Skip to content

Commit

Permalink
engine, start window, network game setup parity with JFDuke3D
Browse files Browse the repository at this point in the history
  • Loading branch information
jonof committed Nov 21, 2018
1 parent 8fc2d54 commit 6137b48
Show file tree
Hide file tree
Showing 81 changed files with 16,640 additions and 10,165 deletions.
174 changes: 87 additions & 87 deletions GNU.TXT → GPL.TXT

Large diffs are not rendered by default.

50 changes: 28 additions & 22 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ POLYMOST ?= 1
USE_OPENGL ?= 1
DYNAMIC_OPENGL ?= 1
NOASM ?= 0
LINKED_GTK ?= 0


##
Expand All @@ -61,10 +60,12 @@ endif

include $(AUDIOLIBROOT)/Makefile.shared

CC=gcc
CXX=g++
CC?=gcc
CXX?=g++
NASM?=nasm
RC?=windres
OURCFLAGS=$(debug) -W -Wall -Wimplicit -Wno-unused \
-fno-pic -fno-strict-aliasing -DNO_GCC_BUILTINS \
-fno-strict-aliasing -DNO_GCC_BUILTINS \
-I$(INC) -I$(EINC) -I$(MACTROOT) -I$(AUDIOLIBROOT)/include
OURCXXFLAGS=-fno-exceptions -fno-rtti
LIBS=-lm
Expand Down Expand Up @@ -102,6 +103,7 @@ GAMEOBJS= \
$(SRC)/game.$o \
$(SRC)/girlninj.$o \
$(SRC)/goro.$o \
$(SRC)/grpscan.$o \
$(SRC)/hornet.$o \
$(SRC)/interp.$o \
$(SRC)/interpsh.$o \
Expand Down Expand Up @@ -167,7 +169,7 @@ endif
ifeq ($(PLATFORM),WINDOWS)
OURCFLAGS+= -I$(DXROOT)/include
NASMFLAGS+= -f win32 --prefix _
GAMEOBJS+= $(SRC)/gameres.$o $(SRC)/grpscan.$o $(SRC)/startwin.game.$o
GAMEOBJS+= $(SRC)/gameres.$o $(SRC)/startwin_game.$o
EDITOROBJS+= $(SRC)/buildres.$o
GAMELIBS+= -ldsound \
$(AUDIOLIBROOT)/third-party/mingw32/lib/libvorbisfile.a \
Expand All @@ -176,14 +178,18 @@ ifeq ($(PLATFORM),WINDOWS)
endif

ifeq ($(RENDERTYPE),SDL)
ifeq (1,$(HAVE_GTK2))
OURCFLAGS+= -DHAVE_GTK2 $(shell pkg-config --cflags gtk+-2.0)
GAMEOBJS+= $(SRC)/game_banner.$o $(SRC)/grpscan.$o $(SRC)/startgtk.game.$o
EDITOROBJS+= $(SRC)/editor_banner.$o
OURCFLAGS+= $(SDLCONFIG_CFLAGS)
LIBS+= $(SDLCONFIG_LIBS)

ifeq (1,$(HAVE_GTK))
OURCFLAGS+= $(GTKCONFIG_CFLAGS)
LIBS+= $(GTKCONFIG_LIBS)
GAMEOBJS+= $(SRC)/startgtk_game.$o $(RSRC)/startgtk_game_gresource.$o
EDITOROBJS+= $(RSRC)/startgtk_build_gresource.$o
endif

GAMEOBJS+= $(SRC)/game_icon.$o
EDITOROBJS+= $(SRC)/build_icon.$o
GAMEOBJS+= $(RSRC)/sdlappicon_game.$o
EDITOROBJS+= $(RSRC)/sdlappicon_build.$o
endif

OURCFLAGS+= $(BUILDCFLAGS)
Expand Down Expand Up @@ -224,6 +230,8 @@ enginelib editorlib:
SUPERBUILD=$(SUPERBUILD) POLYMOST=$(POLYMOST) \
USE_OPENGL=$(USE_OPENGL) DYNAMIC_OPENGL=$(DYNAMIC_OPENGL) \
NOASM=$(NOASM) RELEASE=$(RELEASE) $@
$(EROOT)/generatesdlappicon$(EXESUFFIX):
$(MAKE) -C $(EROOT) generatesdlappicon$(EXESUFFIX)

