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 (18)
...@@ -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)
......
...@@ -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
) )
......
...@@ -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 \
......
...@@ -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)
......
...@@ -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
} }
} }
...@@ -836,6 +844,10 @@ static void IdentifyVersion(void) ...@@ -836,6 +844,10 @@ static void IdentifyVersion(void)
// Add our crappy patches to fix our bugs // Add our crappy patches to fix our bugs
// D_AddFile(va(pandf,srb2waddir,"patch.dta")); // D_AddFile(va(pandf,srb2waddir,"patch.dta"));
// Add the thokker WAD
if (M_CheckParm("-nothokker") == 0)
D_AddFile(va(pandf,srb2waddir,"thokker.thk"));
#if !defined (HAVE_SDL) || defined (HAVE_MIXER) #if !defined (HAVE_SDL) || defined (HAVE_MIXER)
{ {
#if defined (DC) && 0 #if defined (DC) && 0
...@@ -943,9 +955,9 @@ void D_SRB2Main(void) ...@@ -943,9 +955,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 +1130,7 @@ void D_SRB2Main(void) ...@@ -1118,7 +1130,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
......
...@@ -44,6 +44,7 @@ ...@@ -44,6 +44,7 @@
#include "lua_hook.h" #include "lua_hook.h"
#include "m_cond.h" #include "m_cond.h"
#include "m_anigif.h" #include "m_anigif.h"
#include "m_argv.h"
#ifdef NETGAME_DEVMODE #ifdef NETGAME_DEVMODE
#define CV_RESTRICT CV_NETVAR #define CV_RESTRICT CV_NETVAR
...@@ -1618,7 +1619,10 @@ static void Command_Map_f(void) ...@@ -1618,7 +1619,10 @@ static void Command_Map_f(void)
// new gametype value // new gametype value
// use current one by default // use current one by default
i = COM_CheckParm("-gametype"); i = COM_CheckParm("-gametype");
if (i)
if (M_CheckParm("-nothokker") == 0)
newgametype = GT_TEAMMATCH;
else if (i)
{ {
if (!multiplayer) if (!multiplayer)
{ {
...@@ -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.
...@@ -3351,8 +3375,13 @@ void D_GameTypeChanged(INT32 lastgametype) ...@@ -3351,8 +3375,13 @@ void D_GameTypeChanged(INT32 lastgametype)
if (!cv_timelimit.changed && !cv_pointlimit.changed) // user hasn't changed limits if (!cv_timelimit.changed && !cv_pointlimit.changed) // user hasn't changed limits
{ {
// default settings for match: timelimit 10 mins, no pointlimit // default settings for match: timelimit 10 mins, no pointlimit
CV_SetValue(&cv_pointlimit, 0); if (M_CheckParm("-nothokker") != 0) {
CV_SetValue(&cv_timelimit, 10); CV_SetValue(&cv_pointlimit, 0);
CV_SetValue(&cv_timelimit, 10);
} else {
CV_SetValue(&cv_pointlimit, 3);
CV_SetValue(&cv_timelimit, 0);
}
} }
if (!cv_itemrespawntime.changed) if (!cv_itemrespawntime.changed)
CV_Set(&cv_itemrespawntime, cv_itemrespawntime.defaultvalue); // respawn normally CV_Set(&cv_itemrespawntime, cv_itemrespawntime.defaultvalue); // respawn normally
......
...@@ -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);
} }
...@@ -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';
...@@ -3807,7 +3814,6 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit ...@@ -3807,7 +3814,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 +3823,6 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit ...@@ -3817,7 +3823,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 +7177,6 @@ static const char *const MOBJFLAG2_LIST[] = { ...@@ -7172,7 +7177,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 +7205,9 @@ static const char *const MOBJEFLAG_LIST[] = { ...@@ -7201,6 +7205,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 +7310,7 @@ static const char *const ML_LIST[16] = { ...@@ -7303,6 +7310,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 +7337,25 @@ static const char *COLOR_ENUMS[] = { ...@@ -7329,7 +7337,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 +7562,9 @@ struct { ...@@ -7536,8 +7562,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 +7757,36 @@ struct { ...@@ -7730,36 +7757,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>>0},
{"ANG2",ANG2}, {"ANG2",ANG2>>0},
{"ANG10",ANG10}, {"ANG10",ANG10>>0},
{"ANG15",ANG15}, {"ANG15",ANG15>>0},
{"ANG20",ANG20}, {"ANG20",ANG20>>0},
{"ANG30",ANG30}, {"ANG30",ANG30>>0},
{"ANG60",ANG60}, {"ANG60",ANG60>>0},
{"ANG64h",ANG64h}, {"ANG64h",ANG64h>>0},
{"ANG105",ANG105}, {"ANG105",ANG105>>0},
{"ANG210",ANG210}, {"ANG210",ANG210>>0},
{"ANG255",ANG255}, {"ANG255",ANG255>>0},
{"ANG340",ANG340}, {"ANG340",ANG340>>0},
{"ANG350",ANG350}, {"ANG350",ANG350>>0},
{"ANGLE_11hh",ANGLE_11hh}, {"ANGLE_11hh",ANGLE_11hh>>0},
{"ANGLE_22h",ANGLE_22h}, {"ANGLE_22h",ANGLE_22h>>0},
{"ANGLE_45",ANGLE_45}, {"ANGLE_45",ANGLE_45>>0},
{"ANGLE_67h",ANGLE_67h}, {"ANGLE_67h",ANGLE_67h>>0},
{"ANGLE_90",ANGLE_90}, {"ANGLE_90",ANGLE_90>>0},
{"ANGLE_112h",ANGLE_112h}, {"ANGLE_112h",ANGLE_112h>>0},
{"ANGLE_135",ANGLE_135}, {"ANGLE_135",ANGLE_135>>0},
{"ANGLE_157h",ANGLE_157h}, {"ANGLE_157h",ANGLE_157h>>0},
{"ANGLE_180",ANGLE_180}, {"ANGLE_180",ANGLE_180>>0},
{"ANGLE_202h",ANGLE_202h}, {"ANGLE_202h",ANGLE_202h>>0},
{"ANGLE_225",ANGLE_225}, {"ANGLE_225",ANGLE_225>>0},
{"ANGLE_247h",ANGLE_247h}, {"ANGLE_247h",ANGLE_247h>>0},
{"ANGLE_270",ANGLE_270}, {"ANGLE_270",ANGLE_270>>0},
{"ANGLE_292h",ANGLE_292h}, {"ANGLE_292h",ANGLE_292h>>0},
{"ANGLE_315",ANGLE_315}, {"ANGLE_315",ANGLE_315>>0},
{"ANGLE_337h",ANGLE_337h}, {"ANGLE_337h",ANGLE_337h>>0},
{"ANGLE_MAX",ANGLE_MAX}, {"ANGLE_MAX",ANGLE_MAX>>0},
// P_Chase directions (dirtype_t) // P_Chase directions (dirtype_t)
{"DI_NODIR",DI_NODIR}, {"DI_NODIR",DI_NODIR},
...@@ -8158,7 +8185,7 @@ static fixed_t find_const(const char **rword) ...@@ -8158,7 +8185,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 +8244,8 @@ void DEH_Check(void) ...@@ -8217,8 +8244,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 +8599,7 @@ static inline int lib_getenum(lua_State *L) ...@@ -8572,7 +8599,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 +8724,7 @@ static inline int lib_getenum(lua_State *L) ...@@ -8697,7 +8724,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,15 +138,17 @@ ...@@ -138,15 +138,17 @@
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 "Trunk"
#define VERSIONSTRINGW L"Trunk"
#else #else
#define VERSION 201 // Game version #define VERSION 165 // Game version
#define SUBVERSION 14 // more precise version number #define SUBVERSION 1
#define VERSIONSTRING "v2.1.14" #define VERSIONSTRING "v2.1.14 (Thokker 1.0.1)"
#define VERSIONSTRINGW L"v2.1.14" #define VERSIONSTRINGW L"v2.1.14 (Thokker 1.0.1)"
// Hey! If you change this, add 1 to the MODVERSION below! // Hey! If you change this, add 1 to the MODVERSION below!
// Otherwise we can't force updates! // Otherwise we can't force updates!
#endif #endif
...@@ -162,8 +164,8 @@ extern FILE *logstream; ...@@ -162,8 +164,8 @@ extern FILE *logstream;
// The string used in the alert that pops up in the event of an update being available. // The string used in the alert that pops up in the event of an update being available.
// Please change to apply to your modification (we don't want everyone asking where your mod is on SRB2.org!). // Please change to apply to your modification (we don't want everyone asking where your mod is on SRB2.org!).
#define UPDATE_ALERT_STRING \ #define UPDATE_ALERT_STRING \
"A new update is available for SRB2.\n"\ "A new update is available for SRB2 Thokker.\n"\
"Please visit SRB2.org to download it.\n"\ "Please visit the SRB2MB to download it.\n"\
"\n"\ "\n"\
"You are using version: %s\n"\ "You are using version: %s\n"\
"The newest version is: %s\n"\ "The newest version is: %s\n"\
...@@ -179,8 +181,8 @@ extern FILE *logstream; ...@@ -179,8 +181,8 @@ extern FILE *logstream;
// The string used in the I_Error alert upon trying to host through command line parameters. // The string used in the I_Error alert upon trying to host through command line parameters.
// Generally less filled with newlines, since Windows gives you lots more room to work with. // Generally less filled with newlines, since Windows gives you lots more room to work with.
#define UPDATE_ALERT_STRING_CONSOLE \ #define UPDATE_ALERT_STRING_CONSOLE \
"A new update is available for SRB2.\n"\ "A new update is available for SRB2 Thokker.\n"\
"Please visit SRB2.org to download it.\n"\ "Please visit the SRB2MB to download it.\n"\
"\n"\ "\n"\
"You are using version: %s\n"\ "You are using version: %s\n"\
"The newest version is: %s\n"\ "The newest version is: %s\n"\
...@@ -197,14 +199,14 @@ extern FILE *logstream; ...@@ -197,14 +199,14 @@ extern FILE *logstream;
// The Modification ID; must be obtained from Inuyasha ( http://mb.srb2.org/private.php?do=newpm&u=2604 ). // The Modification ID; must be obtained from Inuyasha ( http://mb.srb2.org/private.php?do=newpm&u=2604 ).
// DO NOT try to set this otherwise, or your modification will be unplayable through the Master Server. // DO NOT try to set this otherwise, or your modification will be unplayable through the Master Server.
// "12" is the default mod ID for version 2.1 // "13" is the default mod ID for Thokker
#define MODID 12 #define MODID 13
// The Modification Version, starting from 1. Do not follow your version string for this, // The Modification Version, starting from 1. Do not follow your version string for this,
// it's only for detection of the version the player is using so the MS can alert them of an update. // it's only for detection of the version the player is using so the MS can alert them of an update.
// Only set it higher, not lower, obviously. // Only set it higher, not lower, obviously.
// Note that we use this to help keep internal testing in check; this is why v2.1.0 is not version "1". // Note that we use this to help keep internal testing in check; this is why v2.1.0 is not version "1".
#define MODVERSION 19 #define MODVERSION 2
...@@ -437,6 +439,9 @@ extern const char *compdate, *comptime, *comprevision; ...@@ -437,6 +439,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",
......
...@@ -2180,8 +2180,7 @@ void G_PlayerReborn(INT32 player) ...@@ -2180,8 +2180,7 @@ void G_PlayerReborn(INT32 player)
p->health = 1; // 0 rings p->health = 1; // 0 rings
p->panim = PA_IDLE; // standing animation p->panim = PA_IDLE; // standing animation
if ((netgame || multiplayer) && !p->spectator if ((netgame || multiplayer) && !p->spectator)
&& gametype != GT_RACE)
p->powers[pw_flashing] = flashingtics-1; // Babysitting deterrent p->powers[pw_flashing] = flashingtics-1; // Babysitting deterrent
if (p-players == consoleplayer) if (p-players == consoleplayer)
...@@ -4330,20 +4329,10 @@ void G_GhostTicker(void) ...@@ -4330,20 +4329,10 @@ void G_GhostTicker(void)
switch(g->color) switch(g->color)
{ {
case GHC_SUPER: // Super Sonic (P_DoSuperStuff) case GHC_SUPER: // Super Sonic (P_DoSuperStuff)
// Yousa yellow now! if (leveltime % 9 < 5)
g->mo->color = SKINCOLOR_SUPER1 + (leveltime/2) % 5; g->mo->color = SKINCOLOR_SUPER1 + leveltime % 9;
if (g->mo->skin) else
switch (((skin_t*)g->mo->skin)-skins) g->mo->color = SKINCOLOR_SUPER1 + 9 - leveltime % 9;
{
case 1: // Golden orange supertails.
g->mo->color = SKINCOLOR_TSUPER1 + (leveltime/2) % 5;
break;
case 2: // Pink superknux.
g->mo->color = SKINCOLOR_KSUPER1 + (leveltime/2) % 5;
break;
default:
break;
}
break; break;
case GHC_INVINCIBLE: // Mario invincibility (P_CheckInvincibilityTimer) case GHC_INVINCIBLE: // Mario invincibility (P_CheckInvincibilityTimer)
g->mo->color = (UINT8)(leveltime % MAXSKINCOLORS); g->mo->color = (UINT8)(leveltime % MAXSKINCOLORS);
......
This diff is collapsed.
...@@ -975,24 +975,25 @@ void HWR_InitMD2(void) ...@@ -975,24 +975,25 @@ void HWR_InitMD2(void)
} }
while (fscanf(f, "%19s %31s %f %f", name, filename, &scale, &offset) == 4) while (fscanf(f, "%19s %31s %f %f", name, filename, &scale, &offset) == 4)
{ {
if (stricmp(name, "PLAY") == 0)
{
CONS_Printf("MD2 for sprite PLAY detected in md2.dat, use a player skin instead!\n");
continue;
}
for (i = 0; i < NUMSPRITES; i++) for (i = 0; i < NUMSPRITES; i++)
{ {
if (stricmp(name, sprnames[i]) == 0) if (stricmp(name, sprnames[i]) == 0)
{ {
if (stricmp(name, "PLAY") == 0) //if (stricmp(name, "PLAY") == 0)
continue; //continue;
//CONS_Debug(DBG_RENDER, " Found: %s %s %f %f\n", name, filename, scale, offset); //CONS_Debug(DBG_RENDER, " Found: %s %s %f %f\n", name, filename, scale, offset);
md2_models[i].scale = scale; md2_models[i].scale = scale;
md2_models[i].offset = offset; md2_models[i].offset = offset;
md2_models[i].notfound = false; md2_models[i].notfound = false;
strcpy(md2_models[i].filename, filename); strcpy(md2_models[i].filename, filename);
break; goto md2found;
}
if (i == NUMSPRITES)
{
CONS_Printf("MD2 for sprite %s not found\n", name);
md2_models[i].notfound = true;
} }
} }
...@@ -1006,15 +1007,14 @@ void HWR_InitMD2(void) ...@@ -1006,15 +1007,14 @@ void HWR_InitMD2(void)
md2_playermodels[s].offset = offset; md2_playermodels[s].offset = offset;
md2_playermodels[s].notfound = false; md2_playermodels[s].notfound = false;
strcpy(md2_playermodels[s].filename, filename); strcpy(md2_playermodels[s].filename, filename);
break; goto md2found;
}
if (s == MAXSKINS-1)
{
CONS_Printf("MD2 for player skin %s not found\n", name);
md2_playermodels[s].notfound = true;
} }
} }
// no sprite/player skin name found?!?
CONS_Printf("Unknown sprite/player skin %s detected in md2.dat\n", name);
md2found:
// move on to next line...
continue;
} }
fclose(f); fclose(f);
} }
...@@ -1050,17 +1050,14 @@ void HWR_AddPlayerMD2(int skin) // For MD2's that were added after startup ...@@ -1050,17 +1050,14 @@ void HWR_AddPlayerMD2(int skin) // For MD2's that were added after startup
md2_playermodels[skin].offset = offset; md2_playermodels[skin].offset = offset;
md2_playermodels[skin].notfound = false; md2_playermodels[skin].notfound = false;
strcpy(md2_playermodels[skin].filename, filename); strcpy(md2_playermodels[skin].filename, filename);
break; goto playermd2found;
}
if (skin == MAXSKINS-1)
{
CONS_Printf("MD2 for player skin %s not found\n", name);
md2_playermodels[skin].notfound = true;
} }
} }
//CONS_Printf("MD2 for player skin %s not found\n", skins[skin].name);
md2_playermodels[skin].notfound = true;
playermd2found:
fclose(f); fclose(f);
} }
...@@ -1075,6 +1072,9 @@ void HWR_AddSpriteMD2(size_t spritenum) // For MD2s that were added after startu ...@@ -1075,6 +1072,9 @@ void HWR_AddSpriteMD2(size_t spritenum) // For MD2s that were added after startu
if (nomd2s) if (nomd2s)
return; return;
if (spritenum == SPR_PLAY) // Handled already NEWMD2: Per sprite, per-skin check
return;
// Read the md2.dat file // Read the md2.dat file
f = fopen("md2.dat", "rt"); f = fopen("md2.dat", "rt");
...@@ -1088,27 +1088,19 @@ void HWR_AddSpriteMD2(size_t spritenum) // For MD2s that were added after startu ...@@ -1088,27 +1088,19 @@ void HWR_AddSpriteMD2(size_t spritenum) // For MD2s that were added after startu
// Check for any MD2s that match the names of player skins! // Check for any MD2s that match the names of player skins!
while (fscanf(f, "%19s %31s %f %f", name, filename, &scale, &offset) == 4) while (fscanf(f, "%19s %31s %f %f", name, filename, &scale, &offset) == 4)
{ {
if (stricmp(name, sprnames[spritenum]) == 0)
{ {
if (stricmp(name, sprnames[spritenum]) == 0) md2_models[spritenum].scale = scale;
{ md2_models[spritenum].offset = offset;
if (stricmp(name, "PLAY") == 0) // Handled already NEWMD2: Per sprite, per-skin check md2_models[spritenum].notfound = false;
continue; strcpy(md2_models[spritenum].filename, filename);
goto spritemd2found;
md2_models[spritenum].scale = scale;
md2_models[spritenum].offset = offset;
md2_models[spritenum].notfound = false;
strcpy(md2_models[spritenum].filename, filename);
break;
}
if (spritenum == NUMSPRITES-1)
{
CONS_Printf("MD2 for sprite %s not found\n", name);
md2_models[spritenum].notfound = true;
}
} }
} }
//CONS_Printf("MD2 for sprite %s not found\n", sprnames[spritenum]);
md2_models[spritenum].notfound = true;
spritemd2found:
fclose(f); fclose(f);
} }
...@@ -1386,11 +1378,17 @@ void HWR_DrawMD2(gr_vissprite_t *spr) ...@@ -1386,11 +1378,17 @@ void HWR_DrawMD2(gr_vissprite_t *spr)
md2_t *md2; md2_t *md2;
UINT8 color[4]; UINT8 color[4];
if (!cv_grmd2.value)
return;
if (spr->precip)
return;
// MD2 colormap fix // MD2 colormap fix
// colormap test // colormap test
{ {
sector_t *sector = spr->mobj->subsector->sector; sector_t *sector = spr->mobj->subsector->sector;
UINT8 lightlevel = sector->lightlevel; UINT8 lightlevel = 255;
extracolormap_t *colormap = sector->extra_colormap; extracolormap_t *colormap = sector->extra_colormap;
if (sector->numlights) if (sector->numlights)
...@@ -1401,8 +1399,6 @@ void HWR_DrawMD2(gr_vissprite_t *spr) ...@@ -1401,8 +1399,6 @@ void HWR_DrawMD2(gr_vissprite_t *spr)
if (!(spr->mobj->frame & FF_FULLBRIGHT)) if (!(spr->mobj->frame & FF_FULLBRIGHT))
lightlevel = *sector->lightlist[light].lightlevel; lightlevel = *sector->lightlist[light].lightlevel;
else
lightlevel = 255;
if (sector->lightlist[light].extra_colormap) if (sector->lightlist[light].extra_colormap)
colormap = sector->lightlist[light].extra_colormap; colormap = sector->lightlist[light].extra_colormap;
...@@ -1411,24 +1407,18 @@ void HWR_DrawMD2(gr_vissprite_t *spr) ...@@ -1411,24 +1407,18 @@ void HWR_DrawMD2(gr_vissprite_t *spr)
{ {
if (!(spr->mobj->frame & FF_FULLBRIGHT)) if (!(spr->mobj->frame & FF_FULLBRIGHT))
lightlevel = sector->lightlevel; lightlevel = sector->lightlevel;
else
lightlevel = 255;
if (sector->extra_colormap) if (sector->extra_colormap)
colormap = sector->extra_colormap; colormap = sector->extra_colormap;
} }
if (spr->mobj->frame & FF_FULLBRIGHT)
lightlevel = 255;
if (colormap) if (colormap)
Surf.FlatColor.rgba = HWR_Lighting(lightlevel, colormap->rgba, colormap->fadergba, false, false); Surf.FlatColor.rgba = HWR_Lighting(lightlevel, colormap->rgba, colormap->fadergba, false, false);
else else
Surf.FlatColor.rgba = HWR_Lighting(lightlevel, NORMALFOG, FADEFOG, false, false); Surf.FlatColor.rgba = HWR_Lighting(lightlevel, NORMALFOG, FADEFOG, false, false);
} }
// Look at HWR_ProjetctSprite for more // Look at HWR_ProjectSprite for more
if (cv_grmd2.value && ((md2_models[spr->mobj->sprite].scale > 0.0f) || (md2_playermodels[(skin_t*)spr->mobj->skin-skins].scale > 0.0f)) && !spr->precip)
{ {
GLPatch_t *gpatch; GLPatch_t *gpatch;
INT32 *buff; INT32 *buff;
...@@ -1445,15 +1435,11 @@ void HWR_DrawMD2(gr_vissprite_t *spr) ...@@ -1445,15 +1435,11 @@ void HWR_DrawMD2(gr_vissprite_t *spr)
//durs = tics; //durs = tics;
if (spr->mobj->flags2 & MF2_SHADOW) if (spr->mobj->flags2 & MF2_SHADOW)
{
Surf.FlatColor.s.alpha = 0x40; Surf.FlatColor.s.alpha = 0x40;
}
else if (spr->mobj->frame & FF_TRANSMASK) else if (spr->mobj->frame & FF_TRANSMASK)
HWR_TranstableToAlpha((spr->mobj->frame & FF_TRANSMASK)>>FF_TRANSSHIFT, &Surf); HWR_TranstableToAlpha((spr->mobj->frame & FF_TRANSMASK)>>FF_TRANSSHIFT, &Surf);
else else
{
Surf.FlatColor.s.alpha = 0xFF; Surf.FlatColor.s.alpha = 0xFF;
}
// dont forget to enabled the depth test because we can't do this like // dont forget to enabled the depth test because we can't do this like
// before: polygons models are not sorted // before: polygons models are not sorted
...@@ -1571,8 +1557,6 @@ void HWR_DrawMD2(gr_vissprite_t *spr) ...@@ -1571,8 +1557,6 @@ void HWR_DrawMD2(gr_vissprite_t *spr)
p.flip = false; p.flip = false;
HWD.pfnDrawMD2i(buff, curr, durs, tics, next, &p, finalscale, flip, color); HWD.pfnDrawMD2i(buff, curr, durs, tics, next, &p, finalscale, flip, color);
} }
} }
......
...@@ -1910,6 +1910,13 @@ EXPORT void HWRAPI(DrawMD2i) (INT32 *gl_cmd_buffer, md2_frame_t *frame, UINT32 d ...@@ -1910,6 +1910,13 @@ EXPORT void HWRAPI(DrawMD2i) (INT32 *gl_cmd_buffer, md2_frame_t *frame, UINT32 d
pglRotatef(pos->anglex, -1.0f, 0.0f, 0.0f); pglRotatef(pos->anglex, -1.0f, 0.0f, 0.0f);
//pglBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); // alpha = level of transparency //pglBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); // alpha = level of transparency
// Remove depth mask when the model is transparent so it doesn't cut thorugh sprites // SRB2CBTODO: For all stuff too?!
if (color[3] < 255)
{
pglBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); // alpha = level of transparency
pglDepthMask(GL_FALSE);
}
val = *gl_cmd_buffer++; val = *gl_cmd_buffer++;
while (val != 0) while (val != 0)
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
#pragma warning(disable : 4214 4244) #pragma warning(disable : 4214 4244)
#endif #endif
#include "SDL_opengl.h" //Alam_GBC: Simple, yes? #include <SDL2/SDL_opengl.h> //Alam_GBC: Simple, yes?
#ifdef _MSC_VER #ifdef _MSC_VER
#pragma warning(default : 4214 4244) #pragma warning(default : 4214 4244)
......
...@@ -150,8 +150,7 @@ state_t states[NUMSTATES] = ...@@ -150,8 +150,7 @@ state_t states[NUMSTATES] =
{SPR_PLAY, 34, 1, {NULL}, 0, 24, S_PLAY_SIGN}, // S_PLAY_SIGN {SPR_PLAY, 34, 1, {NULL}, 0, 24, S_PLAY_SIGN}, // S_PLAY_SIGN
   
// Blue Crawla // Blue Crawla
{SPR_POSS, 0, 5, {A_Look}, 0, 0, S_POSS_STND2}, // S_POSS_STND {SPR_POSS, 0, 5, {A_Look}, 0, 0, S_POSS_STND}, // S_POSS_STND
{SPR_POSS, 0, 5, {A_Look}, 0, 0, S_POSS_STND}, // S_POSS_STND2
{SPR_POSS, 0, 3, {A_Chase}, 0, 0, S_POSS_RUN2}, // S_POSS_RUN1 {SPR_POSS, 0, 3, {A_Chase}, 0, 0, S_POSS_RUN2}, // S_POSS_RUN1
{SPR_POSS, 1, 3, {A_Chase}, 0, 0, S_POSS_RUN3}, // S_POSS_RUN2 {SPR_POSS, 1, 3, {A_Chase}, 0, 0, S_POSS_RUN3}, // S_POSS_RUN2
{SPR_POSS, 2, 3, {A_Chase}, 0, 0, S_POSS_RUN4}, // S_POSS_RUN3 {SPR_POSS, 2, 3, {A_Chase}, 0, 0, S_POSS_RUN4}, // S_POSS_RUN3
...@@ -160,8 +159,7 @@ state_t states[NUMSTATES] = ...@@ -160,8 +159,7 @@ state_t states[NUMSTATES] =
{SPR_POSS, 5, 3, {A_Chase}, 0, 0, S_POSS_RUN1}, // S_POSS_RUN6 {SPR_POSS, 5, 3, {A_Chase}, 0, 0, S_POSS_RUN1}, // S_POSS_RUN6
   
// Red Crawla // Red Crawla
{SPR_SPOS, 0, 5, {A_Look}, 0, 0, S_SPOS_STND2}, // S_SPOS_STND {SPR_SPOS, 0, 5, {A_Look}, 0, 0, S_SPOS_STND}, // S_SPOS_STND
{SPR_SPOS, 0, 5, {A_Look}, 0, 0, S_SPOS_STND}, // S_SPOS_STND2
{SPR_SPOS, 0, 1, {A_Chase}, 0, 0, S_SPOS_RUN2}, // S_SPOS_RUN1 {SPR_SPOS, 0, 1, {A_Chase}, 0, 0, S_SPOS_RUN2}, // S_SPOS_RUN1
{SPR_SPOS, 1, 1, {A_Chase}, 0, 0, S_SPOS_RUN3}, // S_SPOS_RUN2 {SPR_SPOS, 1, 1, {A_Chase}, 0, 0, S_SPOS_RUN3}, // S_SPOS_RUN2
{SPR_SPOS, 2, 1, {A_Chase}, 0, 0, S_SPOS_RUN4}, // S_SPOS_RUN3 {SPR_SPOS, 2, 1, {A_Chase}, 0, 0, S_SPOS_RUN4}, // S_SPOS_RUN3
......
...@@ -663,7 +663,6 @@ typedef enum state ...@@ -663,7 +663,6 @@ typedef enum state
// 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,
...@@ -673,7 +672,6 @@ typedef enum state ...@@ -673,7 +672,6 @@ typedef enum state
// 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,
......
...@@ -85,13 +85,6 @@ static int lib_print(lua_State *L) ...@@ -85,13 +85,6 @@ static int lib_print(lua_State *L)
return 0; return 0;
} }
static int lib_evalMath(lua_State *L)
{
const char *word = luaL_checkstring(L, 1);
lua_pushinteger(L, LUA_EvalMath(word));
return 1;
}
// M_RANDOM // M_RANDOM
////////////// //////////////
...@@ -138,25 +131,25 @@ static int lib_pRandomRange(lua_State *L) ...@@ -138,25 +131,25 @@ static int lib_pRandomRange(lua_State *L)
static int lib_pAproxDistance(lua_State *L) static int lib_pAproxDistance(lua_State *L)
{ {
fixed_t dx = (fixed_t)luaL_checkinteger(L, 1); fixed_t dx = luaL_checkfixed(L, 1);
fixed_t dy = (fixed_t)luaL_checkinteger(L, 2); fixed_t dy = luaL_checkfixed(L, 2);
//HUDSAFE //HUDSAFE
lua_pushinteger(L, P_AproxDistance(dx, dy)); lua_pushfixed(L, P_AproxDistance(dx, dy));
return 1; return 1;
} }
static int lib_pClosestPointOnLine(lua_State *L) static int lib_pClosestPointOnLine(lua_State *L)
{ {
fixed_t x = (fixed_t)luaL_checkinteger(L, 1); fixed_t x = luaL_checkfixed(L, 1);
fixed_t y = (fixed_t)luaL_checkinteger(L, 2); fixed_t y = luaL_checkfixed(L, 2);
line_t *line = *((line_t **)luaL_checkudata(L, 3, META_LINE)); line_t *line = *((line_t **)luaL_checkudata(L, 3, META_LINE));
vertex_t result; vertex_t result;
//HUDSAFE //HUDSAFE
if (!line) if (!line)
return LUA_ErrInvalid(L, "line_t"); return LUA_ErrInvalid(L, "line_t");
P_ClosestPointOnLine(x, y, line, &result); P_ClosestPointOnLine(x, y, line, &result);
lua_pushinteger(L, result.x); lua_pushfixed(L, result.x);
lua_pushinteger(L, result.y); lua_pushfixed(L, result.y);
return 2; return 2;
} }
...@@ -241,9 +234,9 @@ static int lib_pLookForPlayers(lua_State *L) ...@@ -241,9 +234,9 @@ static int lib_pLookForPlayers(lua_State *L)
static int lib_pSpawnMobj(lua_State *L) static int lib_pSpawnMobj(lua_State *L)
{ {
fixed_t x = (fixed_t)luaL_checkinteger(L, 1); fixed_t x = luaL_checkfixed(L, 1);
fixed_t y = (fixed_t)luaL_checkinteger(L, 2); fixed_t y = luaL_checkfixed(L, 2);
fixed_t z = (fixed_t)luaL_checkinteger(L, 3); fixed_t z = luaL_checkfixed(L, 3);
mobjtype_t type = luaL_checkinteger(L, 4); mobjtype_t type = luaL_checkinteger(L, 4);
NOHUD NOHUD
if (type > MT_LASTFREESLOT) if (type > MT_LASTFREESLOT)
...@@ -283,9 +276,9 @@ static int lib_pSpawnXYZMissile(lua_State *L) ...@@ -283,9 +276,9 @@ static int lib_pSpawnXYZMissile(lua_State *L)
mobj_t *source = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ)); mobj_t *source = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ));
mobj_t *dest = *((mobj_t **)luaL_checkudata(L, 2, META_MOBJ)); mobj_t *dest = *((mobj_t **)luaL_checkudata(L, 2, META_MOBJ));
mobjtype_t type = luaL_checkinteger(L, 3); mobjtype_t type = luaL_checkinteger(L, 3);
fixed_t x = (fixed_t)luaL_checkinteger(L, 4); fixed_t x = luaL_checkfixed(L, 4);
fixed_t y = (fixed_t)luaL_checkinteger(L, 5); fixed_t y = luaL_checkfixed(L, 5);
fixed_t z = (fixed_t)luaL_checkinteger(L, 6); fixed_t z = luaL_checkfixed(L, 6);
NOHUD NOHUD
if (!source || !dest) if (!source || !dest)
return LUA_ErrInvalid(L, "mobj_t"); return LUA_ErrInvalid(L, "mobj_t");
...@@ -298,13 +291,13 @@ static int lib_pSpawnXYZMissile(lua_State *L) ...@@ -298,13 +291,13 @@ static int lib_pSpawnXYZMissile(lua_State *L)
static int lib_pSpawnPointMissile(lua_State *L) static int lib_pSpawnPointMissile(lua_State *L)
{ {
mobj_t *source = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ)); mobj_t *source = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ));
fixed_t xa = (fixed_t)luaL_checkinteger(L, 2); fixed_t xa = luaL_checkfixed(L, 2);
fixed_t ya = (fixed_t)luaL_checkinteger(L, 3); fixed_t ya = luaL_checkfixed(L, 3);
fixed_t za = (fixed_t)luaL_checkinteger(L, 4); fixed_t za = luaL_checkfixed(L, 4);
mobjtype_t type = luaL_checkinteger(L, 5); mobjtype_t type = luaL_checkinteger(L, 5);
fixed_t x = (fixed_t)luaL_checkinteger(L, 6); fixed_t x = luaL_checkfixed(L, 6);
fixed_t y = (fixed_t)luaL_checkinteger(L, 7); fixed_t y = luaL_checkfixed(L, 7);
fixed_t z = (fixed_t)luaL_checkinteger(L, 8); fixed_t z = luaL_checkfixed(L, 8);
NOHUD NOHUD
if (!source) if (!source)
return LUA_ErrInvalid(L, "mobj_t"); return LUA_ErrInvalid(L, "mobj_t");
...@@ -318,9 +311,9 @@ static int lib_pSpawnAlteredDirectionMissile(lua_State *L) ...@@ -318,9 +311,9 @@ static int lib_pSpawnAlteredDirectionMissile(lua_State *L)
{ {
mobj_t *source = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ)); mobj_t *source = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ));
mobjtype_t type = luaL_checkinteger(L, 2); mobjtype_t type = luaL_checkinteger(L, 2);
fixed_t x = (fixed_t)luaL_checkinteger(L, 3); fixed_t x = luaL_checkfixed(L, 3);
fixed_t y = (fixed_t)luaL_checkinteger(L, 4); fixed_t y = luaL_checkfixed(L, 4);
fixed_t z = (fixed_t)luaL_checkinteger(L, 5); fixed_t z = luaL_checkfixed(L, 5);
INT32 shiftingAngle = (INT32)luaL_checkinteger(L, 5); INT32 shiftingAngle = (INT32)luaL_checkinteger(L, 5);
NOHUD NOHUD
if (!source) if (!source)
...@@ -348,7 +341,7 @@ static int lib_pSPMAngle(lua_State *L) ...@@ -348,7 +341,7 @@ static int lib_pSPMAngle(lua_State *L)
{ {
mobj_t *source = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ)); mobj_t *source = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ));
mobjtype_t type = luaL_checkinteger(L, 2); mobjtype_t type = luaL_checkinteger(L, 2);
angle_t angle = (angle_t)luaL_checkinteger(L, 3); angle_t angle = luaL_checkangle(L, 3);
UINT8 allowaim = (UINT8)luaL_optinteger(L, 4, 0); UINT8 allowaim = (UINT8)luaL_optinteger(L, 4, 0);
UINT32 flags2 = (UINT32)luaL_optinteger(L, 5, 0); UINT32 flags2 = (UINT32)luaL_optinteger(L, 5, 0);
NOHUD NOHUD
...@@ -418,13 +411,13 @@ static int lib_pGetClosestAxis(lua_State *L) ...@@ -418,13 +411,13 @@ static int lib_pGetClosestAxis(lua_State *L)
static int lib_pSpawnParaloop(lua_State *L) static int lib_pSpawnParaloop(lua_State *L)
{ {
fixed_t x = (fixed_t)luaL_checkinteger(L, 1); fixed_t x = luaL_checkfixed(L, 1);
fixed_t y = (fixed_t)luaL_checkinteger(L, 2); fixed_t y = luaL_checkfixed(L, 2);
fixed_t z = (fixed_t)luaL_checkinteger(L, 3); fixed_t z = luaL_checkfixed(L, 3);
fixed_t radius = (fixed_t)luaL_checkinteger(L, 4); fixed_t radius = luaL_checkfixed(L, 4);
INT32 number = (INT32)luaL_checkinteger(L, 5); INT32 number = (INT32)luaL_checkinteger(L, 5);
mobjtype_t type = luaL_checkinteger(L, 6); mobjtype_t type = luaL_checkinteger(L, 6);
angle_t rotangle = (angle_t)luaL_checkinteger(L, 7); angle_t rotangle = luaL_checkangle(L, 7);
statenum_t nstate = luaL_optinteger(L, 8, S_NULL); statenum_t nstate = luaL_optinteger(L, 8, S_NULL);
boolean spawncenter = lua_optboolean(L, 9); boolean spawncenter = lua_optboolean(L, 9);
NOHUD NOHUD
...@@ -458,7 +451,7 @@ static int lib_pSupermanLook4Players(lua_State *L) ...@@ -458,7 +451,7 @@ static int lib_pSupermanLook4Players(lua_State *L)
static int lib_pSetScale(lua_State *L) static int lib_pSetScale(lua_State *L)
{ {
mobj_t *mobj = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ)); mobj_t *mobj = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ));
fixed_t newscale = (fixed_t)luaL_checkinteger(L, 2); fixed_t newscale = luaL_checkfixed(L, 2);
NOHUD NOHUD
if (!mobj) if (!mobj)
return LUA_ErrInvalid(L, "mobj_t"); return LUA_ErrInvalid(L, "mobj_t");
...@@ -526,7 +519,7 @@ static int lib_pGetPlayerHeight(lua_State *L) ...@@ -526,7 +519,7 @@ static int lib_pGetPlayerHeight(lua_State *L)
//HUDSAFE //HUDSAFE
if (!player) if (!player)
return LUA_ErrInvalid(L, "player_t"); return LUA_ErrInvalid(L, "player_t");
lua_pushinteger(L, P_GetPlayerHeight(player)); lua_pushfixed(L, P_GetPlayerHeight(player));
return 1; return 1;
} }
...@@ -536,7 +529,7 @@ static int lib_pGetPlayerSpinHeight(lua_State *L) ...@@ -536,7 +529,7 @@ static int lib_pGetPlayerSpinHeight(lua_State *L)
//HUDSAFE //HUDSAFE
if (!player) if (!player)
return LUA_ErrInvalid(L, "player_t"); return LUA_ErrInvalid(L, "player_t");
lua_pushinteger(L, P_GetPlayerSpinHeight(player)); lua_pushfixed(L, P_GetPlayerSpinHeight(player));
return 1; return 1;
} }
...@@ -639,7 +632,7 @@ static int lib_pInQuicksand(lua_State *L) ...@@ -639,7 +632,7 @@ static int lib_pInQuicksand(lua_State *L)
static int lib_pSetObjectMomZ(lua_State *L) static int lib_pSetObjectMomZ(lua_State *L)
{ {
mobj_t *mo = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ)); mobj_t *mo = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ));
fixed_t value = (fixed_t)luaL_checkinteger(L, 2); fixed_t value = luaL_checkfixed(L, 2);
boolean relative = lua_optboolean(L, 3); boolean relative = lua_optboolean(L, 3);
NOHUD NOHUD
if (!mo) if (!mo)
...@@ -753,8 +746,8 @@ static int lib_pDoPlayerExit(lua_State *L) ...@@ -753,8 +746,8 @@ static int lib_pDoPlayerExit(lua_State *L)
static int lib_pInstaThrust(lua_State *L) static int lib_pInstaThrust(lua_State *L)
{ {
mobj_t *mo = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ)); mobj_t *mo = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ));
angle_t angle = (angle_t)luaL_checkinteger(L, 2); angle_t angle = luaL_checkangle(L, 2);
fixed_t move = (fixed_t)luaL_checkinteger(L, 3); fixed_t move = luaL_checkfixed(L, 3);
NOHUD NOHUD
if (!mo) if (!mo)
return LUA_ErrInvalid(L, "mobj_t"); return LUA_ErrInvalid(L, "mobj_t");
...@@ -768,10 +761,10 @@ static int lib_pReturnThrustX(lua_State *L) ...@@ -768,10 +761,10 @@ static int lib_pReturnThrustX(lua_State *L)
fixed_t move; fixed_t move;
if (lua_isnil(L, 1) || lua_isuserdata(L, 1)) if (lua_isnil(L, 1) || lua_isuserdata(L, 1))
lua_remove(L, 1); // ignore mobj as arg1 lua_remove(L, 1); // ignore mobj as arg1
angle = (angle_t)luaL_checkinteger(L, 1); angle = luaL_checkangle(L, 1);
move = (fixed_t)luaL_checkinteger(L, 2); move = luaL_checkfixed(L, 2);
//HUDSAFE //HUDSAFE
lua_pushinteger(L, P_ReturnThrustX(NULL, angle, move)); lua_pushfixed(L, P_ReturnThrustX(NULL, angle, move));
return 1; return 1;
} }
...@@ -781,10 +774,10 @@ static int lib_pReturnThrustY(lua_State *L) ...@@ -781,10 +774,10 @@ static int lib_pReturnThrustY(lua_State *L)
fixed_t move; fixed_t move;
if (lua_isnil(L, 1) || lua_isuserdata(L, 1)) if (lua_isnil(L, 1) || lua_isuserdata(L, 1))
lua_remove(L, 1); // ignore mobj as arg1 lua_remove(L, 1); // ignore mobj as arg1
angle = (angle_t)luaL_checkinteger(L, 1); angle = luaL_checkangle(L, 1);
move = (fixed_t)luaL_checkinteger(L, 2); move = luaL_checkfixed(L, 2);
//HUDSAFE //HUDSAFE
lua_pushinteger(L, P_ReturnThrustY(NULL, angle, move)); lua_pushfixed(L, P_ReturnThrustY(NULL, angle, move));
return 1; return 1;
} }
...@@ -802,7 +795,7 @@ static int lib_pNukeEnemies(lua_State *L) ...@@ -802,7 +795,7 @@ static int lib_pNukeEnemies(lua_State *L)
{ {
mobj_t *inflictor = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ)); mobj_t *inflictor = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ));
mobj_t *source = *((mobj_t **)luaL_checkudata(L, 2, META_MOBJ)); mobj_t *source = *((mobj_t **)luaL_checkudata(L, 2, META_MOBJ));
fixed_t radius = (fixed_t)luaL_checkinteger(L, 3); fixed_t radius = luaL_checkfixed(L, 3);
NOHUD NOHUD
if (!inflictor || !source) if (!inflictor || !source)
return LUA_ErrInvalid(L, "mobj_t"); return LUA_ErrInvalid(L, "mobj_t");
...@@ -868,8 +861,8 @@ static int lib_pSpawnSpinMobj(lua_State *L) ...@@ -868,8 +861,8 @@ static int lib_pSpawnSpinMobj(lua_State *L)
static int lib_pTelekinesis(lua_State *L) static int lib_pTelekinesis(lua_State *L)
{ {
player_t *player = *((player_t **)luaL_checkudata(L, 1, META_PLAYER)); player_t *player = *((player_t **)luaL_checkudata(L, 1, META_PLAYER));
fixed_t thrust = (fixed_t)luaL_checkinteger(L, 2); fixed_t thrust = luaL_checkfixed(L, 2);
fixed_t range = (fixed_t)luaL_checkinteger(L, 3); fixed_t range = luaL_checkfixed(L, 3);
NOHUD NOHUD
if (!player) if (!player)
return LUA_ErrInvalid(L, "player_t"); return LUA_ErrInvalid(L, "player_t");
...@@ -884,8 +877,8 @@ static int lib_pCheckPosition(lua_State *L) ...@@ -884,8 +877,8 @@ static int lib_pCheckPosition(lua_State *L)
{ {
mobj_t *ptmthing = tmthing; mobj_t *ptmthing = tmthing;
mobj_t *thing = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ)); mobj_t *thing = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ));
fixed_t x = (fixed_t)luaL_checkinteger(L, 2); fixed_t x = luaL_checkfixed(L, 2);
fixed_t y = (fixed_t)luaL_checkinteger(L, 3); fixed_t y = luaL_checkfixed(L, 3);
NOHUD NOHUD
if (!thing) if (!thing)
return LUA_ErrInvalid(L, "mobj_t"); return LUA_ErrInvalid(L, "mobj_t");
...@@ -899,8 +892,8 @@ static int lib_pTryMove(lua_State *L) ...@@ -899,8 +892,8 @@ static int lib_pTryMove(lua_State *L)
{ {
mobj_t *ptmthing = tmthing; mobj_t *ptmthing = tmthing;
mobj_t *thing = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ)); mobj_t *thing = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ));
fixed_t x = (fixed_t)luaL_checkinteger(L, 2); fixed_t x = luaL_checkfixed(L, 2);
fixed_t y = (fixed_t)luaL_checkinteger(L, 3); fixed_t y = luaL_checkfixed(L, 3);
boolean allowdropoff = lua_optboolean(L, 4); boolean allowdropoff = lua_optboolean(L, 4);
NOHUD NOHUD
if (!thing) if (!thing)
...@@ -915,7 +908,7 @@ static int lib_pMove(lua_State *L) ...@@ -915,7 +908,7 @@ static int lib_pMove(lua_State *L)
{ {
mobj_t *ptmthing = tmthing; mobj_t *ptmthing = tmthing;
mobj_t *actor = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ)); mobj_t *actor = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ));
fixed_t speed = (fixed_t)luaL_checkinteger(L, 2); fixed_t speed = luaL_checkfixed(L, 2);
NOHUD NOHUD
if (!actor) if (!actor)
return LUA_ErrInvalid(L, "mobj_t"); return LUA_ErrInvalid(L, "mobj_t");
...@@ -929,9 +922,9 @@ static int lib_pTeleportMove(lua_State *L) ...@@ -929,9 +922,9 @@ static int lib_pTeleportMove(lua_State *L)
{ {
mobj_t *ptmthing = tmthing; mobj_t *ptmthing = tmthing;
mobj_t *thing = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ)); mobj_t *thing = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ));
fixed_t x = (fixed_t)luaL_checkinteger(L, 2); fixed_t x = luaL_checkfixed(L, 2);
fixed_t y = (fixed_t)luaL_checkinteger(L, 3); fixed_t y = luaL_checkfixed(L, 3);
fixed_t z = (fixed_t)luaL_checkinteger(L, 4); fixed_t z = luaL_checkfixed(L, 4);
NOHUD NOHUD
if (!thing) if (!thing)
return LUA_ErrInvalid(L, "mobj_t"); return LUA_ErrInvalid(L, "mobj_t");
...@@ -975,10 +968,10 @@ static int lib_pCheckSight(lua_State *L) ...@@ -975,10 +968,10 @@ static int lib_pCheckSight(lua_State *L)
static int lib_pCheckHoopPosition(lua_State *L) static int lib_pCheckHoopPosition(lua_State *L)
{ {
mobj_t *hoopthing = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ)); mobj_t *hoopthing = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ));
fixed_t x = (fixed_t)luaL_checkinteger(L, 2); fixed_t x = luaL_checkfixed(L, 2);
fixed_t y = (fixed_t)luaL_checkinteger(L, 3); fixed_t y = luaL_checkfixed(L, 3);
fixed_t z = (fixed_t)luaL_checkinteger(L, 4); fixed_t z = luaL_checkfixed(L, 4);
fixed_t radius = (fixed_t)luaL_checkinteger(L, 5); fixed_t radius = luaL_checkfixed(L, 5);
NOHUD NOHUD
if (!hoopthing) if (!hoopthing)
return LUA_ErrInvalid(L, "mobj_t"); return LUA_ErrInvalid(L, "mobj_t");
...@@ -990,7 +983,7 @@ static int lib_pRadiusAttack(lua_State *L) ...@@ -990,7 +983,7 @@ static int lib_pRadiusAttack(lua_State *L)
{ {
mobj_t *spot = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ)); mobj_t *spot = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ));
mobj_t *source = *((mobj_t **)luaL_checkudata(L, 2, META_MOBJ)); mobj_t *source = *((mobj_t **)luaL_checkudata(L, 2, META_MOBJ));
fixed_t damagedist = (fixed_t)luaL_checkinteger(L, 3); fixed_t damagedist = luaL_checkfixed(L, 3);
NOHUD NOHUD
if (!spot || !source) if (!spot || !source)
return LUA_ErrInvalid(L, "mobj_t"); return LUA_ErrInvalid(L, "mobj_t");
...@@ -1000,12 +993,12 @@ static int lib_pRadiusAttack(lua_State *L) ...@@ -1000,12 +993,12 @@ static int lib_pRadiusAttack(lua_State *L)
static int lib_pFloorzAtPos(lua_State *L) static int lib_pFloorzAtPos(lua_State *L)
{ {
fixed_t x = (fixed_t)luaL_checkinteger(L, 1); fixed_t x = luaL_checkfixed(L, 1);
fixed_t y = (fixed_t)luaL_checkinteger(L, 2); fixed_t y = luaL_checkfixed(L, 2);
fixed_t z = (fixed_t)luaL_checkinteger(L, 3); fixed_t z = luaL_checkfixed(L, 3);
fixed_t height = (fixed_t)luaL_checkinteger(L, 4); fixed_t height = luaL_checkfixed(L, 4);
//HUDSAFE //HUDSAFE
lua_pushinteger(L, P_FloorzAtPos(x, y, z, height)); lua_pushfixed(L, P_FloorzAtPos(x, y, z, height));
return 1; return 1;
} }
...@@ -1016,8 +1009,8 @@ static int lib_pDoSpring(lua_State *L) ...@@ -1016,8 +1009,8 @@ static int lib_pDoSpring(lua_State *L)
NOHUD NOHUD
if (!spring || !object) if (!spring || !object)
return LUA_ErrInvalid(L, "mobj_t"); return LUA_ErrInvalid(L, "mobj_t");
P_DoSpring(spring, object); lua_pushboolean(L, P_DoSpring(spring, object));
return 0; return 1;
} }
// P_INTER // P_INTER
...@@ -1209,8 +1202,8 @@ static int lib_pDoNightsScore(lua_State *L) ...@@ -1209,8 +1202,8 @@ static int lib_pDoNightsScore(lua_State *L)
static int lib_pThrust(lua_State *L) static int lib_pThrust(lua_State *L)
{ {
mobj_t *mo = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ)); mobj_t *mo = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ));
angle_t angle = (angle_t)luaL_checkinteger(L, 2); angle_t angle = luaL_checkangle(L, 2);
fixed_t move = (fixed_t)luaL_checkinteger(L, 3); fixed_t move = luaL_checkfixed(L, 3);
NOHUD NOHUD
if (!mo) if (!mo)
return LUA_ErrInvalid(L, "mobj_t"); return LUA_ErrInvalid(L, "mobj_t");
...@@ -1485,48 +1478,48 @@ static int lib_evCrumbleChain(lua_State *L) ...@@ -1485,48 +1478,48 @@ static int lib_evCrumbleChain(lua_State *L)
static int lib_rPointToAngle(lua_State *L) static int lib_rPointToAngle(lua_State *L)
{ {
fixed_t x = (fixed_t)luaL_checkinteger(L, 1); fixed_t x = luaL_checkfixed(L, 1);
fixed_t y = (fixed_t)luaL_checkinteger(L, 2); fixed_t y = luaL_checkfixed(L, 2);
//HUDSAFE //HUDSAFE
lua_pushinteger(L, R_PointToAngle(x, y)); lua_pushangle(L, R_PointToAngle(x, y));
return 1; return 1;
} }
static int lib_rPointToAngle2(lua_State *L) static int lib_rPointToAngle2(lua_State *L)
{ {
fixed_t px2 = (fixed_t)luaL_checkinteger(L, 1); fixed_t px2 = luaL_checkfixed(L, 1);
fixed_t py2 = (fixed_t)luaL_checkinteger(L, 2); fixed_t py2 = luaL_checkfixed(L, 2);
fixed_t px1 = (fixed_t)luaL_checkinteger(L, 3); fixed_t px1 = luaL_checkfixed(L, 3);
fixed_t py1 = (fixed_t)luaL_checkinteger(L, 4); fixed_t py1 = luaL_checkfixed(L, 4);
//HUDSAFE //HUDSAFE
lua_pushinteger(L, R_PointToAngle2(px2, py2, px1, py1)); lua_pushangle(L, R_PointToAngle2(px2, py2, px1, py1));
return 1; return 1;
} }
static int lib_rPointToDist(lua_State *L) static int lib_rPointToDist(lua_State *L)
{ {
fixed_t x = (fixed_t)luaL_checkinteger(L, 1); fixed_t x = luaL_checkfixed(L, 1);
fixed_t y = (fixed_t)luaL_checkinteger(L, 2); fixed_t y = luaL_checkfixed(L, 2);
//HUDSAFE //HUDSAFE
lua_pushinteger(L, R_PointToDist(x, y)); lua_pushfixed(L, R_PointToDist(x, y));
return 1; return 1;
} }
static int lib_rPointToDist2(lua_State *L) static int lib_rPointToDist2(lua_State *L)
{ {
fixed_t px2 = (fixed_t)luaL_checkinteger(L, 1); fixed_t px2 = luaL_checkfixed(L, 1);
fixed_t py2 = (fixed_t)luaL_checkinteger(L, 2); fixed_t py2 = luaL_checkfixed(L, 2);
fixed_t px1 = (fixed_t)luaL_checkinteger(L, 3); fixed_t px1 = luaL_checkfixed(L, 3);
fixed_t py1 = (fixed_t)luaL_checkinteger(L, 4); fixed_t py1 = luaL_checkfixed(L, 4);
//HUDSAFE //HUDSAFE
lua_pushinteger(L, R_PointToDist2(px2, py2, px1, py1)); lua_pushfixed(L, R_PointToDist2(px2, py2, px1, py1));
return 1; return 1;
} }
static int lib_rPointInSubsector(lua_State *L) static int lib_rPointInSubsector(lua_State *L)
{ {
fixed_t x = (fixed_t)luaL_checkinteger(L, 1); fixed_t x = luaL_checkfixed(L, 1);
fixed_t y = (fixed_t)luaL_checkinteger(L, 2); fixed_t y = luaL_checkfixed(L, 2);
//HUDSAFE //HUDSAFE
LUA_PushUserdata(L, R_PointInSubsector(x, y), META_SUBSECTOR); LUA_PushUserdata(L, R_PointInSubsector(x, y), META_SUBSECTOR);
return 1; return 1;
...@@ -1660,7 +1653,7 @@ static int lib_sChangeMusic(lua_State *L) ...@@ -1660,7 +1653,7 @@ static int lib_sChangeMusic(lua_State *L)
static int lib_sSpeedMusic(lua_State *L) static int lib_sSpeedMusic(lua_State *L)
{ {
fixed_t fixedspeed = (fixed_t)luaL_checkinteger(L, 1); fixed_t fixedspeed = luaL_checkfixed(L, 1);
float speed = FIXED_TO_FLOAT(fixedspeed); float speed = FIXED_TO_FLOAT(fixedspeed);
player_t *player = NULL; player_t *player = NULL;
NOHUD NOHUD
...@@ -1861,7 +1854,6 @@ static int lib_gTicsToMilliseconds(lua_State *L) ...@@ -1861,7 +1854,6 @@ static int lib_gTicsToMilliseconds(lua_State *L)
static luaL_Reg lib[] = { static luaL_Reg lib[] = {
{"print", lib_print}, {"print", lib_print},
{"EvalMath", lib_evalMath},
// m_random // m_random
{"P_Random",lib_pRandom}, {"P_Random",lib_pRandom},
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include "r_defs.h" #include "r_defs.h"
#include "d_player.h" #include "d_player.h"
#include "blua/lua.h"
enum hook { enum hook {
hook_NetVars=0, hook_NetVars=0,
...@@ -41,12 +42,13 @@ enum hook { ...@@ -41,12 +42,13 @@ enum hook {
hook_BotAI, hook_BotAI,
hook_LinedefExecute, hook_LinedefExecute,
hook_PlayerMsg, hook_PlayerMsg,
hook_DeathMsg, hook_HurtMsg,
hook_MAX // last hook hook_MAX // last hook
}; };
extern const char *const hookNames[]; extern const char *const hookNames[];
void LUAh_NetArchiveHook(lua_CFunction archFunc);
void LUAh_MapChange(void); // Hook for map change (before load) void LUAh_MapChange(void); // Hook for map change (before load)
void LUAh_MapLoad(void); // Hook for map load void LUAh_MapLoad(void); // Hook for map load
void LUAh_PlayerJoin(int playernum); // Hook for Got_AddPlayer void LUAh_PlayerJoin(int playernum); // Hook for Got_AddPlayer
...@@ -54,8 +56,9 @@ void LUAh_ThinkFrame(void); // Hook for frame (after mobj and player thinkers) ...@@ -54,8 +56,9 @@ void LUAh_ThinkFrame(void); // Hook for frame (after mobj and player thinkers)
boolean LUAh_MobjHook(mobj_t *mo, enum hook which); boolean LUAh_MobjHook(mobj_t *mo, enum hook which);
boolean LUAh_PlayerHook(player_t *plr, enum hook which); boolean LUAh_PlayerHook(player_t *plr, enum hook which);
#define LUAh_MobjSpawn(mo) LUAh_MobjHook(mo, hook_MobjSpawn) // Hook for P_SpawnMobj by mobj type #define LUAh_MobjSpawn(mo) LUAh_MobjHook(mo, hook_MobjSpawn) // Hook for P_SpawnMobj by mobj type
UINT8 LUAh_MobjCollide(mobj_t *thing1, mobj_t *thing2); // Hook for PIT_CheckThing by (thing) mobj type UINT8 LUAh_MobjCollideHook(mobj_t *thing1, mobj_t *thing2, enum hook which);
UINT8 LUAh_MobjMoveCollide(mobj_t *thing1, mobj_t *thing2); // Hook for PIT_CheckThing by (tmthing) mobj type #define LUAh_MobjCollide(thing1, thing2) LUAh_MobjCollideHook(thing1, thing2, hook_MobjCollide) // Hook for PIT_CheckThing by (thing) mobj type
#define LUAh_MobjMoveCollide(thing1, thing2) LUAh_MobjCollideHook(thing1, thing2, hook_MobjMoveCollide) // Hook for PIT_CheckThing by (tmthing) mobj type
boolean LUAh_TouchSpecial(mobj_t *special, mobj_t *toucher); // Hook for P_TouchSpecialThing by mobj type boolean LUAh_TouchSpecial(mobj_t *special, mobj_t *toucher); // Hook for P_TouchSpecialThing by mobj type
#define LUAh_MobjFuse(mo) LUAh_MobjHook(mo, hook_MobjFuse) // Hook for mobj->fuse == 0 by mobj type #define LUAh_MobjFuse(mo) LUAh_MobjHook(mo, hook_MobjFuse) // Hook for mobj->fuse == 0 by mobj type
#define LUAh_MobjThinker(mo) LUAh_MobjHook(mo, hook_MobjThinker) // Hook for P_MobjThinker or P_SceneryThinker by mobj type #define LUAh_MobjThinker(mo) LUAh_MobjHook(mo, hook_MobjThinker) // Hook for P_MobjThinker or P_SceneryThinker by mobj type
...@@ -73,6 +76,6 @@ boolean LUAh_BotTiccmd(player_t *bot, ticcmd_t *cmd); // Hook for B_BuildTiccmd ...@@ -73,6 +76,6 @@ boolean LUAh_BotTiccmd(player_t *bot, ticcmd_t *cmd); // Hook for B_BuildTiccmd
boolean LUAh_BotAI(mobj_t *sonic, mobj_t *tails, ticcmd_t *cmd); // Hook for B_BuildTailsTiccmd by skin name boolean LUAh_BotAI(mobj_t *sonic, mobj_t *tails, ticcmd_t *cmd); // Hook for B_BuildTailsTiccmd by skin name
boolean LUAh_LinedefExecute(line_t *line, mobj_t *mo, sector_t *sector); // Hook for linedef executors boolean LUAh_LinedefExecute(line_t *line, mobj_t *mo, sector_t *sector); // Hook for linedef executors
boolean LUAh_PlayerMsg(int source, int target, int flags, char *msg); // Hook for chat messages boolean LUAh_PlayerMsg(int source, int target, int flags, char *msg); // Hook for chat messages
boolean LUAh_DeathMsg(player_t *player, mobj_t *inflictor, mobj_t *source); // Hook for hurt messages boolean LUAh_HurtMsg(player_t *player, mobj_t *inflictor, mobj_t *source); // Hook for hurt messages
#endif #endif
This diff is collapsed.