mirror of
https://github.com/DrBeef/Raze.git
synced 2025-01-18 23:21:43 +00:00
- remove the remains of Lunatic from RR code.
This commit is contained in:
parent
a54d408d59
commit
9aa2224110
12 changed files with 5 additions and 62 deletions
|
@ -3776,7 +3776,7 @@ void G_DoSpriteAnimations(int32_t ourx, int32_t oury, int32_t ourz, int32_t oura
|
|||
if (!FURY && g_player[playerNum].ps->newowner > -1)
|
||||
{
|
||||
// Display APLAYER sprites with action PSTAND when viewed through
|
||||
// a camera. Not implemented for Lunatic.
|
||||
// a camera.
|
||||
const intptr_t *aplayer_scr = g_tile[APLAYER].execPtr;
|
||||
// [0]=strength, [1]=actionofs, [2]=moveofs
|
||||
|
||||
|
@ -5262,8 +5262,6 @@ static void A_InitEnemyFlags(void)
|
|||
}
|
||||
#undef SETFLAG
|
||||
|
||||
// Throw in everything here that needs to be called after a Lua game state
|
||||
// recreation (or on initial startup in a non-Lunatic build.)
|
||||
void G_PostCreateGameState(void)
|
||||
{
|
||||
Net_SendClientInfo();
|
||||
|
@ -5595,8 +5593,6 @@ int GameInterface::app_main()
|
|||
|
||||
Net_GetPackets();
|
||||
|
||||
// NOTE: Allocating the DukePlayer_t structs has to be before compiling scripts,
|
||||
// because in Lunatic, the {pipe,trip}bomb* members are initialized.
|
||||
for (int i=0; i<MAXPLAYERS; i++)
|
||||
G_MaybeAllocPlayer(i);
|
||||
|
||||
|
|
|
@ -1628,7 +1628,6 @@ void __fastcall VM_SetUserdef(int const labelNum, int const lParm2, int32_t cons
|
|||
case USERDEFS_M_RESPAWN_INVENTORY: ud.m_respawn_inventory = iSet; break;
|
||||
case USERDEFS_M_RECSTAT: m_recstat = iSet; break;
|
||||
case USERDEFS_M_MONSTERS_OFF: ud.m_monsters_off = iSet; break;
|
||||
// REMINDER: must implement "boolean" setters like "!!iSet" in Lunatic, too.
|
||||
case USERDEFS_DETAIL: /*ud.detail = clamp(iSet, 1, 16); obsolete*/ break;
|
||||
case USERDEFS_M_FFIRE: m_ffire = iSet; break;
|
||||
case USERDEFS_FFIRE: ud.ffire = iSet; break;
|
||||
|
|
|
@ -40,7 +40,6 @@ BEGIN_RR_NS
|
|||
#define ACTOR_MAXFALLINGZVEL 6144
|
||||
#define ACTOR_ONWATER_ADDZ (24<<8)
|
||||
|
||||
// KEEPINSYNC lunatic/con_lang.lua
|
||||
#define STAT_DEFAULT 0
|
||||
#define STAT_ACTOR 1
|
||||
#define STAT_ZOMBIEACTOR 2
|
||||
|
@ -118,8 +117,6 @@ enum actionflags
|
|||
AF_VIEWPOINT = 1u<<0u,
|
||||
};
|
||||
|
||||
// Select an actor's actiontics and movflags locations depending on
|
||||
// whether we compile the Lunatic build.
|
||||
// <spr>: sprite pointer
|
||||
// <a>: actor_t pointer
|
||||
# define AC_ACTIONTICS(spr, a) ((spr)->lotag)
|
||||
|
@ -179,7 +176,6 @@ typedef struct
|
|||
} tiledata_t;
|
||||
|
||||
|
||||
// KEEPINSYNC lunatic/con_lang.lua
|
||||
enum sflags_t
|
||||
{
|
||||
SFLAG_SHADOW = 0x00000001,
|
||||
|
|
|
@ -55,7 +55,6 @@ BEGIN_RR_NS
|
|||
#define RECSYNCBUFSIZ 2520 //2520 is the (LCM of 1-8)*3
|
||||
#define MOVEFIFOSIZ 256
|
||||
|
||||
// KEEPINSYNC lunatic/con_lang.lua
|
||||
#define MAXLEVELS 64
|
||||
#define MAXGAMETYPES 16
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
#define EDUKE32_EVENTS_DEFS_H_
|
||||
|
||||
// the order of these can't be changed or else compatibility with EDuke 2.0 mods will break
|
||||
// KEEPINSYNC with EventNames[] and lunatic/con_lang.lua
|
||||
enum GameEvent_t {
|
||||
EVENT_INIT, // 0
|
||||
EVENT_ENTERLEVEL,
|
||||
|
|
|
@ -5075,7 +5075,7 @@ default_case1:
|
|||
if (g_player[playerNum].ps->newowner > -1)
|
||||
{
|
||||
// Display APLAYER sprites with action PSTAND when viewed through
|
||||
// a camera. Not implemented for Lunatic.
|
||||
// a camera.
|
||||
const intptr_t *aplayer_scr = g_tile[APLAYER].execPtr;
|
||||
// [0]=strength, [1]=actionofs, [2]=moveofs
|
||||
|
||||
|
@ -6740,8 +6740,6 @@ static void A_InitEnemyFlags(void)
|
|||
}
|
||||
#undef SETFLAG
|
||||
|
||||
// Throw in everything here that needs to be called after a Lua game state
|
||||
// recreation (or on initial startup in a non-Lunatic build.)
|
||||
void G_PostCreateGameState(void)
|
||||
{
|
||||
Net_SendClientInfo();
|
||||
|
@ -7074,7 +7072,7 @@ int GameInterface::app_main()
|
|||
Net_InitNetwork();
|
||||
#endif
|
||||
numplayers = 1;
|
||||
g_mostConcurrentPlayers = ud.multimode; // Lunatic needs this (player[] bound)
|
||||
g_mostConcurrentPlayers = ud.multimode;
|
||||
|
||||
if (!g_fakeMultiMode)
|
||||
{
|
||||
|
@ -7092,8 +7090,6 @@ int GameInterface::app_main()
|
|||
|
||||
Net_GetPackets();
|
||||
|
||||
// NOTE: Allocating the DukePlayer_t structs has to be before compiling scripts,
|
||||
// because in Lunatic, the {pipe,trip}bomb* members are initialized.
|
||||
for (bssize_t i=0; i<MAXPLAYERS; i++)
|
||||
G_MaybeAllocPlayer(i);
|
||||
|
||||
|
|
|
@ -123,8 +123,6 @@ void A_DeleteSprite(int spriteNum);
|
|||
|
||||
#define MAX_RETURN_VALUES 6
|
||||
|
||||
// KEEPINSYNC lunatic/_defs_game.lua
|
||||
|
||||
typedef struct {
|
||||
vec3_t camerapos;
|
||||
int32_t const_visibility,uw_framerate;
|
||||
|
|
|
@ -348,7 +348,6 @@ enum ScriptKeywords_t
|
|||
CON_IFPUPWIND, // 166
|
||||
CON_END
|
||||
};
|
||||
// KEEPINSYNC with the keyword list in lunatic/con_lang.lua
|
||||
|
||||
END_RR_NS
|
||||
|
||||
|
|
|
@ -654,32 +654,18 @@ static int32_t G_StaticToDynamicSound(int32_t const sound)
|
|||
}
|
||||
}
|
||||
|
||||
// Initialize WEAPONx_* gamevars. Since for Lunatic, they reside on the C side,
|
||||
// they're set directly. In C-CON, a new CON variable is defined together with
|
||||
// Initialize WEAPONx_* gamevars. In C-CON, a new CON variable is defined together with
|
||||
// its initial value.
|
||||
#ifdef LUNATIC
|
||||
# define ADDWEAPONVAR(Weapidx, Membname) do { \
|
||||
int32_t j; \
|
||||
for (j=0; j<MAXPLAYERS; j++) \
|
||||
g_playerWeapon[j][Weapidx].Membname = weapondefaults[Weapidx].Membname; \
|
||||
} while (0)
|
||||
#else
|
||||
# define ADDWEAPONVAR(Weapidx, Membname) do { \
|
||||
FStringf aszBuf("WEAPON%d_" #Membname, Weapidx); \
|
||||
aszBuf.ToUpper(); \
|
||||
Gv_NewVar(aszBuf, weapondefaults[Weapidx].Membname, GAMEVAR_PERPLAYER | GAMEVAR_SYSTEM); \
|
||||
} while (0)
|
||||
#endif
|
||||
|
||||
// After CON translation, get not-overridden members from weapondefaults[] back
|
||||
// into the live arrays! (That is, g_playerWeapon[][] for Lunatic, WEAPONx_*
|
||||
// gamevars on the CON side in C-CON.)
|
||||
#ifdef LUNATIC
|
||||
# define POSTADDWEAPONVAR(Weapidx, Membname) ADDWEAPONVAR(Weapidx, Membname)
|
||||
#else
|
||||
// into the live arrays!
|
||||
// NYI
|
||||
# define POSTADDWEAPONVAR(Weapidx, Membname) do {} while (0)
|
||||
#endif
|
||||
|
||||
// Finish a default weapon member after CON translation. If it was not
|
||||
// overridden from CON itself (see example at g_weaponOverridden[]), we set
|
||||
|
@ -714,9 +700,7 @@ void Gv_FinalizeWeaponDefaults(void)
|
|||
#undef FINISH_WEAPON_DEFAULT_X
|
||||
#undef POSTADDWEAPONVAR
|
||||
|
||||
#if !defined LUNATIC
|
||||
static int32_t lastvisinc;
|
||||
#endif
|
||||
|
||||
static void Gv_AddSystemVars(void)
|
||||
{
|
||||
|
@ -770,26 +754,15 @@ static void Gv_AddSystemVars(void)
|
|||
|
||||
void Gv_Init(void)
|
||||
{
|
||||
#if !defined LUNATIC
|
||||
// already initialized
|
||||
if (aGameVars[0].flags)
|
||||
return;
|
||||
#else
|
||||
static int32_t inited=0;
|
||||
if (inited)
|
||||
return;
|
||||
inited = 1;
|
||||
#endif
|
||||
|
||||
// Set up weapon defaults, g_playerWeapon[][].
|
||||
Gv_AddSystemVars();
|
||||
#if !defined LUNATIC
|
||||
Gv_InitWeaponPointers();
|
||||
#endif
|
||||
Gv_ResetSystemDefaults();
|
||||
}
|
||||
|
||||
#if !defined LUNATIC
|
||||
void Gv_InitWeaponPointers(void)
|
||||
{
|
||||
char aszBuf[64];
|
||||
|
@ -853,6 +826,5 @@ void Gv_RefreshPointers(void)
|
|||
aGameVars[Gv_GetVarIndex("RESPAWN_MONSTERS")].global = (intptr_t)&ud.respawn_monsters;
|
||||
aGameVars[Gv_GetVarIndex("VOLUME")].global = (intptr_t)&ud.volume_number;
|
||||
}
|
||||
#endif
|
||||
|
||||
END_RR_NS
|
||||
|
|
|
@ -46,7 +46,6 @@ BEGIN_RR_NS
|
|||
#endif
|
||||
|
||||
#define MAXINTERPOLATIONS MAXSPRITES
|
||||
// KEEPINSYNC lunatic/con_lang.lua
|
||||
|
||||
// duke3d global soup :(
|
||||
|
||||
|
|
|
@ -132,7 +132,6 @@ typedef struct {
|
|||
// * char --> int8_t
|
||||
// Need to carefully think about implications!
|
||||
// TODO: rearrange this if the opportunity arises!
|
||||
// KEEPINSYNC lunatic/_defs_game.lua
|
||||
typedef struct {
|
||||
vec3_t pos, opos, vel, npos;
|
||||
vec2_t bobpos, fric;
|
||||
|
@ -231,7 +230,6 @@ typedef struct {
|
|||
int8_t padding_[3];
|
||||
} DukePlayer_t;
|
||||
|
||||
// KEEPINSYNC lunatic/_defs_game.lua
|
||||
typedef struct
|
||||
{
|
||||
DukePlayer_t *ps;
|
||||
|
@ -255,7 +253,6 @@ typedef struct
|
|||
} playerdata_t;
|
||||
#pragma pack(pop)
|
||||
|
||||
// KEEPINSYNC lunatic/con_lang.lua
|
||||
typedef struct
|
||||
{
|
||||
// NOTE: the member names must be identical to aplWeapon* suffixes.
|
||||
|
@ -277,10 +274,6 @@ typedef struct
|
|||
int32_t FlashColor; // Muzzle flash color
|
||||
} weapondata_t;
|
||||
|
||||
#ifdef LUNATIC
|
||||
# define PWEAPON(Player, Weapon, Wmember) (g_playerWeapon[Player][Weapon].Wmember)
|
||||
extern weapondata_t g_playerWeapon[MAXPLAYERS][MAX_WEAPONS];
|
||||
#else
|
||||
# define PWEAPON(Player, Weapon, Wmember) (aplWeapon ## Wmember [Weapon][Player])
|
||||
extern intptr_t *aplWeaponClip[MAX_WEAPONS]; // number of items in clip
|
||||
extern intptr_t *aplWeaponReload[MAX_WEAPONS]; // delay to reload (include fire)
|
||||
|
@ -298,9 +291,7 @@ extern intptr_t *aplWeaponFireSound[MAX_WEAPONS]; // Sound made wh
|
|||
extern intptr_t *aplWeaponSound2Time[MAX_WEAPONS]; // Alternate sound time
|
||||
extern intptr_t *aplWeaponSound2Sound[MAX_WEAPONS]; // Alternate sound sound ID
|
||||
extern intptr_t *aplWeaponFlashColor[MAX_WEAPONS]; // Color for polymer muzzle flash
|
||||
#endif
|
||||
|
||||
// KEEPINSYNC lunatic/_defs_game.lua
|
||||
typedef struct {
|
||||
int32_t cur, count; // "cur" is the only member that is *used*
|
||||
int32_t gunposx, lookhalfang; // weapon_xoffset, ps->look_ang>>1
|
||||
|
|
|
@ -35,7 +35,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
|
||||
BEGIN_RR_NS
|
||||
|
||||
// KEEPINSYNC lunatic/con_lang.lua
|
||||
#define MAXSOUNDS 4096
|
||||
#define LOUDESTVOLUME 111
|
||||
|
||||
|
|
Loading…
Reference in a new issue