Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • STJr/SRB2
  • Sryder/SRB2
  • wolfy852/SRB2
  • Alpha2244/SRB2
  • Inuyasha/SRB2
  • yoshibot/SRB2
  • TehRealSalt/SRB2
  • PrisimaTF/SRB2
  • Hatninja/SRB2
  • SteelT/SRB2
  • james/SRB2
  • ShaderWraith/SRB2
  • SinnamonLat/SRB2
  • mazmazz_/SRB2
  • filpAM/SRB2
  • chaoloveicemdboy/SRB2
  • Whooa21/SRB2
  • Machturne/SRB2
  • Golden/SRB2
  • Tatsuru/SRB2
  • Snu/SRB2
  • Zwip-Zwap_Zapony/SRB2
  • fickleheart/SRB2
  • alphaRexJames/SRB2
  • JJK/SRB2
  • diskpoppy/SRB2
  • Hannu_Hanhi/SRB2
  • ZipperQR/SRB2
  • kays/SRB2
  • spherallic/SRB2
  • Zippy_Zolton/SRB2
  • namiishere/SRB2
  • Ors/SRB2
  • SMS_Alfredo/SRB2
  • sonic_edge/SRB2
  • lavla/SRB2
  • ashi/SRB2
  • X.organic/SRB2
  • Fafabis/SRB2
  • Meziu/SRB2
  • v-rob/SRB2
  • tertu/SRB2
  • bitten2up/SRB2
  • flarn2006/SRB2
  • Krabs/SRB2
  • clairebun/SRB2
  • Lactozilla/SRB2
  • thehackstack/SRB2
  • Spice/SRB2
  • win8linux/SRB2
  • JohnFrostFox/SRB2
  • talktoneon726/SRB2
  • Wane/SRB2
  • Lamibe/SRB2
  • spectrumuk2/srb-2
  • nerdyminer18/srb-2
  • 256nil/SRB2
  • ARJr/SRB2
  • Alam/SRB2
  • Zenya/srb-2-marathon-demos
  • Acelite/srb-2-archivedmodifications
  • MIDIMan/SRB2
  • Lach/SRB2
  • Frostiikin/bounce-tweaks
  • Hanicef/SRB2Classic
  • Jaden/SRB2
  • Tyron/SRB2
  • Astronight/SRB2
  • Mari0shi06/SRB2
  • aiire/SRB2
  • Galactice/SRB2
  • srb2-ports/srb2-dreamcast
  • sdasdas/SRB2
  • chreas/srb-2-vr
  • StarManiaKG/the-story-of-sinically-rocketing-and-botching-the-2nd
  • LoganAir/SRB2
  • NepDisk/srb-2
  • alufolie91/SRB2
  • Felicia.iso/SRB2
  • twi/SRB2
  • BarrelsOFun/SRB2
  • Speed2411/SRB2
  • Leather_Realms/SRB2
  • Ayemar/SRB2
  • Acelite/SRB2
  • VladDoc/SRB2
  • kaldrum/model-features
  • strawberryfox417/SRB2
  • Lugent/SRB2
  • Jisk/SRB2
  • Rem/SRB2
  • Refrag/SRB2
  • Henry_3230/srb-3230
  • TehPuertoRicanSpartan2/tprs-srb2
  • Leminn/srb-2-marathon-stuff
  • chromaticpipe2/SRB2
  • MiguelGustavo15/SRB2
  • Maru/srb-2-tests
  • SilicDev/SRB2
  • UnmatchedBracket/SRB2
  • HybridDog/SRB2
  • xordspar0/SRB2
  • jsjhbewfhh/SRB2
  • Fancy2209/SRB2
  • Lorsoen/SRB2
  • shindoukin/SRB2
  • GamerOfDays/SRB2
  • Craftyawesome/SRB2
  • tenshi-tensai-tennoji/SRB2
  • Scarfdudebalder/SRB2
  • luigi-budd/srb-2-fix-interplag-lockon
  • mskluesner/SRB2
  • johnpetersa19/SRB2
  • Pheazant/SRB2
  • chromaticpipe2/srb2classic
  • romoney5/SRB2
  • PAS/SRB2Classic
  • BlueStaggo/SRB2