$(ELIB)/$(ENGINELIB): enginelib
$(ELIB)/$(EDITORLIB): editorlib
Expand All @@ -241,23 +249,21 @@ $(SRC)/%.$o: $(SRC)/%.cpp
$(MACTROOT)/%.$o: $(MACTROOT)/%.c
$(CC) $(CFLAGS) $(OURCFLAGS) -c $< -o $@

$(SRC)/%.$o: $(SRC)/misc/%.rc
windres -i $< -o $@ --include-dir=$(EINC) --include-dir=$(SRC)
$(SRC)/%.$o: $(SRC)/%.rc
$(RC) -i $< -o $@ --include-dir=$(EINC) --include-dir=$(SRC)

$(SRC)/%.$o: $(SRC)/util/%.c
$(CC) $(CFLAGS) $(OURCFLAGS) -c $< -o $@

$(SRC)/%.$o: $(RSRC)/%.c
$(RSRC)/%.$o: $(RSRC)/%.c
$(CC) $(CFLAGS) $(OURCFLAGS) -c $< -o $@

$(SRC)/game_banner.$o: $(RSRC)/game_banner.c
$(SRC)/editor_banner.$o: $(RSRC)/editor_banner.c
$(RSRC)/game_banner.c: $(RSRC)/game.bmp
echo "#include <gdk-pixbuf/gdk-pixdata.h>" > $@
gdk-pixbuf-csource --extern --struct --rle --name=startbanner_pixdata $^ | sed '/pixel_data:/ a (guint8*)' >> $@
$(RSRC)/editor_banner.c: $(RSRC)/build.bmp
echo "#include <gdk-pixbuf/gdk-pixdata.h>" > $@
gdk-pixbuf-csource --extern --struct --rle --name=startbanner_pixdata $^ | sed '/pixel_data:/ a (guint8*)' >> $@
$(RSRC)/%_gresource.c: $(RSRC)/%.gresource.xml
glib-compile-resources --generate --manual-register --c-name=startgtk --target=$@ --sourcedir=$(RSRC) $<
$(RSRC)/%_gresource.h: $(RSRC)/%.gresource.xml
glib-compile-resources --generate --manual-register --c-name=startgtk --target=$@ --sourcedir=$(RSRC) $<
$(RSRC)/sdlappicon_%.c: $(RSRC)/%.png $(EROOT)/generatesdlappicon$(EXESUFFIX)
$(EROOT)/generatesdlappicon$(EXESUFFIX) $< > $@

