diff --git a/LICENSE b/COPYING similarity index 100% rename from LICENSE rename to COPYING diff --git a/Documentation/LevelEditing.md b/Documentation/LevelEditing.md index 973a37d8..3ba0c94d 100644 --- a/Documentation/LevelEditing.md +++ b/Documentation/LevelEditing.md @@ -19,16 +19,20 @@ make radiant And then run it using the launcher at `./radiant`. +@note NetRadiant-Custom is also available to build with Nuclide integration. Specify `netradiant-custom` as the target. + You will probably want Nuclide's build system to generate a game pack for that installation of **Radiant**. This can be achieved by running: ``` -make radiant-game [GAME=base] +make defs [GAME=base] ``` Where `GAME=base` is used to specify which game to build. That should match the name of your game directory. After that, you will be able to select your game from within **Radiant**. +@note If you plan on using a legacy BSP format using WAD texture archives, the target `defs-wad` can be used instead of `defs`. + ![Radiant Launch Setup](radiant-setup.png) ## BSP Compiler diff --git a/Documentation/ReadMe.md b/Documentation/ReadMe.md index a8e8e1ce..2c4fd0e6 100644 --- a/Documentation/ReadMe.md +++ b/Documentation/ReadMe.md @@ -9,6 +9,8 @@ We are sharing it with the world in the hopes that it is useful! ![](book.png) [You can read more in-depth information, such as features here](About.md). +If you're looking for a similar project for vanilla id Tech 2 (Quake, QuakeWorld, HeXen II) then check out [Nuclide-Lite](https://code.idtech.space/vera/nuclide-lite). + ## Learning Resources ![](hourglass.png) [Getting Started](GettingStarted.md) diff --git a/Makefile b/Makefile index 9fe93bc5..3ccb9243 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ # Nuclide GNUMakefile # # Apr 2024 by Marco Cawthorne -# Last updated: 2024/11/28 +# Last updated: 2025/01/30 # # set `GAME` when issuing make. E.g. `make GAME=wastes` @@ -51,55 +51,384 @@ RADIANT_XLINK="$(NUCLIDE_DIR)/ThirdParty/gtkradiant/install/installs/$(NAME)Pack RADIANT_SYNAPSE="$(NUCLIDE_DIR)/ThirdParty/gtkradiant/install/installs/$(NAME)Pack/game/synapse.config" RADIANT_PROJECT="$(NUCLIDE_DIR)/ThirdParty/gtkradiant/install/installs/$(NAME)Pack/install/$(GAME)/scripts/default_project.proj" RADIANT_TEXTURES="$(NUCLIDE_DIR)/ThirdParty/gtkradiant/install/installs/$(NAME)Pack/install/$(GAME)/textures" -ENTITY_DEF="$(NUCLIDE_DIR)/ThirdParty/gtkradiant/install/installs/$(NAME)Pack/install/$(GAME)/scripts/entities.def" +RADIANT_DEF="$(NUCLIDE_DIR)/ThirdParty/gtkradiant/install/installs/$(NAME)Pack/install/$(GAME)/scripts/entities.def" RADIANT_SHADERLIST="$(NUCLIDE_DIR)/ThirdParty/gtkradiant/install/installs/$(NAME)Pack/install/$(GAME)/scripts/shaderlist.txt" +NRC_GAME="$(NUCLIDE_DIR)/ThirdParty/netradiant-custom/install/gamepacks/games/$(NAME).game" +NRC_GAMEDIR="$(NUCLIDE_DIR)/ThirdParty/netradiant-custom/install/gamepacks/$(NAME).game/$(GAME)/" +NRC_DEF="$(NRC_GAMEDIR)/entities.def" +NRC_SYNAPSE="$(NRC_GAMEDIR)/../default_build_menu.xml" + EDITOR_VMAP="$(ARGSTR)TEMPLATEenginepath/vmap" EDITOR_ENGINEPATH="$(ARGSTR)TEMPLATEenginepath" EDITOR_BASEPATH="$(ARGSTR)TEMPLATEbasedir" EDITOR_HOMEPATH="$(ARGSTR)TEMPLATEuserhomepath" help: - @printf "#####################\nNuclide Makefile Help\n#####################\n\nmain targets:\n" - @printf "\tgame [GAME=base]\n" - @printf "\t\talternatively: client, server, menu [GAME=base]\n" - @printf "\tedef [GAME=base]\n" - @printf "\tengine [GAME=base] [NAME=MyGame]\n" - @printf "\tdedicated [GAME=base]\n" - @printf "\tplugins [GAME=base] [NATIVE_PLUGINS=\"ode ffmpeg\"]\n" - @printf "\ttools\n" - @printf "\teditor\n" - @printf "\tdocs\n" - @printf "\tdist [GAME=base]\n" - @printf "\tclean[-game,engine,tools] [GAME=base]\n" - @printf "\tupdate [GAME=base]\n" - @printf "\nthird-party targets:\n" - @printf "\tfteqw, fteqw-sv, fteqw-plugins\n" - @printf "\tradiant, netradiant-custom\n" + @printf "################################################################################\n" + @printf " Nuclide Makefile Help - Developed by Vera Visions LLC\n" + @printf "################################################################################\n" + @printf "\nSwitch games by setting GAME=gamedir after the target\n\n" + @printf "main targets:\n" + @printf "\tgame \t\t\t\t# Builds the game logic\n" + @printf "\t\t\t\t\t# alternatively: client, server, menu\n\n" + @printf "\tdefs \t\t\t\t# Editor definitions\n" + @printf "\tdefs-wad \t\t\t# WAD favoring editor definitions\n" + @printf "\tengine [NAME=MyGame] \t\t# Branded engine binary\n" + @printf "\tdedicated \t\t\t# Branded dedicated server binary\n" + @printf "\tplugins \t\t\t# Plugins required by game\n" + @printf "\ttools \t\t\t\t# Builds the various tools\n" + @printf "\tfteqw \t\t\t\t# Builds FTEQW\n" + @printf "\tfteqw \t\t\t\t# Builds FTEQCC\n" + @printf "\tradiant \t\t\t# Builds GtkRadiant\n" + @printf "\tnetradiant-custom \t\t# Builds NetRadiant-Custom\n" + @printf "\tdocs \t\t\t\t# Builds Documentation/html/*.html\n" + @printf "\tdist \t\t\t\t# Builds binary for distribution\n" + @printf "\tclean[-game,engine,tools] \t# Cleans temp files\n" + @printf "\tupdate \t\t\t\t# Update online repos.\n" all: game engine dedicated plugins game: fteqcc - -cp src/cvar_defaults.cfg "$(GAME)/zpak001.pk3dir/default_cvar.cfg" - cd "$(GAME)/src/" && $(MAKE) QCC=$(QCC_DIR)/../../fteqcc + -cp src/cvar_defaults.cfg "$(GAME)/default_cvar.cfg" + cd "$(GAME)/src/" && $(MAKE) QCC=$(QCC_DIR)/../../fteqcc CFLAGS="-I$(QCC_DIR)/../../src/common/" client: fteqcc - cd "$(GAME)/src/client/" && $(MAKE) QCC=$(QCC_DIR)/../../../fteqcc + cd "$(GAME)/src/client/" && $(MAKE) QCC=$(QCC_DIR)/../../../fteqcc CFLAGS="-I$(QCC_DIR)/../../src/common/" server: fteqcc - cd "$(GAME)/src/server/" && $(MAKE) QCC=$(QCC_DIR)/../../../fteqcc + cd "$(GAME)/src/server/" && $(MAKE) QCC=$(QCC_DIR)/../../../fteqcc CFLAGS="-I$(QCC_DIR)/../../src/common/" rules: fteqcc - cd "$(GAME)/src/rules/" && $(MAKE) QCC=$(QCC_DIR)/../../../fteqcc + cd "$(GAME)/src/rules/" && $(MAKE) QCC=$(QCC_DIR)/../../../fteqcc CFLAGS="-I$(QCC_DIR)/../../src/common/" menu: fteqcc - cd "$(GAME)/src/menu/" && $(MAKE) QCC=$(QCC_DIR)/../../../fteqcc + cd "$(GAME)/src/menu/" && $(MAKE) QCC=$(QCC_DIR)/../../../fteqcc CFLAGS="-I$(QCC_DIR)/../../src/common/" mapc: fteqcc - cd "$(GAME)/src/maps/" && $(MAKE) QCC=$(QCC_DIR)/../../../fteqcc + cd "$(GAME)/src/maps/" && $(MAKE) QCC=$(QCC_DIR)/../../../fteqcc CFLAGS="-I$(QCC_DIR)/../../src/common/" # will build a gamepack for gtkradiant -radiant-game: radiant edef +defs-nrc-q3: netradiant-custom $(GAME)/scripts/entities.def + mkdir -p "$(NRC_GAMEDIR)" + echo "" > "$(NRC_GAME)" + echo "> "$(NRC_GAME)" + echo " type=\"q3\"" >> "$(NRC_GAME)" + echo " name=\"$(NAME)\"" >> "$(NRC_GAME)" + echo " enginepath_linux=\"$(NUCLIDE_DIR)\"" >> "$(NRC_GAME)" + echo " enginepath_win32=\"c:$(NUCLIDE_DIR)\"" >> "$(NRC_GAME)" + echo " engine_win32=\"fteqw.exe\"" >> "$(NRC_GAME)" + echo " engine_linux=\"fteqw\"" >> "$(NRC_GAME)" + echo " basegame=\"$(GAME)\"" >> "$(NRC_GAME)" + echo " basegamename=\"$(NAME)\"" >> "$(NRC_GAME)" + echo " unknowngamename=\"Custom Game Directory\"" >> "$(NRC_GAME)" + echo " default_scale=\"1.0\"" >> "$(NRC_GAME)" + echo " no_patch=\"1\"" >> "$(NRC_GAME)" + echo " no_bsp_monitor=\"1\"" >> "$(NRC_GAME)" + echo " archivetypes=\"pk3\"" >> "$(NRC_GAME)" + echo " texturetypes=\"tga jpg png ktx dds\"" >> "$(NRC_GAME)" + echo " modeltypes=\"md3 ase lwo obj 3ds 3d 3mf ac ac3d acc amf ask assbin b3d blend bvh cob csm dae dxf enff fbx glb gltf hmp iqm irr irrmesh lws lxo m3d md2 md5mesh mdc mdl mesh mesh.xml mot ms3d ndo nff off ply pmx prj q3o q3s raw scn sib smd stl ter uc vta x x3d x3db xgl xml zae zgl\"" >> "$(NRC_GAME)" + echo " maptypes=\"mapq3\"" >> "$(NRC_GAME)" + echo " shaders=\"quake3\"" >> "$(NRC_GAME)" + echo " shaderpath=\"texturesrc\"" >> "$(NRC_GAME)" + echo " entityclass=\"quake3\"" >> "$(NRC_GAME)" + echo " entityclasstype=\"def xml\"" >> "$(NRC_GAME)" + echo " entities=\"quake3\"" >> "$(NRC_GAME)" + echo " brushtypes=\"quake3\"" >> "$(NRC_GAME)" + echo " patchtypes=\"quake3\"" >> "$(NRC_GAME)" + echo "/>" >> "$(NRC_GAME)" + cp "$(GAME)/scripts/entities.def" "$(NRC_DEF)" + echo "" > $(NRC_SYNAPSE) + echo "" >> $(NRC_SYNAPSE) + echo " \"[EnginePath]qbsp\"" >> $(NRC_SYNAPSE) + echo " \"[EnginePath]qvis\"" >> $(NRC_SYNAPSE) + echo " \"[EnginePath]qrad\"" >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " [bsp] \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " [bsp] -onlyents \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " [bsp] \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " [vis] \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " [bsp] \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " [vis] -fast \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " [bsp] \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " [vis] -noambient \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " [bsp] \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " [vis] -noambient -fast \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " [bsp] \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " [light] \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " [bsp] \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " [light] -extra \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " [bsp] \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " [light] -extra4x4 \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " [bsp] \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " [bsp] \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " [light] \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " [bsp] \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " [light] -extra \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " [bsp] \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " [light] -extra4x4 \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " [bsp] \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " [vis] \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " [bsp] \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " [vis] \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " [light] \"[MapFile]\" " >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " [bsp] \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " [vis] \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " [light] -extra \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " [bsp] \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " [vis] \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " [light] -extra4x4 \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " [bsp] \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " [vis] -fast \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " [bsp] \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " [vis] -fast \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " [light] \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " [bsp] \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " [vis] -fast \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " [light] -extra \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " [bsp] \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " [vis] -fast \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " [light] -extra4x4 \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " [bsp] \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " [vis] -noambient \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " [bsp] \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " [vis] -noambient \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " [light] \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " [bsp] \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " [vis] -noambient \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " [light] -extra \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " [bsp] \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " [vis] -noambient \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " [light] -extra4x4 \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " [bsp] \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " [vis] -noambient -fast \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " [bsp] \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " [vis] -noambient -fast \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " [light] \"[MapFile]\" " >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " [bsp] \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " [vis] -noambient -fast \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " [light] -extra \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " [bsp] \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " [vis] -noambient -fast \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " [light] -extra4x4 \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo "" >> $(NRC_SYNAPSE) + +defs-nrc-q1: netradiant-custom $(GAME)/scripts/entities.def + mkdir -p "$(NRC_GAMEDIR)" + echo "" > "$(NRC_GAME)" + echo "> "$(NRC_GAME)" + echo " type=\"q1\"" >> "$(NRC_GAME)" + echo " name=\"$(NAME)\"" >> "$(NRC_GAME)" + echo " enginepath_linux=\"c:$(NUCLIDE_DIR)\"" >> "$(NRC_GAME)" + echo " enginepath_win32=\"c:$(NUCLIDE_DIR)\"" >> "$(NRC_GAME)" + echo " engine_win32=\"fteqw.exe\"" >> "$(NRC_GAME)" + echo " engine_linux=\"fteqw\"" >> "$(NRC_GAME)" + echo " basegame=\"$(GAME)\"" >> "$(NRC_GAME)" + echo " basegamename=\"$(NAME)\"" >> "$(NRC_GAME)" + echo " unknowngamename=\"Custom Quake modification\"" >> "$(NRC_GAME)" + echo " default_scale=\"1.0\"" >> "$(NRC_GAME)" + echo " no_patch=\"1\"" >> "$(NRC_GAME)" + echo " no_bsp_monitor=\"1\"" >> "$(NRC_GAME)" + echo " show_wads=\"1\"" >> "$(NRC_GAME)" + echo " archivetypes=\"pak wad\"" >> "$(NRC_GAME)" + echo " texturetypes=\"tga jpg mip hlw\"" >> "$(NRC_GAME)" + echo " modeltypes=\"mdl\"" >> "$(NRC_GAME)" + echo " maptypes=\"mapq1\"" >> "$(NRC_GAME)" + echo " shaders=\"quake3\"" >> "$(NRC_GAME)" + echo " entityclass=\"quake3\"" >> "$(NRC_GAME)" + echo " entityclasstype=\"def xml\"" >> "$(NRC_GAME)" + echo " entities=\"quake3\"" >> "$(NRC_GAME)" + echo " brushtypes=\"quake\"" >> "$(NRC_GAME)" + echo " patchtypes=\"quake3\"" >> "$(NRC_GAME)" + echo "/>" >> "$(NRC_GAME)" + cp "$(GAME)/scripts/entities.def" "$(NRC_DEF)" + echo "" > $(NRC_SYNAPSE) + echo "" >> $(NRC_SYNAPSE) + echo " \"[EnginePath]qbsp\"" >> $(NRC_SYNAPSE) + echo " \"[EnginePath]qvis\"" >> $(NRC_SYNAPSE) + echo " \"[EnginePath]qrad\"" >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " [bsp] \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " [bsp] -onlyents \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " [bsp] \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " [vis] \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " [bsp] \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " [vis] -fast \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " [bsp] \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " [vis] -noambient \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " [bsp] \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " [vis] -noambient -fast \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " [bsp] \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " [light] \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " [bsp] \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " [light] -extra \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " [bsp] \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " [light] -extra4x4 \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " [bsp] \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " [bsp] \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " [light] \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " [bsp] \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " [light] -extra \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " [bsp] \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " [light] -extra4x4 \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " [bsp] \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " [vis] \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " [bsp] \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " [vis] \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " [light] \"[MapFile]\" " >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " [bsp] \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " [vis] \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " [light] -extra \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " [bsp] \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " [vis] \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " [light] -extra4x4 \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " [bsp] \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " [vis] -fast \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " [bsp] \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " [vis] -fast \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " [light] \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " [bsp] \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " [vis] -fast \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " [light] -extra \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " [bsp] \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " [vis] -fast \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " [light] -extra4x4 \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " [bsp] \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " [vis] -noambient \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " [bsp] \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " [vis] -noambient \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " [light] \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " [bsp] \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " [vis] -noambient \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " [light] -extra \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " [bsp] \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " [vis] -noambient \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " [light] -extra4x4 \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " [bsp] \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " [vis] -noambient -fast \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " [bsp] \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " [vis] -noambient -fast \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " [light] \"[MapFile]\" " >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " [bsp] \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " [vis] -noambient -fast \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " [light] -extra \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo " [bsp] \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " [vis] -noambient -fast \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " [light] -extra4x4 \"[MapFile]\"" >> $(NRC_SYNAPSE) + echo " " >> $(NRC_SYNAPSE) + echo "" >> $(NRC_SYNAPSE) + +# will build a gamepack for gtkradiant +defs-gtkradiant-q3: radiant $(GAME)/scripts/entities.def echo "" > "$(RADIANT_GAME)" echo "> "$(RADIANT_GAME)" echo " name=\"$(NAME)\"" >> "$(RADIANT_GAME)" @@ -143,7 +472,7 @@ radiant-game: radiant edef echo "pk3" >> "$(RADIANT_SYNAPSE)" echo "" >> "$(RADIANT_SYNAPSE)" mkdir -p "$(NUCLIDE_DIR)/ThirdParty/gtkradiant/install/installs/$(NAME)Pack/install/$(GAME)/scripts" - cp "$(GAME)/scripts/entities.def" "$(ENTITY_DEF)" + cp "$(GAME)/scripts/entities.def" "$(RADIANT_DEF)" echo "" > "$(RADIANT_PROJECT)" echo "" >> "$(RADIANT_PROJECT)" echo "" >> "$(RADIANT_PROJECT)" @@ -164,14 +493,90 @@ radiant-game: radiant edef mkdir -p "$(RADIANT_TEXTURES)/." rsync -rva "$(NUCLIDE_DIR)/Tools/textures/." "$(RADIANT_TEXTURES)/." mkdir -p "$(HOME)/.$(GAME)/$(GAME)/scripts" + +# will build a gamepack for gtkradiant +defs-gtkradiant-q1: radiant $(GAME)/scripts/entities.def + echo "" > "$(RADIANT_GAME)" + echo "> "$(RADIANT_GAME)" + echo " name=\"$(NAME)\"" >> "$(RADIANT_GAME)" + echo " enginepath_linux=\"$(NUCLIDE_DIR)\"" >> "$(RADIANT_GAME)" + echo " gametools_linux=\"$(NUCLIDE_DIR)/ThirdParty/gtkradiant/install/installs/$(NAME)Pack/game\"" >> "$(RADIANT_GAME)" + echo " prefix=\".$(GAME)\"" >> "$(RADIANT_GAME)" + echo " basegame=\"$(GAME)\"" >> "$(RADIANT_GAME)" + echo "/>" >> "$(RADIANT_GAME)" + mkdir -p "$(NUCLIDE_DIR)/ThirdParty/gtkradiant/install/installs/$(NAME)Pack/game" + echo "" > "$(RADIANT_XLINK)" + echo "" >> "$(RADIANT_XLINK)" + echo "" >> "$(RADIANT_XLINK)" + echo "" >> "$(RADIANT_XLINK)" + echo "" >> "$(RADIANT_XLINK)" + echo "" >> "$(RADIANT_XLINK)" + echo "" > "$(RADIANT_SYNAPSE)" + echo "pcx tga mip" >> "$(RADIANT_SYNAPSE)" + echo "" >> "$(RADIANT_SYNAPSE)" + echo "wad" >> "$(RADIANT_SYNAPSE)" + echo "" >> "$(RADIANT_SYNAPSE)" + echo "idtech2" >> "$(RADIANT_SYNAPSE)" + echo "" >> "$(RADIANT_SYNAPSE)" + echo "maphl" >> "$(RADIANT_SYNAPSE)" + echo "" >> "$(RADIANT_SYNAPSE)" + echo "def" >> "$(RADIANT_SYNAPSE)" + echo "" >> "$(RADIANT_SYNAPSE)" + echo "idtech2" >> "$(RADIANT_SYNAPSE)" + echo "" >> "$(RADIANT_SYNAPSE)" + echo "wad" >> "$(RADIANT_SYNAPSE)" + echo "" >> "$(RADIANT_SYNAPSE)" + echo "idtech2" >> "$(RADIANT_SYNAPSE)" + echo "" >> "$(RADIANT_SYNAPSE)" + echo "wad" >> "$(RADIANT_SYNAPSE)" + echo "" >> "$(RADIANT_SYNAPSE)" + echo "idtech2" >> "$(RADIANT_SYNAPSE)" + echo "" >> "$(RADIANT_SYNAPSE)" + echo "idtech2" >> "$(RADIANT_SYNAPSE)" + echo "" >> "$(RADIANT_SYNAPSE)" + echo "idtech2" >> "$(RADIANT_SYNAPSE)" + echo "" >> "$(RADIANT_SYNAPSE)" + echo "wad" >> "$(RADIANT_SYNAPSE)" + echo "" >> "$(RADIANT_SYNAPSE)" + mkdir -p "$(NUCLIDE_DIR)/ThirdParty/gtkradiant/install/installs/$(NAME)Pack/install/$(GAME)/scripts" + cp "$(GAME)/scripts/entities.def" "$(RADIANT_DEF)" + echo "" > "$(RADIANT_PROJECT)" + echo "" >> "$(RADIANT_PROJECT)" + echo "" >> "$(RADIANT_PROJECT)" + echo "" >> "$(RADIANT_PROJECT)" + echo "" >> "$(RADIANT_PROJECT)" + echo "" >> "$(RADIANT_PROJECT)" + echo "" >> "$(RADIANT_PROJECT)" + echo "" >> "$(RADIANT_PROJECT)" + echo "" >> "$(RADIANT_PROJECT)" + echo "" >> "$(RADIANT_PROJECT)" + echo "" >> "$(RADIANT_PROJECT)" + echo "" >> "$(RADIANT_PROJECT)" + echo "" >> "$(RADIANT_PROJECT)" + echo "" >> "$(RADIANT_PROJECT)" + echo "" >> "$(RADIANT_PROJECT)" + echo "" >> "$(RADIANT_PROJECT)" + mkdir -p "$(RADIANT_TEXTURES)/." + mkdir -p "$(HOME)/.$(GAME)/$(GAME)/scripts" rsync -rva "$(NUCLIDE_DIR)/ThirdParty/gtkradiant/install/installs/$(NAME)Pack/install/$(GAME)/." "$(HOME)/.$(GAME)/$(GAME)/." rsync -rva "$(NUCLIDE_DIR)/ThirdParty/gtkradiant/install/installs/$(NAME)Pack/install/$(GAME)/." "./$(GAME)/." -edef: +defs: + if [ -d "$(NUCLIDE_DIR)/ThirdParty/gtkradiant" ];then $(MAKE) defs-gtkradiant-q3;fi + if [ -d "$(NUCLIDE_DIR)/ThirdParty/netradiant-custom" ];then $(MAKE) defs-nrc-q3;fi + +defs-wad: + if [ -d "$(NUCLIDE_DIR)/ThirdParty/gtkradiant" ];then $(MAKE) defs-gtkradiant-q1;fi + if [ -d "$(NUCLIDE_DIR)/ThirdParty/netradiant-custom" ];then $(MAKE) defs-nrc-q1;fi + +$(GAME)/scripts/entities.def: Tools/make_mapdef.sh $(GAME) maps: Tools/make_maps.sh $(GAME) + +wads: imgtool + ./Tools/build_wads.sh $(GAME) textures: Tools/make_textures.sh $(GAME) @@ -213,9 +618,6 @@ vvmtool: cd Tools/vvmtool && $(MAKE) install -m 0777 Tools/vvmtool/vvmtool vvmtool -worldspawn: - cd Tools/worldspawn && $(MAKE) - dist: dist-pak dist-engine dist-engine: engine-lin32 engine-lin64 engine-win32 engine-win64 dedicated-lin32 dedicated-lin64 dedicated-win32 dedicated-win64 @@ -224,6 +626,7 @@ dist-pak: mkdir -p "$(BUILD_DIR)/$(NAME)-content/$(GAME)" ./Tools/make_dist.sh "$(GAME)" $(BUILD_DIR)/$(NAME)-content/$(GAME) > $(BUILD_DIR)/$(NAME)-content.log -$(GAME)/post-dist.sh "$(GAME)" "$(BUILD_DIR)/$(NAME)-content" + @printf "Building finished. Check %s\n", "$(BUILD_DIR)/$(NAME)-content" # generate trinity .shader files from .mat within the game directory trshaders: @@ -239,7 +642,6 @@ vacuum: -rm ./$(GAME)/config.cfg -rm ./$(GAME)/*.lno -rm -rfv ./$(GAME)/csprogsvers - -rm -rfv ./$(GAME)/data -rm -rfv ./$(GAME)/saves clean: clean-game clean-engine clean-tools clean-dist @@ -254,7 +656,7 @@ clean-game: privkey.pem installed.lst $(GAME)/csprogs.dat \ $(GAME)/menu.dat $(GAME)/progs.dat $(GAME)/csprogs.lno \ $(GAME)/menu.lno $(GAME)/progs.lno $(GAME)/csqccore.txt \ - $(GAME)/menucore.txt $(GAME)/ssqccore.txt fteplug_*.so + $(GAME)/menucore.txt $(GAME)/ssqccore.txt clean-engine: cd ThirdParty/fteqw/engine && $(MAKE) clean @@ -270,7 +672,7 @@ clean-tools: cd ThirdParty/fteqw/engine && $(MAKE) clean -rm vmap vvmtool iqmtool imgtool fteqcc generatebuiltinsl makevulkanblob -debug: +debug: $(ENGINE_BINARY) gdb --args ./$(GAME_BINARY) +set sv_cheats 1 +set sv_csqcdebug 1 +set g_logLevel 3 +set g_logTimestamps 1 update: @@ -279,30 +681,10 @@ update: if [ ! -d ThirdParty/fteqw ];then git clone $(ENGINE_URL) ThirdParty/fteqw;else cd ./ThirdParty/fteqw && git pull;fi if [ ! -d Tools/vvmtool ];then git clone https://github.com/VeraVisions/vvmtool Tools/vvmtool;else cd ./Tools/vvmtool && git pull;fi if [ ! -d Tools/vmap ];then git clone https://github.com/VeraVisions/vmap Tools/vmap;else cd ./Tools/vmap && git pull;fi - if [ ! -d Tools/worldspawn ];then git clone https://github.com/VeraVisions/worldspawn Tools/worldspawn;else cd ./Tools/worldspawn && git pull;fi if [ ! -d ThirdParty/gtkradiant ];then git clone https://github.com/TTimo/gtkradiant ThirdParty/gtkradiant;else cd ./ThirdParty/gtkradiant && git pull;fi if [ ! -d ThirdParty/netradiant-custom ];then git clone https://github.com/Garux/netradiant-custom ThirdParty/netradiant-custom;else cd ./ThirdParty/netradiant-custom && git pull;fi -# fte specific corner -fteqw-plugins: - cd ThirdParty/fteqw/engine && $(MAKE) plugins-dbg NATIVE_PLUGINS="$(NATIVE_PLUGINS)" - find ThirdParty/fteqw/engine/debug/ -name "fteplug_*.so" -exec mv '{}' ./ \; - -fteqw-plugins-win32: - cd ThirdParty/fteqw/engine && $(MAKE) plugins-dbg NATIVE_PLUGINS="$(NATIVE_PLUGINS)" FTE_TARGET=win32 - find ThirdParty/fteqw/engine/debug/ -name "fteplug_*.dll" -exec mv '{}' ./ \; - -fteqw-plugins-win64: - cd ThirdParty/fteqw/engine && $(MAKE) plugins-dbg NATIVE_PLUGINS="$(NATIVE_PLUGINS)" FTE_TARGET=win64 - find ThirdParty/fteqw/engine/debug/ -name "fteplug_*.dll" -exec mv '{}' ./ \; - -fteqw-plugins-lin32: - cd ThirdParty/fteqw/engine && $(MAKE) plugins-dbg NATIVE_PLUGINS="$(NATIVE_PLUGINS)" FTE_TARGET=linux32 - find ThirdParty/fteqw/engine/debug/ -name "fteplug_*.dll" -exec mv '{}' ./ \; - -fteqw-plugins-lin64: - cd ThirdParty/fteqw/engine && $(MAKE) plugins-dbg NATIVE_PLUGINS="$(NATIVE_PLUGINS)" FTE_TARGET=linux64 - find ThirdParty/fteqw/engine/debug/ -name "fteplug_*.dll" -exec mv '{}' ./ \; +# game engine binaries $(ENGINE_BINARY): cd ThirdParty/fteqw/engine && $(MAKE) makelibs ARCH=x86_64 @@ -346,6 +728,8 @@ $(ENGINE_BINARY_LIN64): cd ThirdParty/fteqw/engine && $(MAKE) plugins-rel NATIVE_PLUGINS="$(NATIVE_PLUGINS)" FTE_CONFIG=$(GAME) FTE_TARGET=linux64 find ThirdParty/fteqw/engine/release/ -name "fteplug_*.so" -exec mv '{}' $(BUILD_DIR)/$(NAME)-linux/ \; +# game dedicated binaries + $(ENGINE_DEDICATED): cd ThirdParty/fteqw/engine && $(MAKE) makelibs ARCH=x86_64 cp $(GAME)/engine.h ./ThirdParty/fteqw/engine/common/config_$(GAME).h @@ -380,6 +764,8 @@ $(ENGINE_DS_WIN64): mkdir -p "$(BUILD_DIR)/$(NAME)-linux" install -m 0777 $(ENGINE_DS_LIN64) $(BUILD_DIR)/$(NAME)-linux/$(NAME)DS_x64 +# tools + iqmtool: cd ThirdParty/fteqw/engine && $(MAKE) iqmtool install -m 0777 ./ThirdParty/fteqw/engine/release/iqmtool ./ @@ -418,7 +804,28 @@ fteqw-sv: cd ThirdParty/fteqw/engine && $(MAKE) sv-dbg FTE_CONFIG=fteqw ARCH=stock-x86_64 install -m 0777 ./ThirdParty/fteqw/engine/debug/fteqw ./fteqw -# third-party level editing software +# stock FTE plugins +fteqw-plugins: + cd ThirdParty/fteqw/engine && $(MAKE) plugins-dbg NATIVE_PLUGINS="$(NATIVE_PLUGINS)" + find ThirdParty/fteqw/engine/debug/ -name "fteplug_*.so" -exec mv '{}' ./ \; + +fteqw-plugins-win32: + cd ThirdParty/fteqw/engine && $(MAKE) plugins-dbg NATIVE_PLUGINS="$(NATIVE_PLUGINS)" FTE_TARGET=win32 + find ThirdParty/fteqw/engine/debug/ -name "fteplug_*.dll" -exec mv '{}' ./ \; + +fteqw-plugins-win64: + cd ThirdParty/fteqw/engine && $(MAKE) plugins-dbg NATIVE_PLUGINS="$(NATIVE_PLUGINS)" FTE_TARGET=win64 + find ThirdParty/fteqw/engine/debug/ -name "fteplug_*.dll" -exec mv '{}' ./ \; + +fteqw-plugins-lin32: + cd ThirdParty/fteqw/engine && $(MAKE) plugins-dbg NATIVE_PLUGINS="$(NATIVE_PLUGINS)" FTE_TARGET=linux32 + find ThirdParty/fteqw/engine/debug/ -name "fteplug_*.dll" -exec mv '{}' ./ \; + +fteqw-plugins-lin64: + cd ThirdParty/fteqw/engine && $(MAKE) plugins-dbg NATIVE_PLUGINS="$(NATIVE_PLUGINS)" FTE_TARGET=linux64 + find ThirdParty/fteqw/engine/debug/ -name "fteplug_*.dll" -exec mv '{}' ./ \; + +# level editing software radiant: if [ ! -d ThirdParty/gtkradiant ];then git clone https://github.com/TTimo/gtkradiant ThirdParty/gtkradiant;fi cd ThirdParty/gtkradiant && scons @@ -426,5 +833,6 @@ radiant: netradiant-custom: if [ ! -d ThirdParty/netradiant-custom ];then git clone https://github.com/Garux/netradiant-custom ThirdParty/netradiant-custom;fi - cd ThirdParty/netradiant-custom && $(MAKE) + cd ThirdParty/netradiant-custom && $(MAKE) DOWNLOAD_GAMEPACKS=no BUILD=debug RADIANT_ABOUTMSG="NuclideLite managed build." + mkdir -p ./ThirdParty/netradiant-custom/install/gamepacks/games Tools/make_launcher.sh ./ThirdParty/netradiant-custom/install/ ./radiant.x86_64 netradiant-custom diff --git a/README.md b/README.md index 5ce05d51..54dbca68 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Ensure you have FTE QuakeWorld, or are comfortable building it yourself. You can build a copy of FTEQW using the command `make engine`. *If that is a lot to bootstrap, you can use any recent binary version.* -Run the engine in the root of this repository, after having issued `make progs GAME=base`. +Run the engine in the root of this repository, after having issued `make game GAME=base`. ## Building Documentation diff --git a/Tools/build_wads.sh b/Tools/build_wads.sh new file mode 100755 index 00000000..e83bbd8f --- /dev/null +++ b/Tools/build_wads.sh @@ -0,0 +1,32 @@ +#!/bin/sh + +# ensure we use the tools provided in root +export PATH="$(pwd):$PATH" +CWD="$(pwd)" + +# texture wads +build_wads() +{ + if [ ! -d "$CWD/$1/texturesrc/" ] + then + exit 0 + fi + + echo "building texturesrc/*.wad" + + cd "$CWD/$1/texturesrc/" + + # will make a .wad out of every sub directory. + find ./ -type d -maxdepth 1 | while read WADDIR + do + DIRNAME=$(basename "$WADDIR") + + if [ ! "$DIRNAME" = "." ] + then + printf "WAD3 building %s:\n" "$DIRNAME" + imgtool --genwad3 ../"$DIRNAME".wad ./"$DIRNAME" + fi + done +} + +build_wads $1 diff --git a/Tools/make_dist.sh b/Tools/make_dist.sh index f273aaaa..edd26b77 100755 --- a/Tools/make_dist.sh +++ b/Tools/make_dist.sh @@ -31,6 +31,31 @@ then exit 2 fi +if [ -f "$GAMEROOT/$GAMEDIR/src/files.dat" ] +then + printf "Found files.dat, will build that.\n" + + if [ -f "$GAMEROOT/$GAMEDIR/PAK_NAME" ] + then + PAKNAME=$(head -n 1 "$GAMEROOT/$GAMEDIR/PAK_NAME") + else + PAKNAME="pak000.pk4" + fi + + cd "$GAMEROOT/$GAMEDIR/" + rm -v "$PAKNAME" + + awk '{ print $2; }' "$GAMEROOT/$GAMEDIR/src/files.dat" > /tmp/pakzip + zip -0 "$OUTDIR/$PAKNAME" -@ < /tmp/pakzip + + if [ -f "$GAMEROOT/$GAMEDIR/PAK_COPYRIGHT" ] + then + zip -z "$OUTDIR/$PAKNAME" < "$GAMEROOT/$GAMEDIR/PAK_COPYRIGHT" + fi +fi + +cd "$GAMEROOT" + # build the archives from the pk3dir directories find "./$GAMEDIR" -name "*.pk3dir" -maxdepth 1 | sort | xargs -I @ sh -c 'echo `basename "@"`' | while read PK3DIR do diff --git a/base/csprogs.dat b/base/csprogs.dat index afc74d5e..8ba20fff 100644 Binary files a/base/csprogs.dat and b/base/csprogs.dat differ diff --git a/base/default_cvar.cfg b/base/default_cvar.cfg index ac0740a3..521486f7 100644 --- a/base/default_cvar.cfg +++ b/base/default_cvar.cfg @@ -112,7 +112,7 @@ set pm_proneheight "0" set pm_pronespeed "40.5" set pm_proneviewheight "16" set pm_runspeed "0" -set pm_runfiring "0" +set pm_runfiring "1" set pm_stairSmoothing "1" set pm_stamina "24" set pm_staminarate "0.75" @@ -126,7 +126,7 @@ set pm_waterjumpheight "350" set r_autoscale "1" // When set, will ensure the game is at 640x480 type scaling. set r_drawdecals "1" // Shows decal entities managed by the game when set. set r_ignoreentpvs "0" // override -set r_imageextensions "ktx tga bmp pcx png jpg" // override +set r_imageextensions "tga bmp pcx png jpg" // override set r_meshpitch "1" // override set r_pixelscale "0" // When set, will ensure the 3D rendered scene is restricted to 640x480 resolution in definition. set r_renderEntityInfo "0" // Display visual information about entities in-world. @@ -186,5 +186,3 @@ set physics_ode_autodisable_threshold_linear "0.05" // Was 0.2, too lenient. set physics_ode_autodisable_threshold_angular "0.01" // override set physics_ode_autodisable_threshold_samples "5" // override set physics_ode_maxspeed "800" // was 0 -set sv_mintic "0.0166666666667" // 60 fps physics -set phys_lowspec "0" diff --git a/base/menu.dat b/base/menu.dat index 9f4ebcdf..c67001ad 100644 Binary files a/base/menu.dat and b/base/menu.dat differ diff --git a/base/progs.dat b/base/progs.dat index 2e25c316..8b0e99cd 100644 Binary files a/base/progs.dat and b/base/progs.dat differ diff --git a/base/progs/deathmatch.dat b/base/progs/deathmatch.dat index 52798cf3..8c3dab84 100644 Binary files a/base/progs/deathmatch.dat and b/base/progs/deathmatch.dat differ diff --git a/base/progs/singleplayer.dat b/base/progs/singleplayer.dat index 38936f91..204bdd4c 100644 Binary files a/base/progs/singleplayer.dat and b/base/progs/singleplayer.dat differ diff --git a/base/src/client/Makefile b/base/src/client/Makefile index 24c4e84a..55a79828 100644 --- a/base/src/client/Makefile +++ b/base/src/client/Makefile @@ -1,5 +1,4 @@ QCC=fteqcc all: - $(QCC) progs.src - $(QCC) hud.qc + $(QCC) $(CFLAGS) -I../../../src/platform/ progs.src diff --git a/base/src/rules/Makefile b/base/src/rules/Makefile index b512e4ec..2593e1e4 100644 --- a/base/src/rules/Makefile +++ b/base/src/rules/Makefile @@ -2,5 +2,5 @@ QCC=fteqcc all: mkdir -pv ../../progs/ - $(QCC) deathmatch.qc - $(QCC) singleplayer.qc + $(QCC) $(CFLAGS) -I../../../src/server deathmatch.qc + $(QCC) $(CFLAGS) -I../../../src/server singleplayer.qc diff --git a/base/src/server/Makefile b/base/src/server/Makefile index 2fe44a45..b5bbf6f5 100644 --- a/base/src/server/Makefile +++ b/base/src/server/Makefile @@ -1,4 +1,4 @@ QCC=fteqcc all: - $(QCC) progs.src + $(QCC) $(CFLAGS) -I../shared progs.src diff --git a/base/src/shared/fx_blood.qc b/base/src/shared/fx_blood.qc deleted file mode 100644 index fbcd2903..00000000 --- a/base/src/shared/fx_blood.qc +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2016-2022 Vera Visions LLC. - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER - * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING - * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -*/ - -#ifdef CLIENT -var float PARTICLE_BLOOD; - -void -FX_Blood_Init(void) -{ - PARTICLE_BLOOD = particleeffectnum("part_blood"); -} -#endif - -void -FX_Blood(vector pos, vector color) -{ -#ifdef SERVER - WriteByte(MSG_MULTICAST, SVC_CGAMEPACKET); - WriteByte(MSG_MULTICAST, EV_BLOOD); - WriteCoord(MSG_MULTICAST, pos[0]); - WriteCoord(MSG_MULTICAST, pos[1]); - WriteCoord(MSG_MULTICAST, pos[2]); - WriteByte(MSG_MULTICAST, color[0] * 255); - WriteByte(MSG_MULTICAST, color[1] * 255); - WriteByte(MSG_MULTICAST, color[2] * 255); - msg_entity = self; - multicast(pos, MULTICAST_PVS); -#else - if (cvar("violence_hblood") <= 0) { - return; - } - - pointparticles(PARTICLE_BLOOD, pos, [0,0,0], 1); -#endif -} diff --git a/base/src/shared/fx_corpse.qc b/base/src/shared/fx_corpse.qc deleted file mode 100644 index bdb642b9..00000000 --- a/base/src/shared/fx_corpse.qc +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (c) 2016-2022 Vera Visions LLC. - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER - * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING - * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -*/ - -#ifdef SERVER -#define CORPSES_MAX 16 -entity g_bodies; - -void -FX_Corpse_Init(void) -{ - entity next = spawn(ncRenderableEntity); - g_bodies = next; - - for ( int i = 0; i <= CORPSES_MAX; i++ ) { - next.classname = "corpse"; - next.owner = spawn(ncRenderableEntity); - - if ( i == CORPSES_MAX ) { - next.owner = g_bodies; - } else { - next = next.owner; - } - } -} - -entity -FX_Corpse_Next(void) -{ - entity r = g_bodies; - g_bodies = g_bodies.owner; - return r; -} - -entity -FX_Corpse_Spawn(ncActor pl, float anim) -{ - ncRenderableEntity body_next = (ncRenderableEntity)FX_Corpse_Next(); - setorigin(body_next, pl.origin + [0,0,32]); - body_next.SetMovetype(MOVETYPE_TOSS); - body_next.SetSolid(SOLID_CORPSE); - setmodel(body_next, pl.model); - setsize(body_next, VEC_HULL_MIN, VEC_HULL_MAX); - body_next.SetModelindex(pl.modelindex); - body_next.SetAngles(pl.angles); - body_next.velocity = (pl.velocity) + [0,0,120]; - body_next.colormap = pl.colormap; - body_next.SetFrame(anim); - return (entity)body_next; -} -#endif diff --git a/base/src/shared/include.src b/base/src/shared/include.src index 715356c4..9ffb4801 100644 --- a/base/src/shared/include.src +++ b/base/src/shared/include.src @@ -1,5 +1,3 @@ #includelist flags.h -fx_blood.qc -fx_corpse.qc #endlist diff --git a/src/client/api.qc b/src/client/api.qc index df826304..c1a98691 100644 --- a/src/client/api.qc +++ b/src/client/api.qc @@ -387,20 +387,20 @@ Draw_RoundedBox(vector pos, vector size, vector rgb, float a) tileSize[0] = tileSize[1] = (16 * tileScale); - drawpic(pos, "textures/ui/m_topleft.tga", tileSize, rgb, a, 0); - drawpic(pos + [size[0] - tileSize[0], 0], "textures/ui/m_topright.tga", tileSize, rgb, a, 0); - drawpic(pos + [0, size[1] - tileSize[1]], "textures/ui/m_bottomleft.tga", tileSize, rgb, a, 0); - drawpic(pos + [size[0] - tileSize[0], size[1] - tileSize[1]], "textures/ui/m_bottomright.tga", tileSize, rgb, a, 0); + drawpic(pos, "gfx/ui/m_topleft.tga", tileSize, rgb, a, 0); + drawpic(pos + [size[0] - tileSize[0], 0], "gfx/ui/m_topright.tga", tileSize, rgb, a, 0); + drawpic(pos + [0, size[1] - tileSize[1]], "gfx/ui/m_bottomleft.tga", tileSize, rgb, a, 0); + drawpic(pos + [size[0] - tileSize[0], size[1] - tileSize[1]], "gfx/ui/m_bottomright.tga", tileSize, rgb, a, 0); if (size_x > 32) { - drawpic(pos + [tileSize[0], 0], "textures/ui/m_top.tga", [size[0] - (tileSize[0] * 2), tileSize[1]], rgb, a, 0); - drawpic(pos + [tileSize[0], size[1] - tileSize[1]], "textures/ui/m_bottom.tga", [size[0] - (tileSize[0] * 2), tileSize[1]], rgb, a, 0); + drawpic(pos + [tileSize[0], 0], "gfx/ui/m_top.tga", [size[0] - (tileSize[0] * 2), tileSize[1]], rgb, a, 0); + drawpic(pos + [tileSize[0], size[1] - tileSize[1]], "gfx/ui/m_bottom.tga", [size[0] - (tileSize[0] * 2), tileSize[1]], rgb, a, 0); } if (size_y > 32) { - drawpic(pos + [0, tileSize[1]], "textures/ui/m_left.tga", [tileSize[0], size[1] - (tileSize[0] * 2)], rgb, a, 0); - drawpic(pos + [size[0] - tileSize[0], tileSize[1]], "textures/ui/m_right.tga", [tileSize[0], size[1] - (tileSize[0] * 2)], rgb, a, 0); - drawpic(pos + [tileSize[0], tileSize[1]], "textures/ui/m_mid.tga", [size[0] - (tileSize[0] * 2), size[1] - (tileSize[0] * 2)], rgb, a, 0); + drawpic(pos + [0, tileSize[1]], "gfx/ui/m_left.tga", [tileSize[0], size[1] - (tileSize[0] * 2)], rgb, a, 0); + drawpic(pos + [size[0] - tileSize[0], tileSize[1]], "gfx/ui/m_right.tga", [tileSize[0], size[1] - (tileSize[0] * 2)], rgb, a, 0); + drawpic(pos + [tileSize[0], tileSize[1]], "gfx/ui/m_mid.tga", [size[0] - (tileSize[0] * 2), size[1] - (tileSize[0] * 2)], rgb, a, 0); } } diff --git a/src/common/colors.h b/src/common/c_colors.h similarity index 100% rename from src/common/colors.h rename to src/common/c_colors.h diff --git a/src/common/events.h b/src/common/c_events.h similarity index 100% rename from src/common/events.h rename to src/common/c_events.h diff --git a/src/common/flags.h b/src/common/c_flags.h similarity index 100% rename from src/common/flags.h rename to src/common/c_flags.h diff --git a/src/common/materials.h b/src/common/c_materials.h similarity index 100% rename from src/common/materials.h rename to src/common/c_materials.h diff --git a/src/common/math.h b/src/common/c_math.h similarity index 99% rename from src/common/math.h rename to src/common/c_math.h index 05f7d7c6..412f47a4 100644 --- a/src/common/math.h +++ b/src/common/c_math.h @@ -273,5 +273,3 @@ hsvToRGB(float h, float s, float v) return col; } /** @} */ // end of math - -#include "math_vector.h" diff --git a/src/common/math_vector.h b/src/common/c_math_vector.h similarity index 100% rename from src/common/math_vector.h rename to src/common/c_math_vector.h diff --git a/src/common/memory.h b/src/common/c_memory.h similarity index 100% rename from src/common/memory.h rename to src/common/c_memory.h diff --git a/src/common/platform.h b/src/common/c_platform.h similarity index 100% rename from src/common/platform.h rename to src/common/c_platform.h diff --git a/src/common/teams.h b/src/common/c_teams.h similarity index 100% rename from src/common/teams.h rename to src/common/c_teams.h diff --git a/src/common/defs.h b/src/common/defs.h index d8fa5c9e..83870280 100644 --- a/src/common/defs.h +++ b/src/common/defs.h @@ -201,17 +201,14 @@ Util_ExtensionFromString(string inputString) return substring(inputString, modelNameLength - 3, modelNameLength); } - -/* other parts of shared to include */ - -#include "math.h" -#include "memory.h" -#include "platform.h" -#include "colors.h" -#include "materials.h" -#include "teams.h" -#include "events.h" -#include "flags.h" - - /** @} */ // end of common + +#include "c_math.h" +#include "c_math_vector.h" +#include "c_memory.h" +#include "c_platform.h" +#include "c_colors.h" +#include "c_materials.h" +#include "c_teams.h" +#include "c_events.h" +#include "c_flags.h" diff --git a/src/nav/defs.h b/src/nav/defs.h deleted file mode 100644 index 820be635..00000000 --- a/src/nav/defs.h +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (c) 2024 Vera Visions LLC. - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER - * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING - * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#include "linkflags.h" -#include "nodes.h" -#include "route.h" -#include "NodeEditor.h" -#include "way_convert.h" -#include "NavInfo.h" -#include "Hint.h" diff --git a/src/nav/nodes.qc b/src/nav/nodes.qc index a04b27db..1bab189a 100644 --- a/src/nav/nodes.qc +++ b/src/nav/nodes.qc @@ -135,7 +135,7 @@ Nodes_BuildFromEnts(void) NSLog("%i possible nodes found in %s", g_iNodes, mapname); - if (g_iNodes) { + if (g_iNodes > 0i) { NSLog("saving nodes nodes for %s", mapname); ncNodeEditor::SaveFile(sprintf("%s.way", mapname)); } else { diff --git a/src/server/defs.h b/src/server/defs.h index a11a64a6..f6ee7a81 100644 --- a/src/server/defs.h +++ b/src/server/defs.h @@ -21,7 +21,15 @@ #include "GameRules.h" #include "skill.h" #include "logging.h" -#include "../nav/defs.h" + +#include "../nav/linkflags.h" +#include "../nav/nodes.h" +#include "../nav/route.h" +#include "../nav/NodeEditor.h" +#include "../nav/way_convert.h" +#include "../nav/NavInfo.h" +#include "../nav/Hint.h" + #include "spawn.h" #include "plugins.h" #include "lament.h" diff --git a/src/xr/NSXRInput.h b/src/shared/XRInput.h similarity index 100% rename from src/xr/NSXRInput.h rename to src/shared/XRInput.h diff --git a/src/xr/NSXRInput.qc b/src/shared/XRInput.qc similarity index 100% rename from src/xr/NSXRInput.qc rename to src/shared/XRInput.qc diff --git a/src/xr/NSXRSpace.h b/src/shared/XRSpace.h similarity index 100% rename from src/xr/NSXRSpace.h rename to src/shared/XRSpace.h diff --git a/src/xr/NSXRSpace.qc b/src/shared/XRSpace.qc similarity index 100% rename from src/xr/NSXRSpace.qc rename to src/shared/XRSpace.qc diff --git a/src/shared/defs.h b/src/shared/defs.h index 1f895568..04449a67 100644 --- a/src/shared/defs.h +++ b/src/shared/defs.h @@ -124,7 +124,7 @@ string __fullspawndata; #include "Sound.h" #include "Debris.h" -#include "../xr/defs.h" +#include "xr.h" #include "../botlib/Bot.h" #include "Client.h" #include "Spectator.h" diff --git a/src/shared/entityDef.h b/src/shared/entityDef.h index c27a0994..7f0c17fa 100644 --- a/src/shared/entityDef.h +++ b/src/shared/entityDef.h @@ -92,7 +92,7 @@ to in-game events without you having to dig into the source code. #ifndef ENTITYDEF_MAX /** Can be redefined in the server its progs.src file. */ -#define ENTITYDEF_MAX 256 +#define ENTITYDEF_MAX 512 #endif /** Options for EntityDef checks. */ diff --git a/src/shared/include.src b/src/shared/include.src index 8ae75340..28766502 100644 --- a/src/shared/include.src +++ b/src/shared/include.src @@ -49,6 +49,8 @@ entityDef.qc ammo.qc activities.qc api.qc -../xr/include.src +XRSpace.qc +XRInput.qc +xr.qc ../botlib/Bot.qc #endlist diff --git a/src/xr/xr.h b/src/shared/xr.h similarity index 81% rename from src/xr/xr.h rename to src/shared/xr.h index b1ed9b25..ab3a36a3 100644 --- a/src/xr/xr.h +++ b/src/shared/xr.h @@ -14,6 +14,16 @@ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +/** @defgroup xr Extended Reality + @ingroup shared + @brief Extended reality framework, handling **Virtual Reality (VR)**, **Augmented Reality (AR)** and **Mixed Reality (MR)** support + +You can take advantage of **Extended Reality**, aka **XR** by using the `openxr` engine plugin. +*/ + +#include "XRSpace.h" +#include "XRInput.h" + /** Called internally by client/server modules for when a player joins. */ void XR_Init(entity); /** Called internally by client/server modules for when a player leaves. */ diff --git a/src/xr/xr.qc b/src/shared/xr.qc similarity index 100% rename from src/xr/xr.qc rename to src/shared/xr.qc diff --git a/src/xr/defs.h b/src/xr/defs.h deleted file mode 100644 index 025325e1..00000000 --- a/src/xr/defs.h +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (c) 2016-2022 Vera Visions LLC. - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER - * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING - * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -*/ - -#include "NSXRSpace.h" -#include "NSXRInput.h" -#include "xr.h" - -/** @defgroup xr Extended Reality - @ingroup shared - @brief Extended reality framework, handling **Virtual Reality (VR)**, **Augmented Reality (AR)** and **Mixed Reality (MR)** support - -You can take advantage of **Extended Reality**, aka **XR** by using the `openxr` engine plugin. -*/ diff --git a/src/xr/include.src b/src/xr/include.src index c078ec79..37454c2e 100644 --- a/src/xr/include.src +++ b/src/xr/include.src @@ -1,5 +1,3 @@ #includelist -../xr/NSXRSpace.qc -../xr/NSXRInput.qc -../xr/xr.qc + #endlist