Skip to content

Commit

Permalink
rebranding to doomcraft
Browse files Browse the repository at this point in the history
  • Loading branch information
lkabuci committed Mar 30, 2024
1 parent 0751857 commit d779574
Show file tree
Hide file tree
Showing 25 changed files with 46 additions and 66 deletions.
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Program Binaries
cRay
doomcraft
cub3D
build/
.idea/

# Cmake
cmake-build-debug/
Expand Down Expand Up @@ -57,4 +59,4 @@ modules.order
Module.symvers
Mkfile.old
dkms.conf
.vscode/
.vscode/
8 changes: 0 additions & 8 deletions .idea/.gitignore

This file was deleted.

2 changes: 0 additions & 2 deletions .idea/Mario3D.iml

This file was deleted.

4 changes: 0 additions & 4 deletions .idea/misc.xml

This file was deleted.

8 changes: 0 additions & 8 deletions .idea/modules.xml

This file was deleted.

7 changes: 0 additions & 7 deletions .idea/vcs.xml

This file was deleted.

14 changes: 7 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.25.1)
project(cRay)
project(doomcraft)
set(CMAKE_C_STANDARD 99)

# Set the path to the MLX42 library
Expand Down Expand Up @@ -43,20 +43,20 @@ set(SOURCES
)

# Create the executable target
add_executable(cRay ${SOURCES})
add_executable(doomcraft ${SOURCES})

# Link the executable with the MLX42 library
target_link_libraries(cRay PRIVATE ${MLX_LIB})
target_link_libraries(doomcraft PRIVATE ${MLX_LIB})

# Optionally, link other libraries depending on the OS
if(UNIX AND NOT APPLE)
target_link_libraries(cRay PRIVATE dl glfw pthread m)
target_link_libraries(doomcraft PRIVATE dl glfw pthread m)
else()
target_link_libraries(cRay PRIVATE glfw)
target_link_libraries(doomcraft PRIVATE glfw)
endif()

# Add any additional include directories if needed
target_include_directories(cRay PRIVATE includes MLX42/include/MLX42)
target_include_directories(doomcraft PRIVATE includes MLX42/include/MLX42)

# Set compiler options
target_compile_options(cRay PRIVATE -Wall -Wextra -Werror)
target_compile_options(doomcraft PRIVATE -Wall -Wextra -Werror)
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ BIN_DIR = bin/
OBJS = $(SRCS:%.c=$(BIN_DIR)%.o)
OBJS_DIRS = $(dir $(OBJS))

INCLUDES = includes/libft.h includes/cray.h
INCLUDES = includes/libft.h includes/doomcraft.h

NAME = cRay
NAME = doomcraft

all: $(NAME)

