Prepare master for merge

This commit is contained in:
JackCarterSmith 2018-06-23 11:30:59 +02:00
parent 9d8ba9c878
commit 6213bf7ab1
66 changed files with 2614 additions and 103 deletions

Binary file not shown.

View File

@ -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

View File

@ -1,8 +0,0 @@
################################################################################
# Automatically-generated file. Do not edit!
################################################################################
USER_OBJS :=
LIBS := -lSDL2 -lSDL2_image -lSDL2main

View File

@ -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 := \
. \

View File

@ -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 ' '

View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

Before

Width:  |  Height:  |  Size: 246 B

After

Width:  |  Height:  |  Size: 246 B

View File

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

BIN
data/icon_ia.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
data/sprite_ia_0.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

BIN
data/sprite_ia_1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

BIN
data/sprite_ia_2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

BIN
data/sprite_ia_3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

BIN
data/sprite_player_0.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

BIN
data/sprite_player_1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

BIN
data/sprite_player_2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

BIN
data/sprite_player_3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

BIN
data/tile_gold.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

BIN
data/tile_grass.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

BIN
data/tile_rock.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

BIN
data/tile_spawn.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

BIN
data/tile_tree.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

BIN
data/tile_water.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

16
launch.sh Normal file
View 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
View 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 ' '

File diff suppressed because it is too large Load Diff

View File

24
src/main.h Normal file
View 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