# PHONIES
clean:
Expand Down
23 changes: 15 additions & 8 deletions Makefile.deps
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ $(SRC)/copysect.$o: $(SRC)/copysect.c $(build_h) $(names2_h) $(game_h) $(tags_h)
$(SRC)/demo.$o: $(SRC)/demo.c $(build_h) $(INC)/keys.h $(names2_h) $(panel_h) $(game_h) $(INC)/net.h $(INC)/mytypes.h $(MACTROOT)/control.h $(INC)/function.h $(INC)/demo.h $(INC)/player.h $(INC)/menus.h
$(SRC)/draw.$o: $(SRC)/draw.c $(build_h) $(INC)/keys.h $(names2_h) $(panel_h) $(game_h) $(INC)/quake.h $(INC)/vis.h $(INC)/jsector.h $(INC)/reserve.h $(INC)/mytypes.h $(MACTROOT)/control.h $(INC)/function.h $(INC)/net.h $(INC)/pal.h $(INC)/player.h $(INC)/jtags.h $(INC)/parent.h $(INC)/cache.h $(INC)/text.h $(INC)/menus.h $(INC)/interp.h $(INC)/sector.h
$(SRC)/eel.$o: $(SRC)/eel.c $(build_h) $(INC)/keys.h $(names2_h) $(game_h) $(tags_h) $(INC)/ai.h $(INC)/actor.h $(INC)/weapon.h $(INC)/track.h $(INC)/saveable.h
$(SRC)/game.$o: $(SRC)/game.c $(build_h) $(INC)/keys.h $(names2_h) $(panel_h) $(game_h) $(tags_h) $(INC)/sector.h $(INC)/sprite.h $(INC)/weapon.h $(INC)/player.h $(INC)/lists.h $(INC)/net.h $(INC)/pal.h $(AUDIOLIBROOT)/include/fx_man.h $(INC)/mytypes.h $(INC)/menus.h $(MACTROOT)/control.h $(INC)/function.h $(INC)/demo.h $(INC)/cache.h $(INC)/anim.h $(INC)/colormap.h $(INC)/break.h $(INC)/ninja.h $(INC)/light.h $(INC)/track.h $(INC)/jsector.h $(MACTROOT)/keyboard.h $(INC)/text.h $(AUDIOLIBROOT)/include/music.h $(INC)/saveable.h
$(SRC)/game.$o: $(SRC)/game.c $(build_h) $(INC)/keys.h $(names2_h) $(panel_h) $(game_h) $(tags_h) $(INC)/sector.h $(INC)/sprite.h $(INC)/weapon.h $(INC)/player.h $(INC)/lists.h $(INC)/net.h $(INC)/pal.h $(AUDIOLIBROOT)/include/fx_man.h $(INC)/mytypes.h $(INC)/menus.h $(MACTROOT)/control.h $(INC)/function.h $(INC)/demo.h $(INC)/cache.h $(INC)/anim.h $(INC)/colormap.h $(INC)/break.h $(INC)/ninja.h $(INC)/light.h $(INC)/track.h $(INC)/jsector.h $(MACTROOT)/keyboard.h $(INC)/text.h $(AUDIOLIBROOT)/include/music.h $(INC)/saveable.h $(INC)/version.h $(INC)/grpscan.h
$(SRC)/girlninj.$o: $(SRC)/girlninj.c $(build_h) $(INC)/keys.h $(names2_h) $(panel_h) $(game_h) $(tags_h) $(INC)/ai.h $(INC)/pal.h $(INC)/player.h $(INC)/net.h $(INC)/actor.h $(INC)/track.h $(INC)/sprite.h $(INC)/saveable.h
$(SRC)/goro.$o: $(SRC)/goro.c $(build_h) $(INC)/keys.h $(names2_h) $(game_h) $(tags_h) $(INC)/ai.h $(INC)/actor.h $(INC)/track.h $(INC)/saveable.h
$(SRC)/hornet.$o: $(SRC)/hornet.c $(build_h) $(INC)/keys.h $(names2_h) $(game_h) $(tags_h) $(INC)/ai.h $(INC)/actor.h $(INC)/weapon.h $(INC)/track.h $(INC)/sprite.h $(INC)/saveable.h
Expand Down Expand Up @@ -80,14 +80,21 @@ $(SRC)/brooms.$o: $(SRC)/brooms.c $(build_h) $(INC)/keys.h $(names2_h) $(game_h)
$(SRC)/bldscript.$o: $(SRC)/bldscript.c $(build_h) $(names2_h) $(game_h) $(INC)/parse.h $(EINC)/editor.h $(EINC)/cache1d.h
$(SRC)/jbhlp.$o: $(SRC)/jbhlp.c $(build_h) $(INC)/keys.h $(names2_h) $(game_h) $(EINC)/editor.h $(EINC)/cache1d.h

$(SRC)/game_icon.$o: $(RSRC)/game_icon.c
$(SRC)/build_icon.$o: $(RSRC)/build_icon.c

