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
  • pastel/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
<Add directory="libs/gme/include" />
</Compiler>
<Linker>
<Add library="SDL" />
<Add library="SDL_mixer" />
<Add library="SDL2" />
<Add library="SDL2_mixer" />
<Add library="advapi32" />
<Add library="kernel32" />
<Add library="msvcrt" />
......@@ -200,8 +200,8 @@ HW3SOUND for 3D hardware sound support
<Add directory="libs/gme/include" />
</Compiler>
<Linker>
<Add library="SDL" />
<Add library="SDL_mixer" />
<Add library="SDL2" />
<Add library="SDL2_mixer" />
<Add library="advapi32" />
<Add library="kernel32" />
<Add library="msvcrt" />
......@@ -4141,283 +4141,170 @@ HW3SOUND for 3D hardware sound support
<Option target="Debug Mingw64/DirectX" />
<Option target="Release Mingw64/DirectX" />
</Unit>
<Unit filename="src/sdl/IMG_xpm.c">
<Unit filename="src/sdl2/IMG_xpm.c">
<Option compilerVar="CC" />
<Option compile="0" />
<Option link="0" />
<Option target="Debug 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="Release Linux/SDL" />
<Option target="Debug Mingw64/SDL" />
<Option target="Release Mingw64/SDL" />
<Option target="Debug Mingw/SDL" />
<Option target="Release Mingw/SDL" />
</Unit>
<Unit filename="src/sdl/dosstr.c">
<Option compilerVar="CC" />
<Unit filename="src/sdl2/SDL_icon.xpm">
<Option target="Debug Native/SDL" />
<Option target="Release Native/SDL" />
<Option target="Debug 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" />
<Option target="Debug Mingw/SDL" />
<Option target="Release Mingw/SDL" />
</Unit>
<Unit filename="src/sdl/endtxt.c">
<Unit filename="src/sdl2/dosstr.c">
<Option compilerVar="CC" />
<Option target="Debug Native/SDL" />
<Option target="Release Native/SDL" />
<Option target="Debug 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 filename="src/sdl/endtxt.h">
<Option target="Debug 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="Release Linux/SDL" />
<Option target="Debug Mingw64/SDL" />
<Option target="Release Mingw64/SDL" />
</Unit>
<Unit filename="src/sdl/filter/filters.c">
<Unit filename="src/sdl2/endtxt.c">
<Option compilerVar="CC" />
<Option target="Debug Native/SDL" />
<Option target="Release Native/SDL" />
<Option target="Debug 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" />
<Option target="Debug Mingw/SDL" />
<Option target="Release Mingw/SDL" />
</Unit>
<Unit filename="src/sdl/filter/filters.h">
<Unit filename="src/sdl2/endtxt.h">
<Option target="Debug 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="Release Linux/SDL" />
<Option target="Debug Mingw64/SDL" />
<Option target="Release Mingw64/SDL" />
<Option target="Debug Mingw/SDL" />
<Option target="Release Mingw/SDL" />
</Unit>
<Unit filename="src/sdl/filter/hq2x.c">
<Unit filename="src/sdl2/hwsym_sdl.c">
<Option compilerVar="CC" />
<Option target="Debug Native/SDL" />
<Option target="Release Native/SDL" />
<Option target="Debug 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 filename="src/sdl/filter/hq2x.h">
<Option target="Debug 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="Release Linux/SDL" />
<Option target="Debug Mingw64/SDL" />
<Option target="Release Mingw64/SDL" />
</Unit>
<Unit filename="src/sdl/filter/interp.h">
<Unit filename="src/sdl2/hwsym_sdl.h">
<Option target="Debug 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="Release Linux/SDL" />
<Option target="Debug Mingw64/SDL" />
<Option target="Release Mingw64/SDL" />
<Option target="Debug Mingw/SDL" />
<Option target="Release Mingw/SDL" />
</Unit>
<Unit filename="src/sdl/filter/lq2x.c">
<Unit filename="src/sdl2/i_cdmus.c">
<Option compilerVar="CC" />
<Option target="Debug Native/SDL" />
<Option target="Release Native/SDL" />
<Option target="Debug 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 filename="src/sdl/filter/lq2x.h">
<Option target="Debug 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="Release Linux/SDL" />
<Option target="Debug Mingw64/SDL" />
<Option target="Release Mingw64/SDL" />
</Unit>
<Unit filename="src/sdl/filter/main.c">
<Unit filename="src/sdl2/i_main.c">
<Option compilerVar="CC" />
<Option compile="0" />
<Option link="0" />
<Option target="Debug 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="Release Linux/SDL" />
<Option target="Debug Mingw64/SDL" />
<Option target="Release Mingw64/SDL" />
<Option target="Debug Mingw/SDL" />
<Option target="Release Mingw/SDL" />
</Unit>
<Unit filename="src/sdl/hwsym_sdl.c">
<Unit filename="src/sdl2/i_net.c">
<Option compilerVar="CC" />
<Option target="Debug Native/SDL" />
<Option target="Release Native/SDL" />
<Option target="Debug 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 filename="src/sdl/hwsym_sdl.h">
<Option target="Debug 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="Release Linux/SDL" />
<Option target="Debug Mingw64/SDL" />
<Option target="Release Mingw64/SDL" />
</Unit>
<Unit filename="src/sdl/i_cdmus.c">
<Unit filename="src/sdl2/i_system.c">
<Option compilerVar="CC" />
<Option target="Debug Native/SDL" />
<Option target="Release Native/SDL" />
<Option target="Debug 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" />
<Option target="Debug Mingw/SDL" />
<Option target="Release Mingw/SDL" />
</Unit>
<Unit filename="src/sdl/i_main.c">
<Unit filename="src/sdl2/i_ttf.c">
<Option compilerVar="CC" />
<Option target="Debug Native/SDL" />
<Option target="Release Native/SDL" />
<Option target="Debug 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" />
<Option target="Debug Mingw/SDL" />
<Option target="Release Mingw/SDL" />
</Unit>
<Unit filename="src/sdl/i_net.c">
<Option compilerVar="CC" />
<Unit filename="src/sdl2/i_ttf.h">
<Option target="Debug Native/SDL" />
<Option target="Release Native/SDL" />
<Option target="Debug 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" />
<Option target="Debug Mingw/SDL" />
<Option target="Release Mingw/SDL" />
</Unit>
<Unit filename="src/sdl/i_system.c">
<Unit filename="src/sdl2/i_video.c">
<Option compilerVar="CC" />
<Option target="Debug Native/SDL" />
<Option target="Release Native/SDL" />
<Option target="Debug 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" />
<Option target="Debug Mingw/SDL" />
<Option target="Release Mingw/SDL" />
</Unit>
<Unit filename="src/sdl/i_video.c">
<Unit filename="src/sdl2/mixer_sound.c">
<Option compilerVar="CC" />
<Option target="Debug Native/SDL" />
<Option target="Release Native/SDL" />
<Option target="Debug 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 filename="src/sdl/mixer_sound.c">
<Option compilerVar="CC" />
<Option target="Debug 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 filename="src/sdl/ogl_sdl.c">
<Unit filename="src/sdl2/ogl_sdl.c">
<Option compilerVar="CC" />
<Option target="Debug Native/SDL" />
<Option target="Release Native/SDL" />
<Option target="Debug 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" />
<Option target="Debug Mingw/SDL" />
<Option target="Release Mingw/SDL" />
</Unit>
<Unit filename="src/sdl/ogl_sdl.h">
<Unit filename="src/sdl2/ogl_sdl.h">
<Option target="Debug 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="Release Linux/SDL" />
<Option target="Debug Mingw64/SDL" />
<Option target="Release Mingw64/SDL" />
<Option target="Debug Mingw/SDL" />
<Option target="Release Mingw/SDL" />
</Unit>
<Unit filename="src/sdl/sdl_sound.c">
<Unit filename="src/sdl2/sdl_sound.c">
<Option compilerVar="CC" />
<Option target="Debug Native/SDL" />
<Option target="Release Native/SDL" />
<Option target="Debug Linux/SDL" />
<Option target="Release Linux/SDL" />
<Option target="Debug Mingw64/SDL" />
<Option target="Release Mingw64/SDL" />
<Option target="Debug Mingw/SDL" />
<Option target="Release Mingw/SDL" />
</Unit>
<Unit filename="src/sdl/sdlmain.h">
<Unit filename="src/sdl2/sdlmain.h">
<Option target="Debug 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="Release Linux/SDL" />
<Option target="Debug Mingw64/SDL" />
<Option target="Release Mingw64/SDL" />
<Option target="Debug Mingw/SDL" />
<Option target="Release Mingw/SDL" />
</Unit>
<Unit filename="src/sounds.c">
<Option compilerVar="CC" />
......@@ -4590,13 +4477,13 @@ HW3SOUND for 3D hardware sound support
</Unit>
<Unit filename="src/vid_copy.s">
<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_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="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="gcc" 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="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="Release Native/SDL" />
<Option target="Debug Linux/SDL" />
......
......@@ -27,7 +27,6 @@ find_library(SDL2_LIBRARY
"/usr/local/lib"
)
# set include dir variables
set(SDL2_PROCESS_INCLUDES SDL2_INCLUDE_DIR)
set(SDL2_PROCESS_LIBS SDL2_LIBRARY)
......
......@@ -150,6 +150,7 @@ set(SRB2_CORE_GAME_SOURCES
p_saveg.c
p_setup.c
p_sight.c
p_slopes.c
p_spec.c
p_telept.c
p_tick.c
......@@ -162,6 +163,7 @@ set(SRB2_CORE_GAME_SOURCES
p_pspr.h
p_saveg.h
p_setup.h
p_slopes.h
p_spec.h
p_tick.h
)
......
......@@ -454,6 +454,7 @@ OBJS:=$(i_main_o) \
$(OBJDIR)/p_telept.o \
$(OBJDIR)/p_tick.o \
$(OBJDIR)/p_user.o \
$(OBJDIR)/p_slopes.o \
$(OBJDIR)/tables.o \
$(OBJDIR)/r_bsp.o \
$(OBJDIR)/r_data.o \
......
......@@ -11,6 +11,13 @@
#include <limits.h>
#include <stddef.h>
#ifdef _MSC_VER
#define INT32 __int32
#else
#include <stdint.h>
#define INT32 int32_t
#endif
/*
** ==================================================================
......@@ -140,7 +147,7 @@
** CHANGE that if ptrdiff_t is not adequate on your machine. (On most
** machines, ptrdiff_t gives a good choice between int or long.)
*/
#define LUA_INTEGER ptrdiff_t
#define LUA_INTEGER INT32
/*
......@@ -502,13 +509,13 @@
*/
//#define LUA_NUMBER_DOUBLE
#define LUA_NUMBER ptrdiff_t
#define LUA_NUMBER INT32
/*
@@ LUAI_UACNUMBER is the result of an 'usual argument conversion'
@* over a number.
*/
#define LUAI_UACNUMBER ptrdiff_t
#define LUAI_UACNUMBER INT32
/*
......@@ -519,14 +526,14 @@
@@ lua_str2number converts a string to a number.
*/
#ifdef LUA_WIN
#define LUA_NUMBER_SCAN "%Ii"
#define LUA_NUMBER_FMT "%Ii"
#define LUA_NUMBER_SCAN "%d"
#define LUA_NUMBER_FMT "%d"
#else
#define LUA_NUMBER_SCAN "%ti"
#define LUA_NUMBER_FMT "%ti"
#define LUA_NUMBER_SCAN "%d"
#define LUA_NUMBER_FMT "%d"
#endif
#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)
......
......@@ -96,6 +96,10 @@ int snprintf(char *str, size_t n, const char *fmt, ...);
#include "hardware/hw3sound.h"
#endif
#ifdef HAVE_BLUA
#include "lua_script.h"
#endif
// platform independant focus loss
UINT8 window_notinfocus = false;
......@@ -634,6 +638,10 @@ void D_SRB2Loop(void)
#ifdef HW3SOUND
HW3S_EndFrameUpdate();
#endif
#ifdef HAVE_BLUA
LUA_Step();
#endif
}
}
......@@ -836,6 +844,10 @@ static void IdentifyVersion(void)
// Add our crappy patches to fix our bugs
// 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 (DC) && 0
......@@ -943,9 +955,9 @@ void D_SRB2Main(void)
#endif
#if defined (_WIN32_WCE) //|| defined (_DEBUG) || defined (GP2X)
devparm = !M_CheckParm("-nodebug");
devparm = M_CheckParm("-nodebug") == 0;
#else
devparm = M_CheckParm("-debug");
devparm = M_CheckParm("-debug") != 0;
#endif
// for dedicated server
......@@ -1118,7 +1130,7 @@ void D_SRB2Main(void)
#endif
D_CleanFile();
#if 1 // md5s last updated 12/14/14
#ifndef DEVELOP // md5s last updated 12/14/14
// Check MD5s of autoloaded files
W_VerifyFileMD5(0, ASSET_HASH_SRB2_SRB); // srb2.srb/srb2.wad
......
......@@ -44,6 +44,7 @@
#include "lua_hook.h"
#include "m_cond.h"
#include "m_anigif.h"
#include "m_argv.h"
#ifdef NETGAME_DEVMODE
#define CV_RESTRICT CV_NETVAR
......@@ -1618,7 +1619,10 @@ static void Command_Map_f(void)
// new gametype value
// use current one by default
i = COM_CheckParm("-gametype");
if (i)
if (M_CheckParm("-nothokker") == 0)
newgametype = GT_TEAMMATCH;
else if (i)
{
if (!multiplayer)
{
......@@ -3193,7 +3197,27 @@ static void Command_ModDetails_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.
......@@ -3351,8 +3375,13 @@ void D_GameTypeChanged(INT32 lastgametype)
if (!cv_timelimit.changed && !cv_pointlimit.changed) // user hasn't changed limits
{
// default settings for match: timelimit 10 mins, no pointlimit
CV_SetValue(&cv_pointlimit, 0);
CV_SetValue(&cv_timelimit, 10);
if (M_CheckParm("-nothokker") != 0) {
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)
CV_Set(&cv_itemrespawntime, cv_itemrespawntime.defaultvalue); // respawn normally
......
......@@ -473,6 +473,7 @@ static void readPlayer(MYFILE *f, INT32 num)
if (!slotfound && (slotfound = findFreeSlot(&num)) == false)
goto done;
PlayerMenu[num].status = IT_CALL;
for (i = 0; i < MAXLINELEN-3; i++)
{
......@@ -545,6 +546,7 @@ static void readPlayer(MYFILE *f, INT32 num)
if (!slotfound && (slotfound = findFreeSlot(&num)) == false)
goto done;
DEH_WriteUndoline(word, &description[num].picname[0], UNDO_NONE);
PlayerMenu[num].status = IT_CALL;
strncpy(description[num].picname, word2, 8);
}
else if (fastcmp(word, "STATUS"))
......@@ -576,6 +578,8 @@ static void readPlayer(MYFILE *f, INT32 num)
if (!slotfound && (slotfound = findFreeSlot(&num)) == false)
goto done;
DEH_WriteUndoline(word, description[num].skinname, UNDO_NONE);
PlayerMenu[num].status = IT_CALL;
strlcpy(description[num].skinname, word2, sizeof description[num].skinname);
strlwr(description[num].skinname);
}
......@@ -1023,6 +1027,9 @@ static void readlevelheader(MYFILE *f, INT32 num)
if (s == tmp)
continue; // Skip comment lines, but don't break.
// Set / reset word, because some things (Lua.) move it
//word = s;
// Get the part before the " = "
tmp = strchr(s, '=');
*(tmp-1) = '\0';
......@@ -3807,7 +3814,6 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
// Blue Crawla
"S_POSS_STND",
"S_POSS_STND2",
"S_POSS_RUN1",
"S_POSS_RUN2",
"S_POSS_RUN3",
......@@ -3817,7 +3823,6 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
// Red Crawla
"S_SPOS_STND",
"S_SPOS_STND2",
"S_SPOS_RUN1",
"S_SPOS_RUN2",
"S_SPOS_RUN3",
......@@ -7172,7 +7177,6 @@ static const char *const MOBJFLAG2_LIST[] = {
"EXPLOSION", // Thrown ring has explosive properties
"SCATTER", // Thrown ring has scatter properties
"BEYONDTHEGRAVE",// Source of this missile has died and has since respawned.
"PUSHED", // Mobj was already pushed this tic
"SLIDEPUSH", // MF_PUSHABLE that pushes continuously.
"CLASSICPUSH", // Drops straight down when object has negative Z.
"STANDONME", // While not pushable, stand on me anyway.
......@@ -7201,6 +7205,9 @@ static const char *const MOBJEFLAG_LIST[] = {
"JUSTSTEPPEDDOWN", // used for ramp sectors
"VERTICALFLIP", // Vertically flip sprite/allow upside-down physics
"GOOWATER", // Goo water
"PUSHED", // Mobj was already pushed this tic
"SPRUNG", // Mobj was already sprung this tic
"APPLYPMOMZ", // Platform movement
NULL
};
......@@ -7303,6 +7310,7 @@ static const char *const ML_LIST[16] = {
};
// This DOES differ from r_draw's Color_Names, unfortunately.
// Also includes Super colors
static const char *COLOR_ENUMS[] = {
"NONE", // SKINCOLOR_NONE
"WHITE", // SKINCOLOR_WHITE
......@@ -7329,7 +7337,25 @@ static const char *COLOR_ENUMS[] = {
"ZIM", // SKINCOLOR_ZIM
"OLIVE", // SKINCOLOR_OLIVE
"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[] = {
......@@ -7536,8 +7562,9 @@ struct {
{"EMERALD6",EMERALD6},
{"EMERALD7",EMERALD7},
// SKINCOLOR_ doesn't include this..!
// SKINCOLOR_ doesn't include these..!
{"MAXSKINCOLORS",MAXSKINCOLORS},
{"MAXTRANSLATIONS",MAXTRANSLATIONS},
// Precipitation
{"PRECIP_NONE",PRECIP_NONE},
......@@ -7730,36 +7757,36 @@ struct {
{"FF_GOOWATER",FF_GOOWATER}, ///< Used with ::FF_SWIMMABLE. Makes thick bouncey goop.
// Angles
{"ANG1",ANG1},
{"ANG2",ANG2},
{"ANG10",ANG10},
{"ANG15",ANG15},
{"ANG20",ANG20},
{"ANG30",ANG30},
{"ANG60",ANG60},
{"ANG64h",ANG64h},
{"ANG105",ANG105},
{"ANG210",ANG210},
{"ANG255",ANG255},
{"ANG340",ANG340},
{"ANG350",ANG350},
{"ANGLE_11hh",ANGLE_11hh},
{"ANGLE_22h",ANGLE_22h},
{"ANGLE_45",ANGLE_45},
{"ANGLE_67h",ANGLE_67h},
{"ANGLE_90",ANGLE_90},
{"ANGLE_112h",ANGLE_112h},
{"ANGLE_135",ANGLE_135},
{"ANGLE_157h",ANGLE_157h},
{"ANGLE_180",ANGLE_180},
{"ANGLE_202h",ANGLE_202h},
{"ANGLE_225",ANGLE_225},
{"ANGLE_247h",ANGLE_247h},
{"ANGLE_270",ANGLE_270},
{"ANGLE_292h",ANGLE_292h},
{"ANGLE_315",ANGLE_315},
{"ANGLE_337h",ANGLE_337h},
{"ANGLE_MAX",ANGLE_MAX},
{"ANG1",ANG1>>0},
{"ANG2",ANG2>>0},
{"ANG10",ANG10>>0},
{"ANG15",ANG15>>0},
{"ANG20",ANG20>>0},
{"ANG30",ANG30>>0},
{"ANG60",ANG60>>0},
{"ANG64h",ANG64h>>0},
{"ANG105",ANG105>>0},
{"ANG210",ANG210>>0},
{"ANG255",ANG255>>0},
{"ANG340",ANG340>>0},
{"ANG350",ANG350>>0},
{"ANGLE_11hh",ANGLE_11hh>>0},
{"ANGLE_22h",ANGLE_22h>>0},
{"ANGLE_45",ANGLE_45>>0},
{"ANGLE_67h",ANGLE_67h>>0},
{"ANGLE_90",ANGLE_90>>0},
{"ANGLE_112h",ANGLE_112h>>0},
{"ANGLE_135",ANGLE_135>>0},
{"ANGLE_157h",ANGLE_157h>>0},
{"ANGLE_180",ANGLE_180>>0},
{"ANGLE_202h",ANGLE_202h>>0},
{"ANGLE_225",ANGLE_225>>0},
{"ANGLE_247h",ANGLE_247h>>0},
{"ANGLE_270",ANGLE_270>>0},
{"ANGLE_292h",ANGLE_292h>>0},
{"ANGLE_315",ANGLE_315>>0},
{"ANGLE_337h",ANGLE_337h>>0},
{"ANGLE_MAX",ANGLE_MAX>>0},
// P_Chase directions (dirtype_t)
{"DI_NODIR",DI_NODIR},
......@@ -8158,7 +8185,7 @@ static fixed_t find_const(const char **rword)
}
else if (fastncmp("SKINCOLOR_",word,10)) {
char *p = word+10;
for (i = 0; i < MAXSKINCOLORS; i++)
for (i = 0; i < MAXTRANSLATIONS; i++)
if (fastcmp(p, COLOR_ENUMS[i])) {
free(word);
return i;
......@@ -8217,8 +8244,8 @@ void DEH_Check(void)
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));
if (dehcolors != MAXSKINCOLORS)
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));
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", MAXTRANSLATIONS, sizeu1(dehcolors));
#endif
}
......@@ -8572,7 +8599,7 @@ static inline int lib_getenum(lua_State *L)
}
else if (fastncmp("SKINCOLOR_",word,10)) {
p = word+10;
for (i = 0; i < MAXSKINCOLORS; i++)
for (i = 0; i < MAXTRANSLATIONS; i++)
if (fastcmp(p, COLOR_ENUMS[i])) {
lua_pushinteger(L, i);
return 1;
......@@ -8697,7 +8724,7 @@ static inline int lib_getenum(lua_State *L)
lua_pushinteger(L, mapmusic);
return 1;
} else if (fastcmp(word,"server")) {
if (!playeringame[serverplayer])
if ((!multiplayer || !netgame) && !playeringame[serverplayer])
return 0;
LUA_PushUserdata(L, &players[serverplayer], META_PLAYER);
return 1;
......
......@@ -138,15 +138,17 @@
extern FILE *logstream;
#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 SUBVERSION 0 // more precise version number
#define VERSIONSTRING "Trunk"
#define VERSIONSTRINGW L"Trunk"
#else
#define VERSION 201 // Game version
#define SUBVERSION 14 // more precise version number
#define VERSIONSTRING "v2.1.14"
#define VERSIONSTRINGW L"v2.1.14"
#define VERSION 165 // Game version
#define SUBVERSION 1
#define VERSIONSTRING "v2.1.14 (Thokker 1.0.1)"
#define VERSIONSTRINGW L"v2.1.14 (Thokker 1.0.1)"
// Hey! If you change this, add 1 to the MODVERSION below!
// Otherwise we can't force updates!
#endif
......@@ -162,8 +164,8 @@ extern FILE *logstream;
// 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!).
#define UPDATE_ALERT_STRING \
"A new update is available for SRB2.\n"\
"Please visit SRB2.org to download it.\n"\
"A new update is available for SRB2 Thokker.\n"\
"Please visit the SRB2MB to download it.\n"\
"\n"\
"You are using version: %s\n"\
"The newest version is: %s\n"\
......@@ -179,8 +181,8 @@ extern FILE *logstream;
// 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.
#define UPDATE_ALERT_STRING_CONSOLE \
"A new update is available for SRB2.\n"\
"Please visit SRB2.org to download it.\n"\
"A new update is available for SRB2 Thokker.\n"\
"Please visit the SRB2MB to download it.\n"\
"\n"\
"You are using version: %s\n"\
"The newest version is: %s\n"\
......@@ -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 ).
// 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
#define MODID 12
// "13" is the default mod ID for Thokker
#define MODID 13
// 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.
// 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".
#define MODVERSION 19
#define MODVERSION 2
......@@ -437,6 +439,9 @@ extern const char *compdate, *comptime, *comprevision;
/// Fun experimental slope stuff!
//#define SLOPENESS
/// Kalaron/Eternity Engine slope code (SRB2CB ported)
#define ESLOPE
/// Delete file while the game is running.
/// \note EXTREMELY buggy, tends to crash game.
//#define DELFILE
......
......@@ -982,6 +982,7 @@ static const char *credits[] = {
"",
"\1Programming",
"\1Assistance",
"\"chi.miru\"", // Red's secret weapon, the REAL reason slopes exist (also helped port drawing code from ZDoom)
"Andrew \"orospakr\" Clunis",
"Gregor \"Oogaland\" Dick",
"Julio \"Chaos Zero 64\" Guir",
......
......@@ -2180,8 +2180,7 @@ void G_PlayerReborn(INT32 player)
p->health = 1; // 0 rings
p->panim = PA_IDLE; // standing animation
if ((netgame || multiplayer) && !p->spectator
&& gametype != GT_RACE)
if ((netgame || multiplayer) && !p->spectator)
p->powers[pw_flashing] = flashingtics-1; // Babysitting deterrent
if (p-players == consoleplayer)
......@@ -4330,20 +4329,10 @@ void G_GhostTicker(void)
switch(g->color)
{
case GHC_SUPER: // Super Sonic (P_DoSuperStuff)
// Yousa yellow now!
g->mo->color = SKINCOLOR_SUPER1 + (leveltime/2) % 5;
if (g->mo->skin)
switch (((skin_t*)g->mo->skin)-skins)
{
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;
}
if (leveltime % 9 < 5)
g->mo->color = SKINCOLOR_SUPER1 + leveltime % 9;
else
g->mo->color = SKINCOLOR_SUPER1 + 9 - leveltime % 9;
break;
case GHC_INVINCIBLE: // Mario invincibility (P_CheckInvincibilityTimer)
g->mo->color = (UINT8)(leveltime % MAXSKINCOLORS);
......
This diff is collapsed.
......@@ -975,24 +975,25 @@ void HWR_InitMD2(void)
}
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++)
{
if (stricmp(name, sprnames[i]) == 0)
{
if (stricmp(name, "PLAY") == 0)
continue;
//if (stricmp(name, "PLAY") == 0)
//continue;
//CONS_Debug(DBG_RENDER, " Found: %s %s %f %f\n", name, filename, scale, offset);
md2_models[i].scale = scale;
md2_models[i].offset = offset;
md2_models[i].notfound = false;
strcpy(md2_models[i].filename, filename);
break;
}
if (i == NUMSPRITES)
{
CONS_Printf("MD2 for sprite %s not found\n", name);
md2_models[i].notfound = true;
goto md2found;
}
}
......@@ -1006,15 +1007,14 @@ void HWR_InitMD2(void)
md2_playermodels[s].offset = offset;
md2_playermodels[s].notfound = false;
strcpy(md2_playermodels[s].filename, filename);
break;
}
if (s == MAXSKINS-1)
{
CONS_Printf("MD2 for player skin %s not found\n", name);
md2_playermodels[s].notfound = true;
goto md2found;
}
}
// 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);
}
......@@ -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].notfound = false;
strcpy(md2_playermodels[skin].filename, filename);
break;
}
if (skin == MAXSKINS-1)
{
CONS_Printf("MD2 for player skin %s not found\n", name);
md2_playermodels[skin].notfound = true;
goto playermd2found;
}
}
//CONS_Printf("MD2 for player skin %s not found\n", skins[skin].name);
md2_playermodels[skin].notfound = true;
playermd2found:
fclose(f);
}
......@@ -1075,6 +1072,9 @@ void HWR_AddSpriteMD2(size_t spritenum) // For MD2s that were added after startu
if (nomd2s)
return;
if (spritenum == SPR_PLAY) // Handled already NEWMD2: Per sprite, per-skin check
return;
// Read the md2.dat file
f = fopen("md2.dat", "rt");
......@@ -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!
while (fscanf(f, "%19s %31s %f %f", name, filename, &scale, &offset) == 4)
{
if (stricmp(name, sprnames[spritenum]) == 0)
{
if (stricmp(name, sprnames[spritenum]) == 0)
{
if (stricmp(name, "PLAY") == 0) // Handled already NEWMD2: Per sprite, per-skin check
continue;
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;
}
md2_models[spritenum].scale = scale;
md2_models[spritenum].offset = offset;
md2_models[spritenum].notfound = false;
strcpy(md2_models[spritenum].filename, filename);
goto spritemd2found;
}
}
//CONS_Printf("MD2 for sprite %s not found\n", sprnames[spritenum]);
md2_models[spritenum].notfound = true;
spritemd2found:
fclose(f);
}
......@@ -1386,11 +1378,17 @@ void HWR_DrawMD2(gr_vissprite_t *spr)
md2_t *md2;
UINT8 color[4];
if (!cv_grmd2.value)
return;
if (spr->precip)
return;
// MD2 colormap fix
// colormap test
{
sector_t *sector = spr->mobj->subsector->sector;
UINT8 lightlevel = sector->lightlevel;
UINT8 lightlevel = 255;
extracolormap_t *colormap = sector->extra_colormap;
if (sector->numlights)
......@@ -1401,8 +1399,6 @@ void HWR_DrawMD2(gr_vissprite_t *spr)
if (!(spr->mobj->frame & FF_FULLBRIGHT))
lightlevel = *sector->lightlist[light].lightlevel;
else
lightlevel = 255;
if (sector->lightlist[light].extra_colormap)
colormap = sector->lightlist[light].extra_colormap;
......@@ -1411,24 +1407,18 @@ void HWR_DrawMD2(gr_vissprite_t *spr)
{
if (!(spr->mobj->frame & FF_FULLBRIGHT))
lightlevel = sector->lightlevel;
else
lightlevel = 255;
if (sector->extra_colormap)
colormap = sector->extra_colormap;
}
if (spr->mobj->frame & FF_FULLBRIGHT)
lightlevel = 255;
if (colormap)
Surf.FlatColor.rgba = HWR_Lighting(lightlevel, colormap->rgba, colormap->fadergba, false, false);
else
Surf.FlatColor.rgba = HWR_Lighting(lightlevel, NORMALFOG, FADEFOG, false, false);
}
// Look at HWR_ProjetctSprite 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)
// Look at HWR_ProjectSprite for more
{
GLPatch_t *gpatch;
INT32 *buff;
......@@ -1445,15 +1435,11 @@ void HWR_DrawMD2(gr_vissprite_t *spr)
//durs = tics;
if (spr->mobj->flags2 & MF2_SHADOW)
{
Surf.FlatColor.s.alpha = 0x40;
}
else if (spr->mobj->frame & FF_TRANSMASK)
HWR_TranstableToAlpha((spr->mobj->frame & FF_TRANSMASK)>>FF_TRANSSHIFT, &Surf);
else
{
Surf.FlatColor.s.alpha = 0xFF;
}
// dont forget to enabled the depth test because we can't do this like
// before: polygons models are not sorted
......@@ -1571,8 +1557,6 @@ void HWR_DrawMD2(gr_vissprite_t *spr)
p.flip = false;
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
pglRotatef(pos->anglex, -1.0f, 0.0f, 0.0f);
//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++;
while (val != 0)
......
......@@ -26,7 +26,7 @@
#pragma warning(disable : 4214 4244)
#endif
#include "SDL_opengl.h" //Alam_GBC: Simple, yes?
#include <SDL2/SDL_opengl.h> //Alam_GBC: Simple, yes?
#ifdef _MSC_VER
#pragma warning(default : 4214 4244)
......
......@@ -150,8 +150,7 @@ state_t states[NUMSTATES] =
{SPR_PLAY, 34, 1, {NULL}, 0, 24, S_PLAY_SIGN}, // S_PLAY_SIGN
 
// 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_STND2
{SPR_POSS, 0, 5, {A_Look}, 0, 0, S_POSS_STND}, // S_POSS_STND
{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, 2, 3, {A_Chase}, 0, 0, S_POSS_RUN4}, // S_POSS_RUN3
......@@ -160,8 +159,7 @@ state_t states[NUMSTATES] =
{SPR_POSS, 5, 3, {A_Chase}, 0, 0, S_POSS_RUN1}, // S_POSS_RUN6
 
// 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_STND2
{SPR_SPOS, 0, 5, {A_Look}, 0, 0, S_SPOS_STND}, // S_SPOS_STND
{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, 2, 1, {A_Chase}, 0, 0, S_SPOS_RUN4}, // S_SPOS_RUN3
......
......@@ -663,7 +663,6 @@ typedef enum state
// Blue Crawla
S_POSS_STND,
S_POSS_STND2,
S_POSS_RUN1,
S_POSS_RUN2,
S_POSS_RUN3,
......@@ -673,7 +672,6 @@ typedef enum state
// Red Crawla
S_SPOS_STND,
S_SPOS_STND2,
S_SPOS_RUN1,
S_SPOS_RUN2,
S_SPOS_RUN3,
......
......@@ -85,13 +85,6 @@ static int lib_print(lua_State *L)
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
//////////////
......@@ -138,25 +131,25 @@ static int lib_pRandomRange(lua_State *L)
static int lib_pAproxDistance(lua_State *L)
{
fixed_t dx = (fixed_t)luaL_checkinteger(L, 1);
fixed_t dy = (fixed_t)luaL_checkinteger(L, 2);
fixed_t dx = luaL_checkfixed(L, 1);
fixed_t dy = luaL_checkfixed(L, 2);
//HUDSAFE
lua_pushinteger(L, P_AproxDistance(dx, dy));
lua_pushfixed(L, P_AproxDistance(dx, dy));
return 1;
}
static int lib_pClosestPointOnLine(lua_State *L)
{
fixed_t x = (fixed_t)luaL_checkinteger(L, 1);
fixed_t y = (fixed_t)luaL_checkinteger(L, 2);
fixed_t x = luaL_checkfixed(L, 1);
fixed_t y = luaL_checkfixed(L, 2);
line_t *line = *((line_t **)luaL_checkudata(L, 3, META_LINE));
vertex_t result;
//HUDSAFE
if (!line)
return LUA_ErrInvalid(L, "line_t");
P_ClosestPointOnLine(x, y, line, &result);
lua_pushinteger(L, result.x);
lua_pushinteger(L, result.y);
lua_pushfixed(L, result.x);
lua_pushfixed(L, result.y);
return 2;
}
......@@ -241,9 +234,9 @@ static int lib_pLookForPlayers(lua_State *L)
static int lib_pSpawnMobj(lua_State *L)
{
fixed_t x = (fixed_t)luaL_checkinteger(L, 1);
fixed_t y = (fixed_t)luaL_checkinteger(L, 2);
fixed_t z = (fixed_t)luaL_checkinteger(L, 3);
fixed_t x = luaL_checkfixed(L, 1);
fixed_t y = luaL_checkfixed(L, 2);
fixed_t z = luaL_checkfixed(L, 3);
mobjtype_t type = luaL_checkinteger(L, 4);
NOHUD
if (type > MT_LASTFREESLOT)
......@@ -283,9 +276,9 @@ static int lib_pSpawnXYZMissile(lua_State *L)
mobj_t *source = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ));
mobj_t *dest = *((mobj_t **)luaL_checkudata(L, 2, META_MOBJ));
mobjtype_t type = luaL_checkinteger(L, 3);
fixed_t x = (fixed_t)luaL_checkinteger(L, 4);
fixed_t y = (fixed_t)luaL_checkinteger(L, 5);
fixed_t z = (fixed_t)luaL_checkinteger(L, 6);
fixed_t x = luaL_checkfixed(L, 4);
fixed_t y = luaL_checkfixed(L, 5);
fixed_t z = luaL_checkfixed(L, 6);
NOHUD
if (!source || !dest)
return LUA_ErrInvalid(L, "mobj_t");
......@@ -298,13 +291,13 @@ static int lib_pSpawnXYZMissile(lua_State *L)
static int lib_pSpawnPointMissile(lua_State *L)
{
mobj_t *source = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ));
fixed_t xa = (fixed_t)luaL_checkinteger(L, 2);
fixed_t ya = (fixed_t)luaL_checkinteger(L, 3);
fixed_t za = (fixed_t)luaL_checkinteger(L, 4);
fixed_t xa = luaL_checkfixed(L, 2);
fixed_t ya = luaL_checkfixed(L, 3);
fixed_t za = luaL_checkfixed(L, 4);
mobjtype_t type = luaL_checkinteger(L, 5);
fixed_t x = (fixed_t)luaL_checkinteger(L, 6);
fixed_t y = (fixed_t)luaL_checkinteger(L, 7);
fixed_t z = (fixed_t)luaL_checkinteger(L, 8);
fixed_t x = luaL_checkfixed(L, 6);
fixed_t y = luaL_checkfixed(L, 7);
fixed_t z = luaL_checkfixed(L, 8);
NOHUD
if (!source)
return LUA_ErrInvalid(L, "mobj_t");
......@@ -318,9 +311,9 @@ static int lib_pSpawnAlteredDirectionMissile(lua_State *L)
{
mobj_t *source = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ));
mobjtype_t type = luaL_checkinteger(L, 2);
fixed_t x = (fixed_t)luaL_checkinteger(L, 3);
fixed_t y = (fixed_t)luaL_checkinteger(L, 4);
fixed_t z = (fixed_t)luaL_checkinteger(L, 5);
fixed_t x = luaL_checkfixed(L, 3);
fixed_t y = luaL_checkfixed(L, 4);
fixed_t z = luaL_checkfixed(L, 5);
INT32 shiftingAngle = (INT32)luaL_checkinteger(L, 5);
NOHUD
if (!source)
......@@ -348,7 +341,7 @@ static int lib_pSPMAngle(lua_State *L)
{
mobj_t *source = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ));
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);
UINT32 flags2 = (UINT32)luaL_optinteger(L, 5, 0);
NOHUD
......@@ -418,13 +411,13 @@ static int lib_pGetClosestAxis(lua_State *L)
static int lib_pSpawnParaloop(lua_State *L)
{
fixed_t x = (fixed_t)luaL_checkinteger(L, 1);
fixed_t y = (fixed_t)luaL_checkinteger(L, 2);
fixed_t z = (fixed_t)luaL_checkinteger(L, 3);
fixed_t radius = (fixed_t)luaL_checkinteger(L, 4);
fixed_t x = luaL_checkfixed(L, 1);
fixed_t y = luaL_checkfixed(L, 2);
fixed_t z = luaL_checkfixed(L, 3);
fixed_t radius = luaL_checkfixed(L, 4);
INT32 number = (INT32)luaL_checkinteger(L, 5);
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);
boolean spawncenter = lua_optboolean(L, 9);
NOHUD
......@@ -458,7 +451,7 @@ static int lib_pSupermanLook4Players(lua_State *L)
static int lib_pSetScale(lua_State *L)
{
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
if (!mobj)
return LUA_ErrInvalid(L, "mobj_t");
......@@ -526,7 +519,7 @@ static int lib_pGetPlayerHeight(lua_State *L)
//HUDSAFE
if (!player)
return LUA_ErrInvalid(L, "player_t");
lua_pushinteger(L, P_GetPlayerHeight(player));
lua_pushfixed(L, P_GetPlayerHeight(player));
return 1;
}
......@@ -536,7 +529,7 @@ static int lib_pGetPlayerSpinHeight(lua_State *L)
//HUDSAFE
if (!player)
return LUA_ErrInvalid(L, "player_t");
lua_pushinteger(L, P_GetPlayerSpinHeight(player));
lua_pushfixed(L, P_GetPlayerSpinHeight(player));
return 1;
}
......@@ -639,7 +632,7 @@ static int lib_pInQuicksand(lua_State *L)
static int lib_pSetObjectMomZ(lua_State *L)
{
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);
NOHUD
if (!mo)
......@@ -753,8 +746,8 @@ static int lib_pDoPlayerExit(lua_State *L)
static int lib_pInstaThrust(lua_State *L)
{
mobj_t *mo = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ));
angle_t angle = (angle_t)luaL_checkinteger(L, 2);
fixed_t move = (fixed_t)luaL_checkinteger(L, 3);
angle_t angle = luaL_checkangle(L, 2);
fixed_t move = luaL_checkfixed(L, 3);
NOHUD
if (!mo)
return LUA_ErrInvalid(L, "mobj_t");
......@@ -768,10 +761,10 @@ static int lib_pReturnThrustX(lua_State *L)
fixed_t move;
if (lua_isnil(L, 1) || lua_isuserdata(L, 1))
lua_remove(L, 1); // ignore mobj as arg1
angle = (angle_t)luaL_checkinteger(L, 1);
move = (fixed_t)luaL_checkinteger(L, 2);
angle = luaL_checkangle(L, 1);
move = luaL_checkfixed(L, 2);
//HUDSAFE
lua_pushinteger(L, P_ReturnThrustX(NULL, angle, move));
lua_pushfixed(L, P_ReturnThrustX(NULL, angle, move));
return 1;
}
......@@ -781,10 +774,10 @@ static int lib_pReturnThrustY(lua_State *L)
fixed_t move;
if (lua_isnil(L, 1) || lua_isuserdata(L, 1))
lua_remove(L, 1); // ignore mobj as arg1
angle = (angle_t)luaL_checkinteger(L, 1);
move = (fixed_t)luaL_checkinteger(L, 2);
angle = luaL_checkangle(L, 1);
move = luaL_checkfixed(L, 2);
//HUDSAFE
lua_pushinteger(L, P_ReturnThrustY(NULL, angle, move));
lua_pushfixed(L, P_ReturnThrustY(NULL, angle, move));
return 1;
}
......@@ -802,7 +795,7 @@ static int lib_pNukeEnemies(lua_State *L)
{
mobj_t *inflictor = *((mobj_t **)luaL_checkudata(L, 1, 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
if (!inflictor || !source)
return LUA_ErrInvalid(L, "mobj_t");
......@@ -868,8 +861,8 @@ static int lib_pSpawnSpinMobj(lua_State *L)
static int lib_pTelekinesis(lua_State *L)
{
player_t *player = *((player_t **)luaL_checkudata(L, 1, META_PLAYER));
fixed_t thrust = (fixed_t)luaL_checkinteger(L, 2);
fixed_t range = (fixed_t)luaL_checkinteger(L, 3);
fixed_t thrust = luaL_checkfixed(L, 2);
fixed_t range = luaL_checkfixed(L, 3);
NOHUD
if (!player)
return LUA_ErrInvalid(L, "player_t");
......@@ -884,8 +877,8 @@ static int lib_pCheckPosition(lua_State *L)
{
mobj_t *ptmthing = tmthing;
mobj_t *thing = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ));
fixed_t x = (fixed_t)luaL_checkinteger(L, 2);
fixed_t y = (fixed_t)luaL_checkinteger(L, 3);
fixed_t x = luaL_checkfixed(L, 2);
fixed_t y = luaL_checkfixed(L, 3);
NOHUD
if (!thing)
return LUA_ErrInvalid(L, "mobj_t");
......@@ -899,8 +892,8 @@ static int lib_pTryMove(lua_State *L)
{
mobj_t *ptmthing = tmthing;
mobj_t *thing = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ));
fixed_t x = (fixed_t)luaL_checkinteger(L, 2);
fixed_t y = (fixed_t)luaL_checkinteger(L, 3);
fixed_t x = luaL_checkfixed(L, 2);
fixed_t y = luaL_checkfixed(L, 3);
boolean allowdropoff = lua_optboolean(L, 4);
NOHUD
if (!thing)
......@@ -915,7 +908,7 @@ static int lib_pMove(lua_State *L)
{
mobj_t *ptmthing = tmthing;
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
if (!actor)
return LUA_ErrInvalid(L, "mobj_t");
......@@ -929,9 +922,9 @@ static int lib_pTeleportMove(lua_State *L)
{
mobj_t *ptmthing = tmthing;
mobj_t *thing = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ));
fixed_t x = (fixed_t)luaL_checkinteger(L, 2);
fixed_t y = (fixed_t)luaL_checkinteger(L, 3);
fixed_t z = (fixed_t)luaL_checkinteger(L, 4);
fixed_t x = luaL_checkfixed(L, 2);
fixed_t y = luaL_checkfixed(L, 3);
fixed_t z = luaL_checkfixed(L, 4);
NOHUD
if (!thing)
return LUA_ErrInvalid(L, "mobj_t");
......@@ -975,10 +968,10 @@ static int lib_pCheckSight(lua_State *L)
static int lib_pCheckHoopPosition(lua_State *L)
{
mobj_t *hoopthing = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ));
fixed_t x = (fixed_t)luaL_checkinteger(L, 2);
fixed_t y = (fixed_t)luaL_checkinteger(L, 3);
fixed_t z = (fixed_t)luaL_checkinteger(L, 4);
fixed_t radius = (fixed_t)luaL_checkinteger(L, 5);
fixed_t x = luaL_checkfixed(L, 2);
fixed_t y = luaL_checkfixed(L, 3);
fixed_t z = luaL_checkfixed(L, 4);
fixed_t radius = luaL_checkfixed(L, 5);
NOHUD
if (!hoopthing)
return LUA_ErrInvalid(L, "mobj_t");
......@@ -990,7 +983,7 @@ static int lib_pRadiusAttack(lua_State *L)
{
mobj_t *spot = *((mobj_t **)luaL_checkudata(L, 1, 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
if (!spot || !source)
return LUA_ErrInvalid(L, "mobj_t");
......@@ -1000,12 +993,12 @@ static int lib_pRadiusAttack(lua_State *L)
static int lib_pFloorzAtPos(lua_State *L)
{
fixed_t x = (fixed_t)luaL_checkinteger(L, 1);
fixed_t y = (fixed_t)luaL_checkinteger(L, 2);
fixed_t z = (fixed_t)luaL_checkinteger(L, 3);
fixed_t height = (fixed_t)luaL_checkinteger(L, 4);
fixed_t x = luaL_checkfixed(L, 1);
fixed_t y = luaL_checkfixed(L, 2);
fixed_t z = luaL_checkfixed(L, 3);
fixed_t height = luaL_checkfixed(L, 4);
//HUDSAFE
lua_pushinteger(L, P_FloorzAtPos(x, y, z, height));
lua_pushfixed(L, P_FloorzAtPos(x, y, z, height));
return 1;
}
......@@ -1016,8 +1009,8 @@ static int lib_pDoSpring(lua_State *L)
NOHUD
if (!spring || !object)
return LUA_ErrInvalid(L, "mobj_t");
P_DoSpring(spring, object);
return 0;
lua_pushboolean(L, P_DoSpring(spring, object));
return 1;
}
// P_INTER
......@@ -1209,8 +1202,8 @@ static int lib_pDoNightsScore(lua_State *L)
static int lib_pThrust(lua_State *L)
{
mobj_t *mo = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ));
angle_t angle = (angle_t)luaL_checkinteger(L, 2);
fixed_t move = (fixed_t)luaL_checkinteger(L, 3);
angle_t angle = luaL_checkangle(L, 2);
fixed_t move = luaL_checkfixed(L, 3);
NOHUD
if (!mo)
return LUA_ErrInvalid(L, "mobj_t");
......@@ -1485,48 +1478,48 @@ static int lib_evCrumbleChain(lua_State *L)
static int lib_rPointToAngle(lua_State *L)
{
fixed_t x = (fixed_t)luaL_checkinteger(L, 1);
fixed_t y = (fixed_t)luaL_checkinteger(L, 2);
fixed_t x = luaL_checkfixed(L, 1);
fixed_t y = luaL_checkfixed(L, 2);
//HUDSAFE
lua_pushinteger(L, R_PointToAngle(x, y));
lua_pushangle(L, R_PointToAngle(x, y));
return 1;
}
static int lib_rPointToAngle2(lua_State *L)
{
fixed_t px2 = (fixed_t)luaL_checkinteger(L, 1);
fixed_t py2 = (fixed_t)luaL_checkinteger(L, 2);
fixed_t px1 = (fixed_t)luaL_checkinteger(L, 3);
fixed_t py1 = (fixed_t)luaL_checkinteger(L, 4);
fixed_t px2 = luaL_checkfixed(L, 1);
fixed_t py2 = luaL_checkfixed(L, 2);
fixed_t px1 = luaL_checkfixed(L, 3);
fixed_t py1 = luaL_checkfixed(L, 4);
//HUDSAFE
lua_pushinteger(L, R_PointToAngle2(px2, py2, px1, py1));
lua_pushangle(L, R_PointToAngle2(px2, py2, px1, py1));
return 1;
}
static int lib_rPointToDist(lua_State *L)
{
fixed_t x = (fixed_t)luaL_checkinteger(L, 1);
fixed_t y = (fixed_t)luaL_checkinteger(L, 2);
fixed_t x = luaL_checkfixed(L, 1);
fixed_t y = luaL_checkfixed(L, 2);
//HUDSAFE
lua_pushinteger(L, R_PointToDist(x, y));
lua_pushfixed(L, R_PointToDist(x, y));
return 1;
}
static int lib_rPointToDist2(lua_State *L)
{
fixed_t px2 = (fixed_t)luaL_checkinteger(L, 1);
fixed_t py2 = (fixed_t)luaL_checkinteger(L, 2);
fixed_t px1 = (fixed_t)luaL_checkinteger(L, 3);
fixed_t py1 = (fixed_t)luaL_checkinteger(L, 4);
fixed_t px2 = luaL_checkfixed(L, 1);
fixed_t py2 = luaL_checkfixed(L, 2);
fixed_t px1 = luaL_checkfixed(L, 3);
fixed_t py1 = luaL_checkfixed(L, 4);
//HUDSAFE
lua_pushinteger(L, R_PointToDist2(px2, py2, px1, py1));
lua_pushfixed(L, R_PointToDist2(px2, py2, px1, py1));
return 1;
}
static int lib_rPointInSubsector(lua_State *L)
{
fixed_t x = (fixed_t)luaL_checkinteger(L, 1);
fixed_t y = (fixed_t)luaL_checkinteger(L, 2);
fixed_t x = luaL_checkfixed(L, 1);
fixed_t y = luaL_checkfixed(L, 2);
//HUDSAFE
LUA_PushUserdata(L, R_PointInSubsector(x, y), META_SUBSECTOR);
return 1;
......@@ -1660,7 +1653,7 @@ static int lib_sChangeMusic(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);
player_t *player = NULL;
NOHUD
......@@ -1861,7 +1854,6 @@ static int lib_gTicsToMilliseconds(lua_State *L)
static luaL_Reg lib[] = {
{"print", lib_print},
{"EvalMath", lib_evalMath},
// m_random
{"P_Random",lib_pRandom},
......
......@@ -14,6 +14,7 @@
#include "r_defs.h"
#include "d_player.h"
#include "blua/lua.h"
enum hook {
hook_NetVars=0,
......@@ -41,12 +42,13 @@ enum hook {
hook_BotAI,
hook_LinedefExecute,
hook_PlayerMsg,
hook_DeathMsg,
hook_HurtMsg,
hook_MAX // last hook
};
extern const char *const hookNames[];
void LUAh_NetArchiveHook(lua_CFunction archFunc);
void LUAh_MapChange(void); // Hook for map change (before load)
void LUAh_MapLoad(void); // Hook for map load
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)
boolean LUAh_MobjHook(mobj_t *mo, 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
UINT8 LUAh_MobjCollide(mobj_t *thing1, mobj_t *thing2); // Hook for PIT_CheckThing by (thing) mobj type
UINT8 LUAh_MobjMoveCollide(mobj_t *thing1, mobj_t *thing2); // Hook for PIT_CheckThing by (tmthing) mobj type
UINT8 LUAh_MobjCollideHook(mobj_t *thing1, mobj_t *thing2, enum hook which);
#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
#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
......@@ -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_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_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
This diff is collapsed.