118 results
Show changes
Commits on Source (22)
...@@ -100,7 +100,8 @@ set(GIT_EXECUTABLE "git" CACHE FILEPATH "Path to git binary") ...@@ -100,7 +100,8 @@ set(GIT_EXECUTABLE "git" CACHE FILEPATH "Path to git binary")
include(GitUtilities) include(GitUtilities)
git_describe(SRB2_GIT_DESCRIBE "${CMAKE_SOURCE_DIR}") git_describe(SRB2_GIT_DESCRIBE "${CMAKE_SOURCE_DIR}")
git_current_branch(SRB2_GIT_BRANCH "${CMAKE_SOURCE_DIR}") git_current_branch(SRB2_GIT_BRANCH "${CMAKE_SOURCE_DIR}")
set(SRB2_COMP_REVISION "${SRB2_GIT_DESCRIBE}-<${SRB2_GIT_BRANCH}>") set(SRB2_COMP_BRANCH "${SRB2_GIT_BRANCH}")
set(SRB2_COMP_REVISION "${SRB2_GIT_DESCRIBE}")
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/src/config.h) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/src/config.h)
##### PACKAGE CONFIGURATION ##### ##### PACKAGE CONFIGURATION #####
......
...@@ -154,8 +154,8 @@ HW3SOUND for 3D hardware sound support ...@@ -154,8 +154,8 @@ HW3SOUND for 3D hardware sound support
<Add directory="libs/gme/include" /> <Add directory="libs/gme/include" />
</Compiler> </Compiler>
<Linker> <Linker>
<Add library="SDL" /> <Add library="SDL2" />
<Add library="SDL_mixer" /> <Add library="SDL2_mixer" />
<Add library="advapi32" /> <Add library="advapi32" />
<Add library="kernel32" /> <Add library="kernel32" />
<Add library="msvcrt" /> <Add library="msvcrt" />
...@@ -200,8 +200,8 @@ HW3SOUND for 3D hardware sound support ...@@ -200,8 +200,8 @@ HW3SOUND for 3D hardware sound support
<Add directory="libs/gme/include" /> <Add directory="libs/gme/include" />
</Compiler> </Compiler>
<Linker> <Linker>
<Add library="SDL" /> <Add library="SDL2" />
<Add library="SDL_mixer" /> <Add library="SDL2_mixer" />
<Add library="advapi32" /> <Add library="advapi32" />
<Add library="kernel32" /> <Add library="kernel32" />
<Add library="msvcrt" /> <Add library="msvcrt" />
...@@ -4141,283 +4141,170 @@ HW3SOUND for 3D hardware sound support ...@@ -4141,283 +4141,170 @@ HW3SOUND for 3D hardware sound support
<Option target="Debug Mingw64/DirectX" /> <Option target="Debug Mingw64/DirectX" />
<Option target="Release Mingw64/DirectX" /> <Option target="Release Mingw64/DirectX" />
</Unit> </Unit>
<Unit filename="src/sdl/IMG_xpm.c"> <Unit filename="src/sdl2/IMG_xpm.c">
<Option compilerVar="CC" /> <Option compilerVar="CC" />
<Option compile="0" />
<Option link="0" />
<Option target="Debug Native/SDL" /> <Option target="Debug Native/SDL" />
<Option target="Release Native/SDL" /> <Option target="Release Native/SDL" />
<Option target="Debug Mingw/SDL" />
<Option target="Release Mingw/SDL" />
<Option target="Debug Any/Dummy" />
<Option target="Release Any/Dummy" />
<Option target="Debug Linux/SDL" /> <Option target="Debug Linux/SDL" />
<Option target="Release Linux/SDL" /> <Option target="Release Linux/SDL" />
<Option target="Debug Mingw64/SDL" /> <Option target="Debug Mingw/SDL" />
<Option target="Release Mingw64/SDL" /> <Option target="Release Mingw/SDL" />
</Unit> </Unit>
<Unit filename="src/sdl/dosstr.c"> <Unit filename="src/sdl2/SDL_icon.xpm">
<Option compilerVar="CC" />
<Option target="Debug Native/SDL" /> <Option target="Debug Native/SDL" />
<Option target="Release Native/SDL" /> <Option target="Release Native/SDL" />
<Option target="Debug Mingw/SDL" />
<Option target="Release Mingw/SDL" />
<Option target="Debug Linux/SDL" /> <Option target="Debug Linux/SDL" />
<Option target="Release Linux/SDL" /> <Option target="Release Linux/SDL" />
<Option target="Debug Mingw64/SDL" /> <Option target="Debug Mingw/SDL" />
<Option target="Release Mingw64/SDL" /> <Option target="Release Mingw/SDL" />
</Unit> </Unit>
<Unit filename="src/sdl/endtxt.c"> <Unit filename="src/sdl2/dosstr.c">
<Option compilerVar="CC" /> <Option compilerVar="CC" />
<Option target="Debug Native/SDL" /> <Option target="Debug Native/SDL" />
<Option target="Release Native/SDL" /> <Option target="Release Native/SDL" />
<Option target="Debug Mingw/SDL" />
<Option target="Release Mingw/SDL" />
<Option target="Debug Linux/SDL" /> <Option target="Debug Linux/SDL" />
<Option target="Release Linux/SDL" /> <Option target="Release Linux/SDL" />
<Option target="Debug Mingw64/SDL" />
<Option target="Release Mingw64/SDL" />
</Unit>
<Unit filename="src/sdl/endtxt.h">
<Option target="Debug Native/SDL" />
<Option target="Release Native/SDL" />
<Option target="Debug Mingw/SDL" /> <Option target="Debug Mingw/SDL" />
<Option target="Release Mingw/SDL" /> <Option target="Release Mingw/SDL" />
<Option target="Debug Any/Dummy" />
<Option target="Release Any/Dummy" />
<Option target="Debug Linux/SDL" />
<Option target="Release Linux/SDL" />
<Option target="Debug Mingw64/SDL" />
<Option target="Release Mingw64/SDL" />
</Unit> </Unit>
<Unit filename="src/sdl/filter/filters.c"> <Unit filename="src/sdl2/endtxt.c">
<Option compilerVar="CC" /> <Option compilerVar="CC" />
<Option target="Debug Native/SDL" /> <Option target="Debug Native/SDL" />
<Option target="Release Native/SDL" /> <Option target="Release Native/SDL" />
<Option target="Debug Mingw/SDL" />
<Option target="Release Mingw/SDL" />
<Option target="Debug Linux/SDL" /> <Option target="Debug Linux/SDL" />
<Option target="Release Linux/SDL" /> <Option target="Release Linux/SDL" />
<Option target="Debug Mingw64/SDL" /> <Option target="Debug Mingw/SDL" />
<Option target="Release Mingw64/SDL" /> <Option target="Release Mingw/SDL" />
</Unit> </Unit>
<Unit filename="src/sdl/filter/filters.h"> <Unit filename="src/sdl2/endtxt.h">
<Option target="Debug Native/SDL" /> <Option target="Debug Native/SDL" />
<Option target="Release Native/SDL" /> <Option target="Release Native/SDL" />
<Option target="Debug Mingw/SDL" />
<Option target="Release Mingw/SDL" />
<Option target="Debug Any/Dummy" />
<Option target="Release Any/Dummy" />
<Option target="Debug Linux/SDL" /> <Option target="Debug Linux/SDL" />
<Option target="Release Linux/SDL" /> <Option target="Release Linux/SDL" />
<Option target="Debug Mingw64/SDL" /> <Option target="Debug Mingw/SDL" />
<Option target="Release Mingw64/SDL" /> <Option target="Release Mingw/SDL" />
</Unit> </Unit>
<Unit filename="src/sdl/filter/hq2x.c"> <Unit filename="src/sdl2/hwsym_sdl.c">
<Option compilerVar="CC" /> <Option compilerVar="CC" />
<Option target="Debug Native/SDL" /> <Option target="Debug Native/SDL" />
<Option target="Release Native/SDL" /> <Option target="Release Native/SDL" />
<Option target="Debug Mingw/SDL" />
<Option target="Release Mingw/SDL" />
<Option target="Debug Linux/SDL" /> <Option target="Debug Linux/SDL" />
<Option target="Release Linux/SDL" /> <Option target="Release Linux/SDL" />
<Option target="Debug Mingw64/SDL" />
<Option target="Release Mingw64/SDL" />
</Unit>
<Unit filename="src/sdl/filter/hq2x.h">
<Option target="Debug Native/SDL" />
<Option target="Release Native/SDL" />
<Option target="Debug Mingw/SDL" /> <Option target="Debug Mingw/SDL" />
<Option target="Release Mingw/SDL" /> <Option target="Release Mingw/SDL" />
<Option target="Debug Any/Dummy" />
<Option target="Release Any/Dummy" />
<Option target="Debug Linux/SDL" />
<Option target="Release Linux/SDL" />
<Option target="Debug Mingw64/SDL" />
<Option target="Release Mingw64/SDL" />
</Unit> </Unit>
<Unit filename="src/sdl/filter/interp.h"> <Unit filename="src/sdl2/hwsym_sdl.h">
<Option target="Debug Native/SDL" /> <Option target="Debug Native/SDL" />
<Option target="Release Native/SDL" /> <Option target="Release Native/SDL" />
<Option target="Debug Mingw/SDL" />
<Option target="Release Mingw/SDL" />
<Option target="Debug Any/Dummy" />
<Option target="Release Any/Dummy" />
<Option target="Debug Linux/SDL" /> <Option target="Debug Linux/SDL" />
<Option target="Release Linux/SDL" /> <Option target="Release Linux/SDL" />
<Option target="Debug Mingw64/SDL" /> <Option target="Debug Mingw/SDL" />
<Option target="Release Mingw64/SDL" /> <Option target="Release Mingw/SDL" />
</Unit> </Unit>
<Unit filename="src/sdl/filter/lq2x.c"> <Unit filename="src/sdl2/i_cdmus.c">
<Option compilerVar="CC" /> <Option compilerVar="CC" />
<Option target="Debug Native/SDL" /> <Option target="Debug Native/SDL" />
<Option target="Release Native/SDL" /> <Option target="Release Native/SDL" />
<Option target="Debug Mingw/SDL" />
<Option target="Release Mingw/SDL" />
<Option target="Debug Linux/SDL" /> <Option target="Debug Linux/SDL" />
<Option target="Release Linux/SDL" /> <Option target="Release Linux/SDL" />
<Option target="Debug Mingw64/SDL" />
<Option target="Release Mingw64/SDL" />
</Unit>
<Unit filename="src/sdl/filter/lq2x.h">
<Option target="Debug Native/SDL" />
<Option target="Release Native/SDL" />
<Option target="Debug Mingw/SDL" /> <Option target="Debug Mingw/SDL" />
<Option target="Release Mingw/SDL" /> <Option target="Release Mingw/SDL" />
<Option target="Debug Any/Dummy" />
<Option target="Release Any/Dummy" />
<Option target="Debug Linux/SDL" />
<Option target="Release Linux/SDL" />
<Option target="Debug Mingw64/SDL" />
<Option target="Release Mingw64/SDL" />
</Unit> </Unit>
<Unit filename="src/sdl/filter/main.c"> <Unit filename="src/sdl2/i_main.c">
<Option compilerVar="CC" /> <Option compilerVar="CC" />
<Option compile="0" />
<Option link="0" />
<Option target="Debug Native/SDL" /> <Option target="Debug Native/SDL" />
<Option target="Release Native/SDL" /> <Option target="Release Native/SDL" />
<Option target="Debug Mingw/SDL" />
<Option target="Release Mingw/SDL" />
<Option target="Debug Any/Dummy" />
<Option target="Release Any/Dummy" />
<Option target="Debug Linux/SDL" /> <Option target="Debug Linux/SDL" />
<Option target="Release Linux/SDL" /> <Option target="Release Linux/SDL" />
<Option target="Debug Mingw64/SDL" /> <Option target="Debug Mingw/SDL" />
<Option target="Release Mingw64/SDL" /> <Option target="Release Mingw/SDL" />
</Unit> </Unit>
<Unit filename="src/sdl/hwsym_sdl.c"> <Unit filename="src/sdl2/i_net.c">
<Option compilerVar="CC" /> <Option compilerVar="CC" />
<Option target="Debug Native/SDL" /> <Option target="Debug Native/SDL" />
<Option target="Release Native/SDL" /> <Option target="Release Native/SDL" />
<Option target="Debug Mingw/SDL" />
<Option target="Release Mingw/SDL" />
<Option target="Debug Linux/SDL" /> <Option target="Debug Linux/SDL" />
<Option target="Release Linux/SDL" /> <Option target="Release Linux/SDL" />
<Option target="Debug Mingw64/SDL" />
<Option target="Release Mingw64/SDL" />
</Unit>
<Unit filename="src/sdl/hwsym_sdl.h">
<Option target="Debug Native/SDL" />
<Option target="Release Native/SDL" />
<Option target="Debug Mingw/SDL" /> <Option target="Debug Mingw/SDL" />
<Option target="Release Mingw/SDL" /> <Option target="Release Mingw/SDL" />
<Option target="Debug Any/Dummy" />
<Option target="Release Any/Dummy" />
<Option target="Debug Linux/SDL" />
<Option target="Release Linux/SDL" />
<Option target="Debug Mingw64/SDL" />
<Option target="Release Mingw64/SDL" />
</Unit> </Unit>
<Unit filename="src/sdl/i_cdmus.c"> <Unit filename="src/sdl2/i_system.c">
<Option compilerVar="CC" /> <Option compilerVar="CC" />
<Option target="Debug Native/SDL" /> <Option target="Debug Native/SDL" />
<Option target="Release Native/SDL" /> <Option target="Release Native/SDL" />
<Option target="Debug Mingw/SDL" />
<Option target="Release Mingw/SDL" />
<Option target="Debug Linux/SDL" /> <Option target="Debug Linux/SDL" />
<Option target="Release Linux/SDL" /> <Option target="Release Linux/SDL" />
<Option target="Debug Mingw64/SDL" /> <Option target="Debug Mingw/SDL" />
<Option target="Release Mingw64/SDL" /> <Option target="Release Mingw/SDL" />
</Unit> </Unit>
<Unit filename="src/sdl/i_main.c"> <Unit filename="src/sdl2/i_ttf.c">
<Option compilerVar="CC" /> <Option compilerVar="CC" />
<Option target="Debug Native/SDL" /> <Option target="Debug Native/SDL" />
<Option target="Release Native/SDL" /> <Option target="Release Native/SDL" />
<Option target="Debug Mingw/SDL" />
<Option target="Release Mingw/SDL" />
<Option target="Debug Linux/SDL" /> <Option target="Debug Linux/SDL" />
<Option target="Release Linux/SDL" /> <Option target="Release Linux/SDL" />
<Option target="Debug Mingw64/SDL" /> <Option target="Debug Mingw/SDL" />
<Option target="Release Mingw64/SDL" /> <Option target="Release Mingw/SDL" />
</Unit> </Unit>
<Unit filename="src/sdl/i_net.c"> <Unit filename="src/sdl2/i_ttf.h">
<Option compilerVar="CC" />
<Option target="Debug Native/SDL" /> <Option target="Debug Native/SDL" />
<Option target="Release Native/SDL" /> <Option target="Release Native/SDL" />
<Option target="Debug Mingw/SDL" />
<Option target="Release Mingw/SDL" />
<Option target="Debug Linux/SDL" /> <Option target="Debug Linux/SDL" />
<Option target="Release Linux/SDL" /> <Option target="Release Linux/SDL" />
<Option target="Debug Mingw64/SDL" /> <Option target="Debug Mingw/SDL" />
<Option target="Release Mingw64/SDL" /> <Option target="Release Mingw/SDL" />
</Unit> </Unit>
<Unit filename="src/sdl/i_system.c"> <Unit filename="src/sdl2/i_video.c">
<Option compilerVar="CC" /> <Option compilerVar="CC" />
<Option target="Debug Native/SDL" /> <Option target="Debug Native/SDL" />
<Option target="Release Native/SDL" /> <Option target="Release Native/SDL" />
<Option target="Debug Mingw/SDL" />
<Option target="Release Mingw/SDL" />
<Option target="Debug Linux/SDL" /> <Option target="Debug Linux/SDL" />
<Option target="Release Linux/SDL" /> <Option target="Release Linux/SDL" />
<Option target="Debug Mingw64/SDL" /> <Option target="Debug Mingw/SDL" />
<Option target="Release Mingw64/SDL" /> <Option target="Release Mingw/SDL" />
</Unit> </Unit>
<Unit filename="src/sdl/i_video.c"> <Unit filename="src/sdl2/mixer_sound.c">
<Option compilerVar="CC" /> <Option compilerVar="CC" />
<Option target="Debug Native/SDL" /> <Option target="Debug Native/SDL" />
<Option target="Release Native/SDL" /> <Option target="Release Native/SDL" />
<Option target="Debug Mingw/SDL" />
<Option target="Release Mingw/SDL" />
<Option target="Debug Linux/SDL" /> <Option target="Debug Linux/SDL" />
<Option target="Release Linux/SDL" /> <Option target="Release Linux/SDL" />
<Option target="Debug Mingw64/SDL" />
<Option target="Release Mingw64/SDL" />
</Unit>
<Unit filename="src/sdl/mixer_sound.c">
<Option compilerVar="CC" />
<Option target="Debug Mingw/SDL" /> <Option target="Debug Mingw/SDL" />
<Option target="Release Mingw/SDL" /> <Option target="Release Mingw/SDL" />
<Option target="Debug Linux/SDL" />
<Option target="Release Linux/SDL" />
<Option target="Debug Mingw64/SDL" />
<Option target="Release Mingw64/SDL" />
</Unit> </Unit>
<Unit filename="src/sdl/ogl_sdl.c"> <Unit filename="src/sdl2/ogl_sdl.c">
<Option compilerVar="CC" /> <Option compilerVar="CC" />
<Option target="Debug Native/SDL" /> <Option target="Debug Native/SDL" />
<Option target="Release Native/SDL" /> <Option target="Release Native/SDL" />
<Option target="Debug Mingw/SDL" />
<Option target="Release Mingw/SDL" />
<Option target="Debug Linux/SDL" /> <Option target="Debug Linux/SDL" />
<Option target="Release Linux/SDL" /> <Option target="Release Linux/SDL" />
<Option target="Debug Mingw64/SDL" /> <Option target="Debug Mingw/SDL" />
<Option target="Release Mingw64/SDL" /> <Option target="Release Mingw/SDL" />
</Unit> </Unit>
<Unit filename="src/sdl/ogl_sdl.h"> <Unit filename="src/sdl2/ogl_sdl.h">
<Option target="Debug Native/SDL" /> <Option target="Debug Native/SDL" />
<Option target="Release Native/SDL" /> <Option target="Release Native/SDL" />
<Option target="Debug Mingw/SDL" />
<Option target="Release Mingw/SDL" />
<Option target="Debug Any/Dummy" />
<Option target="Release Any/Dummy" />
<Option target="Debug Linux/SDL" /> <Option target="Debug Linux/SDL" />
<Option target="Release Linux/SDL" /> <Option target="Release Linux/SDL" />
<Option target="Debug Mingw64/SDL" /> <Option target="Debug Mingw/SDL" />
<Option target="Release Mingw64/SDL" /> <Option target="Release Mingw/SDL" />
</Unit> </Unit>
<Unit filename="src/sdl/sdl_sound.c"> <Unit filename="src/sdl2/sdl_sound.c">
<Option compilerVar="CC" /> <Option compilerVar="CC" />
<Option target="Debug Native/SDL" /> <Option target="Debug Native/SDL" />
<Option target="Release Native/SDL" /> <Option target="Release Native/SDL" />
<Option target="Debug Linux/SDL" /> <Option target="Debug Linux/SDL" />
<Option target="Release Linux/SDL" /> <Option target="Release Linux/SDL" />
<Option target="Debug Mingw64/SDL" />
<Option target="Release Mingw64/SDL" />
<Option target="Debug Mingw/SDL" /> <Option target="Debug Mingw/SDL" />
<Option target="Release Mingw/SDL" /> <Option target="Release Mingw/SDL" />
</Unit> </Unit>
<Unit filename="src/sdl/sdlmain.h"> <Unit filename="src/sdl2/sdlmain.h">
<Option target="Debug Native/SDL" /> <Option target="Debug Native/SDL" />
<Option target="Release Native/SDL" /> <Option target="Release Native/SDL" />
<Option target="Debug Mingw/SDL" />
<Option target="Release Mingw/SDL" />
<Option target="Debug Any/Dummy" />
<Option target="Release Any/Dummy" />
<Option target="Debug Linux/SDL" /> <Option target="Debug Linux/SDL" />
<Option target="Release Linux/SDL" /> <Option target="Release Linux/SDL" />
<Option target="Debug Mingw64/SDL" /> <Option target="Debug Mingw/SDL" />
<Option target="Release Mingw64/SDL" /> <Option target="Release Mingw/SDL" />
</Unit> </Unit>
<Unit filename="src/sounds.c"> <Unit filename="src/sounds.c">
<Option compilerVar="CC" /> <Option compilerVar="CC" />
...@@ -4590,13 +4477,13 @@ HW3SOUND for 3D hardware sound support ...@@ -4590,13 +4477,13 @@ HW3SOUND for 3D hardware sound support
</Unit> </Unit>
<Unit filename="src/vid_copy.s"> <Unit filename="src/vid_copy.s">
<Option compilerVar="CC" /> <Option compilerVar="CC" />
<Option compiler="avrgcc" use="1" buildCommand="$compiler $options -x assembler-with-cpp -c $file -o $object" /> <Option compiler="gcc" use="1" buildCommand="$compiler $options -x assembler-with-cpp -c $file -o $object" />
<Option compiler="ppcgcc" use="1" buildCommand="$compiler $options -x assembler-with-cpp -c $file -o $object" />
<Option compiler="gnu_gcc_compiler_for_mingw32" use="1" buildCommand="$compiler $options -x assembler-with-cpp -c $file -o $object" /> <Option compiler="gnu_gcc_compiler_for_mingw32" use="1" buildCommand="$compiler $options -x assembler-with-cpp -c $file -o $object" />
<Option compiler="gnu_gcc_compiler_for_mingw64" use="1" buildCommand="$compiler $options -x assembler-with-cpp -c $file -o $object" />
<Option compiler="armelfgcc" use="1" buildCommand="$compiler $options -x assembler-with-cpp -c $file -o $object" /> <Option compiler="armelfgcc" use="1" buildCommand="$compiler $options -x assembler-with-cpp -c $file -o $object" />
<Option compiler="tricoregcc" use="1" buildCommand="$compiler $options -x assembler-with-cpp -c $file -o $object" /> <Option compiler="tricoregcc" use="1" buildCommand="$compiler $options -x assembler-with-cpp -c $file -o $object" />
<Option compiler="ppcgcc" use="1" buildCommand="$compiler $options -x assembler-with-cpp -c $file -o $object" /> <Option compiler="avrgcc" use="1" buildCommand="$compiler $options -x assembler-with-cpp -c $file -o $object" />
<Option compiler="gcc" use="1" buildCommand="$compiler $options -x assembler-with-cpp -c $file -o $object" /> <Option compiler="gnu_gcc_compiler_for_mingw64" use="1" buildCommand="$compiler $options -x assembler-with-cpp -c $file -o $object" />
<Option target="Debug Native/SDL" /> <Option target="Debug Native/SDL" />
<Option target="Release Native/SDL" /> <Option target="Release Native/SDL" />
<Option target="Debug Linux/SDL" /> <Option target="Debug Linux/SDL" />
......
...@@ -27,7 +27,6 @@ find_library(SDL2_LIBRARY ...@@ -27,7 +27,6 @@ find_library(SDL2_LIBRARY
"/usr/local/lib" "/usr/local/lib"
) )
# set include dir variables # set include dir variables
set(SDL2_PROCESS_INCLUDES SDL2_INCLUDE_DIR) set(SDL2_PROCESS_INCLUDES SDL2_INCLUDE_DIR)
set(SDL2_PROCESS_LIBS SDL2_LIBRARY) set(SDL2_PROCESS_LIBS SDL2_LIBRARY)
......
@ECHO OFF @ECHO OFF
set REV=Unknown set BRA=Unknown
set REV=illegal
copy nul: /b +%1\comptime.c tmp.$$$ > nul copy nul: /b +%1\comptime.c tmp.$$$ > nul
move tmp.$$$ %1\comptime.c > nul move tmp.$$$ %1\comptime.c > nul
SET REV=illegal
FOR /F "usebackq" %%s IN (`svnversion %1`) DO @SET REV=%%s if exist .git goto gitrev
if exist ..\.git goto gitrev
if exist .svn goto svnrev
goto filwri
:gitrev
set GIT=%2
if "%GIT%"=="" set GIT=git
FOR /F "usebackq" %%s IN (`%GIT% rev-parse --abbrev-ref HEAD`) DO @SET BRA=%%s
FOR /F "usebackq" %%s IN (`%GIT% rev-parse HEAD`) DO @SET REV=%%s
set REV=%REV:~0,8%
goto filwri
:svnrev
set BRA=Subversion
FOR /F "usebackq" %%s IN (`svnversion .`) DO @SET REV=%%s
set REV=r%REV%
goto filwri
:filwri
ECHO // Do not edit! This file was autogenerated > %1\comptime.h ECHO // Do not edit! This file was autogenerated > %1\comptime.h
ECHO // by the %0 batch file >> %1\comptime.h ECHO // by the %0 batch file >> %1\comptime.h
ECHO // >> %1\comptime.h ECHO // >> %1\comptime.h
ECHO const char* comprevision = "r%REV%"; >> %1\comptime.h ECHO const char* compbranch = "%BRA%"; >> %1\comptime.h
ECHO const char* comprevision = "%REV%"; >> %1\comptime.h
...@@ -5,13 +5,15 @@ if [ x"$1" != x ]; then ...@@ -5,13 +5,15 @@ if [ x"$1" != x ]; then
fi fi
versiongit() { versiongit() {
gitversion=`git describe` gitbranch=`git rev-parse --abbrev-ref HEAD`
gitversion=`git rev-parse HEAD`
cat <<EOF > $path/comptime.h cat <<EOF > $path/comptime.h
// Do not edit! This file was autogenerated // Do not edit! This file was autogenerated
// by the $0 script with git svn // by the $0 script with git
// //
const char* comprevision = "$gitversion"; const char* compbranch = "$gitbranch";
const char* comprevision = "${gitversion:0:8}";
EOF EOF
exit 0 exit 0
} }
...@@ -23,6 +25,7 @@ versionsvn() { ...@@ -23,6 +25,7 @@ versionsvn() {
// Do not edit! This file was autogenerated // Do not edit! This file was autogenerated
// by the $0 script with subversion // by the $0 script with subversion
// //
const char* compbranch = "Subversion";
const char* comprevision = "r$svnrevision"; const char* comprevision = "r$svnrevision";
EOF EOF
exit 0 exit 0
...@@ -34,6 +37,7 @@ versionfake() { ...@@ -34,6 +37,7 @@ versionfake() {
// Do not edit! This file was autogenerated // Do not edit! This file was autogenerated
// by the $0 script with an unknown or nonexist SCM // by the $0 script with an unknown or nonexist SCM
// //
const char* compbranch = "Unknown";
const char* comprevision = "illegal"; const char* comprevision = "illegal";
EOF EOF
} }
......
...@@ -150,6 +150,7 @@ set(SRB2_CORE_GAME_SOURCES ...@@ -150,6 +150,7 @@ set(SRB2_CORE_GAME_SOURCES
p_saveg.c p_saveg.c
p_setup.c p_setup.c
p_sight.c p_sight.c
p_slopes.c
p_spec.c p_spec.c
p_telept.c p_telept.c
p_tick.c p_tick.c
...@@ -162,6 +163,7 @@ set(SRB2_CORE_GAME_SOURCES ...@@ -162,6 +163,7 @@ set(SRB2_CORE_GAME_SOURCES
p_pspr.h p_pspr.h
p_saveg.h p_saveg.h
p_setup.h p_setup.h
p_slopes.h
p_spec.h p_spec.h
p_tick.h p_tick.h
) )
...@@ -263,6 +265,7 @@ if(${SRB2_CONFIG_HAVE_BLUA}) ...@@ -263,6 +265,7 @@ if(${SRB2_CONFIG_HAVE_BLUA})
blua/lfunc.c blua/lfunc.c
blua/lgc.c blua/lgc.c
blua/linit.c blua/linit.c
blua/liolib.c
blua/llex.c blua/llex.c
blua/lmem.c blua/lmem.c
blua/lobject.c blua/lobject.c
......
...@@ -454,6 +454,7 @@ OBJS:=$(i_main_o) \ ...@@ -454,6 +454,7 @@ OBJS:=$(i_main_o) \
$(OBJDIR)/p_telept.o \ $(OBJDIR)/p_telept.o \
$(OBJDIR)/p_tick.o \ $(OBJDIR)/p_tick.o \
$(OBJDIR)/p_user.o \ $(OBJDIR)/p_user.o \
$(OBJDIR)/p_slopes.o \
$(OBJDIR)/tables.o \ $(OBJDIR)/tables.o \
$(OBJDIR)/r_bsp.o \ $(OBJDIR)/r_bsp.o \
$(OBJDIR)/r_data.o \ $(OBJDIR)/r_data.o \
......
...@@ -18,6 +18,7 @@ OBJS:=$(OBJS) \ ...@@ -18,6 +18,7 @@ OBJS:=$(OBJS) \
$(OBJDIR)/ldo.o \ $(OBJDIR)/ldo.o \
$(OBJDIR)/lfunc.o \ $(OBJDIR)/lfunc.o \
$(OBJDIR)/linit.o \ $(OBJDIR)/linit.o \
$(OBJDIR)/liolib.o \
$(OBJDIR)/llex.o \ $(OBJDIR)/llex.o \
$(OBJDIR)/lmem.o \ $(OBJDIR)/lmem.o \
$(OBJDIR)/lobject.o \ $(OBJDIR)/lobject.o \
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
static const luaL_Reg lualibs[] = { static const luaL_Reg lualibs[] = {
{"", luaopen_base}, {"", luaopen_base},
{LUA_TABLIBNAME, luaopen_table}, {LUA_TABLIBNAME, luaopen_table},
{LUA_IOLIBNAME, luaopen_io},
{LUA_STRLIBNAME, luaopen_string}, {LUA_STRLIBNAME, luaopen_string},
{NULL, NULL} {NULL, NULL}
}; };
......
/*
** $Id: liolib.c,v 2.73.1.3 2008/01/18 17:47:43 roberto Exp $
** Standard I/O (and system) library
** See Copyright Notice in lua.h
*/
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define liolib_c
#define LUA_LIB
#include "lua.h"
#include "lauxlib.h"
#include "lualib.h"
#include "../i_system.h"
#include "../doomdef.h"
#include "../m_misc.h"
#define IO_INPUT 1
#define IO_OUTPUT 2
#define FILELIMIT 1024*1024 // Size limit for reading/writing files
static const char *const fnames[] = {"input", "output"};
static const char *whitelist[] = { // Allow scripters to write files of these types to SRB2's folder
".txt",
".sav2",
".cfg",
".png",
".bmp"
};
static int pushresult (lua_State *L, int i, const char *filename) {
int en = errno; /* calls to Lua API may change this value */
if (i) {
lua_pushboolean(L, 1);
return 1;
}
else {
lua_pushnil(L);
if (filename)
lua_pushfstring(L, "%s: %s", filename, strerror(en));
else
lua_pushfstring(L, "%s", strerror(en));
lua_pushinteger(L, en);
return 3;
}
}
static void fileerror (lua_State *L, int arg, const char *filename) {
lua_pushfstring(L, "%s: %s", filename, strerror(errno));
luaL_argerror(L, arg, lua_tostring(L, -1));
}
#define tofilep(L) ((FILE **)luaL_checkudata(L, 1, LUA_FILEHANDLE))
static int io_type (lua_State *L) {
void *ud;
luaL_checkany(L, 1);
ud = lua_touserdata(L, 1);
lua_getfield(L, LUA_REGISTRYINDEX, LUA_FILEHANDLE);
if (ud == NULL || !lua_getmetatable(L, 1) || !lua_rawequal(L, -2, -1))
lua_pushnil(L); /* not a file */
else if (*((FILE **)ud) == NULL)
lua_pushliteral(L, "closed file");
else
lua_pushliteral(L, "file");
return 1;
}
static FILE *tofile (lua_State *L) {
FILE **f = tofilep(L);
if (*f == NULL)
luaL_error(L, "attempt to use a closed file");
return *f;
}
/*
** When creating file handles, always creates a `closed' file handle
** before opening the actual file; so, if there is a memory error, the
** file is not left opened.
*/
static FILE **newfile (lua_State *L) {
FILE **pf = (FILE **)lua_newuserdata(L, sizeof(FILE *));
*pf = NULL; /* file handle is currently `closed' */
luaL_getmetatable(L, LUA_FILEHANDLE);
lua_setmetatable(L, -2);
return pf;
}
/*
** function to (not) close the standard files stdin, stdout, and stderr
*/
static int io_noclose (lua_State *L) {
lua_pushnil(L);
lua_pushliteral(L, "cannot close standard file");
return 2;
}
/*
** function to close regular files
*/
static int io_fclose (lua_State *L) {
FILE **p = tofilep(L);
int ok = (fclose(*p) == 0);
*p = NULL;
return pushresult(L, ok, NULL);
}
static int aux_close (lua_State *L) {
lua_getfenv(L, 1);
lua_getfield(L, -1, "__close");
return (lua_tocfunction(L, -1))(L);
}
static int io_close (lua_State *L) {
if (lua_isnone(L, 1))
lua_rawgeti(L, LUA_ENVIRONINDEX, IO_OUTPUT);
tofile(L); /* make sure argument is a file */
return aux_close(L);
}
static int io_gc (lua_State *L) {
FILE *f = *tofilep(L);
/* ignore closed files */
if (f != NULL)
aux_close(L);
return 0;
}
static int io_tostring (lua_State *L) {
FILE *f = *tofilep(L);
if (f == NULL)
lua_pushliteral(L, "file (closed)");
else
lua_pushfstring(L, "file (%p)", f);
return 1;
}
static int StartsWith(const char *a, const char *b) // this is wolfs being lazy yet again
{
if(strncmp(a, b, strlen(b)) == 0) return 1;
return 0;
}
static int io_open (lua_State *L) {
FILE **pf;
const char *filename = luaL_checkstring(L, 1);
int pass = 0;
size_t i;
int length = strlen(filename);
char *splitter, *forward, *backward;
char *destFilename;
const char *mode = luaL_optstring(L, 2, "r");
for (i = 0; i < (sizeof (whitelist) / sizeof(const char *)); i++)
{
if (!stricmp(&filename[length - strlen(whitelist[i])], whitelist[i]))
{
pass = 1;
break;
}
}
if (strstr(filename, "..") || strchr(filename, ':') || StartsWith(filename, "\\")
|| StartsWith(filename, "/") || !pass)
{
luaL_error(L,"access denied to %s", filename);
return pushresult(L,0,filename);
}
destFilename = va("luafiles"PATHSEP"%s", filename);
// Make directories as needed
splitter = destFilename;
forward = strchr(splitter, '/');
backward = strchr(splitter, '\\');
while ((splitter = (forward && backward) ? min(forward, backward) : (forward ?: backward)))
{
*splitter = 0;
I_mkdir(destFilename, 0755);
*splitter = '/';
splitter++;
forward = strchr(splitter, '/');
backward = strchr(splitter, '\\');
}
pf = newfile(L);
*pf = fopen(destFilename, mode);
return (*pf == NULL) ? pushresult(L, 0, filename) : 1;
}
static int io_tmpfile (lua_State *L) {
FILE **pf = newfile(L);
*pf = tmpfile();
return (*pf == NULL) ? pushresult(L, 0, NULL) : 1;
}
static FILE *getiofile (lua_State *L, int findex) {
FILE *f;
lua_rawgeti(L, LUA_ENVIRONINDEX, findex);
f = *(FILE **)lua_touserdata(L, -1);
if (f == NULL)
luaL_error(L, "standard %s file is closed", fnames[findex - 1]);
return f;
}
static int g_iofile (lua_State *L, int f, const char *mode) {
if (!lua_isnoneornil(L, 1)) {
const char *filename = lua_tostring(L, 1);
if (filename) {
FILE **pf = newfile(L);
*pf = fopen(filename, mode);
if (*pf == NULL)
fileerror(L, 1, filename);
}
else {
tofile(L); /* check that it's a valid file handle */
lua_pushvalue(L, 1);
}
lua_rawseti(L, LUA_ENVIRONINDEX, f);
}
/* return current value */
lua_rawgeti(L, LUA_ENVIRONINDEX, f);
return 1;
}
static int io_input (lua_State *L) {
return g_iofile(L, IO_INPUT, "r");
}
static int io_output (lua_State *L) {
return g_iofile(L, IO_OUTPUT, "w");
}
static int io_readline (lua_State *L);
static void aux_lines (lua_State *L, int idx, int toclose) {
lua_pushvalue(L, idx);
lua_pushboolean(L, toclose); /* close/not close file when finished */
lua_pushcclosure(L, io_readline, 2);
}
static int f_lines (lua_State *L) {
tofile(L); /* check that it's a valid file handle */
aux_lines(L, 1, 0);
return 1;
}
static int io_lines (lua_State *L) {
if (lua_isnoneornil(L, 1)) { /* no arguments? */
/* will iterate over default input */
lua_rawgeti(L, LUA_ENVIRONINDEX, IO_INPUT);
return f_lines(L);
}
else {
const char *filename = luaL_checkstring(L, 1);
FILE **pf = newfile(L);
*pf = fopen(filename, "r");
if (*pf == NULL)
fileerror(L, 1, filename);
aux_lines(L, lua_gettop(L), 1);
return 1;
}
}
/*
** {======================================================
** READ
** =======================================================
*/
static int read_number (lua_State *L, FILE *f) {
lua_Number d;
if (fscanf(f, LUA_NUMBER_SCAN, &d) == 1) {
lua_pushnumber(L, d);
return 1;
}
else return 0; /* read fails */
}
static int test_eof (lua_State *L, FILE *f) {
int c = getc(f);
ungetc(c, f);
lua_pushlstring(L, NULL, 0);
return (c != EOF);
}
static int read_line (lua_State *L, FILE *f) {
luaL_Buffer b;
luaL_buffinit(L, &b);
for (;;) {
size_t l;
char *p = luaL_prepbuffer(&b);
if (fgets(p, LUAL_BUFFERSIZE, f) == NULL) { /* eof? */
luaL_pushresult(&b); /* close buffer */
return (lua_objlen(L, -1) > 0); /* check whether read something */
}
l = strlen(p);
if (l == 0 || p[l-1] != '\n')
luaL_addsize(&b, l);
else {
luaL_addsize(&b, l - 1); /* do not include `eol' */
luaL_pushresult(&b); /* close buffer */
return 1; /* read at least an `eol' */
}
}
}
static int read_chars (lua_State *L, FILE *f, size_t n) {
size_t rlen; /* how much to read */
size_t nr; /* number of chars actually read */
luaL_Buffer b;
luaL_buffinit(L, &b);
rlen = LUAL_BUFFERSIZE; /* try to read that much each time */
do {
char *p = luaL_prepbuffer(&b);
if (rlen > n) rlen = n; /* cannot read more than asked */
nr = fread(p, sizeof(char), rlen, f);
luaL_addsize(&b, nr);
n -= nr; /* still have to read `n' chars */
} while (n > 0 && nr == rlen); /* until end of count or eof */
luaL_pushresult(&b); /* close buffer */
return (n == 0 || lua_objlen(L, -1) > 0);
}
static int g_read (lua_State *L, FILE *f, int first) {
int nargs = lua_gettop(L) - 1;
int success;
int n;
clearerr(f);
if (nargs == 0) { /* no arguments? */
success = read_line(L, f);
n = first+1; /* to return 1 result */
}
else { /* ensure stack space for all results and for auxlib's buffer */
luaL_checkstack(L, nargs+LUA_MINSTACK, "too many arguments");
success = 1;
for (n = first; nargs-- && success; n++) {
if (lua_type(L, n) == LUA_TNUMBER) {
size_t l = (size_t)lua_tointeger(L, n);
success = (l == 0) ? test_eof(L, f) : read_chars(L, f, l);
}
else {
const char *p = lua_tostring(L, n);
luaL_argcheck(L, p && p[0] == '*', n, "invalid option");
switch (p[1]) {
case 'n': /* number */
success = read_number(L, f);
break;
case 'l': /* line */
success = read_line(L, f);
break;
case 'a': /* file */
read_chars(L, f, ~((size_t)0)); /* read MAX_SIZE_T chars */
success = 1; /* always success */
break;
default:
return luaL_argerror(L, n, "invalid format");
}
}
}
}
if (ferror(f))
return pushresult(L, 0, NULL);
if (!success) {
lua_pop(L, 1); /* remove last result */
lua_pushnil(L); /* push nil instead */
}
return n - first;
}
static int io_read (lua_State *L) {
return g_read(L, getiofile(L, IO_INPUT), 1);
}
static int f_read (lua_State *L) {
return g_read(L, tofile(L), 2);
}
static int io_readline (lua_State *L) {
FILE *f = *(FILE **)lua_touserdata(L, lua_upvalueindex(1));
int sucess;
if (f == NULL) /* file is already closed? */
luaL_error(L, "file is already closed");
sucess = read_line(L, f);
if (ferror(f))
return luaL_error(L, "%s", strerror(errno));
if (sucess) return 1;
else { /* EOF */
if (lua_toboolean(L, lua_upvalueindex(2))) { /* generator created file? */
lua_settop(L, 0);
lua_pushvalue(L, lua_upvalueindex(1));
aux_close(L); /* close it */
}
return 0;
}
}
/* }====================================================== */
static int g_write (lua_State *L, FILE *f, int arg) {
int nargs = lua_gettop(L) - 1;
int status = 1;
size_t count;
for (; nargs--; arg++) {
if (lua_type(L, arg) == LUA_TNUMBER) {
/* optimization: could be done exactly as for strings */
status = status &&
fprintf(f, LUA_NUMBER_FMT, lua_tonumber(L, arg)) > 0;
}
else {
size_t l;
const char *s = luaL_checklstring(L, arg, &l);
count += l;
if (ftell(f) + l > FILELIMIT)
{
luaL_error(L,"write limit bypassed in file. Changes have been discarded.");
break;
}
status = status && (fwrite(s, sizeof(char), l, f) == l);
}
}
return pushresult(L, status, NULL);
}
static int io_write (lua_State *L) {
return g_write(L, getiofile(L, IO_OUTPUT), 1);
}
static int f_write (lua_State *L) {
return g_write(L, tofile(L), 2);
}
static int f_seek (lua_State *L) {
static const int mode[] = {SEEK_SET, SEEK_CUR, SEEK_END};
static const char *const modenames[] = {"set", "cur", "end", NULL};
FILE *f = tofile(L);
int op = luaL_checkoption(L, 2, "cur", modenames);
long offset = luaL_optlong(L, 3, 0);
op = fseek(f, offset, mode[op]);
if (op)
return pushresult(L, 0, NULL); /* error */
else {
lua_pushinteger(L, ftell(f));
return 1;
}
}
static int f_setvbuf (lua_State *L) {
static const int mode[] = {_IONBF, _IOFBF, _IOLBF};
static const char *const modenames[] = {"no", "full", "line", NULL};
FILE *f = tofile(L);
int op = luaL_checkoption(L, 2, NULL, modenames);
lua_Integer sz = luaL_optinteger(L, 3, LUAL_BUFFERSIZE);
int res = setvbuf(f, NULL, mode[op], sz);
return pushresult(L, res == 0, NULL);
}
static int io_flush (lua_State *L) {
return pushresult(L, fflush(getiofile(L, IO_OUTPUT)) == 0, NULL);
}
static int f_flush (lua_State *L) {
return pushresult(L, fflush(tofile(L)) == 0, NULL);
}
static const luaL_Reg iolib[] = {
{"close", io_close},
{"flush", io_flush},
{"input", io_input},
{"lines", io_lines},
{"open", io_open},
{"output", io_output},
{"read", io_read},
{"tmpfile", io_tmpfile},
{"type", io_type},
{"write", io_write},
{NULL, NULL}
};
static const luaL_Reg flib[] = {
{"close", io_close},
{"flush", f_flush},
{"lines", f_lines},
{"read", f_read},
{"seek", f_seek},
{"setvbuf", f_setvbuf},
{"write", f_write},
{"__gc", io_gc},
{"__tostring", io_tostring},
{NULL, NULL}
};
static void createmeta (lua_State *L) {
luaL_newmetatable(L, LUA_FILEHANDLE); /* create metatable for file handles */
lua_pushvalue(L, -1); /* push metatable */
lua_setfield(L, -2, "__index"); /* metatable.__index = metatable */
luaL_register(L, NULL, flib); /* file methods */
}
static void createstdfile (lua_State *L, FILE *f, int k, const char *fname) {
*newfile(L) = f;
if (k > 0) {
lua_pushvalue(L, -1);
lua_rawseti(L, LUA_ENVIRONINDEX, k);
}
lua_pushvalue(L, -2); /* copy environment */
lua_setfenv(L, -2); /* set it */
lua_setfield(L, -3, fname);
}
static void newfenv (lua_State *L, lua_CFunction cls) {
lua_createtable(L, 0, 1);
lua_pushcfunction(L, cls);
lua_setfield(L, -2, "__close");
}
LUALIB_API int luaopen_io (lua_State *L) {
createmeta(L);
/* create (private) environment (with fields IO_INPUT, IO_OUTPUT, __close) */
newfenv(L, io_fclose);
lua_replace(L, LUA_ENVIRONINDEX);
/* open library */
luaL_register(L, LUA_IOLIBNAME, iolib);
/* create (and set) default files */
newfenv(L, io_noclose); /* close function for default files */
createstdfile(L, stdin, IO_INPUT, "stdin");
createstdfile(L, stdout, IO_OUTPUT, "stdout");
createstdfile(L, stderr, 0, "stderr");
lua_pop(L, 1); /* pop environment for default files */
return 1;
}
...@@ -11,6 +11,13 @@ ...@@ -11,6 +11,13 @@
#include <limits.h> #include <limits.h>
#include <stddef.h> #include <stddef.h>
#ifdef _MSC_VER
#define INT32 __int32
#else
#include <stdint.h>
#define INT32 int32_t
#endif
/* /*
** ================================================================== ** ==================================================================
...@@ -140,7 +147,7 @@ ...@@ -140,7 +147,7 @@
** CHANGE that if ptrdiff_t is not adequate on your machine. (On most ** CHANGE that if ptrdiff_t is not adequate on your machine. (On most
** machines, ptrdiff_t gives a good choice between int or long.) ** machines, ptrdiff_t gives a good choice between int or long.)
*/ */
#define LUA_INTEGER ptrdiff_t #define LUA_INTEGER INT32
/* /*
...@@ -502,13 +509,13 @@ ...@@ -502,13 +509,13 @@
*/ */
//#define LUA_NUMBER_DOUBLE //#define LUA_NUMBER_DOUBLE
#define LUA_NUMBER ptrdiff_t #define LUA_NUMBER INT32
/* /*
@@ LUAI_UACNUMBER is the result of an 'usual argument conversion' @@ LUAI_UACNUMBER is the result of an 'usual argument conversion'
@* over a number. @* over a number.
*/ */
#define LUAI_UACNUMBER ptrdiff_t #define LUAI_UACNUMBER INT32
/* /*
...@@ -519,14 +526,14 @@ ...@@ -519,14 +526,14 @@
@@ lua_str2number converts a string to a number. @@ lua_str2number converts a string to a number.
*/ */
#ifdef LUA_WIN #ifdef LUA_WIN
#define LUA_NUMBER_SCAN "%Ii" #define LUA_NUMBER_SCAN "%d"
#define LUA_NUMBER_FMT "%Ii" #define LUA_NUMBER_FMT "%d"
#else #else
#define LUA_NUMBER_SCAN "%ti" #define LUA_NUMBER_SCAN "%d"
#define LUA_NUMBER_FMT "%ti" #define LUA_NUMBER_FMT "%d"
#endif #endif
#define lua_number2str(s,n) sprintf((s), LUA_NUMBER_FMT, (n)) #define lua_number2str(s,n) sprintf((s), LUA_NUMBER_FMT, (n))
#define LUAI_MAXNUMBER2STR 32 /* 16 digits, sign, point, and \0 */ #define LUAI_MAXNUMBER2STR 12 /* 10 digits, sign, and \0 */
#define lua_str2number(s,p) strtol((s), (p), 10) #define lua_str2number(s,p) strtol((s), (p), 10)
......
...@@ -21,6 +21,9 @@ LUALIB_API int (luaopen_base) (lua_State *L); ...@@ -21,6 +21,9 @@ LUALIB_API int (luaopen_base) (lua_State *L);
#define LUA_TABLIBNAME "table" #define LUA_TABLIBNAME "table"
LUALIB_API int (luaopen_table) (lua_State *L); LUALIB_API int (luaopen_table) (lua_State *L);
#define LUA_IOLIBNAME "io"
LUALIB_API int (luaopen_io) (lua_State *L);
#define LUA_STRLIBNAME "string" #define LUA_STRLIBNAME "string"
LUALIB_API int (luaopen_string) (lua_State *L); LUALIB_API int (luaopen_string) (lua_State *L);
......
...@@ -9,12 +9,14 @@ ...@@ -9,12 +9,14 @@
#if (defined(CMAKECONFIG)) #if (defined(CMAKECONFIG))
#include "config.h" #include "config.h"
const char *compbranch = SRB2_COMP_BRANCH;
const char *comprevision = SRB2_COMP_REVISION; const char *comprevision = SRB2_COMP_REVISION;
#elif (defined(COMPVERSION)) #elif (defined(COMPVERSION))
#include "comptime.h" #include "comptime.h"
#else #else
const char *compbranch = "Unknown";
const char *comprevision = "illegal"; const char *comprevision = "illegal";
#endif #endif
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
#define ASSET_HASH_PATCH_DTA "${SRB2_ASSET_patch.dta_HASH}" #define ASSET_HASH_PATCH_DTA "${SRB2_ASSET_patch.dta_HASH}"
#define SRB2_COMP_REVISION "${SRB2_COMP_REVISION}" #define SRB2_COMP_REVISION "${SRB2_COMP_REVISION}"
#define SRB2_COMP_BRANCH "${SRB2_COMP_BRANCH}"
#define SRB2_GIT_DESCRIBE "${SRB2_GIT_DESCRIBE}" #define SRB2_GIT_DESCRIBE "${SRB2_GIT_DESCRIBE}"
#define SRB2_GIT_BRANCH "${SRB2_GIT_BRANCH}" #define SRB2_GIT_BRANCH "${SRB2_GIT_BRANCH}"
......
...@@ -202,7 +202,7 @@ static void CONS_Bind_f(void) ...@@ -202,7 +202,7 @@ static void CONS_Bind_f(void)
} }
key = G_KeyStringtoNum(COM_Argv(1)); key = G_KeyStringtoNum(COM_Argv(1));
if (!key) if (key <= 0 || key >= NUMINPUTS)
{ {
CONS_Alert(CONS_NOTICE, M_GetText("Invalid key name\n")); CONS_Alert(CONS_NOTICE, M_GetText("Invalid key name\n"));
return; return;
......
...@@ -96,6 +96,10 @@ int snprintf(char *str, size_t n, const char *fmt, ...); ...@@ -96,6 +96,10 @@ int snprintf(char *str, size_t n, const char *fmt, ...);
#include "hardware/hw3sound.h" #include "hardware/hw3sound.h"
#endif #endif
#ifdef HAVE_BLUA
#include "lua_script.h"
#endif
// platform independant focus loss // platform independant focus loss
UINT8 window_notinfocus = false; UINT8 window_notinfocus = false;
...@@ -634,6 +638,10 @@ void D_SRB2Loop(void) ...@@ -634,6 +638,10 @@ void D_SRB2Loop(void)
#ifdef HW3SOUND #ifdef HW3SOUND
HW3S_EndFrameUpdate(); HW3S_EndFrameUpdate();
#endif #endif
#ifdef HAVE_BLUA
LUA_Step();
#endif
} }
} }
...@@ -943,9 +951,9 @@ void D_SRB2Main(void) ...@@ -943,9 +951,9 @@ void D_SRB2Main(void)
#endif #endif
#if defined (_WIN32_WCE) //|| defined (_DEBUG) || defined (GP2X) #if defined (_WIN32_WCE) //|| defined (_DEBUG) || defined (GP2X)
devparm = !M_CheckParm("-nodebug"); devparm = M_CheckParm("-nodebug") == 0;
#else #else
devparm = M_CheckParm("-debug"); devparm = M_CheckParm("-debug") != 0;
#endif #endif
// for dedicated server // for dedicated server
...@@ -1118,7 +1126,7 @@ void D_SRB2Main(void) ...@@ -1118,7 +1126,7 @@ void D_SRB2Main(void)
#endif #endif
D_CleanFile(); D_CleanFile();
#if 1 // md5s last updated 12/14/14 #ifndef DEVELOP // md5s last updated 12/14/14
// Check MD5s of autoloaded files // Check MD5s of autoloaded files
W_VerifyFileMD5(0, ASSET_HASH_SRB2_SRB); // srb2.srb/srb2.wad W_VerifyFileMD5(0, ASSET_HASH_SRB2_SRB); // srb2.srb/srb2.wad
......
...@@ -3179,7 +3179,11 @@ static void Command_ListWADS_f(void) ...@@ -3179,7 +3179,11 @@ static void Command_ListWADS_f(void)
*/ */
static void Command_Version_f(void) static void Command_Version_f(void)
{ {
#ifdef DEVELOP
CONS_Printf("Sonic Robo Blast 2 %s-%s (%s %s)\n", compbranch, comprevision, compdate, comptime);
#else
CONS_Printf("Sonic Robo Blast 2 %s (%s %s %s)\n", VERSIONSTRING, compdate, comptime, comprevision); CONS_Printf("Sonic Robo Blast 2 %s (%s %s %s)\n", VERSIONSTRING, compdate, comptime, comprevision);
#endif
} }
#ifdef UPDATE_ALERT #ifdef UPDATE_ALERT
...@@ -3193,7 +3197,27 @@ static void Command_ModDetails_f(void) ...@@ -3193,7 +3197,27 @@ static void Command_ModDetails_f(void)
// //
static void Command_ShowGametype_f(void) static void Command_ShowGametype_f(void)
{ {
CONS_Printf(M_GetText("Current gametype is %d\n"), gametype); INT32 j;
const char *gametypestr = NULL;
if (!(netgame || multiplayer)) // print "Single player" instead of "Co-op"
{
CONS_Printf(M_GetText("Current gametype is %s\n"), M_GetText("Single player"));
return;
}
// find name string for current gametype
for (j = 0; gametype_cons_t[j].strvalue; j++)
{
if (gametype_cons_t[j].value == gametype)
{
gametypestr = gametype_cons_t[j].strvalue;
break;
}
}
if (gametypestr)
CONS_Printf(M_GetText("Current gametype is %s\n"), gametypestr);
else // string for current gametype was not found above (should never happen)
CONS_Printf(M_GetText("Unknown gametype set (%d)\n"), gametype);
} }
/** Plays the intro. /** Plays the intro.
......
...@@ -473,6 +473,7 @@ static void readPlayer(MYFILE *f, INT32 num) ...@@ -473,6 +473,7 @@ static void readPlayer(MYFILE *f, INT32 num)
if (!slotfound && (slotfound = findFreeSlot(&num)) == false) if (!slotfound && (slotfound = findFreeSlot(&num)) == false)
goto done; goto done;
PlayerMenu[num].status = IT_CALL;
for (i = 0; i < MAXLINELEN-3; i++) for (i = 0; i < MAXLINELEN-3; i++)
{ {
...@@ -545,6 +546,7 @@ static void readPlayer(MYFILE *f, INT32 num) ...@@ -545,6 +546,7 @@ static void readPlayer(MYFILE *f, INT32 num)
if (!slotfound && (slotfound = findFreeSlot(&num)) == false) if (!slotfound && (slotfound = findFreeSlot(&num)) == false)
goto done; goto done;
DEH_WriteUndoline(word, &description[num].picname[0], UNDO_NONE); DEH_WriteUndoline(word, &description[num].picname[0], UNDO_NONE);
PlayerMenu[num].status = IT_CALL;
strncpy(description[num].picname, word2, 8); strncpy(description[num].picname, word2, 8);
} }
else if (fastcmp(word, "STATUS")) else if (fastcmp(word, "STATUS"))
...@@ -576,6 +578,8 @@ static void readPlayer(MYFILE *f, INT32 num) ...@@ -576,6 +578,8 @@ static void readPlayer(MYFILE *f, INT32 num)
if (!slotfound && (slotfound = findFreeSlot(&num)) == false) if (!slotfound && (slotfound = findFreeSlot(&num)) == false)
goto done; goto done;
DEH_WriteUndoline(word, description[num].skinname, UNDO_NONE); DEH_WriteUndoline(word, description[num].skinname, UNDO_NONE);
PlayerMenu[num].status = IT_CALL;
strlcpy(description[num].skinname, word2, sizeof description[num].skinname); strlcpy(description[num].skinname, word2, sizeof description[num].skinname);
strlwr(description[num].skinname); strlwr(description[num].skinname);
} }
...@@ -994,7 +998,7 @@ static const struct { ...@@ -994,7 +998,7 @@ static const struct {
static void readlevelheader(MYFILE *f, INT32 num) static void readlevelheader(MYFILE *f, INT32 num)
{ {
char *s = Z_Malloc(MAXLINELEN, PU_STATIC, NULL); char *s = Z_Malloc(MAXLINELEN, PU_STATIC, NULL);
char *word = s; char *word;
char *word2; char *word2;
//char *word3; // Non-uppercase version of word2 //char *word3; // Non-uppercase version of word2
char *tmp; char *tmp;
...@@ -1023,6 +1027,9 @@ static void readlevelheader(MYFILE *f, INT32 num) ...@@ -1023,6 +1027,9 @@ static void readlevelheader(MYFILE *f, INT32 num)
if (s == tmp) if (s == tmp)
continue; // Skip comment lines, but don't break. continue; // Skip comment lines, but don't break.
// Set / reset word, because some things (Lua.) move it
word = s;
// Get the part before the " = " // Get the part before the " = "
tmp = strchr(s, '='); tmp = strchr(s, '=');
*(tmp-1) = '\0'; *(tmp-1) = '\0';
...@@ -1125,6 +1132,10 @@ static void readlevelheader(MYFILE *f, INT32 num) ...@@ -1125,6 +1132,10 @@ static void readlevelheader(MYFILE *f, INT32 num)
} }
else if (fastcmp(word, "NEXTLEVEL")) else if (fastcmp(word, "NEXTLEVEL"))
{ {
if (fastcmp(word2, "TITLE")) i = 1100;
else if (fastcmp(word2, "EVALUATION")) i = 1101;
else if (fastcmp(word2, "CREDITS")) i = 1102;
else
// Support using the actual map name, // Support using the actual map name,
// i.e., Nextlevel = AB, Nextlevel = FZ, etc. // i.e., Nextlevel = AB, Nextlevel = FZ, etc.
...@@ -3807,7 +3818,6 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit ...@@ -3807,7 +3818,6 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
// Blue Crawla // Blue Crawla
"S_POSS_STND", "S_POSS_STND",
"S_POSS_STND2",
"S_POSS_RUN1", "S_POSS_RUN1",
"S_POSS_RUN2", "S_POSS_RUN2",
"S_POSS_RUN3", "S_POSS_RUN3",
...@@ -3817,7 +3827,6 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit ...@@ -3817,7 +3827,6 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
// Red Crawla // Red Crawla
"S_SPOS_STND", "S_SPOS_STND",
"S_SPOS_STND2",
"S_SPOS_RUN1", "S_SPOS_RUN1",
"S_SPOS_RUN2", "S_SPOS_RUN2",
"S_SPOS_RUN3", "S_SPOS_RUN3",
...@@ -7172,7 +7181,6 @@ static const char *const MOBJFLAG2_LIST[] = { ...@@ -7172,7 +7181,6 @@ static const char *const MOBJFLAG2_LIST[] = {
"EXPLOSION", // Thrown ring has explosive properties "EXPLOSION", // Thrown ring has explosive properties
"SCATTER", // Thrown ring has scatter properties "SCATTER", // Thrown ring has scatter properties
"BEYONDTHEGRAVE",// Source of this missile has died and has since respawned. "BEYONDTHEGRAVE",// Source of this missile has died and has since respawned.
"PUSHED", // Mobj was already pushed this tic
"SLIDEPUSH", // MF_PUSHABLE that pushes continuously. "SLIDEPUSH", // MF_PUSHABLE that pushes continuously.
"CLASSICPUSH", // Drops straight down when object has negative Z. "CLASSICPUSH", // Drops straight down when object has negative Z.
"STANDONME", // While not pushable, stand on me anyway. "STANDONME", // While not pushable, stand on me anyway.
...@@ -7201,6 +7209,9 @@ static const char *const MOBJEFLAG_LIST[] = { ...@@ -7201,6 +7209,9 @@ static const char *const MOBJEFLAG_LIST[] = {
"JUSTSTEPPEDDOWN", // used for ramp sectors "JUSTSTEPPEDDOWN", // used for ramp sectors
"VERTICALFLIP", // Vertically flip sprite/allow upside-down physics "VERTICALFLIP", // Vertically flip sprite/allow upside-down physics
"GOOWATER", // Goo water "GOOWATER", // Goo water
"PUSHED", // Mobj was already pushed this tic
"SPRUNG", // Mobj was already sprung this tic
"APPLYPMOMZ", // Platform movement
NULL NULL
}; };
...@@ -7303,6 +7314,7 @@ static const char *const ML_LIST[16] = { ...@@ -7303,6 +7314,7 @@ static const char *const ML_LIST[16] = {
}; };
// This DOES differ from r_draw's Color_Names, unfortunately. // This DOES differ from r_draw's Color_Names, unfortunately.
// Also includes Super colors
static const char *COLOR_ENUMS[] = { static const char *COLOR_ENUMS[] = {
"NONE", // SKINCOLOR_NONE "NONE", // SKINCOLOR_NONE
"WHITE", // SKINCOLOR_WHITE "WHITE", // SKINCOLOR_WHITE
...@@ -7329,7 +7341,25 @@ static const char *COLOR_ENUMS[] = { ...@@ -7329,7 +7341,25 @@ static const char *COLOR_ENUMS[] = {
"ZIM", // SKINCOLOR_ZIM "ZIM", // SKINCOLOR_ZIM
"OLIVE", // SKINCOLOR_OLIVE "OLIVE", // SKINCOLOR_OLIVE
"YELLOW", // SKINCOLOR_YELLOW "YELLOW", // SKINCOLOR_YELLOW
"GOLD" // SKINCOLOR_GOLD "GOLD", // SKINCOLOR_GOLD
// Super special awesome Super flashing colors!
"SUPER1", // SKINCOLOR_SUPER1
"SUPER2", // SKINCOLOR_SUPER2,
"SUPER3", // SKINCOLOR_SUPER3,
"SUPER4", // SKINCOLOR_SUPER4,
"SUPER5", // SKINCOLOR_SUPER5,
// Super Tails
"TSUPER1", // SKINCOLOR_TSUPER1,
"TSUPER2", // SKINCOLOR_TSUPER2,
"TSUPER3", // SKINCOLOR_TSUPER3,
"TSUPER4", // SKINCOLOR_TSUPER4,
"TSUPER5", // SKINCOLOR_TSUPER5,
// Super Knuckles
"KSUPER1", // SKINCOLOR_KSUPER1,
"KSUPER2", // SKINCOLOR_KSUPER2,
"KSUPER3", // SKINCOLOR_KSUPER3,
"KSUPER4", // SKINCOLOR_KSUPER4,
"KSUPER5" // SKINCOLOR_KSUPER5,
}; };
static const char *const POWERS_LIST[] = { static const char *const POWERS_LIST[] = {
...@@ -7536,8 +7566,9 @@ struct { ...@@ -7536,8 +7566,9 @@ struct {
{"EMERALD6",EMERALD6}, {"EMERALD6",EMERALD6},
{"EMERALD7",EMERALD7}, {"EMERALD7",EMERALD7},
// SKINCOLOR_ doesn't include this..! // SKINCOLOR_ doesn't include these..!
{"MAXSKINCOLORS",MAXSKINCOLORS}, {"MAXSKINCOLORS",MAXSKINCOLORS},
{"MAXTRANSLATIONS",MAXTRANSLATIONS},
// Precipitation // Precipitation
{"PRECIP_NONE",PRECIP_NONE}, {"PRECIP_NONE",PRECIP_NONE},
...@@ -7730,36 +7761,36 @@ struct { ...@@ -7730,36 +7761,36 @@ struct {
{"FF_GOOWATER",FF_GOOWATER}, ///< Used with ::FF_SWIMMABLE. Makes thick bouncey goop. {"FF_GOOWATER",FF_GOOWATER}, ///< Used with ::FF_SWIMMABLE. Makes thick bouncey goop.
// Angles // Angles
{"ANG1",ANG1}, {"ANG1",ANG1>>16},
{"ANG2",ANG2}, {"ANG2",ANG2>>16},
{"ANG10",ANG10}, {"ANG10",ANG10>>16},
{"ANG15",ANG15}, {"ANG15",ANG15>>16},
{"ANG20",ANG20}, {"ANG20",ANG20>>16},
{"ANG30",ANG30}, {"ANG30",ANG30>>16},
{"ANG60",ANG60}, {"ANG60",ANG60>>16},
{"ANG64h",ANG64h}, {"ANG64h",ANG64h>>16},
{"ANG105",ANG105}, {"ANG105",ANG105>>16},
{"ANG210",ANG210}, {"ANG210",ANG210>>16},
{"ANG255",ANG255}, {"ANG255",ANG255>>16},
{"ANG340",ANG340}, {"ANG340",ANG340>>16},
{"ANG350",ANG350}, {"ANG350",ANG350>>16},
{"ANGLE_11hh",ANGLE_11hh}, {"ANGLE_11hh",ANGLE_11hh>>16},
{"ANGLE_22h",ANGLE_22h}, {"ANGLE_22h",ANGLE_22h>>16},
{"ANGLE_45",ANGLE_45}, {"ANGLE_45",ANGLE_45>>16},
{"ANGLE_67h",ANGLE_67h}, {"ANGLE_67h",ANGLE_67h>>16},
{"ANGLE_90",ANGLE_90}, {"ANGLE_90",ANGLE_90>>16},
{"ANGLE_112h",ANGLE_112h}, {"ANGLE_112h",ANGLE_112h>>16},
{"ANGLE_135",ANGLE_135}, {"ANGLE_135",ANGLE_135>>16},
{"ANGLE_157h",ANGLE_157h}, {"ANGLE_157h",ANGLE_157h>>16},
{"ANGLE_180",ANGLE_180}, {"ANGLE_180",ANGLE_180>>16},
{"ANGLE_202h",ANGLE_202h}, {"ANGLE_202h",ANGLE_202h>>16},
{"ANGLE_225",ANGLE_225}, {"ANGLE_225",ANGLE_225>>16},
{"ANGLE_247h",ANGLE_247h}, {"ANGLE_247h",ANGLE_247h>>16},
{"ANGLE_270",ANGLE_270}, {"ANGLE_270",ANGLE_270>>16},
{"ANGLE_292h",ANGLE_292h}, {"ANGLE_292h",ANGLE_292h>>16},
{"ANGLE_315",ANGLE_315}, {"ANGLE_315",ANGLE_315>>16},
{"ANGLE_337h",ANGLE_337h}, {"ANGLE_337h",ANGLE_337h>>16},
{"ANGLE_MAX",ANGLE_MAX}, {"ANGLE_MAX",ANGLE_MAX>>16},
// P_Chase directions (dirtype_t) // P_Chase directions (dirtype_t)
{"DI_NODIR",DI_NODIR}, {"DI_NODIR",DI_NODIR},
...@@ -8158,7 +8189,7 @@ static fixed_t find_const(const char **rword) ...@@ -8158,7 +8189,7 @@ static fixed_t find_const(const char **rword)
} }
else if (fastncmp("SKINCOLOR_",word,10)) { else if (fastncmp("SKINCOLOR_",word,10)) {
char *p = word+10; char *p = word+10;
for (i = 0; i < MAXSKINCOLORS; i++) for (i = 0; i < MAXTRANSLATIONS; i++)
if (fastcmp(p, COLOR_ENUMS[i])) { if (fastcmp(p, COLOR_ENUMS[i])) {
free(word); free(word);
return i; return i;
...@@ -8217,8 +8248,8 @@ void DEH_Check(void) ...@@ -8217,8 +8248,8 @@ void DEH_Check(void)
if (dehpowers != NUMPOWERS) if (dehpowers != NUMPOWERS)
I_Error("You forgot to update the Dehacked powers list, you dolt!\n(%d powers defined, versus %s in the Dehacked list)\n", NUMPOWERS, sizeu1(dehpowers)); I_Error("You forgot to update the Dehacked powers list, you dolt!\n(%d powers defined, versus %s in the Dehacked list)\n", NUMPOWERS, sizeu1(dehpowers));
if (dehcolors != MAXSKINCOLORS) if (dehcolors != MAXTRANSLATIONS)
I_Error("You forgot to update the Dehacked colors list, you dolt!\n(%d colors defined, versus %s in the Dehacked list)\n", MAXSKINCOLORS, sizeu1(dehcolors)); I_Error("You forgot to update the Dehacked colors list, you dolt!\n(%d colors defined, versus %s in the Dehacked list)\n", MAXTRANSLATIONS, sizeu1(dehcolors));
#endif #endif
} }
...@@ -8572,7 +8603,7 @@ static inline int lib_getenum(lua_State *L) ...@@ -8572,7 +8603,7 @@ static inline int lib_getenum(lua_State *L)
} }
else if (fastncmp("SKINCOLOR_",word,10)) { else if (fastncmp("SKINCOLOR_",word,10)) {
p = word+10; p = word+10;
for (i = 0; i < MAXSKINCOLORS; i++) for (i = 0; i < MAXTRANSLATIONS; i++)
if (fastcmp(p, COLOR_ENUMS[i])) { if (fastcmp(p, COLOR_ENUMS[i])) {
lua_pushinteger(L, i); lua_pushinteger(L, i);
return 1; return 1;
...@@ -8697,7 +8728,7 @@ static inline int lib_getenum(lua_State *L) ...@@ -8697,7 +8728,7 @@ static inline int lib_getenum(lua_State *L)
lua_pushinteger(L, mapmusic); lua_pushinteger(L, mapmusic);
return 1; return 1;
} else if (fastcmp(word,"server")) { } else if (fastcmp(word,"server")) {
if (!playeringame[serverplayer]) if ((!multiplayer || !netgame) && !playeringame[serverplayer])
return 0; return 0;
LUA_PushUserdata(L, &players[serverplayer], META_PLAYER); LUA_PushUserdata(L, &players[serverplayer], META_PLAYER);
return 1; return 1;
......
...@@ -138,10 +138,14 @@ ...@@ -138,10 +138,14 @@
extern FILE *logstream; extern FILE *logstream;
#endif #endif
#if 0 //#define DEVELOP // Disable this for release builds to remove excessive cheat commands and enable MD5 checking and stuff, all in one go. :3
#ifdef DEVELOP
#define VERSION 0 // Game version #define VERSION 0 // Game version
#define SUBVERSION 0 // more precise version number #define SUBVERSION 0 // more precise version number
#define VERSIONSTRING "Trunk" #define VERSIONSTRING "Development EXE"
#define VERSIONSTRINGW L"Development EXE"
// most interface strings are ignored in development mode.
// we use comprevision and compbranch instead.
#else #else
#define VERSION 201 // Game version #define VERSION 201 // Game version
#define SUBVERSION 14 // more precise version number #define SUBVERSION 14 // more precise version number
...@@ -413,7 +417,7 @@ INT32 I_GetKey(void); ...@@ -413,7 +417,7 @@ INT32 I_GetKey(void);
#endif #endif
// Compile date and time and revision. // Compile date and time and revision.
extern const char *compdate, *comptime, *comprevision; extern const char *compdate, *comptime, *comprevision, *compbranch;
// Disabled code and code under testing // Disabled code and code under testing
// None of these that are disabled in the normal build are guaranteed to work perfectly // None of these that are disabled in the normal build are guaranteed to work perfectly
...@@ -426,6 +430,9 @@ extern const char *compdate, *comptime, *comprevision; ...@@ -426,6 +430,9 @@ extern const char *compdate, *comptime, *comprevision;
/// Fun experimental slope stuff! /// Fun experimental slope stuff!
//#define SLOPENESS //#define SLOPENESS
/// Kalaron/Eternity Engine slope code (SRB2CB ported)
#define ESLOPE
/// Delete file while the game is running. /// Delete file while the game is running.
/// \note EXTREMELY buggy, tends to crash game. /// \note EXTREMELY buggy, tends to crash game.
//#define DELFILE //#define DELFILE
......
...@@ -982,6 +982,7 @@ static const char *credits[] = { ...@@ -982,6 +982,7 @@ static const char *credits[] = {
"", "",
"\1Programming", "\1Programming",
"\1Assistance", "\1Assistance",
"\"chi.miru\"", // Red's secret weapon, the REAL reason slopes exist (also helped port drawing code from ZDoom)
"Andrew \"orospakr\" Clunis", "Andrew \"orospakr\" Clunis",
"Gregor \"Oogaland\" Dick", "Gregor \"Oogaland\" Dick",
"Julio \"Chaos Zero 64\" Guir", "Julio \"Chaos Zero 64\" Guir",
......