$(SRC)/grpscan.$o: $(SRC)/grpscan.c $(EINC)/compat.h $(EINC)/baselayer.h $(EINC)/scriptfile.h $(EINC)/cache1d.h $(EINC)/crc32.h $(INC)/grpscan.h
$(SRC)/gameres.$o: $(SRC)/misc/gameres.rc $(SRC)/startwin.game.h $(RSRC)/game.bmp $(RSRC)/game_icon.ico
$(SRC)/buildres.$o: $(SRC)/misc/buildres.rc $(RSRC)/build.bmp $(RSRC)/build_icon.ico
$(SRC)/startwin.game.$o: $(SRC)/startwin.game.c $(build_h) $(EINC)/winlayer.h $(INC)/grpscan.h
$(SRC)/startgtk.game.$o: $(SRC)/startgtk.game.c $(build_h) $(EINC)/dynamicgtk.h $(EINC)/baselayer.h $(INC)/grpscan.h
$(SRC)/gameres.$o: $(SRC)/gameres.rc $(INC)/gameres.h $(INC)/version.h $(RSRC)/game.bmp $(RSRC)/game_icon.ico
$(SRC)/buildres.$o: $(SRC)/buildres.rc $(EINC)/buildres.h $(RSRC)/build.bmp $(RSRC)/build_icon.ico
$(SRC)/startwin_game.$o: $(SRC)/startwin_game.c $(EINC)/build.h $(EINC)/winlayer.h $(EINC)/compat.h $(INC)/grpscan.h $(INC)/startwin.h $(INC)/gameres.h
$(SRC)/startgtk_game.$o: $(SRC)/startgtk_game.c $(EINC)/build.h $(EINC)/baselayer.h $(SRC)/grpscan.h $(INC)/startwin.h $(EINC)/compat.h

# Derived source files from art assets
$(RSRC)/startgtk_game_gresource.c: $(RSRC)/startgtk_game.gresource.xml $(RSRC)/game.png $(RSRC)/startgtk_game.glade
$(RSRC)/startgtk_game_gresource.h: $(RSRC)/startgtk_game.gresource.xml
$(RSRC)/startgtk_build_gresource.c: $(RSRC)/startgtk_build.gresource.xml $(RSRC)/build.png $(RSRC)/startgtk_build.glade
$(RSRC)/startgtk_build_gresource.h: $(RSRC)/startgtk_build.gresource.xml
$(RSRC)/sdlappicon_game.c: $(RSRC)/game.png
$(RSRC)/sdlappicon_game.$o: $(RSRC)/sdlappicon_game.c
$(RSRC)/sdlappicon_build.c: $(RSRC)/build.png
$(RSRC)/sdlappicon_build.$o: $(RSRC)/sdlappicon_build.c

# jMACT objects
$(MACTROOT)/util_lib.$o: $(MACTROOT)/util_lib.c $(MACTROOT)/util_lib.h $(MACTROOT)/types.h $(EINC)/compat.h
Expand Down
2 changes: 1 addition & 1 deletion jfaudiolib
2 changes: 1 addition & 1 deletion jfbuild
Submodule jfbuild updated 178 files
2 changes: 1 addition & 1 deletion jfmact
Submodule jfmact updated 1 files
+11 −27 control.c
44 changes: 22 additions & 22 deletions rsrc/manifest.build.xml → rsrc/build-x86.manifest
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity
version="1.0.0.0"
processorArchitecture="X86"
name="JonoF.JFShadowWarrior.Build"
type="win32"
/>
<description>Build Editor for JFShadowWarrior</description>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="X86"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
</assembly>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity
version="1.0.0.0"
processorArchitecture="X86"
name="JonoF.JFShadowWarrior.Build"
type="win32"
/>
<description>Build Editor for JFShadowWarrior</description>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="X86"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
</assembly>
Binary file modified rsrc/build.bmp
Binary file not shown.
22 changes: 22 additions & 0 deletions rsrc/build.manifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity
version="1.0.0.0"
processorArchitecture="amd64"
name="JonoF.JFShadowWarrior.Build"
type="win32"
/>
<description>Build Editor for JFShadowWarrior</description>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="amd64"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
</assembly>
Binary file added rsrc/build.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed rsrc/build.xcf
Binary file not shown.
Loading

0 comments on commit 6137b48

Please sign in to comment.