Prepare master for merge
@ -1,42 +0,0 @@
|
||||
################################################################################
|
||||
# Automatically-generated file. Do not edit!
|
||||
################################################################################
|
||||
|
||||
-include ../makefile.init
|
||||
|
||||
RM := rm -rf
|
||||
|
||||
# All of the sources participating in the build are defined here
|
||||
-include sources.mk
|
||||
-include subdir.mk
|
||||
-include objects.mk
|
||||
|
||||
ifneq ($(MAKECMDGOALS),clean)
|
||||
ifneq ($(strip $(C_DEPS)),)
|
||||
-include $(C_DEPS)
|
||||
endif
|
||||
endif
|
||||
|
||||
-include ../makefile.defs
|
||||
|
||||
# Add inputs and outputs from these tool invocations to the build variables
|
||||
|
||||
# All Target
|
||||
all: ArenaWarSurvival
|
||||
|
||||
# Tool invocations
|
||||
ArenaWarSurvival: $(OBJS) $(USER_OBJS)
|
||||
@echo 'Building target: $@'
|
||||
@echo 'Invoking: GCC C Linker'
|
||||
gcc -o "ArenaWarSurvival" $(OBJS) $(USER_OBJS) $(LIBS)
|
||||
@echo 'Finished building target: $@'
|
||||
@echo ' '
|
||||
|
||||
# Other Targets
|
||||
clean:
|
||||
-$(RM) $(EXECUTABLES)$(OBJS)$(C_DEPS) ArenaWarSurvival
|
||||
-@echo ' '
|
||||
|
||||
.PHONY: all clean dependents
|
||||
|
||||
-include ../makefile.targets
|
@ -1,8 +0,0 @@
|
||||
################################################################################
|
||||
# Automatically-generated file. Do not edit!
|
||||
################################################################################
|
||||
|
||||
USER_OBJS :=
|
||||
|
||||
LIBS := -lSDL2 -lSDL2_image -lSDL2main
|
||||
|
@ -1,17 +0,0 @@
|
||||
################################################################################
|
||||
# Automatically-generated file. Do not edit!
|
||||
################################################################################
|
||||
|
||||
OBJ_SRCS :=
|
||||
ASM_SRCS :=
|
||||
C_SRCS :=
|
||||
O_SRCS :=
|
||||
S_UPPER_SRCS :=
|
||||
EXECUTABLES :=
|
||||
OBJS :=
|
||||
C_DEPS :=
|
||||
|
||||
# Every subdirectory with source files must be described here
|
||||
SUBDIRS := \
|
||||
. \
|
||||
|
@ -1,36 +0,0 @@
|
||||
################################################################################
|
||||
# Automatically-generated file. Do not edit!
|
||||
################################################################################
|
||||
|
||||
# Add inputs and outputs from these tool invocations to the build variables
|
||||
C_SRCS += \
|
||||
../IAEngine.c \
|
||||
../arenaEngine.c \
|
||||
../fileHandler.c \
|
||||
../main.c \
|
||||
../playerInterface.c
|
||||
|
||||
OBJS += \
|
||||
./IAEngine.o \
|
||||
./arenaEngine.o \
|
||||
./fileHandler.o \
|
||||
./main.o \
|
||||
./playerInterface.o
|
||||
|
||||
C_DEPS += \
|
||||
./IAEngine.d \
|
||||
./arenaEngine.d \
|
||||
./fileHandler.d \
|
||||
./main.d \
|
||||
./playerInterface.d
|
||||
|
||||
|
||||
# Each subdirectory must supply rules for building sources it contributes
|
||||
%.o: ../%.c
|
||||
@echo 'Building file: $<'
|
||||
@echo 'Invoking: GCC C Compiler'
|
||||
gcc -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -o "$@" "$<"
|
||||
@echo 'Finished building: $<'
|
||||
@echo ' '
|
||||
|
||||
|
0
Adventurer/adventurer1_32x32.png → data/Adventurer/adventurer1_32x32.png
Executable file → Normal file
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
0
Adventurer/adventurer_back_32x32.png → data/Adventurer/adventurer_back_32x32.png
Executable file → Normal file
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
0
Adventurer/adventurer_left_32x32.png → data/Adventurer/adventurer_left_32x32.png
Executable file → Normal file
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
0
Adventurer/adventurer_right_32x32.png → data/Adventurer/adventurer_right_32x32.png
Executable file → Normal file
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
0
Adventurer1/adventurer1_32x32.png → data/Adventurer1/adventurer1_32x32.png
Executable file → Normal file
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
0
Adventurer1/adventurer_back_32x32.png → data/Adventurer1/adventurer_back_32x32.png
Executable file → Normal file
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
0
Adventurer1/adventurer_left_32x32.png → data/Adventurer1/adventurer_left_32x32.png
Executable file → Normal file
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
0
Adventurer1/adventurer_resize.png → data/Adventurer1/adventurer_resize.png
Executable file → Normal file
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
0
Adventurer1/adventurer_right_32x32.png → data/Adventurer1/adventurer_right_32x32.png
Executable file → Normal file
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
0
Adventurer2/adventurer2_32x32.png → data/Adventurer2/adventurer2_32x32.png
Executable file → Normal file
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
0
Adventurer2/adventurer2_back_32x32.png → data/Adventurer2/adventurer2_back_32x32.png
Executable file → Normal file
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
0
Adventurer2/adventurer2_left_32x32.png → data/Adventurer2/adventurer2_left_32x32.png
Executable file → Normal file
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
0
Adventurer2/adventurer2_right_32x32.png → data/Adventurer2/adventurer2_right_32x32.png
Executable file → Normal file
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
0
IA1/adventurer2_32x32.png → data/IA1/adventurer2_32x32.png
Executable file → Normal file
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
0
IA1/adventurer2_back_32x32.png → data/IA1/adventurer2_back_32x32.png
Executable file → Normal file
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
0
IA1/adventurer2_left_32x32.png → data/IA1/adventurer2_left_32x32.png
Executable file → Normal file
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
0
IA1/adventurer2_right_32x32.png → data/IA1/adventurer2_right_32x32.png
Executable file → Normal file
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
0
Landscape/dirt_brown.png → data/Landscape/dirt_brown.png
Executable file → Normal file
Before Width: | Height: | Size: 246 B After Width: | Height: | Size: 246 B |
0
Landscape/grass_green_32x32.png → data/Landscape/grass_green_32x32.png
Executable file → Normal file
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
0
Landscape/river_green_32x32.png → data/Landscape/river_green_32x32.png
Executable file → Normal file
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
0
Landscape/stone_green_32x32.png → data/Landscape/stone_green_32x32.png
Executable file → Normal file
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
0
Landscape/stone_resize.png → data/Landscape/stone_resize.png
Executable file → Normal file
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
0
Landscape/tree_green_32x32.png → data/Landscape/tree_green_32x32.png
Executable file → Normal file
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
0
Landscape/tree_resize.png → data/Landscape/tree_resize.png
Executable file → Normal file
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
BIN
data/icon_ia.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
data/sprite_ia_0.png
Normal file
After Width: | Height: | Size: 3.2 KiB |
BIN
data/sprite_ia_1.png
Normal file
After Width: | Height: | Size: 2.9 KiB |
BIN
data/sprite_ia_2.png
Normal file
After Width: | Height: | Size: 2.9 KiB |
BIN
data/sprite_ia_3.png
Normal file
After Width: | Height: | Size: 2.9 KiB |
BIN
data/sprite_player_0.png
Normal file
After Width: | Height: | Size: 3.2 KiB |
BIN
data/sprite_player_1.png
Normal file
After Width: | Height: | Size: 3.3 KiB |
BIN
data/sprite_player_2.png
Normal file
After Width: | Height: | Size: 2.8 KiB |
BIN
data/sprite_player_3.png
Normal file
After Width: | Height: | Size: 2.8 KiB |
BIN
data/tile_gold.png
Normal file
After Width: | Height: | Size: 3.1 KiB |
BIN
data/tile_grass.png
Normal file
After Width: | Height: | Size: 2.6 KiB |
BIN
data/tile_rock.png
Normal file
After Width: | Height: | Size: 2.9 KiB |
BIN
data/tile_spawn.png
Normal file
After Width: | Height: | Size: 2.8 KiB |
BIN
data/tile_tree.png
Normal file
After Width: | Height: | Size: 2.9 KiB |
BIN
data/tile_water.png
Normal file
After Width: | Height: | Size: 2.9 KiB |
16
launch.sh
Normal file
@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
|
||||
DATA_DIR='data'
|
||||
LOGS_DIR='logs'
|
||||
|
||||
if [ ! -d "$DATA_DIR" ]; then
|
||||
echo "WARNING ! Missing DATA dir, can't launch program."
|
||||
echo "Exit..."
|
||||
fi
|
||||
|
||||
if [ ! -d "$LOGS_DIR" ]; then
|
||||
mkdir logs
|
||||
fi
|
||||
|
||||
chmod +x ArenaSurvivalTournament
|
||||
./ArenaSurvivalTournament
|
82
makefile
Normal file
@ -0,0 +1,82 @@
|
||||
BUILD_DIR := build
|
||||
RM := rm -rf $(BUILD_DIR)
|
||||
|
||||
OBJ_SRCS :=
|
||||
ASM_SRCS :=
|
||||
C_SRCS :=
|
||||
O_SRCS :=
|
||||
S_UPPER_SRCS :=
|
||||
EXECUTABLES :=
|
||||
OBJS :=
|
||||
C_DEPS :=
|
||||
|
||||
# Every subdirectory with source files must be described here
|
||||
SUBDIRS := \
|
||||
. \
|
||||
|
||||
C_SRCS += \
|
||||
src/IAEngine.c \
|
||||
src/arenaEngine.c \
|
||||
src/arenaGUI.c \
|
||||
src/fileHandler.c \
|
||||
src/logHelper.c \
|
||||
src/main.c \
|
||||
src/menuGUI.c \
|
||||
src/playerInterface.c
|
||||
|
||||
OBJS += \
|
||||
build/IAEngine.o \
|
||||
build/arenaEngine.o \
|
||||
build/arenaGUI.o \
|
||||
build/fileHandler.o \
|
||||
build/logHelper.o \
|
||||
build/main.o \
|
||||
build/menuGUI.o \
|
||||
build/playerInterface.o
|
||||
|
||||
C_DEPS += \
|
||||
build/IAEngine.d \
|
||||
build/arenaEngine.d \
|
||||
build/arenaGUI.d \
|
||||
build/fileHandler.d \
|
||||
build/logHelper.d \
|
||||
build/main.d \
|
||||
build/menuGUI.d \
|
||||
build/playerInterface.d
|
||||
|
||||
|
||||
build/%.o: src/%.c
|
||||
@echo 'Building file: $<'
|
||||
@echo 'Invoking: GCC C Compiler'
|
||||
gcc -O3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -o "$@" "$<"
|
||||
@echo 'Finished building: $<'
|
||||
@echo ' '
|
||||
|
||||
LIBS := -lSDL2 -lSDL2main -lSDL2_image
|
||||
|
||||
ifneq ($(MAKECMDGOALS),clean)
|
||||
ifneq ($(strip $(C_DEPS)),)
|
||||
-include $(C_DEPS)
|
||||
endif
|
||||
endif
|
||||
|
||||
.PHONY: all buildDir clean dependents
|
||||
|
||||
# All Target
|
||||
all: buildDir ArenaSurvivalTournament
|
||||
|
||||
buildDir:
|
||||
[ -d $(BUILD_DIR) ] || mkdir -p $(BUILD_DIR)
|
||||
|
||||
# Tool invocations
|
||||
ArenaSurvivalTournament: $(OBJS)
|
||||
@echo 'Building target: $@'
|
||||
@echo 'Invoking: GCC C Linker'
|
||||
gcc -o "ArenaSurvivalTournament" $(OBJS) $(LIBS)
|
||||
@echo 'Finished building target: $@'
|
||||
@echo ' '
|
||||
|
||||
# Other Targets
|
||||
clean:
|
||||
-$(RM) $(EXECUTABLES)$(OBJS)$(C_DEPS) ArenaSurvivalTournament
|
||||
-@echo ' '
|
2492
src/ArenaSurvivalTournament.doxyfile
Normal file
24
src/main.h
Normal file
@ -0,0 +1,24 @@
|
||||
#ifndef MAIN_H_
|
||||
#define MAIN_H_
|
||||
|
||||
#define A_WIDTH 30
|
||||
#define A_HEIGHT 30
|
||||
|
||||
#define TILE_SIZE 32
|
||||
#define WINDOWS_WIDTH TILE_SIZE * A_WIDTH
|
||||
#define WINDOWS_HEIGHT TILE_SIZE * A_HEIGHT
|
||||
|
||||
/*
|
||||
* Generator tiles spawn rate (in percent)
|
||||
*/
|
||||
#define ROCK_GEN_RATE 30
|
||||
#define TREE_GEN_RATE 25
|
||||
#define WATER_GEN_RATE 8
|
||||
#define GOLD_GEN_RATE 10
|
||||
|
||||
enum {DOWN, UP, LEFT, RIGHT};
|
||||
enum {GRASS, ROCK, TREE, WATER, GOLD, SPAWN};
|
||||
|
||||
int random_lim(int max);
|
||||
|
||||
#endif
|