Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into specialDiggers
Browse files Browse the repository at this point in the history
  • Loading branch information
PieterVdc committed Oct 28, 2024
2 parents b3e0d0c + e15d43d commit f382c9a
Show file tree
Hide file tree
Showing 84 changed files with 360 additions and 21,308 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,9 @@ docs/latex
*.Tpo
res/keeperfx_icon.ico
.header_checksum
/deps/enet
/deps/zlib
/deps/spng
/deps/astronomy
/deps/centijson
/deps/*.tar.gz
13 changes: 0 additions & 13 deletions .gitmodules

This file was deleted.

135 changes: 62 additions & 73 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -64,17 +64,9 @@ HVLOGBIN = bin/keeperfx_hvlog$(EXEEXT)
# Names of intermediate build products
GENSRC = obj/ver_defs.h
RES = obj/keeperfx_stdres.res
LIBS = obj/enet.a

DEPS = \
obj/spng.o \
obj/json/json.o \
obj/json/value.o \
obj/json/json-dom.o \
obj/centitoml/toml_api.o \
obj/astronomy.o \
obj/unzip.o \
obj/ioapi.o
obj/centitoml/toml_api.o

# functional test debugging flags/objs
FTEST_DEBUG ?= 0
Expand Down Expand Up @@ -352,10 +344,23 @@ CU_OBJS = \
obj/cu/Util.o

# include and library directories
LINKLIB = -L"sdl/lib" -mwindows obj/enet.a \
-lwinmm -lmingw32 -limagehlp -lSDL2main -lSDL2 -lSDL2_mixer -lSDL2_net -lSDL2_image \
-L"deps/zlib" -lz -lws2_32 -ldbghelp
INCS = -I"sdl/include" -I"sdl/include/SDL2" -I"deps/enet/include" -I"deps/centijson/src" -I"deps/centitoml" -I"deps/astronomy"
LINKLIB = -mwindows \
-L"sdl/lib" -lSDL2 -lSDL2_mixer -lSDL2_net -lSDL2_image \
-L"deps/astronomy" -lastronomy \
-L"deps/enet" -lenet \
-L"deps/spng" -lspng \
-L"deps/centijson" -ljson \
-L"deps/zlib" -lminizip -lz \
-lwinmm -lmingw32 -limagehlp -lws2_32 -ldbghelp
INCS = \
-I"deps/zlib/include" \
-I"deps/spng/include" \
-I"sdl/include" \
-I"sdl/include/SDL2" \
-I"deps/enet/include" \
-I"deps/centijson/include" \
-I"deps/centitoml" \
-I"deps/astronomy/include"
CXXINCS = $(INCS)

STDOBJS = $(subst obj/,obj/std/,$(OBJS))
Expand Down Expand Up @@ -458,15 +463,12 @@ FOLDERS = bin obj/std obj/hvlog \
obj/std/ftests \
obj/std/ftests/tests \
obj/tests obj/cu \
obj/std/json obj/hvlog/json \
obj/std/centitoml obj/hvlog/centitoml \
obj/enet \
sdl/for_final_package

$(shell $(MKDIR) $(FOLDERS))

# We need this file because we need git update
build-before: libexterns deps/zlib/configure.log
build-before: libexterns

std-before: build-before
hvlog-before: build-before
Expand All @@ -492,73 +494,38 @@ clean-build:
-$(RM) $(HVLOGBIN) $(HVLOGBIN:%.exe=%.map)
-$(RM) $(HVLOGBIN) $(HVLOGBIN:%.exe=%.pdb)
-$(RM) bin/keeperfx.dll
-$(RM) $(LIBS) $(GENSRC)
-$(RM) $(GENSRC)
-$(RM) res/*.ico
-$(RM) obj/keeperfx.*

$(BIN): $(GENSRC) $(STDOBJS) $(STD_MAIN_OBJ) $(LIBS) std-before
$(BIN): $(GENSRC) $(STDOBJS) $(STD_MAIN_OBJ) std-before
-$(ECHO) 'Building target: $@'
$(CPP) -o "$@" $(STDOBJS) $(STD_MAIN_OBJ) $(LDFLAGS)
ifdef CV2PDB
$(CV2PDB) -C "$@"
endif
-$(ECHO) ' '

$(HVLOGBIN): $(GENSRC) $(HVLOGOBJS) $(HVLOG_MAIN_OBJ) $(LIBS) hvlog-before
$(HVLOGBIN): $(GENSRC) $(HVLOGOBJS) $(HVLOG_MAIN_OBJ) hvlog-before
-$(ECHO) 'Building target: $@'
$(CPP) -o "$@" $(HVLOGOBJS) $(HVLOG_MAIN_OBJ) $(LDFLAGS)
ifdef CV2PDB
$(CV2PDB) -C "$@"
endif
-$(ECHO) ' '

$(TEST_BIN): $(GENSRC) $(STDOBJS) $(TESTS_OBJ) $(LIBS) $(CU_OBJS) std-before
$(TEST_BIN): $(GENSRC) $(STDOBJS) $(TESTS_OBJ) $(CU_OBJS) std-before
-$(ECHO) 'Building target: $@'
$(CPP) -o "$@" $(TESTS_OBJ) $(STDOBJS) $(CU_OBJS) $(LDFLAGS)
ifdef CV2PDB
$(CV2PDB) -C "$@"
endif

obj/std/spng.o obj/hvlog/spng.o: deps/libspng/spng/spng.c deps/zlib/libz.a
-$(ECHO) 'Building file: $<'
$(CC) $(CFLAGS) -I"deps/zlib" -I"deps/libspng/spng" -o"$@" "$<"
-$(ECHO) ' '

obj/std/json/%.o obj/hvlog/json/%.o: deps/centijson/src/%.c
-$(ECHO) 'Building file: $<'
$(CC) $(CFLAGS) -o"$@" "$<"
-$(ECHO) ' '

obj/std/centitoml/toml_api.o obj/hvlog/centitoml/toml_api.o: deps/centitoml/toml_api.c build-before
-$(ECHO) 'Building file: $<'
$(CC) $(CFLAGS) -o"$@" "$<"
-$(ECHO) ' '

obj/std/unzip.o obj/hvlog/unzip.o: deps/zlib/contrib/minizip/unzip.c
-$(ECHO) 'Building file: $<'
$(CC) $(CFLAGS) -Wno-shadow -I"deps/zlib" -o"$@" "$<"
-$(ECHO) ' '

obj/std/astronomy.o obj/hvlog/astronomy.o: deps/astronomy/astronomy.c
-$(ECHO) 'Building file: $<'
$(CC) $(CFLAGS) -o"$@" "$<"
-$(ECHO) ' '

obj/std/ioapi.o obj/hvlog/ioapi.o: deps/zlib/contrib/minizip/ioapi.c
-$(ECHO) 'Building file: $<'
$(CC) $(CFLAGS) -I"deps/zlib" -o"$@" "$<"
-$(ECHO) ' '

obj/std/lvl_filesdk1.o obj/hvlog/lvl_filesdk1.o: src/lvl_filesdk1.c deps/zlib/contrib/minizip/unzip.c $(GENSRC)
-$(ECHO) 'Building file: $<'
$(CC) $(CFLAGS) -I"deps/zlib" -I"deps/zlib/contrib/minizip" -o"$@" "$<"
-$(ECHO) ' '

obj/std/custom_sprites.o obj/hvlog/custom_sprites.o: src/custom_sprites.c deps/zlib/contrib/minizip/unzip.c $(GENSRC)
-$(ECHO) 'Building file: $<'
$(CC) $(CFLAGS) -I"deps/libspng/spng" -I"deps/zlib" -I"deps/zlib/contrib/minizip" -o"$@" "$<"
-$(ECHO) ' '

obj/tests/%.o: tests/%.cpp $(GENSRC)
-$(ECHO) 'Building file: $<'
$(CPP) $(CXXFLAGS) -I"src/" $(CU_INC) -o"$@" "$<"
Expand Down Expand Up @@ -591,9 +558,9 @@ obj/std/%.res obj/hvlog/%.res: res/%.rc res/keeperfx_icon.ico $(GENSRC)
-$(ECHO) ' '

# Creation of Windows icon files from PNG files
res/%.ico: res/%016-08bpp.png res/%032-08bpp.png res/%048-08bpp.png res/%064-08bpp.png res/%128-08bpp.png $(PNGTOICO)
res/%.ico: res/%016-08bpp.png res/%032-08bpp.png res/%048-08bpp.png res/%064-08bpp.png res/%128-08bpp.png res/%128-24bpp.png res/%256-24bpp.png res/%512-24bpp.png $(PNGTOICO)
-$(ECHO) 'Building icon: $@'
$(PNGTOICO) "$@" --colors 256 $(word 5,$^) $(word 4,$^) $(word 3,$^) --colors 16 $(word 2,$^) $(word 1,$^)
$(PNGTOICO) "$@" $(word 8,$^) $(word 7,$^) $(word 6,$^) --colors 256 $(word 5,$^) $(word 4,$^) $(word 3,$^) --colors 16 $(word 2,$^) $(word 1,$^)
-$(ECHO) ' '

obj/ver_defs.h: version.mk Makefile
Expand All @@ -613,26 +580,48 @@ libexterns: libexterns.mk

clean-libexterns: libexterns.mk
-$(MAKE) -f libexterns.mk clean-libexterns
-$(MAKE) -f enet.mk clean
-cd deps/zlib && $(MAKE) -f win32/Makefile.gcc clean
-cd deps/zlib && git checkout Makefile zconf.h
-$(RM) -rf deps/enet deps/zlib deps/spng deps/astronomy deps/centijson
-$(RM) libexterns

deps/centijson/src/json.c deps/centijson/src/value.c deps/centijson/src/json-dom.c: build-before
deps/libspng/spng/spng.c: build-before
deps/zlib/contrib/minizip/unzip.c deps/zlib/contrib/minizip/ioapi.c: build-before
deps/astronomy/astronomy.c: build-before
deps/enet deps/zlib deps/spng deps/astronomy deps/centijson:
$(MKDIR) $@

src/api.c: deps/centijson/include/json.h
src/bflib_enet.cpp: deps/enet/include/enet/enet.h
src/custom_sprites.c: deps/zlib/include/zlib.h deps/spng/include/spng.h deps/centijson/include/json.h
src/moonphase.c: deps/astronomy/include/astronomy.h
deps/centitoml/toml_api.c: deps/centijson/include/json.h
deps/centitoml/toml_conv.c: deps/centijson/include/json.h

deps/enet-mingw32.tar.gz:
curl -Lso $@ "https://github.com/dkfans/kfx-deps/releases/download/initial/enet-mingw32.tar.gz"

deps/enet/include/enet/enet.h: deps/enet-mingw32.tar.gz | deps/enet
tar xzmf $< -C deps/enet

deps/zlib-mingw32.tar.gz:
curl -Lso $@ "https://github.com/dkfans/kfx-deps/releases/download/initial/zlib-mingw32.tar.gz"

deps/zlib/include/zlib.h: deps/zlib-mingw32.tar.gz | deps/zlib
tar xzmf $< -C deps/zlib

deps/spng-mingw32.tar.gz:
curl -Lso $@ "https://github.com/dkfans/kfx-deps/releases/download/initial/spng-mingw32.tar.gz"

deps/spng/include/spng.h: deps/spng-mingw32.tar.gz | deps/spng
tar xzmf $< -C deps/spng

deps/astronomy-mingw32.tar.gz:
curl -Lso $@ "https://github.com/dkfans/kfx-deps/releases/download/initial/astronomy-mingw32.tar.gz"

deps/zlib/configure.log:
git submodule sync && git submodule update --init
touch deps/zlib/configure.log
cd deps/zlib && ./configure --static
deps/astronomy/include/astronomy.h: deps/astronomy-mingw32.tar.gz | deps/astronomy
tar xzmf $< -C deps/astronomy

deps/zlib/libz.a: deps/zlib/configure.log
cd deps/zlib && $(MAKE) -f win32/Makefile.gcc PREFIX=$(CROSS_COMPILE) libz.a
deps/centijson-mingw32.tar.gz:
curl -Lso $@ "https://github.com/dkfans/kfx-deps/releases/download/initial/centijson-mingw32.tar.gz"

obj/enet.a:
$(MAKE) -f enet.mk PREFIX=$(CROSS_COMPILE) WARNFLAGS=$(WARNFLAGS) obj/enet.a
deps/centijson/include/json.h: deps/centijson-mingw32.tar.gz | deps/centijson
tar xzmf $< -C deps/centijson

include tool_png2ico.mk
include tool_pngpal2raw.mk
Expand Down
3 changes: 3 additions & 0 deletions campgns/ancntkpr/map00019.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ REM ********************************************
COMPUTER_PLAYER(PLAYER1,0)
COMPUTER_PLAYER(PLAYER2,0)

SET_COMPUTER_PROCESS(PLAYER1,"DIG TO CLOSE GOLD",0,30999,144000,1,1)
SET_COMPUTER_PROCESS(PLAYER2,"DIG TO CLOSE GOLD",0,30999,144000,1,1)

DISPLAY_OBJECTIVE(105,PLAYER0)
DISPLAY_INFORMATION(107,PLAYER0)

Expand Down
1 change: 0 additions & 1 deletion campgns/dzjr06lv_crtr/archer.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,4 @@ PowersLevelRequired = 1 0 0 4 0 0 0 0 9 0
ExperienceForHitting = 26

[jobs]
PrimaryJobs = MANUFACTURE
SecondaryJobs =
54 changes: 2 additions & 52 deletions campgns/dzjr06lv_crtr/avatar.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,13 @@
[attributes]
Name = AVATAR
Health = 2000
HealRequirement = 150
HealThreshold = 200
Strength = 140
Armour = 120
Dexterity = 180
FearWounded = 0
FearStronger = 10000
FearsomeFactor = 100
Defence = 120
Luck = 20
Recovery = 5
HungerRate = 10000
HungerFill = 4
LairSize = 1
HurtByLava = 2
BaseSpeed = 32
GoldHold = 1000
Pay = 2500
SlapsToKill = 60
DamageToBoulder = 20
Properties = BLEEDS HUMANOID_SKELETON ONE_OF_KIND

Expand All @@ -32,53 +20,15 @@ EntranceRoom = NULL BARRACKS NULL
RoomSlabsRequired = 0 25 0

[annoyance]
EatFood = -1000
WillNotDoJob = 450
InHand = 0
NoLair = 4
NoHatchery = 4
WokenUp = 2000
StandingOnDeadEnemy = -50
Sulking = 10
NoSalary = 4000
Slapped = 2250
StandingOnDeadFriend = 120
InTorture = 120
InTemple = -75
Sleeping = -1
GotWage = -750
WinBattle = -1000
Untrained = 0 0
OthersLeaving = 10
JobStress = 0
GoingPostal = 0
Queue = 24
LairEnemy = NULL
AnnoyLevel = 4000
AngerJobs = KILL_CREATURES

[senses]
Hearing = 10
EyeHeight = 512
FieldOfView = 1024
EyeEffect = NULL
MaxAngleChange = 25

[appearance]
WalkingAnimSpeed = 56
VisualRange = 18

[experience]
Powers = SWING_WEAPON_SWORD NULL HEAL NULL REBOUND NULL SWING_WEAPON_FIST DRAIN NULL WORD_OF_POWER
PowersLevelRequired = 1 0 3 0 5 0 7 8 0 10
LevelsTrainValues = 3000 7500 15000 25000 35000 45000 55000 60000 65000
GrowUp = 0 NULL 0
ExperienceForHitting = 0

[jobs]
PrimaryJobs =
SecondaryJobs =
NotDoJobs =
StressfulJobs =
PrimaryJobs =
NotDoJobs =
TrainingValue = 5
TrainingCost = 100
Loading

0 comments on commit f382c9a

Please sign in to comment.