Expand Down
29 changes: 18 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
## About:
**cRay** is a raycasting game engine written in C language that uses [the Digital Differential Analysis](https://en.wikipedia.org/wiki/Digital_differential_analyzer_(graphics_algorithm)) aka the "DDA" algorithm.
**doomcraft** is a raycasting game engine written in C language that uses [the Digital Differential Analysis](https://en.wikipedia.org/wiki/Digital_differential_analyzer_(graphics_algorithm)) aka the "DDA" algorithm.

## Overview:
![Screenshot from 2023-09-12 00-17-14](https://github.com/kaboussi/cRay/assets/95357302/c037377f-db38-49d5-9048-3c1c53a7b504)
![Screenshot from 2023-09-12 00-17-14](https://github.com/kaboussi/cray/assets/95357302/c037377f-db38-49d5-9048-3c1c53a7b504)


## Dependencies:
Expand All @@ -20,25 +20,32 @@ The [MLX42](https://github.com/codam-coding-college/MLX42) is a minimal graphica

## Setup:
```bash
~ git clone https://github.com/https://github.com/kaboussi/cRay
~ cd cRay/MLX42
~ cmake -B build
~ cmake --build build -j4
~ git clone https://github.com/lkabuci/Doomcraft && cd Doomcraft
~ (cd MLX42 && cmake -B build && cmake --build build -j4)
```

## Compile and run:
* Using Cmake
```bash
~ cmake -B cmake-build-debug
~ cd cmake-build-debug
~ make -C cmake-build-debug
~ ./cmake-build-debug/cRay assets/maps/map.cub
~ cmake -B build
~ make -C build
~ ./build/doomcraft assets/maps/map.cub
```

* Using Makfile
```bash
~ make
~ ./cRay assets/maps/map.cub
~ ./doomcraft assets/maps/map.cub
```

* Oneline setup
```bash
git clone https://github.com/lkabuci/Doomcraft &&\
cd Doomcraft && \
(cd MLX42 && cmake -B build && cmake --build build -j4) &&\
cmake -B build &&\
make -C build &&\
./build/doomcraft assets/maps/map.cub
```

### Resources:
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Created by redone on 7/27/23.
//

#include "includes/cray.h"
#include "includes/doomcraft.h"

int main(int argc, const char *argv[])
{
Expand Down
2 changes: 1 addition & 1 deletion srcs/helpers.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "../includes/cray.h"
#include "../includes/doomcraft.h"

void free_array(char **split)
{
Expand Down
2 changes: 1 addition & 1 deletion srcs/hooks.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "../includes/cray.h"
#include "../includes/doomcraft.h"

void move_hook(void *param)
{
Expand Down
2 changes: 1 addition & 1 deletion srcs/inits.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "../includes/cray.h"
#include "../includes/doomcraft.h"

void initialize_all_variables(t_seer *pSeer);

Expand Down
2 changes: 1 addition & 1 deletion srcs/move.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "../includes/cray.h"
#include "../includes/doomcraft.h"

static bool can_move(char block);

Expand Down
2 changes: 1 addition & 1 deletion srcs/parsing/colors.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "../../includes/cray.h"
#include "../../includes/doomcraft.h"

long get_rgb(char *value)
{
Expand Down
2 changes: 1 addition & 1 deletion srcs/parsing/map.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "../../includes/cray.h"
#include "../../includes/doomcraft.h"

void get_map_dimensions(t_map_info *pInfo)
{
Expand Down
2 changes: 1 addition & 1 deletion srcs/parsing/map_validity.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Created by redone on 7/29/23.
//

#include "../../includes/cray.h"
#include "../../includes/doomcraft.h"

/*
* 1 -> only 6 possible characters (0, 1, N, S, E, W) and \0
Expand Down
2 changes: 1 addition & 1 deletion srcs/parsing/parsing.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Created by redone on 7/27/23.
//

#include "../../includes/cray.h"
#include "../../includes/doomcraft.h"

void parse_elements(t_map_info *info);
void fill_elements(mlx_t *mlx, t_map_info *pInfo, char *key,
Expand Down
2 changes: 1 addition & 1 deletion srcs/parsing/utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Created by redone on 7/28/23.
//

#include "../../includes/cray.h"
#include "../../includes/doomcraft.h"

static bool is_all_spaces(const char *line);

Expand Down
2 changes: 1 addition & 1 deletion srcs/raycasting.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "../includes/cray.h"
#include "../includes/doomcraft.h"

void position_direction(t_seer *pSeer, t_camera *pCamera, int xPixel)
{
Expand Down
2 changes: 1 addition & 1 deletion srcs/textures.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "../includes/cray.h"
#include "../includes/doomcraft.h"

// the floor is used to get the value between 0 and 1
void set_texture_params(t_seer *pSeer, int xPixel)
Expand Down
2 changes: 1 addition & 1 deletion srcs/utils.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "../includes/cray.h"
#include "../includes/doomcraft.h"

unsigned int get_image_color(mlx_image_t *image, t_point p)
{
Expand Down
2 changes: 1 addition & 1 deletion srcs/view.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "../includes/cray.h"
#include "../includes/doomcraft.h"

void change_to_left(t_seer *pSeer, double rotSpeed)
{
Expand Down
2 changes: 1 addition & 1 deletion vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name" : "cray",
"name" : "doomcraft",
"version-string" : "1.0.0",
"builtin-baseline" : "ccd2e8b4b9e76ba8883aede0b89225099d805e01",
"dependencies" : [ {
Expand Down

0 comments on commit d779574

Please sign in to comment.