mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-24 10:40:46 +00:00
- revert all consolidation efforts between Duke and RR frontends.
Too many problems with different code.
This commit is contained in:
parent
ef63e47cbf
commit
de2c07aa6a
71 changed files with 5796 additions and 517 deletions
|
@ -602,7 +602,6 @@ file( GLOB HEADER_FILES
|
|||
common/rendering/hwrenderer/data/*.h
|
||||
common/rendering/hwrenderer/postprocessing/*.h
|
||||
common/rendering/hwrenderer/utility/*.h
|
||||
dukerr/*.h
|
||||
|
||||
build/src/*.h
|
||||
platform/win32/*.h
|
||||
|
@ -813,9 +812,6 @@ set (PCH_SOURCES
|
|||
common/rendering/hwrenderer/postprocessing/hw_postprocess.cpp
|
||||
common/rendering/hwrenderer/postprocessing/hw_postprocess_cvars.cpp
|
||||
common/rendering/hwrenderer/utility/hw_shaderpatcher.cpp
|
||||
|
||||
dukerr/namesdyn.cpp
|
||||
dukerr/soundsdyn.cpp
|
||||
)
|
||||
|
||||
macro( use_precompiled_header )
|
||||
|
@ -982,7 +978,6 @@ install(TARGETS ${PROJECT_NAME}
|
|||
DESTINATION ${INSTALL_PATH}
|
||||
COMPONENT "Game executable")
|
||||
|
||||
source_group("DukeRR" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/dukerr/.+")
|
||||
source_group("Utility" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/utility/.+")
|
||||
source_group("Core" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/.+")
|
||||
source_group("Core\\Textures" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/textures/.+")
|
||||
|
|
|
@ -397,6 +397,30 @@ void PreloadCache(void)
|
|||
|
||||
if ((++cnt & 7) == 0)
|
||||
gameHandleEvents();
|
||||
|
||||
#if 0
|
||||
if (videoGetRenderMode() != REND_CLASSIC && totalclock - clock > (kTicRate>>2))
|
||||
{
|
||||
int const percentComplete = min(100, tabledivide32_noinline(100 * cnt, nPrecacheCount));
|
||||
|
||||
// this just prevents the loading screen percentage bar from making large jumps
|
||||
while (percentDisplayed < percentComplete)
|
||||
{
|
||||
gameHandleEvents();
|
||||
Bsprintf(tempbuf, "Loaded %d%% (%d/%d textures)\n", percentDisplayed, cnt, nPrecacheCount);
|
||||
viewLoadingScreenUpdate(tempbuf, percentDisplayed);
|
||||
videoNextPage();
|
||||
|
||||
if (totalclock - clock >= 1)
|
||||
{
|
||||
clock = totalclock;
|
||||
percentDisplayed++;
|
||||
}
|
||||
}
|
||||
|
||||
clock = totalclock;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
memset(gotpic,0,sizeof(gotpic));
|
||||
|
@ -1272,6 +1296,20 @@ RESTART:
|
|||
gRestartGame = 0;
|
||||
gGameStarted = 0;
|
||||
levelSetupOptions(0,0);
|
||||
#if 0
|
||||
// What's this loop for? Needs checking
|
||||
while (gGameMenuMgr.m_bActive)
|
||||
{
|
||||
gGameMenuMgr.Process();
|
||||
gameHandleEvents();
|
||||
if (G_FPSLimit())
|
||||
{
|
||||
videoClearScreen(0);
|
||||
gGameMenuMgr.Draw();
|
||||
videoNextPage();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if (gGameOptions.nGameType != 0)
|
||||
{
|
||||
if (!gDemo.at0 && gDemo.at59ef > 0 && gGameOptions.nGameType == 0 && !bNoDemo && demo_playloop)
|
||||
|
|
|
@ -1011,7 +1011,13 @@ void netInitialize(bool bConsole)
|
|||
while (numplayers < gNetPlayers)
|
||||
{
|
||||
handleevents();
|
||||
|
||||
#if 0
|
||||
if (quitevent)
|
||||
{
|
||||
netServerDisconnect();
|
||||
QuitGame();
|
||||
}
|
||||
#endif
|
||||
if (!bConsole && inputState.GetKeyStatus(sc_Escape))
|
||||
{
|
||||
netServerDisconnect();
|
||||
|
@ -1168,7 +1174,13 @@ void netInitialize(bool bConsole)
|
|||
while (bWaitServer)
|
||||
{
|
||||
handleevents();
|
||||
|
||||
#if 0
|
||||
if (quitevent)
|
||||
{
|
||||
netClientDisconnect();
|
||||
QuitGame();
|
||||
}
|
||||
#endif
|
||||
if (!bConsole && inputState.GetKeyStatus(sc_Escape))
|
||||
{
|
||||
netClientDisconnect();
|
||||
|
|
|
@ -2,13 +2,10 @@
|
|||
|
||||
#ifndef NO_NAMESPACE
|
||||
|
||||
#define BEGIN_DUKERR_NS namespace DukeRR {
|
||||
#define END_DUKERR_NS }
|
||||
|
||||
#define BEGIN_DUKE_NS namespace DukeRR{} namespace Duke { using namespace DukeRR;
|
||||
#define BEGIN_DUKE_NS namespace Duke {
|
||||
#define END_DUKE_NS }
|
||||
|
||||
#define BEGIN_RR_NS namespace DukeRR{} namespace Redneck { using namespace DukeRR;
|
||||
#define BEGIN_RR_NS namespace Redneck {
|
||||
#define END_RR_NS }
|
||||
|
||||
#define BEGIN_BLD_NS namespace Blood {
|
||||
|
@ -22,9 +19,6 @@
|
|||
|
||||
#else
|
||||
|
||||
#define BEGIN_DUKERR_NS
|
||||
#define END_DUKERR_NS
|
||||
|
||||
#define BEGIN_DUKE_NS
|
||||
#define END_DUKE_NS
|
||||
|
||||
|
|
|
@ -40,7 +40,6 @@
|
|||
#include "m_swap.h"
|
||||
#include "s_soundinternal.h"
|
||||
|
||||
const char* G_DefaultRtsFile(void);
|
||||
|
||||
struct WadInfo
|
||||
{
|
||||
|
@ -68,7 +67,6 @@ struct LumpInfoInternal
|
|||
static FString RTSName;
|
||||
static TArray<uint8_t> RTSFile;
|
||||
static TArray<LumpInfoInternal> LumpInfo;
|
||||
static bool checked;
|
||||
|
||||
|
||||
void RTS_Init(const char *filename)
|
||||
|
@ -82,11 +80,6 @@ void RTS_Init(const char *filename)
|
|||
bool RTS_IsInitialized()
|
||||
{
|
||||
if (LumpInfo.Size() > 0) return true;
|
||||
if (RTSName.IsEmpty() && !checked)
|
||||
{
|
||||
RTSName = G_DefaultRtsFile();
|
||||
checked = true;
|
||||
}
|
||||
if (RTSName.IsEmpty()) return false;
|
||||
auto fr = fileSystem.OpenFileReader(RTSName, 0);
|
||||
RTSName = ""; // don't try ever again.
|
||||
|
|
|
@ -971,35 +971,6 @@ const char* G_ConFile(void)
|
|||
return userConfig.DefaultCon.IsNotEmpty() ? userConfig.DefaultCon.GetChars() : G_DefaultConFile();
|
||||
}
|
||||
|
||||
const char* G_DefaultRtsFile(void)
|
||||
{
|
||||
if (g_gameType & GAMEFLAG_DUKE)
|
||||
return "DUKE.RTS";
|
||||
else if (g_gameType & GAMEFLAG_WW2GI)
|
||||
return "WW2GI.RTS";
|
||||
else if (g_gameType & GAMEFLAG_NAPALM)
|
||||
{
|
||||
if (!fileSystem.FileExists("NAPALM.RTS") && fileSystem.FileExists("NAM.RTS"))
|
||||
return "NAM.RTS";
|
||||
else
|
||||
return "NAPALM.RTS";
|
||||
}
|
||||
else if (g_gameType & GAMEFLAG_NAM)
|
||||
{
|
||||
if (!fileSystem.FileExists("NAM.RTS") && fileSystem.FileExists("NAPALM.RTS"))
|
||||
return "NAPALM.RTS";
|
||||
else
|
||||
return "NAM.RTS";
|
||||
}
|
||||
else if (g_gameType & GAMEFLAG_RRALL)
|
||||
return "REDNECK.RTS";
|
||||
else if (g_gameType & GAMEFLAG_SW)
|
||||
return "SW.RTS";
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
|
||||
#if 0
|
||||
// Should this be added to the game data collector?
|
||||
|
|
|
@ -16,6 +16,7 @@ set( PCH_SOURCES
|
|||
src/gameexec.cpp
|
||||
src/gamevars.cpp
|
||||
src/global.cpp
|
||||
src/namesdyn.cpp
|
||||
src/network.cpp
|
||||
src/osdcmds.cpp
|
||||
src/player.cpp
|
||||
|
@ -26,6 +27,7 @@ set( PCH_SOURCES
|
|||
src/text.cpp
|
||||
src/sector.cpp
|
||||
src/sounds.cpp
|
||||
src/soundsdyn.cpp
|
||||
src/d_menu.cpp
|
||||
)
|
||||
|
||||
|
|
|
@ -24,12 +24,164 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#define actors_h_
|
||||
|
||||
#include "player.h"
|
||||
# include "dukerr/namesdyn.h"
|
||||
#include "dukerr/actors.h"
|
||||
# include "namesdyn.h"
|
||||
|
||||
BEGIN_DUKE_NS
|
||||
|
||||
#define MAXSLEEPDIST 16384
|
||||
#define SLEEPTIME 1536
|
||||
#define ACTOR_FLOOR_OFFSET (1<<8)
|
||||
#define ZOFFSET2 (16<<8)
|
||||
#define ZOFFSET3 (8<<8)
|
||||
#define ZOFFSET4 (12<<8)
|
||||
#define ZOFFSET5 (32<<8)
|
||||
#define ZOFFSET6 (4<<8)
|
||||
|
||||
#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
|
||||
#define STAT_EFFECTOR 3
|
||||
#define STAT_PROJECTILE 4
|
||||
#define STAT_MISC 5
|
||||
#define STAT_STANDABLE 6
|
||||
#define STAT_LOCATOR 7
|
||||
#define STAT_ACTIVATOR 8
|
||||
#define STAT_TRANSPORT 9
|
||||
#define STAT_PLAYER 10
|
||||
#define STAT_FX 11
|
||||
#define STAT_FALLER 12
|
||||
#define STAT_DUMMYPLAYER 13
|
||||
#define STAT_LIGHT 14
|
||||
#define STAT_NETALLOC (MAXSTATUS-1)
|
||||
|
||||
|
||||
// Defines the motion characteristics of an actor
|
||||
enum amoveflags_t
|
||||
{
|
||||
face_player = 1,
|
||||
geth = 2,
|
||||
getv = 4,
|
||||
random_angle = 8,
|
||||
face_player_slow = 16,
|
||||
spin = 32,
|
||||
face_player_smart = 64,
|
||||
fleeenemy = 128,
|
||||
jumptoplayer_only = 256,
|
||||
jumptoplayer_bits = 257, // NOTE: two bits set!
|
||||
seekplayer = 512,
|
||||
furthestdir = 1024,
|
||||
dodgebullet = 4096
|
||||
};
|
||||
|
||||
// Defines for 'useractor' keyword
|
||||
enum uactortypes_t
|
||||
{
|
||||
notenemy,
|
||||
enemy,
|
||||
enemystayput
|
||||
};
|
||||
|
||||
// These macros are there to give names to the t_data[]/T*/vm.g_t[] indices
|
||||
// when used with actors. Greppability of source code is certainly a virtue.
|
||||
#define AC_COUNT(t) ((t)[0]) /* the actor's count */
|
||||
/* The ID of the actor's current move. In C-CON, the bytecode offset to the
|
||||
* move composite: */
|
||||
#define AC_MOVE_ID(t) ((t)[1])
|
||||
#define AC_ACTION_COUNT(t) ((t)[2]) /* the actor's action count */
|
||||
#define AC_CURFRAME(t) ((t)[3]) /* the actor's current frame offset */
|
||||
/* The ID of the actor's current action. In C-CON, the bytecode offset to the
|
||||
* action composite: */
|
||||
#define AC_ACTION_ID(t) ((t)[4])
|
||||
#define AC_AI_ID(t) ((t)[5]) /* the ID of the actor's current ai */
|
||||
|
||||
enum actionparams
|
||||
{
|
||||
ACTION_STARTFRAME = 0,
|
||||
ACTION_NUMFRAMES,
|
||||
ACTION_VIEWTYPE,
|
||||
ACTION_INCVAL,
|
||||
ACTION_DELAY,
|
||||
ACTION_FLAGS,
|
||||
ACTION_PARAM_COUNT,
|
||||
};
|
||||
|
||||
enum actionflags
|
||||
{
|
||||
AF_VIEWPOINT = 1u<<0u,
|
||||
};
|
||||
|
||||
#ifdef LUNATIC
|
||||
struct action
|
||||
{
|
||||
// These members MUST be in this exact order because FFI cdata of this type
|
||||
// can be initialized by passing a table with numeric indices (con.action).
|
||||
int16_t startframe, numframes;
|
||||
int16_t viewtype, incval, delay;
|
||||
uint16_t flags;
|
||||
};
|
||||
|
||||
struct move
|
||||
{
|
||||
// These members MUST be in this exact order.
|
||||
int16_t hvel, vvel;
|
||||
};
|
||||
|
||||
#pragma pack(push,1)
|
||||
typedef struct { int32_t id; struct move mv; } con_move_t;
|
||||
typedef struct { int32_t id; struct action ac; } con_action_t;
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
// Select an actor's actiontics and movflags locations depending on
|
||||
// whether we compile the Lunatic build.
|
||||
// <spr>: sprite pointer
|
||||
// <a>: actor_t pointer
|
||||
#ifdef LUNATIC
|
||||
# define AC_ACTIONTICS(spr, a) ((a)->actiontics)
|
||||
# define AC_MOVFLAGS(spr, a) ((a)->movflags)
|
||||
#else
|
||||
# define AC_ACTIONTICS(spr, a) ((spr)->lotag)
|
||||
# define AC_MOVFLAGS(spr, a) ((spr)->hitag)
|
||||
#endif
|
||||
|
||||
// (+ 40 16 16 4 8 6 8 6 4 20)
|
||||
#pragma pack(push, 1)
|
||||
typedef struct
|
||||
{
|
||||
int32_t t_data[10]; // 40b sometimes used to hold offsets to con code
|
||||
|
||||
#ifdef LUNATIC
|
||||
// total: 18b
|
||||
struct move mv;
|
||||
struct action ac;
|
||||
// Gets incremented by TICSPERFRAME on each A_Execute() call:
|
||||
uint16_t actiontics;
|
||||
// Movement flags, sprite[i].hitag in C-CON:
|
||||
uint16_t movflags;
|
||||
#endif
|
||||
|
||||
int32_t flags; // 4b
|
||||
vec3_t bpos; // 12b
|
||||
int32_t floorz, ceilingz; // 8b
|
||||
vec2_t lastv; // 8b
|
||||
int16_t picnum, ang, extra, owner; // 8b
|
||||
int16_t movflag, tempang, timetosleep; // 6b
|
||||
int16_t stayput; // 2b
|
||||
|
||||
uint8_t cgg, lasttransport; // 2b
|
||||
// NOTE: 'dispicnum' is updated every frame, not in sync with game tics!
|
||||
int16_t dispicnum; // 2b
|
||||
|
||||
#ifdef POLYMER
|
||||
int16_t lightId, lightmaxrange; // 4b
|
||||
_prlight *lightptr; // 4b/8b aligned on 96 bytes
|
||||
uint8_t lightcount, filler[3];
|
||||
#endif
|
||||
} actor_t;
|
||||
|
||||
// note: fields in this struct DO NOT have to be in this order,
|
||||
// however if you add something to this struct, please make sure
|
||||
|
@ -54,6 +206,26 @@ typedef struct netactor_s
|
|||
t_data_8,
|
||||
t_data_9;
|
||||
|
||||
#ifdef LUNATIC
|
||||
|
||||
int32_t
|
||||
hvel,
|
||||
vvel;
|
||||
|
||||
|
||||
int32_t
|
||||
startframe,
|
||||
numframes;
|
||||
|
||||
int32_t
|
||||
viewtype,
|
||||
incval,
|
||||
delay;
|
||||
|
||||
int32_t
|
||||
actiontics;
|
||||
#endif
|
||||
|
||||
int32_t
|
||||
flags;
|
||||
|
||||
|
@ -84,6 +256,10 @@ typedef struct netactor_s
|
|||
dispicnum;
|
||||
|
||||
|
||||
#if defined LUNATIC
|
||||
int32_t movflags;
|
||||
#endif
|
||||
|
||||
// note: lightId, lightcount, lightmaxrange are not synchronized between client and server
|
||||
|
||||
int32_t
|
||||
|
@ -175,6 +351,86 @@ typedef struct netactor_s
|
|||
} netactor_t;
|
||||
#pragma pack(pop)
|
||||
|
||||
typedef struct
|
||||
{
|
||||
#if !defined LUNATIC
|
||||
intptr_t *execPtr; // pointer to CON script for this tile, formerly actorscrptr
|
||||
intptr_t *loadPtr; // pointer to load time CON script, formerly actorLoadEventScrPtr or something
|
||||
#endif
|
||||
projectile_t *proj;
|
||||
projectile_t *defproj;
|
||||
uint32_t flags; // formerly SpriteFlags, ActorType
|
||||
int32_t cacherange; // formerly SpriteCache
|
||||
} tiledata_t;
|
||||
|
||||
|
||||
// KEEPINSYNC lunatic/con_lang.lua
|
||||
enum sflags_t
|
||||
{
|
||||
SFLAG_SHADOW = 0x00000001,
|
||||
SFLAG_NVG = 0x00000002,
|
||||
SFLAG_NOSHADE = 0x00000004,
|
||||
SFLAG_PROJECTILE = 0x00000008,
|
||||
SFLAG_DECAL = 0x00000010,
|
||||
SFLAG_BADGUY = 0x00000020,
|
||||
SFLAG_NOPAL = 0x00000040,
|
||||
SFLAG_NOEVENTCODE = 0x00000080,
|
||||
SFLAG_NOLIGHT = 0x00000100,
|
||||
SFLAG_USEACTIVATOR = 0x00000200,
|
||||
SFLAG_NULL = 0x00000400, // null sprite in multiplayer
|
||||
SFLAG_NOCLIP = 0x00000800, // clipmove it with cliptype 0
|
||||
SFLAG_NOFLOORSHADOW = 0x00001000, // for temp. internal use, per-tile flag not checked
|
||||
SFLAG_SMOOTHMOVE = 0x00002000,
|
||||
SFLAG_NOTELEPORT = 0x00004000,
|
||||
SFLAG_BADGUYSTAYPUT = 0x00008000,
|
||||
SFLAG_CACHE = 0x00010000,
|
||||
// rotation-fixed wrt a pivot point to prevent position diverging due to
|
||||
// roundoff error accumulation:
|
||||
SFLAG_ROTFIXED = 0x00020000,
|
||||
SFLAG_HARDCODED_BADGUY = 0x00040000,
|
||||
SFLAG_DIDNOSE7WATER = 0x00080000, // used temporarily
|
||||
SFLAG_NODAMAGEPUSH = 0x00100000,
|
||||
SFLAG_NOWATERDIP = 0x00200000,
|
||||
SFLAG_HURTSPAWNBLOOD = 0x00400000,
|
||||
SFLAG_GREENSLIMEFOOD = 0x00800000,
|
||||
SFLAG_REALCLIPDIST = 0x01000000,
|
||||
SFLAG_WAKEUPBADGUYS = 0x02000000,
|
||||
SFLAG_DAMAGEEVENT = 0x04000000,
|
||||
SFLAG_NOWATERSECTOR = 0x08000000,
|
||||
SFLAG_QUEUEDFORDELETE = 0x10000000,
|
||||
};
|
||||
|
||||
// Custom projectiles "workslike" flags.
|
||||
// XXX: Currently not predefined from CON.
|
||||
enum pflags_t
|
||||
{
|
||||
PROJECTILE_HITSCAN = 0x00000001,
|
||||
PROJECTILE_RPG = 0x00000002,
|
||||
PROJECTILE_BOUNCESOFFWALLS = 0x00000004,
|
||||
PROJECTILE_BOUNCESOFFMIRRORS = 0x00000008,
|
||||
PROJECTILE_KNEE = 0x00000010,
|
||||
PROJECTILE_WATERBUBBLES = 0x00000020,
|
||||
PROJECTILE_TIMED = 0x00000040,
|
||||
PROJECTILE_BOUNCESOFFSPRITES = 0x00000080,
|
||||
PROJECTILE_SPIT = 0x00000100,
|
||||
PROJECTILE_COOLEXPLOSION1 = 0x00000200,
|
||||
PROJECTILE_BLOOD = 0x00000400,
|
||||
PROJECTILE_LOSESVELOCITY = 0x00000800,
|
||||
PROJECTILE_NOAIM = 0x00001000,
|
||||
PROJECTILE_RANDDECALSIZE = 0x00002000,
|
||||
PROJECTILE_EXPLODEONTIMER = 0x00004000,
|
||||
PROJECTILE_RPG_IMPACT = 0x00008000,
|
||||
PROJECTILE_RADIUS_PICNUM = 0x00010000,
|
||||
PROJECTILE_ACCURATE_AUTOAIM = 0x00020000,
|
||||
PROJECTILE_FORCEIMPACT = 0x00040000,
|
||||
PROJECTILE_REALCLIPDIST = 0x00080000,
|
||||
PROJECTILE_ACCURATE = 0x00100000,
|
||||
PROJECTILE_NOSETOWNERSHADE = 0x00200000,
|
||||
PROJECTILE_RPG_IMPACT_DAMAGE = 0x00400000,
|
||||
PROJECTILE_MOVED = 0x80000000, // internal flag, do not document
|
||||
PROJECTILE_TYPE_MASK = PROJECTILE_HITSCAN | PROJECTILE_RPG | PROJECTILE_KNEE | PROJECTILE_BLOOD,
|
||||
};
|
||||
|
||||
extern tiledata_t g_tile[MAXTILES];
|
||||
extern actor_t actor[MAXSPRITES];
|
||||
extern int32_t block_deletesprite;
|
||||
|
@ -207,65 +463,83 @@ void G_MoveWorld(void);
|
|||
void G_RefreshLights(void);
|
||||
void G_StopInterpolation(const int32_t *posptr);
|
||||
|
||||
inline int A_CheckEnemyTile(int tileNum);
|
||||
inline int A_SetSprite(int spriteNum, uint32_t cliptype);
|
||||
inline int32_t A_MoveSprite(int spriteNum, vec3_t const* change, uint32_t cliptype);
|
||||
|
||||
inline int G_CheckForSpaceCeiling(int sectnum);
|
||||
inline int G_CheckForSpaceFloor(int sectnum);
|
||||
|
||||
inline int A_CheckEnemySprite(void const* s);
|
||||
|
||||
// PK 20110701: changed input argument: int32_t i (== sprite, whose sectnum...) --> sectnum directly
|
||||
void Sect_ToggleInterpolation(int sectnum, int setInterpolation);
|
||||
inline void Sect_ClearInterpolation(int sectnum) { Sect_ToggleInterpolation(sectnum, 0); }
|
||||
inline void Sect_SetInterpolation(int sectnum) { Sect_ToggleInterpolation(sectnum, 1); }
|
||||
static FORCE_INLINE void Sect_ClearInterpolation(int sectnum) { Sect_ToggleInterpolation(sectnum, 0); }
|
||||
static FORCE_INLINE void Sect_SetInterpolation(int sectnum) { Sect_ToggleInterpolation(sectnum, 1); }
|
||||
|
||||
#ifdef LUNATIC
|
||||
int32_t G_ToggleWallInterpolation(int32_t w, int32_t doset);
|
||||
#endif
|
||||
|
||||
#if KRANDDEBUG
|
||||
# define ACTOR_INLINE __fastcall
|
||||
# define ACTOR_INLINE_HEADER extern __fastcall
|
||||
#else
|
||||
# define ACTOR_INLINE EXTERN_INLINE
|
||||
# define ACTOR_INLINE_HEADER EXTERN_INLINE_HEADER
|
||||
#endif
|
||||
|
||||
extern int32_t A_MoveSpriteClipdist(int32_t spritenum, vec3_t const * change, uint32_t cliptype, int32_t clipdist);
|
||||
ACTOR_INLINE_HEADER int A_CheckEnemyTile(int tileNum);
|
||||
ACTOR_INLINE_HEADER int A_SetSprite(int spriteNum, uint32_t cliptype);
|
||||
ACTOR_INLINE_HEADER int32_t A_MoveSprite(int spriteNum, vec3_t const * change, uint32_t cliptype);
|
||||
|
||||
EXTERN_INLINE_HEADER int G_CheckForSpaceCeiling(int sectnum);
|
||||
EXTERN_INLINE_HEADER int G_CheckForSpaceFloor(int sectnum);
|
||||
|
||||
EXTERN_INLINE_HEADER int A_CheckEnemySprite(void const * s);
|
||||
|
||||
|
||||
inline int A_CheckEnemyTile(int const tileNum)
|
||||
#if defined actors_c_ || !defined DISABLE_INLINING
|
||||
|
||||
# if !KRANDDEBUG || (KRANDDEBUG && defined actors_c_)
|
||||
|
||||
ACTOR_INLINE int A_CheckEnemyTile(int const tileNum)
|
||||
{
|
||||
return ((g_tile[tileNum].flags & (SFLAG_HARDCODED_BADGUY | SFLAG_BADGUY)) != 0);
|
||||
}
|
||||
|
||||
inline int A_SetSprite(int const spriteNum, uint32_t cliptype)
|
||||
ACTOR_INLINE int A_SetSprite(int const spriteNum, uint32_t cliptype)
|
||||
{
|
||||
vec3_t const davect = { (sprite[spriteNum].xvel * (sintable[(sprite[spriteNum].ang + 512) & 2047])) >> 14,
|
||||
(sprite[spriteNum].xvel * (sintable[sprite[spriteNum].ang & 2047])) >> 14, sprite[spriteNum].zvel };
|
||||
return (A_MoveSprite(spriteNum, &davect, cliptype) == 0);
|
||||
}
|
||||
|
||||
inline int A_SetSpriteNoZ(int const spriteNum, uint32_t cliptype)
|
||||
ACTOR_INLINE int A_SetSpriteNoZ(int const spriteNum, uint32_t cliptype)
|
||||
{
|
||||
vec3_t const davect = { (sprite[spriteNum].xvel * (sintable[(sprite[spriteNum].ang + 512) & 2047])) >> 14,
|
||||
(sprite[spriteNum].xvel * (sintable[sprite[spriteNum].ang & 2047])) >> 14, 0 };
|
||||
return (A_MoveSprite(spriteNum, &davect, cliptype) == 0);
|
||||
}
|
||||
|
||||
inline int32_t A_MoveSprite(int const spriteNum, vec3_t const * const change, uint32_t cliptype)
|
||||
ACTOR_INLINE int32_t A_MoveSprite(int const spriteNum, vec3_t const * const change, uint32_t cliptype)
|
||||
{
|
||||
return A_MoveSpriteClipdist(spriteNum, change, cliptype, -1);
|
||||
}
|
||||
|
||||
inline int G_CheckForSpaceCeiling(int const sectnum)
|
||||
# endif
|
||||
|
||||
EXTERN_INLINE int G_CheckForSpaceCeiling(int const sectnum)
|
||||
{
|
||||
return ((sector[sectnum].ceilingstat&1) && sector[sectnum].ceilingpal == 0 &&
|
||||
(sector[sectnum].ceilingpicnum==MOONSKY1 || sector[sectnum].ceilingpicnum==BIGORBIT1));
|
||||
}
|
||||
|
||||
inline int G_CheckForSpaceFloor(int const sectnum)
|
||||
EXTERN_INLINE int G_CheckForSpaceFloor(int const sectnum)
|
||||
{
|
||||
return ((sector[sectnum].floorstat&1) && sector[sectnum].ceilingpal == 0 &&
|
||||
(sector[sectnum].floorpicnum==MOONSKY1 || sector[sectnum].floorpicnum==BIGORBIT1));
|
||||
}
|
||||
|
||||
inline int A_CheckEnemySprite(void const * const pSprite)
|
||||
EXTERN_INLINE int A_CheckEnemySprite(void const * const pSprite)
|
||||
{
|
||||
return A_CheckEnemyTile(((uspriteptr_t) pSprite)->picnum);
|
||||
}
|
||||
|
||||
|
||||
END_DUKE_NS
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
|
||||
#include "common.h"
|
||||
#include "dukerr/common_game.h"
|
||||
#include "common_game.h"
|
||||
|
||||
BEGIN_DUKE_NS
|
||||
|
||||
|
|
71
source/duke3d/src/common_game.h
Normal file
71
source/duke3d/src/common_game.h
Normal file
|
@ -0,0 +1,71 @@
|
|||
//
|
||||
// Definitions of common game-only data structures/functions
|
||||
// (and declarations of data appearing in both)
|
||||
// for EDuke32 and Mapster32
|
||||
//
|
||||
|
||||
#ifndef EDUKE32_COMMON_GAME_H_
|
||||
#define EDUKE32_COMMON_GAME_H_
|
||||
|
||||
#include "gamecontrol.h"
|
||||
|
||||
BEGIN_DUKE_NS
|
||||
|
||||
|
||||
#define DUKE (g_gameType & GAMEFLAG_DUKE)
|
||||
#define NAM (g_gameType & GAMEFLAG_NAM)
|
||||
#define NAPALM (g_gameType & GAMEFLAG_NAPALM)
|
||||
#define WW2GI (g_gameType & GAMEFLAG_WW2GI)
|
||||
#define NAM_WW2GI (g_gameType & (GAMEFLAG_NAM|GAMEFLAG_WW2GI))
|
||||
#define SHAREWARE (g_gameType & GAMEFLAG_SHAREWARE)
|
||||
#define DUKEBETA ((g_gameType & GAMEFLAG_DUKEBETA) == GAMEFLAG_DUKEBETA)
|
||||
#define FURY (g_gameType & GAMEFLAG_FURY)
|
||||
|
||||
enum Games_t {
|
||||
GAME_DUKE = 0,
|
||||
GAME_NAM,
|
||||
GAME_NAPALM,
|
||||
GAME_WW2GI,
|
||||
GAMECOUNT
|
||||
};
|
||||
|
||||
typedef enum basepal_ {
|
||||
BASEPAL = 0,
|
||||
WATERPAL,
|
||||
SLIMEPAL,
|
||||
DREALMSPAL,
|
||||
TITLEPAL,
|
||||
ENDINGPAL, // 5
|
||||
ANIMPAL,
|
||||
BASEPALCOUNT
|
||||
} basepal_t;
|
||||
|
||||
#include "v_text.h"
|
||||
|
||||
extern int loaddefinitions_game(const char *fn, int32_t preload);
|
||||
|
||||
//////////
|
||||
|
||||
extern void G_InitMultiPsky(int CLOUDYOCEAN__DYN, int MOONSKY1__DYN, int BIGORBIT1__DYN, int LA__DYN);
|
||||
extern void G_SetupGlobalPsky(void);
|
||||
|
||||
//////////
|
||||
|
||||
extern void G_LoadLookups(void);
|
||||
|
||||
//////////
|
||||
|
||||
static inline void Duke_ApplySpritePropertiesToTSprite(tspriteptr_t tspr, uspriteptr_t spr)
|
||||
{
|
||||
EDUKE32_STATIC_ASSERT(CSTAT_SPRITE_RESERVED1 >> 9 == TSPR_FLAGS_DRAW_LAST);
|
||||
EDUKE32_STATIC_ASSERT(CSTAT_SPRITE_RESERVED4 >> 11 == TSPR_FLAGS_NO_SHADOW);
|
||||
EDUKE32_STATIC_ASSERT(CSTAT_SPRITE_RESERVED5 >> 11 == TSPR_FLAGS_INVISIBLE_WITH_SHADOW);
|
||||
|
||||
auto const cstat = spr->cstat;
|
||||
tspr->clipdist |= ((cstat & CSTAT_SPRITE_RESERVED1) >> 9) | ((cstat & (CSTAT_SPRITE_RESERVED4 | CSTAT_SPRITE_RESERVED5)) >> 11);
|
||||
}
|
||||
|
||||
void Duke_CommonCleanup(void);
|
||||
|
||||
END_DUKE_NS
|
||||
#endif
|
|
@ -37,7 +37,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#include "menu/menu.h"
|
||||
#include "gstrings.h"
|
||||
#include "version.h"
|
||||
#include "dukerr/namesdyn.h"
|
||||
#include "namesdyn.h"
|
||||
#include "menus.h"
|
||||
#include "../../glbackend/glbackend.h"
|
||||
|
||||
|
@ -603,7 +603,7 @@ bool GameInterface::DrawSpecialScreen(const DVector2 &origin, int tilenum)
|
|||
int32_t m, l;
|
||||
if (!haveCredits)
|
||||
{
|
||||
if (tilenum == 2504)
|
||||
if (tilenum == CREDITSTEXT1)
|
||||
{
|
||||
Menu_DrawBackground(origin);
|
||||
m = int(origin.X * 65536) + (20 << 16);
|
||||
|
@ -663,7 +663,7 @@ bool GameInterface::DrawSpecialScreen(const DVector2 &origin, int tilenum)
|
|||
shadowminitext(m, l, "Michael Hadwin", 12); l += 7 << 16;
|
||||
return true;
|
||||
}
|
||||
else if (tilenum == 2505)
|
||||
else if (tilenum == CREDITSTEXT2__STATIC)
|
||||
{
|
||||
Menu_DrawBackground(origin);
|
||||
m = int(origin.X * 65536) + (20 << 16);
|
||||
|
@ -705,7 +705,7 @@ bool GameInterface::DrawSpecialScreen(const DVector2 &origin, int tilenum)
|
|||
shadowminitext(m, l, "Thanks for the hardware, guys.", 12); l += 7 << 16;
|
||||
return true;
|
||||
}
|
||||
else if (tilenum == 2506)
|
||||
else if (tilenum == CREDITSTEXT3)
|
||||
{
|
||||
Menu_DrawBackground(origin);
|
||||
mgametextcenter(int(origin.X * 65536), int(origin.Y * 65536) + (50 << 16), "Duke Nukem 3D is a trademark of\n"
|
||||
|
|
|
@ -107,7 +107,7 @@ EDUKE32_STATIC_ASSERT(7 <= MAXTILES-MAXUSERTILES);
|
|||
//#define DEBUG_VALGRIND_NO_SMC
|
||||
|
||||
#include "actors.h"
|
||||
#include "dukerr/common_game.h"
|
||||
#include "common_game.h"
|
||||
#include "config.h"
|
||||
#include "gamecontrol.h"
|
||||
#include "game.h"
|
||||
|
@ -116,15 +116,15 @@ EDUKE32_STATIC_ASSERT(7 <= MAXTILES-MAXUSERTILES);
|
|||
#include "gamevars.h"
|
||||
#include "global.h"
|
||||
#include "inv.h"
|
||||
#include "dukerr/macros.h"
|
||||
#include "dukerr/namesdyn.h"
|
||||
#include "macros.h"
|
||||
#include "namesdyn.h"
|
||||
#include "network.h"
|
||||
#include "player.h"
|
||||
#include "dukerr/quotes.h"
|
||||
#include "quotes.h"
|
||||
#include "rts.h"
|
||||
#include "sector.h"
|
||||
#include "sounds.h"
|
||||
#include "dukerr/soundsdyn.h"
|
||||
#include "soundsdyn.h"
|
||||
#include "text.h"
|
||||
|
||||
BEGIN_DUKE_NS
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#ifndef EDUKE32_EVENTS_DEFS_H_
|
||||
#define EDUKE32_EVENTS_DEFS_H_
|
||||
|
||||
BEGIN_DUKERR_NS
|
||||
BEGIN_DUKE_NS
|
||||
|
||||
// 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
|
||||
|
@ -46,7 +46,6 @@ enum GameEvent_t {
|
|||
EVENT_USEMEDKIT,
|
||||
EVENT_USEJETPACK,
|
||||
EVENT_TURNAROUND,
|
||||
// The following are EDuke32 only.
|
||||
EVENT_DISPLAYWEAPON,
|
||||
EVENT_FIREWEAPON, // 40
|
||||
EVENT_SELECTWEAPON,
|
||||
|
@ -168,10 +167,9 @@ enum GameEvent_t {
|
|||
#ifdef LUNATIC
|
||||
EVENT_ANIMATEALLSPRITES,
|
||||
#endif
|
||||
MAXEVENTS,
|
||||
MAXEVENTS_RR = EVENT_DISPLAYWEAPON
|
||||
MAXEVENTS
|
||||
};
|
||||
|
||||
END_DUKERR_NS
|
||||
END_DUKE_NS
|
||||
|
||||
#endif
|
|
@ -66,13 +66,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
|
||||
BEGIN_DUKE_NS
|
||||
|
||||
extern void G_InitMultiPsky(int CLOUDYOCEAN__DYN, int MOONSKY1__DYN, int BIGORBIT1__DYN, int LA__DYN);
|
||||
extern void G_LoadLookups(void);
|
||||
|
||||
//////////
|
||||
|
||||
|
||||
|
||||
int32_t g_quitDeadline = 0;
|
||||
|
||||
int32_t g_cameraDistance = 0, g_cameraClock = 0;
|
||||
|
@ -85,6 +78,10 @@ int32_t vote_map = -1, vote_episode = -1;
|
|||
|
||||
int32_t g_Debug = 0;
|
||||
|
||||
#ifndef EDUKE32_STANDALONE
|
||||
static const char *defaultrtsfilename[GAMECOUNT] = { "DUKE.RTS", "NAM.RTS", "NAPALM.RTS", "WW2GI.RTS" };
|
||||
#endif
|
||||
|
||||
int32_t g_Shareware = 0;
|
||||
|
||||
int32_t tempwallptr;
|
||||
|
@ -99,6 +96,32 @@ int32_t g_levelTextTime = 0;
|
|||
extern char forcegl;
|
||||
#endif
|
||||
|
||||
const char *G_DefaultRtsFile(void)
|
||||
{
|
||||
#ifndef EDUKE32_STANDALONE
|
||||
if (DUKE)
|
||||
return defaultrtsfilename[GAME_DUKE];
|
||||
else if (WW2GI)
|
||||
return defaultrtsfilename[GAME_WW2GI];
|
||||
else if (NAPALM)
|
||||
{
|
||||
if (!fileSystem.FileExists(defaultrtsfilename[GAME_NAPALM]) && fileSystem.FileExists(defaultrtsfilename[GAME_NAM]))
|
||||
return defaultrtsfilename[GAME_NAM]; // NAM/NAPALM Sharing
|
||||
else
|
||||
return defaultrtsfilename[GAME_NAPALM];
|
||||
}
|
||||
else if (NAM)
|
||||
{
|
||||
if (!fileSystem.FileExists(defaultrtsfilename[GAME_NAM]) && fileSystem.FileExists(defaultrtsfilename[GAME_NAPALM]))
|
||||
return defaultrtsfilename[GAME_NAPALM]; // NAM/NAPALM Sharing
|
||||
else
|
||||
return defaultrtsfilename[GAME_NAM];
|
||||
}
|
||||
#endif
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
enum gametokens
|
||||
{
|
||||
T_INCLUDE = 0,
|
||||
|
@ -196,16 +219,6 @@ int32_t A_CheckInventorySprite(spritetype *s)
|
|||
}
|
||||
|
||||
|
||||
static inline void Duke_ApplySpritePropertiesToTSprite(tspriteptr_t tspr, uspriteptr_t spr)
|
||||
{
|
||||
EDUKE32_STATIC_ASSERT(CSTAT_SPRITE_RESERVED1 >> 9 == TSPR_FLAGS_DRAW_LAST);
|
||||
EDUKE32_STATIC_ASSERT(CSTAT_SPRITE_RESERVED4 >> 11 == TSPR_FLAGS_NO_SHADOW);
|
||||
EDUKE32_STATIC_ASSERT(CSTAT_SPRITE_RESERVED5 >> 11 == TSPR_FLAGS_INVISIBLE_WITH_SHADOW);
|
||||
|
||||
auto const cstat = spr->cstat;
|
||||
tspr->clipdist |= ((cstat & CSTAT_SPRITE_RESERVED1) >> 9) | ((cstat & (CSTAT_SPRITE_RESERVED4 | CSTAT_SPRITE_RESERVED5)) >> 11);
|
||||
}
|
||||
|
||||
|
||||
void G_GameExit(const char *msg)
|
||||
{
|
||||
|
|
|
@ -205,6 +205,8 @@ static inline int Menu_HaveUserMap(void)
|
|||
return (boardfilename[0] != 0 && m_level_number == 7 && ud.m_volume_number == 0);
|
||||
}
|
||||
|
||||
extern const char *G_DefaultRtsFile(void);
|
||||
|
||||
#ifdef LEGACY_ROR
|
||||
extern char ror_protectedsectors[MAXSECTORS];
|
||||
#endif
|
||||
|
|
|
@ -27,11 +27,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
|
||||
#include "cheats.h"
|
||||
#include "common.h"
|
||||
#include "dukerr/common_game.h"
|
||||
#include "common_game.h"
|
||||
#include "m_crc32.h"
|
||||
#include "duke3d.h"
|
||||
#include "gameexec.h"
|
||||
#include "dukerr/namesdyn.h"
|
||||
#include "namesdyn.h"
|
||||
#include "osd.h"
|
||||
#include "savegame.h"
|
||||
#include "printf.h"
|
||||
|
|
|
@ -30,7 +30,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#include "cheats.h"
|
||||
#include "common.h" // tokenlist
|
||||
#include "player.h" // projectile_t
|
||||
#include "dukerr/events_defs.h"
|
||||
#include "events_defs.h"
|
||||
|
||||
|
||||
BEGIN_DUKE_NS
|
||||
|
|
|
@ -24,7 +24,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#define gameexec_h_
|
||||
|
||||
#include "build.h"
|
||||
#include "dukerr/events_defs.h"
|
||||
#include "events_defs.h"
|
||||
#include "gamedef.h" // vmstate_t
|
||||
#include "sector.h" // mapstate_t
|
||||
#include "zstring.h"
|
||||
|
|
|
@ -103,6 +103,25 @@ int32_t g_spriteGravity = 176;
|
|||
int32_t g_timerTicsPerSecond = TICRATE;
|
||||
int32_t g_tripbombRadius = 3880;
|
||||
|
||||
int16_t g_blimpSpawnItems[15] =
|
||||
{
|
||||
RPGSPRITE__STATIC,
|
||||
CHAINGUNSPRITE__STATIC,
|
||||
DEVISTATORAMMO__STATIC,
|
||||
RPGAMMO__STATIC,
|
||||
RPGAMMO__STATIC,
|
||||
JETPACK__STATIC,
|
||||
SHIELD__STATIC,
|
||||
FIRSTAID__STATIC,
|
||||
STEROIDS__STATIC,
|
||||
RPGAMMO__STATIC,
|
||||
RPGAMMO__STATIC,
|
||||
RPGSPRITE__STATIC,
|
||||
RPGAMMO__STATIC,
|
||||
FREEZESPRITE__STATIC,
|
||||
FREEZEAMMO__STATIC
|
||||
};
|
||||
|
||||
char CheatKeys[2] = { sc_D, sc_N };
|
||||
|
||||
END_DUKE_NS
|
||||
|
|
|
@ -27,7 +27,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#include "compat.h"
|
||||
#include "duke3d.h"
|
||||
#include "mmulti.h"
|
||||
#include "dukerr/quotes.h"
|
||||
#include "quotes.h"
|
||||
#include "sector.h"
|
||||
#include "sounds.h"
|
||||
#include "menu/menu.h"
|
||||
|
@ -177,6 +177,7 @@ extern int32_t g_timerTicsPerSecond;
|
|||
extern int32_t g_tripbombRadius;
|
||||
extern int32_t g_volumeCnt;
|
||||
|
||||
extern int16_t g_blimpSpawnItems[15];
|
||||
extern int32_t g_gametypeFlags[MAXGAMETYPES];
|
||||
|
||||
|
||||
|
|
|
@ -22,8 +22,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "dukerr/namesdyn.h"
|
||||
|
||||
BEGIN_DUKE_NS
|
||||
|
||||
enum dukeinv_t
|
||||
|
@ -60,4 +58,21 @@ extern int const icon_to_inv[ICON_MAX];
|
|||
|
||||
extern int const inv_to_icon[GET_MAX];
|
||||
|
||||
enum dukeweapon_t
|
||||
{
|
||||
KNEE_WEAPON, // 0
|
||||
PISTOL_WEAPON,
|
||||
SHOTGUN_WEAPON,
|
||||
CHAINGUN_WEAPON,
|
||||
RPG_WEAPON,
|
||||
HANDBOMB_WEAPON, // 5
|
||||
SHRINKER_WEAPON,
|
||||
DEVISTATOR_WEAPON,
|
||||
TRIPBOMB_WEAPON,
|
||||
FREEZE_WEAPON,
|
||||
HANDREMOTE_WEAPON, // 10
|
||||
GROW_WEAPON,
|
||||
MAX_WEAPONS
|
||||
};
|
||||
|
||||
END_DUKE_NS
|
||||
|
|
152
source/duke3d/src/keys.h
Normal file
152
source/duke3d/src/keys.h
Normal file
|
@ -0,0 +1,152 @@
|
|||
//-------------------------------------------------------------------------
|
||||
/*
|
||||
Copyright (C) 2010 EDuke32 developers and contributors
|
||||
|
||||
This file is part of EDuke32.
|
||||
|
||||
EDuke32 is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License version 2
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
#ifndef KEYS_H
|
||||
|
||||
#define KEYS_H
|
||||
|
||||
BEGIN_DUKE_NS
|
||||
|
||||
#define NUM_CODES 128
|
||||
|
||||
#define ESC 0x1B
|
||||
#define ENTER 0x0D
|
||||
|
||||
#define KEYSC_ESC 0x01
|
||||
#define KEYSC_1 0x02
|
||||
#define KEYSC_2 0x03
|
||||
#define KEYSC_3 0x04
|
||||
#define KEYSC_4 0x05
|
||||
#define KEYSC_5 0x06
|
||||
#define KEYSC_6 0x07
|
||||
#define KEYSC_7 0x08
|
||||
#define KEYSC_8 0x09
|
||||
#define KEYSC_9 0x0a
|
||||
#define KEYSC_0 0x0b
|
||||
#define KEYSC_DASH 0x0c
|
||||
#define KEYSC_EQUAL 0x0d
|
||||
|
||||
#define KEYSC_BS 0x0e
|
||||
#define KEYSC_TAB 0x0f
|
||||
#define KEYSC_Q 0x10
|
||||
#define KEYSC_W 0x11
|
||||
#define KEYSC_E 0x12
|
||||
#define KEYSC_R 0x13
|
||||
#define KEYSC_T 0x14
|
||||
#define KEYSC_Y 0x15
|
||||
#define KEYSC_U 0x16
|
||||
#define KEYSC_I 0x17
|
||||
#define KEYSC_O 0x18
|
||||
#define KEYSC_P 0x19
|
||||
#define KEYSC_LBRACK 0x1a
|
||||
#define KEYSC_RBRACK 0x1b
|
||||
#define KEYSC_ENTER 0x1c
|
||||
|
||||
#define KEYSC_LCTRL 0x1d
|
||||
#define KEYSC_A 0x1e
|
||||
#define KEYSC_S 0x1f
|
||||
#define KEYSC_D 0x20
|
||||
#define KEYSC_F 0x21
|
||||
#define KEYSC_G 0x22
|
||||
#define KEYSC_H 0x23
|
||||
#define KEYSC_J 0x24
|
||||
#define KEYSC_K 0x25
|
||||
#define KEYSC_L 0x26
|
||||
#define KEYSC_SEMI 0x27
|
||||
#define KEYSC_QUOTE 0x28
|
||||
#define KEYSC_BQUOTE 0x29
|
||||
#define KEYSC_TILDE 0x29
|
||||
|
||||
#define KEYSC_LSHIFT 0x2a
|
||||
#define KEYSC_BSLASH 0x2b
|
||||
#define KEYSC_Z 0x2c
|
||||
#define KEYSC_X 0x2d
|
||||
#define KEYSC_C 0x2e
|
||||
#define KEYSC_V 0x2f
|
||||
#define KEYSC_B 0x30
|
||||
#define KEYSC_N 0x31
|
||||
#define KEYSC_M 0x32
|
||||
#define KEYSC_COMMA 0x33
|
||||
#define KEYSC_PERIOD 0x34
|
||||
#define KEYSC_SLASH 0x35
|
||||
#define KEYSC_RSHIFT 0x36
|
||||
#define KEYSC_gSTAR 0x37
|
||||
|
||||
#define KEYSC_LALT 0x38
|
||||
#define KEYSC_SPACE 0x39
|
||||
#define KEYSC_CAPS 0x3a
|
||||
|
||||
#define KEYSC_F1 0x3b
|
||||
#define KEYSC_F2 0x3c
|
||||
#define KEYSC_F3 0x3d
|
||||
#define KEYSC_F4 0x3e
|
||||
#define KEYSC_F5 0x3f
|
||||
#define KEYSC_F6 0x40
|
||||
#define KEYSC_F7 0x41
|
||||
#define KEYSC_F8 0x42
|
||||
#define KEYSC_F9 0x43
|
||||
#define KEYSC_F10 0x44
|
||||
|
||||
#define KEYSC_gNUM 0x45
|
||||
#define KEYSC_SCROLL 0x46
|
||||
|
||||
#define KEYSC_gHOME 0x47
|
||||
#define KEYSC_gUP 0x48
|
||||
#define KEYSC_gPGUP 0x49
|
||||
#define KEYSC_gMINUS 0x4a
|
||||
#define KEYSC_gLEFT 0x4b
|
||||
#define KEYSC_gKP5 0x4c
|
||||
#define KEYSC_gRIGHT 0x4d
|
||||
#define KEYSC_gPLUS 0x4e
|
||||
#define KEYSC_gEND 0x4f
|
||||
#define KEYSC_gDOWN 0x50
|
||||
#define KEYSC_gPGDN 0x51
|
||||
#define KEYSC_gINS 0x52
|
||||
#define KEYSC_gDEL 0x53
|
||||
|
||||
#define KEYSC_F11 0x57
|
||||
#define KEYSC_F12 0x58
|
||||
|
||||
#define KEYSC_gENTER 0x9C
|
||||
#define KEYSC_RCTRL 0x9D
|
||||
#define KEYSC_gSLASH 0xB5
|
||||
#define KEYSC_RALT 0xB8
|
||||
#define KEYSC_PRTSCN 0xB7
|
||||
#define KEYSC_PAUSE 0xC5
|
||||
#define KEYSC_HOME 0xC7
|
||||
#define KEYSC_UP 0xC8
|
||||
#define KEYSC_PGUP 0xC9
|
||||
#define KEYSC_LEFT 0xCB
|
||||
#define KEYSC_RIGHT 0xCD
|
||||
#define KEYSC_END 0xCF
|
||||
#define KEYSC_DOWN 0xD0
|
||||
#define KEYSC_PGDN 0xD1
|
||||
#define KEYSC_INSERT 0xD2
|
||||
#define KEYSC_DELETE 0xD3
|
||||
|
||||
#define asc_Esc 27
|
||||
#define asc_Enter 13
|
||||
#define asc_Space 32
|
||||
|
||||
END_DUKE_NS
|
||||
|
||||
#endif
|
197
source/duke3d/src/macros.h
Normal file
197
source/duke3d/src/macros.h
Normal file
|
@ -0,0 +1,197 @@
|
|||
//-------------------------------------------------------------------------
|
||||
/*
|
||||
Copyright (C) 2010 EDuke32 developers and contributors
|
||||
|
||||
This file is part of EDuke32.
|
||||
|
||||
EDuke32 is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License version 2
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
#ifndef EDUKE32_MACROS_H_
|
||||
#define EDUKE32_MACROS_H_
|
||||
|
||||
#include "mmulti.h"
|
||||
|
||||
BEGIN_DUKE_NS
|
||||
|
||||
|
||||
// Macros, some from SW source
|
||||
|
||||
#define BGSTRETCH (hud_bgstretch ? 1024 : 0)
|
||||
|
||||
#ifndef EDUKE32_STANDALONE
|
||||
#define RANDOMSCRAP(s, i) A_InsertSprite(s->sectnum,s->x+(krand()&255)-128,s->y+(krand()&255)-128,s->z-ZOFFSET3-(krand()&8191),\
|
||||
SCRAP6+(krand()&15),-8,48,48,krand()&2047,(krand()&63)+64,-512-(krand()&2047),i,5)
|
||||
#endif
|
||||
|
||||
#define GTFLAGS(x) (g_gametypeFlags[ud.coop] & x)
|
||||
|
||||
#define TRAVERSE_SPRITE_SECT(l, o, n) (o) = (l); ((o) != -1) && ((n) = nextspritesect[o]); (o) = (n)
|
||||
#define TRAVERSE_SPRITE_STAT(l, o, n) (o) = (l); ((o) != -1) && ((n) = nextspritestat[o]); (o) = (n)
|
||||
#define TRAVERSE_CONNECT(i) i = 0; i != -1; i = connectpoint2[i]
|
||||
|
||||
#define TEST(flags,mask) ((flags) & (mask))
|
||||
#define SET(flags,mask) ((flags) |= (mask))
|
||||
#define RESET(flags,mask) ((flags) &= ~(mask))
|
||||
#define FLIP(flags,mask) ((flags) ^= (mask))
|
||||
|
||||
// mask definitions
|
||||
|
||||
#define BIT(shift) (1u<<(shift))
|
||||
|
||||
#define TEST_SYNC_KEY(bits, sync_num) (!!TEST((bits), BIT(sync_num)))
|
||||
|
||||
#ifndef EDUKE32_STANDALONE
|
||||
#define AFLAMABLE(X) (X==BOX||X==TREE1||X==TREE2||X==TIRE||X==CONE)
|
||||
#else
|
||||
#define AFLAMABLE(X) (0)
|
||||
#endif
|
||||
#define rnd(X) ((krand()>>8)>=(255-(X)))
|
||||
|
||||
//
|
||||
// NETWORK - REDEFINABLE SHARED (SYNC) KEYS BIT POSITIONS
|
||||
//
|
||||
|
||||
#define SK_JUMP 0
|
||||
#define SK_CROUCH 1
|
||||
#define SK_FIRE 2
|
||||
#define SK_AIM_UP 3
|
||||
#define SK_AIM_DOWN 4
|
||||
#define SK_RUN 5
|
||||
#define SK_LOOK_LEFT 6
|
||||
#define SK_LOOK_RIGHT 7
|
||||
// weapons take up 4 bits...
|
||||
#define SK_WEAPON_BITS 8
|
||||
#define SK_WEAPON_BITS1 9
|
||||
#define SK_WEAPON_BITS2 10
|
||||
#define SK_WEAPON_BITS3 11
|
||||
#define SK_STEROIDS 12
|
||||
#define SK_LOOK_UP 13
|
||||
#define SK_LOOK_DOWN 14
|
||||
#define SK_NIGHTVISION 15
|
||||
#define SK_MEDKIT 16
|
||||
#define SK_MULTIFLAG 17
|
||||
#define SK_CENTER_VIEW 18
|
||||
#define SK_HOLSTER 19
|
||||
#define SK_INV_LEFT 20
|
||||
#define SK_PAUSE 21
|
||||
#define SK_QUICK_KICK 22
|
||||
#define SK_AIMMODE 23
|
||||
#define SK_HOLODUKE 24
|
||||
#define SK_JETPACK 25
|
||||
#define SK_GAMEQUIT 26
|
||||
#define SK_INV_RIGHT 27
|
||||
#define SK_TURNAROUND 28
|
||||
#define SK_OPEN 29
|
||||
#define SK_INVENTORY 30
|
||||
#define SK_ESCAPE 31
|
||||
|
||||
// rotatesprite flags
|
||||
#define ROTATE_SPRITE_TRANSLUCENT (BIT(0))
|
||||
#define ROTATE_SPRITE_VIEW_CLIP (BIT(1)) // clip to view
|
||||
#define ROTATE_SPRITE_YFLIP (BIT(2))
|
||||
#define ROTATE_SPRITE_IGNORE_START_MOST (BIT(3)) // don't clip to startumost
|
||||
#define ROTATE_SPRITE_SCREEN_CLIP (BIT(1)|BIT(3)) // use window
|
||||
#define ROTATE_SPRITE_CORNER (BIT(4)) // place sprite from upper left corner
|
||||
#define ROTATE_SPRITE_TRANS_FLIP (BIT(5))
|
||||
#define ROTATE_SPRITE_NON_MASK (BIT(6)) // non masked sprites
|
||||
#define ROTATE_SPRITE_ALL_PAGES (BIT(7)) // copies to all pages
|
||||
|
||||
#define RS_SCALE BIT(16)
|
||||
|
||||
// system defines for status bits
|
||||
#define CEILING_STAT_PLAX BIT(0)
|
||||
#define CEILING_STAT_SLOPE BIT(1)
|
||||
#define CEILING_STAT_SWAPXY BIT(2)
|
||||
#define CEILING_STAT_SMOOSH BIT(3)
|
||||
#define CEILING_STAT_XFLIP BIT(4)
|
||||
#define CEILING_STAT_YFLIP BIT(5)
|
||||
#define CEILING_STAT_RELATIVE BIT(6)
|
||||
#define CEILING_STAT_TYPE_MASK (BIT(7)|BIT(8))
|
||||
#define CEILING_STAT_MASKED BIT(7)
|
||||
#define CEILING_STAT_TRANS BIT(8)
|
||||
#define CEILING_STAT_TRANS_FLIP (BIT(7)|BIT(8))
|
||||
#define CEILING_STAT_FAF_BLOCK_HITSCAN BIT(15)
|
||||
|
||||
#define FLOOR_STAT_PLAX BIT(0)
|
||||
#define FLOOR_STAT_SLOPE BIT(1)
|
||||
#define FLOOR_STAT_SWAPXY BIT(2)
|
||||
#define FLOOR_STAT_SMOOSH BIT(3)
|
||||
#define FLOOR_STAT_XFLIP BIT(4)
|
||||
#define FLOOR_STAT_YFLIP BIT(5)
|
||||
#define FLOOR_STAT_RELATIVE BIT(6)
|
||||
#define FLOOR_STAT_TYPE_MASK (BIT(7)|BIT(8))
|
||||
#define FLOOR_STAT_MASKED BIT(7)
|
||||
#define FLOOR_STAT_TRANS BIT(8)
|
||||
#define FLOOR_STAT_TRANS_FLIP (BIT(7)|BIT(8))
|
||||
#define FLOOR_STAT_FAF_BLOCK_HITSCAN BIT(15)
|
||||
|
||||
|
||||
//cstat, bit 0: 1 = Blocking sprite (use with clipmove, getzrange) "B"
|
||||
// bit 1: 1 = 50/50 transluscence, 0 = normal "T"
|
||||
// bit 2: 1 = x-flipped, 0 = normal "F"
|
||||
// bit 3: 1 = y-flipped, 0 = normal "F"
|
||||
// bits 5-4: 00 = FACE sprite (default) "R"
|
||||
// 01 = WALL sprite (like masked walls)
|
||||
// 10 = FLOOR sprite (parallel to ceilings&floors)
|
||||
// 11 = SPIN sprite (face sprite that can spin 2draw style - not done yet)
|
||||
// bit 6: 1 = 1-sided sprite, 0 = normal "1"
|
||||
// bit 7: 1 = Real centered centering, 0 = foot center "C"
|
||||
// bit 8: 1 = Blocking sprite (use with hitscan) "H"
|
||||
// bit 9: reserved
|
||||
// bit 10: reserved
|
||||
// bit 11: 1 = determine shade based only on its own shade member (see CON's spritenoshade command), i.e.
|
||||
// don't take over shade from parallaxed ceiling/nonparallaxed floor
|
||||
// (NOTE: implemented on the game side)
|
||||
// bit 12: reserved
|
||||
// bit 13: reserved
|
||||
// bit 14: reserved
|
||||
// bit 15: 1 = Invisible sprite, 0 = not invisible
|
||||
#define CSTAT_SPRITE_NOSHADE BIT(11)
|
||||
#define CSTAT_SPRITE_BREAKABLE (CSTAT_SPRITE_BLOCK_HITSCAN)
|
||||
|
||||
#define SP(i) sprite[i].yvel
|
||||
#define SX(i) sprite[i].x
|
||||
#define SY(i) sprite[i].y
|
||||
#define SZ(i) sprite[i].z
|
||||
#define SS(i) sprite[i].shade
|
||||
#define PN(i) sprite[i].picnum
|
||||
#define SA(i) sprite[i].ang
|
||||
//#define SV sprite[i].xvel
|
||||
//#define ZV sprite[i].zvel
|
||||
//#define RX sprite[i].xrepeat
|
||||
//#define RY sprite[i].yrepeat
|
||||
#define OW(i) sprite[i].owner
|
||||
#define CS(i) sprite[i].cstat
|
||||
#define SH(i) sprite[i].extra
|
||||
//#define CX sprite[i].xoffset
|
||||
//#define CY sprite[i].yoffset
|
||||
//#define CD sprite[i].clipdist
|
||||
//#define PL sprite[i].pal
|
||||
#define SLT(i) sprite[i].lotag
|
||||
#define SHT(i) sprite[i].hitag
|
||||
#define SECT(i) sprite[i].sectnum
|
||||
|
||||
#define T1(i) actor[i].t_data[0]
|
||||
#define T2(i) actor[i].t_data[1]
|
||||
#define T3(i) actor[i].t_data[2]
|
||||
#define T4(i) actor[i].t_data[3]
|
||||
#define T5(i) actor[i].t_data[4]
|
||||
#define T6(i) actor[i].t_data[5]
|
||||
|
||||
END_DUKE_NS
|
||||
|
||||
#endif
|
1313
source/duke3d/src/namesdyn.cpp
Normal file
1313
source/duke3d/src/namesdyn.cpp
Normal file
File diff suppressed because it is too large
Load diff
1238
source/duke3d/src/namesdyn.h
Normal file
1238
source/duke3d/src/namesdyn.h
Normal file
File diff suppressed because it is too large
Load diff
|
@ -1763,10 +1763,10 @@ static void G_DrawTileScaled(int drawX, int drawY, int tileNum, int drawShade, i
|
|||
int drawYOffset = 0;
|
||||
int drawXOffset = 192<<16;
|
||||
|
||||
switch (DYNAMICWEAPONMAP(hudweap.cur))
|
||||
switch (hudweap.cur)
|
||||
{
|
||||
case DEVISTATOR_WEAPON__STATIC:
|
||||
case TRIPBOMB_WEAPON__STATIC:
|
||||
case DEVISTATOR_WEAPON:
|
||||
case TRIPBOMB_WEAPON:
|
||||
drawXOffset = 160<<16;
|
||||
break;
|
||||
default:
|
||||
|
@ -2257,9 +2257,9 @@ void P_DisplayWeapon(void)
|
|||
int const weaponPal = P_GetHudPal(pPlayer);
|
||||
|
||||
if (!FURY)
|
||||
switch (DYNAMICWEAPONMAP(currentWeapon))
|
||||
switch (currentWeapon)
|
||||
{
|
||||
case KNEE_WEAPON__STATIC:
|
||||
case KNEE_WEAPON:
|
||||
{
|
||||
int const kneePal = P_GetKneePal(pPlayer, weaponPal);
|
||||
|
||||
|
@ -2274,7 +2274,7 @@ void P_DisplayWeapon(void)
|
|||
break;
|
||||
}
|
||||
|
||||
case TRIPBOMB_WEAPON__STATIC:
|
||||
case TRIPBOMB_WEAPON:
|
||||
weaponX += 8;
|
||||
weaponYOffset -= 10;
|
||||
|
||||
|
@ -2292,7 +2292,7 @@ void P_DisplayWeapon(void)
|
|||
weaponPal);
|
||||
break;
|
||||
|
||||
case RPG_WEAPON__STATIC:
|
||||
case RPG_WEAPON:
|
||||
weaponX -= sintable[(768 + ((*weaponFrame) << 7)) & 2047] >> 11;
|
||||
weaponYOffset += sintable[(768 + ((*weaponFrame) << 7)) & 2047] >> 11;
|
||||
|
||||
|
@ -2320,7 +2320,7 @@ void P_DisplayWeapon(void)
|
|||
weaponBits, weaponPal);
|
||||
break;
|
||||
|
||||
case SHOTGUN_WEAPON__STATIC:
|
||||
case SHOTGUN_WEAPON:
|
||||
weaponX -= 8;
|
||||
|
||||
if (WW2GI)
|
||||
|
@ -2427,7 +2427,7 @@ void P_DisplayWeapon(void)
|
|||
}
|
||||
break;
|
||||
|
||||
case CHAINGUN_WEAPON__STATIC:
|
||||
case CHAINGUN_WEAPON:
|
||||
if (*weaponFrame > 0)
|
||||
{
|
||||
weaponYOffset -= sintable[(*weaponFrame)<<7]>>12;
|
||||
|
@ -2554,7 +2554,7 @@ void P_DisplayWeapon(void)
|
|||
CHAINGUN, weaponShade, weaponBits, weaponPal);
|
||||
break;
|
||||
|
||||
case PISTOL_WEAPON__STATIC:
|
||||
case PISTOL_WEAPON:
|
||||
if ((*weaponFrame) < PWEAPON(screenpeek, PISTOL_WEAPON, TotalTime)+1)
|
||||
{
|
||||
static uint8_t pistolFrames[] = { 0, 1, 2 };
|
||||
|
@ -2613,7 +2613,7 @@ void P_DisplayWeapon(void)
|
|||
|
||||
break;
|
||||
|
||||
case HANDBOMB_WEAPON__STATIC:
|
||||
case HANDBOMB_WEAPON:
|
||||
{
|
||||
static uint8_t pipebombFrames [] = { 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2 };
|
||||
|
||||
|
@ -2663,7 +2663,7 @@ void P_DisplayWeapon(void)
|
|||
}
|
||||
break;
|
||||
|
||||
case HANDREMOTE_WEAPON__STATIC:
|
||||
case HANDREMOTE_WEAPON:
|
||||
{
|
||||
static uint8_t remoteFrames[] = { 0, 1, 1, 2, 1, 1, 0, 0, 0, 0, 0 };
|
||||
|
||||
|
@ -2676,7 +2676,7 @@ void P_DisplayWeapon(void)
|
|||
}
|
||||
break;
|
||||
|
||||
case DEVISTATOR_WEAPON__STATIC:
|
||||
case DEVISTATOR_WEAPON:
|
||||
if (WW2GI)
|
||||
{
|
||||
if (*weaponFrame)
|
||||
|
@ -2761,7 +2761,7 @@ void P_DisplayWeapon(void)
|
|||
}
|
||||
break;
|
||||
|
||||
case FREEZE_WEAPON__STATIC:
|
||||
case FREEZE_WEAPON:
|
||||
if (!(duke3d_globalflags & DUKE3D_NO_WIDESCREEN_PINNING) && DUKE)
|
||||
weaponBits |= 512;
|
||||
|
||||
|
@ -2785,8 +2785,8 @@ void P_DisplayWeapon(void)
|
|||
FREEZE, weaponShade, weaponBits, weaponPal);
|
||||
break;
|
||||
|
||||
case GROW_WEAPON__STATIC:
|
||||
case SHRINKER_WEAPON__STATIC:
|
||||
case GROW_WEAPON:
|
||||
case SHRINKER_WEAPON:
|
||||
weaponX += 28;
|
||||
weaponY += 18;
|
||||
|
||||
|
@ -3332,6 +3332,10 @@ access_incs:
|
|||
return 0;
|
||||
}
|
||||
|
||||
int16_t WeaponPickupSprites[MAX_WEAPONS] = { KNEE__STATIC, FIRSTGUNSPRITE__STATIC, SHOTGUNSPRITE__STATIC,
|
||||
CHAINGUNSPRITE__STATIC, RPGSPRITE__STATIC, HEAVYHBOMB__STATIC, SHRINKERSPRITE__STATIC, DEVISTATORSPRITE__STATIC,
|
||||
TRIPBOMBSPRITE__STATIC, FREEZESPRITE__STATIC, HEAVYHBOMB__STATIC, SHRINKERSPRITE__STATIC
|
||||
};
|
||||
// this is used for player deaths
|
||||
void P_DropWeapon(int const playerNum)
|
||||
{
|
||||
|
@ -3345,10 +3349,10 @@ void P_DropWeapon(int const playerNum)
|
|||
A_Spawn(pPlayer->i, WeaponPickupSprites[currentWeapon]);
|
||||
#ifndef EDUKE32_STANDALONE
|
||||
else if (!FURY)
|
||||
switch (DYNAMICWEAPONMAP(PWEAPON(playerNum, currentWeapon, WorksLike)))
|
||||
switch (PWEAPON(playerNum, currentWeapon, WorksLike))
|
||||
{
|
||||
case RPG_WEAPON__STATIC:
|
||||
case HANDBOMB_WEAPON__STATIC: A_Spawn(pPlayer->i, EXPLOSION2); break;
|
||||
case RPG_WEAPON:
|
||||
case HANDBOMB_WEAPON: A_Spawn(pPlayer->i, EXPLOSION2); break;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -3813,7 +3817,11 @@ void P_FragPlayer(int playerNum)
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef LUNATIC
|
||||
# define PIPEBOMB_CONTROL(playerNum) (g_player[playerNum].ps->pipebombControl)
|
||||
#else
|
||||
# define PIPEBOMB_CONTROL(playerNum) (Gv_GetVarByLabel("PIPEBOMB_CONTROL", PIPEBOMB_REMOTE, -1, playerNum))
|
||||
#endif
|
||||
|
||||
static void P_ProcessWeapon(int playerNum)
|
||||
{
|
||||
|
@ -3972,9 +3980,9 @@ static void P_ProcessWeapon(int playerNum)
|
|||
// this event is deprecated
|
||||
VM_OnEvent(EVENT_FIREWEAPON, pPlayer->i, playerNum);
|
||||
|
||||
switch (DYNAMICWEAPONMAP(PWEAPON(playerNum, pPlayer->curr_weapon, WorksLike)))
|
||||
switch (PWEAPON(playerNum, pPlayer->curr_weapon, WorksLike))
|
||||
{
|
||||
case HANDBOMB_WEAPON__STATIC:
|
||||
case HANDBOMB_WEAPON:
|
||||
pPlayer->hbomb_hold_delay = 0;
|
||||
if (pPlayer->ammo_amount[pPlayer->curr_weapon] > 0)
|
||||
{
|
||||
|
@ -3984,7 +3992,7 @@ static void P_ProcessWeapon(int playerNum)
|
|||
}
|
||||
break;
|
||||
|
||||
case HANDREMOTE_WEAPON__STATIC:
|
||||
case HANDREMOTE_WEAPON:
|
||||
pPlayer->hbomb_hold_delay = 0;
|
||||
(*weaponFrame) = 1;
|
||||
if (PWEAPON(playerNum, pPlayer->curr_weapon, InitialSound) > 0)
|
||||
|
@ -3992,7 +4000,7 @@ static void P_ProcessWeapon(int playerNum)
|
|||
break;
|
||||
|
||||
|
||||
case TRIPBOMB_WEAPON__STATIC:
|
||||
case TRIPBOMB_WEAPON:
|
||||
if (pPlayer->ammo_amount[pPlayer->curr_weapon] > 0)
|
||||
{
|
||||
hitdata_t hitData;
|
||||
|
@ -4037,13 +4045,13 @@ static void P_ProcessWeapon(int playerNum)
|
|||
}
|
||||
break;
|
||||
|
||||
case PISTOL_WEAPON__STATIC:
|
||||
case SHOTGUN_WEAPON__STATIC:
|
||||
case CHAINGUN_WEAPON__STATIC:
|
||||
case SHRINKER_WEAPON__STATIC:
|
||||
case GROW_WEAPON__STATIC:
|
||||
case FREEZE_WEAPON__STATIC:
|
||||
case RPG_WEAPON__STATIC:
|
||||
case PISTOL_WEAPON:
|
||||
case SHOTGUN_WEAPON:
|
||||
case CHAINGUN_WEAPON:
|
||||
case SHRINKER_WEAPON:
|
||||
case GROW_WEAPON:
|
||||
case FREEZE_WEAPON:
|
||||
case RPG_WEAPON:
|
||||
if (pPlayer->ammo_amount[pPlayer->curr_weapon] > 0)
|
||||
{
|
||||
(*weaponFrame) = 1;
|
||||
|
@ -4052,7 +4060,7 @@ static void P_ProcessWeapon(int playerNum)
|
|||
}
|
||||
break;
|
||||
|
||||
case DEVISTATOR_WEAPON__STATIC:
|
||||
case DEVISTATOR_WEAPON:
|
||||
if (pPlayer->ammo_amount[pPlayer->curr_weapon] > 0)
|
||||
{
|
||||
(*weaponFrame) = 1;
|
||||
|
@ -4062,7 +4070,7 @@ static void P_ProcessWeapon(int playerNum)
|
|||
}
|
||||
break;
|
||||
|
||||
case KNEE_WEAPON__STATIC:
|
||||
case KNEE_WEAPON:
|
||||
if (pPlayer->quick_kick == 0)
|
||||
{
|
||||
(*weaponFrame) = 1;
|
||||
|
|
|
@ -131,7 +131,7 @@ typedef struct {
|
|||
uint8_t extbits;
|
||||
} input_t;
|
||||
|
||||
//#pragma pack(push,1)
|
||||
#pragma pack(push,1)
|
||||
// XXX: r1625 changed a lot types here, among others
|
||||
// * int32_t --> int16_t
|
||||
// * int16_t --> int8_t
|
||||
|
@ -152,7 +152,13 @@ typedef struct {
|
|||
int32_t autostep, autostep_sbw;
|
||||
|
||||
uint32_t interface_toggle;
|
||||
#ifdef LUNATIC
|
||||
int32_t pipebombControl, pipebombLifetime, pipebombLifetimeVar;
|
||||
int32_t tripbombControl, tripbombLifetime, tripbombLifetimeVar;
|
||||
|
||||
int32_t zrange;
|
||||
int16_t angrange, autoaimang;
|
||||
#endif
|
||||
uint16_t max_actors_killed, actors_killed;
|
||||
uint16_t gotweapon, zoom;
|
||||
|
||||
|
@ -204,7 +210,16 @@ typedef struct {
|
|||
|
||||
int8_t last_used_weapon;
|
||||
|
||||
#ifdef LUNATIC
|
||||
int8_t palsfadespeed, palsfadenext, palsfadeprio, padding2_;
|
||||
|
||||
// The player index. Always valid since we have no loose DukePlayer_t's
|
||||
// anywhere (like with spritetype_t): g_player[i].ps->wa.idx == i.
|
||||
struct { int32_t idx; } wa;
|
||||
#endif
|
||||
|
||||
int8_t crouch_toggle;
|
||||
int8_t padding_[1];
|
||||
} DukePlayer_t;
|
||||
|
||||
// KEEPINSYNC lunatic/_defs_game.lua
|
||||
|
@ -224,7 +239,7 @@ typedef struct {
|
|||
char user_name[32];
|
||||
uint32_t revision;
|
||||
} playerdata_t;
|
||||
//#pragma pack(pop)
|
||||
#pragma pack(pop)
|
||||
|
||||
// KEEPINSYNC lunatic/con_lang.lua
|
||||
typedef struct
|
||||
|
@ -277,11 +292,7 @@ extern intptr_t *aplWeaponSelectSound[MAX_WEAPONS]; // Sound for wea
|
|||
extern intptr_t *aplWeaponFlashColor[MAX_WEAPONS]; // Color for polymer muzzle flash
|
||||
#endif
|
||||
|
||||
// is referenced by shared code so it needs to be in the shared namespace.
|
||||
END_DUKE_NS
|
||||
BEGIN_DUKERR_NS
|
||||
struct projectile_t
|
||||
{
|
||||
typedef struct {
|
||||
int32_t workslike, cstat; // 8b
|
||||
int32_t hitradius, range, flashcolor; // 12b
|
||||
int16_t spawns, sound, isound, vel; // 8b
|
||||
|
@ -295,10 +306,7 @@ struct projectile_t
|
|||
uint8_t clipdist; // 1b
|
||||
int8_t filler[2]; // 2b
|
||||
int32_t userdata; // 4b
|
||||
};
|
||||
|
||||
END_DUKERR_NS
|
||||
BEGIN_DUKE_NS
|
||||
} projectile_t;
|
||||
|
||||
// KEEPINSYNC lunatic/_defs_game.lua
|
||||
typedef struct {
|
||||
|
@ -311,6 +319,7 @@ typedef struct {
|
|||
extern input_t inputfifo[MOVEFIFOSIZ][MAXPLAYERS];
|
||||
extern playerspawn_t g_playerSpawnPoints[MAXPLAYERS];
|
||||
extern playerdata_t *const g_player;
|
||||
extern int16_t WeaponPickupSprites[MAX_WEAPONS];
|
||||
extern hudweapon_t hudweap;
|
||||
extern int32_t g_levelTextTime;
|
||||
extern int32_t g_numObituaries;
|
||||
|
|
|
@ -37,8 +37,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
|
||||
BEGIN_DUKE_NS
|
||||
|
||||
extern void G_SetupGlobalPsky(void);
|
||||
|
||||
static uint8_t precachehightile[2][(MAXTILES+7)>>3];
|
||||
static int32_t g_precacheCount;
|
||||
|
||||
|
|
|
@ -2793,9 +2793,9 @@ CHECKINV1:
|
|||
{
|
||||
// this accounts for the expander when handling next/previous
|
||||
|
||||
switch (DYNAMICWEAPONMAP(currentWeapon))
|
||||
switch (currentWeapon)
|
||||
{
|
||||
case DEVISTATOR_WEAPON__STATIC:
|
||||
case DEVISTATOR_WEAPON:
|
||||
if ((int32_t) weaponNum == -1)
|
||||
{
|
||||
if (PLUTOPAK)
|
||||
|
@ -2807,11 +2807,11 @@ CHECKINV1:
|
|||
currentWeapon++;
|
||||
break;
|
||||
|
||||
case GROW_WEAPON__STATIC:
|
||||
case GROW_WEAPON:
|
||||
currentWeapon = ((int32_t) weaponNum == -1) ? SHRINKER_WEAPON : DEVISTATOR_WEAPON;
|
||||
break;
|
||||
|
||||
case SHRINKER_WEAPON__STATIC:
|
||||
case SHRINKER_WEAPON:
|
||||
if ((int32_t)weaponNum == 1)
|
||||
{
|
||||
if (PLUTOPAK)
|
||||
|
@ -2823,7 +2823,7 @@ CHECKINV1:
|
|||
currentWeapon--;
|
||||
break;
|
||||
|
||||
case HANDREMOTE_WEAPON__STATIC:
|
||||
case HANDREMOTE_WEAPON:
|
||||
i = currentWeapon = HANDBOMB_WEAPON;
|
||||
fallthrough__;
|
||||
default:
|
||||
|
@ -2857,12 +2857,12 @@ CHECKINV1:
|
|||
if (weaponNum >= 12) // alt weapon, last used weapon
|
||||
{
|
||||
uint32_t const weaponNumSwitch = weaponNum == 13 ? pPlayer->last_used_weapon : pPlayer->curr_weapon;
|
||||
switch (DYNAMICWEAPONMAP(weaponNumSwitch))
|
||||
switch (weaponNumSwitch)
|
||||
{
|
||||
case HANDREMOTE_WEAPON__STATIC:
|
||||
case HANDREMOTE_WEAPON:
|
||||
weaponNum = HANDBOMB_WEAPON;
|
||||
break;
|
||||
case GROW_WEAPON__STATIC:
|
||||
case GROW_WEAPON:
|
||||
weaponNum = SHRINKER_WEAPON;
|
||||
break;
|
||||
default:
|
||||
|
@ -2918,28 +2918,28 @@ CHECKINV1:
|
|||
pPlayer->weapon_pos = WEAPON_POS_LOWER;
|
||||
}
|
||||
else if ((uint32_t)weaponNum < MAX_WEAPONS && (pPlayer->gotweapon & (1<<weaponNum)) && (uint32_t)pPlayer->curr_weapon != weaponNum)
|
||||
switch (DYNAMICWEAPONMAP(weaponNum))
|
||||
switch (weaponNum)
|
||||
{
|
||||
case PISTOL_WEAPON__STATIC:
|
||||
case SHOTGUN_WEAPON__STATIC:
|
||||
case CHAINGUN_WEAPON__STATIC:
|
||||
case RPG_WEAPON__STATIC:
|
||||
case DEVISTATOR_WEAPON__STATIC:
|
||||
case FREEZE_WEAPON__STATIC:
|
||||
case GROW_WEAPON__STATIC:
|
||||
case SHRINKER_WEAPON__STATIC:
|
||||
case PISTOL_WEAPON:
|
||||
case SHOTGUN_WEAPON:
|
||||
case CHAINGUN_WEAPON:
|
||||
case RPG_WEAPON:
|
||||
case DEVISTATOR_WEAPON:
|
||||
case FREEZE_WEAPON:
|
||||
case GROW_WEAPON:
|
||||
case SHRINKER_WEAPON:
|
||||
if (pPlayer->ammo_amount[weaponNum] == 0 && pPlayer->show_empty_weapon == 0)
|
||||
{
|
||||
pPlayer->last_full_weapon = pPlayer->curr_weapon;
|
||||
pPlayer->show_empty_weapon = 32;
|
||||
}
|
||||
fallthrough__;
|
||||
case KNEE_WEAPON__STATIC:
|
||||
case HANDREMOTE_WEAPON__STATIC:
|
||||
case KNEE_WEAPON:
|
||||
case HANDREMOTE_WEAPON:
|
||||
P_AddWeapon(pPlayer, weaponNum, 1);
|
||||
break;
|
||||
case HANDBOMB_WEAPON__STATIC:
|
||||
case TRIPBOMB_WEAPON__STATIC:
|
||||
case HANDBOMB_WEAPON:
|
||||
case TRIPBOMB_WEAPON:
|
||||
if (pPlayer->ammo_amount[weaponNum] > 0 && (pPlayer->gotweapon & (1<<weaponNum)))
|
||||
P_AddWeapon(pPlayer, weaponNum, 1);
|
||||
break;
|
||||
|
|
|
@ -25,8 +25,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
|
||||
#include "actors.h" // actor_t
|
||||
#include "gamevars.h"
|
||||
#include "dukerr/macros.h"
|
||||
#include "dukerr/namesdyn.h" // for G_GetForcefieldPicnum()
|
||||
#include "macros.h"
|
||||
#include "namesdyn.h" // for G_GetForcefieldPicnum()
|
||||
#include "player.h" // playerspawn_t
|
||||
|
||||
BEGIN_DUKE_NS
|
||||
|
|
418
source/duke3d/src/soundefs.h
Normal file
418
source/duke3d/src/soundefs.h
Normal file
|
@ -0,0 +1,418 @@
|
|||
//-------------------------------------------------------------------------
|
||||
/*
|
||||
Copyright (C) 2010 EDuke32 developers and contributors
|
||||
|
||||
This file is part of EDuke32.
|
||||
|
||||
EDuke32 is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License version 2
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
#define KICK_HIT 0
|
||||
#define PISTOL_RICOCHET 1
|
||||
#define PISTOL_BODYHIT 2
|
||||
#define PISTOL_FIRE 3
|
||||
#define EJECT_CLIP 4
|
||||
#define INSERT_CLIP 5
|
||||
#define CHAINGUN_FIRE 6
|
||||
#define RPG_SHOOT 7
|
||||
#define POOLBALLHIT 8
|
||||
#define RPG_EXPLODE 9
|
||||
#define CAT_FIRE 10
|
||||
#define SHRINKER_FIRE 11
|
||||
#define ACTOR_SHRINKING 12
|
||||
#define PIPEBOMB_BOUNCE 13
|
||||
#define PIPEBOMB_EXPLODE 14
|
||||
#define LASERTRIP_ONWALL 15
|
||||
#define LASERTRIP_ARMING 16
|
||||
#define LASERTRIP_EXPLODE 17
|
||||
#define VENT_BUST 18
|
||||
#define GLASS_BREAKING 19
|
||||
#define GLASS_HEAVYBREAK 20
|
||||
#define SHORT_CIRCUIT 21
|
||||
#define ITEM_SPLASH 22
|
||||
#define DUKE_BREATHING 23
|
||||
#define DUKE_EXHALING 24
|
||||
#define DUKE_GASP 25
|
||||
#define SLIM_RECOG 26
|
||||
// #define ENDSEQVOL3SND1 27
|
||||
#define DUKE_URINATE 28
|
||||
#define ENDSEQVOL3SND2 29
|
||||
#define ENDSEQVOL3SND3 30
|
||||
#define DUKE_PASSWIND 32
|
||||
#define DUKE_CRACK 33
|
||||
#define SLIM_ATTACK 34
|
||||
#define SOMETHINGHITFORCE 35
|
||||
#define DUKE_DRINKING 36
|
||||
#define DUKE_KILLED1 37
|
||||
#define DUKE_GRUNT 38
|
||||
#define DUKE_HARTBEAT 39
|
||||
#define DUKE_ONWATER 40
|
||||
#define DUKE_DEAD 41
|
||||
#define DUKE_LAND 42
|
||||
#define DUKE_WALKINDUCTS 43
|
||||
#define DUKE_GLAD 44
|
||||
#define DUKE_YES 45
|
||||
#define DUKE_HEHE 46
|
||||
#define DUKE_SHUCKS 47
|
||||
#define DUKE_UNDERWATER 48
|
||||
#define DUKE_JETPACK_ON 49
|
||||
#define DUKE_JETPACK_IDLE 50
|
||||
#define DUKE_JETPACK_OFF 51
|
||||
#define LIZTROOP_GROWL 52
|
||||
#define LIZTROOP_TALK1 53
|
||||
#define LIZTROOP_TALK2 54
|
||||
#define LIZTROOP_TALK3 55
|
||||
#define DUKETALKTOBOSS 56
|
||||
#define LIZCAPT_GROWL 57
|
||||
#define LIZCAPT_TALK1 58
|
||||
#define LIZCAPT_TALK2 59
|
||||
#define LIZCAPT_TALK3 60
|
||||
#define LIZARD_BEG 61
|
||||
#define LIZARD_PAIN 62
|
||||
#define LIZARD_DEATH 63
|
||||
#define LIZARD_SPIT 64
|
||||
#define DRONE1_HISSRATTLE 65
|
||||
#define DRONE1_HISSSCREECH 66
|
||||
#define DUKE_TIP2 67
|
||||
#define FLESH_BURNING 68
|
||||
#define SQUISHED 69
|
||||
#define TELEPORTER 70
|
||||
#define ELEVATOR_ON 71
|
||||
#define DUKE_KILLED3 72
|
||||
#define ELEVATOR_OFF 73
|
||||
#define DOOR_OPERATE1 74
|
||||
#define SUBWAY 75
|
||||
#define SWITCH_ON 76
|
||||
#define FAN 77
|
||||
#define DUKE_GETWEAPON3 78
|
||||
#define FLUSH_TOILET 79
|
||||
#define HOVER_CRAFT 80
|
||||
#define EARTHQUAKE 81
|
||||
#define INTRUDER_ALERT 82
|
||||
#define END_OF_LEVEL_WARN 83
|
||||
#define ENGINE_OPERATING 84
|
||||
#define REACTOR_ON 85
|
||||
#define COMPUTER_AMBIENCE 86
|
||||
#define GEARS_GRINDING 87
|
||||
#define BUBBLE_AMBIENCE 88
|
||||
#define MACHINE_AMBIENCE 89
|
||||
#define SEWER_AMBIENCE 90
|
||||
#define WIND_AMBIENCE 91
|
||||
#define SOMETHING_DRIPPING 92
|
||||
#define STEAM_HISSING 93
|
||||
#define THEATER_BREATH 94
|
||||
#define BAR_MUSIC 95
|
||||
#define BOS1_ROAM 96
|
||||
#define BOS1_RECOG 97
|
||||
#define BOS1_ATTACK1 98
|
||||
#define BOS1_PAIN 99
|
||||
#define BOS1_DYING 100
|
||||
#define BOS2_ROAM 101
|
||||
#define BOS2_RECOG 102
|
||||
#define BOS2_ATTACK 103
|
||||
#define BOS2_PAIN 104
|
||||
#define BOS2_DYING 105
|
||||
#define GETATOMICHEALTH 106
|
||||
#define DUKE_GETWEAPON2 107
|
||||
#define BOS3_DYING 108
|
||||
#define SHOTGUN_FIRE 109
|
||||
#define PRED_ROAM 110
|
||||
#define PRED_RECOG 111
|
||||
#define PRED_ATTACK 112
|
||||
#define PRED_PAIN 113
|
||||
#define PRED_DYING 114
|
||||
#define CAPT_ROAM 115
|
||||
#define CAPT_ATTACK 116
|
||||
#define CAPT_RECOG 117
|
||||
#define CAPT_PAIN 118
|
||||
#define CAPT_DYING 119
|
||||
#define PIG_ROAM 120
|
||||
#define PIG_RECOG 121
|
||||
#define PIG_ATTACK 122
|
||||
#define PIG_PAIN 123
|
||||
#define PIG_DYING 124
|
||||
#define RECO_ROAM 125
|
||||
#define RECO_RECOG 126
|
||||
#define RECO_ATTACK 127
|
||||
#define RECO_PAIN 128
|
||||
#define RECO_DYING 129
|
||||
#define DRON_ROAM 130
|
||||
#define DRON_RECOG 131
|
||||
#define DRON_ATTACK1 132
|
||||
#define DRON_PAIN 133
|
||||
#define DRON_DYING 134
|
||||
#define COMM_ROAM 135
|
||||
#define COMM_RECOG 136
|
||||
#define COMM_ATTACK 137
|
||||
#define COMM_PAIN 138
|
||||
#define COMM_DYING 139
|
||||
#define OCTA_ROAM 140
|
||||
#define OCTA_RECOG 141
|
||||
#define OCTA_ATTACK1 142
|
||||
#define OCTA_PAIN 143
|
||||
#define OCTA_DYING 144
|
||||
#define TURR_ROAM 145
|
||||
#define TURR_RECOG 146
|
||||
#define TURR_ATTACK 147
|
||||
#define DUMPSTER_MOVE 148
|
||||
#define SLIM_DYING 149
|
||||
#define BOS3_ROAM 150
|
||||
#define BOS3_RECOG 151
|
||||
#define BOS3_ATTACK1 152
|
||||
#define BOS3_PAIN 153
|
||||
#define BOS1_ATTACK2 154
|
||||
#define COMM_SPIN 155
|
||||
#define BOS1_WALK 156
|
||||
#define DRON_ATTACK2 157
|
||||
#define THUD 158
|
||||
#define OCTA_ATTACK2 159
|
||||
#define WIERDSHOT_FLY 160
|
||||
#define TURR_PAIN 161
|
||||
#define TURR_DYING 162
|
||||
#define SLIM_ROAM 163
|
||||
#define LADY_SCREAM 164
|
||||
#define DOOR_OPERATE2 165
|
||||
#define DOOR_OPERATE3 166
|
||||
#define DOOR_OPERATE4 167
|
||||
#define BORNTOBEWILDSND 168
|
||||
#define SHOTGUN_COCK 169
|
||||
#define GENERIC_AMBIENCE1 170
|
||||
#define GENERIC_AMBIENCE2 171
|
||||
#define GENERIC_AMBIENCE3 172
|
||||
#define GENERIC_AMBIENCE4 173
|
||||
#define GENERIC_AMBIENCE5 174
|
||||
#define GENERIC_AMBIENCE6 175
|
||||
#define BOS3_ATTACK2 176
|
||||
#define GENERIC_AMBIENCE17 177
|
||||
#define GENERIC_AMBIENCE18 178
|
||||
#define GENERIC_AMBIENCE19 179
|
||||
#define GENERIC_AMBIENCE20 180
|
||||
#define GENERIC_AMBIENCE21 181
|
||||
#define GENERIC_AMBIENCE22 182
|
||||
#define SECRETLEVELSND 183
|
||||
#define GENERIC_AMBIENCE8 184
|
||||
#define GENERIC_AMBIENCE9 185
|
||||
#define GENERIC_AMBIENCE10 186
|
||||
#define GENERIC_AMBIENCE11 187
|
||||
#define GENERIC_AMBIENCE12 188
|
||||
#define GENERIC_AMBIENCE13 189
|
||||
#define GENERIC_AMBIENCE14 190
|
||||
#define GENERIC_AMBIENCE15 192
|
||||
#define GENERIC_AMBIENCE16 193
|
||||
#define FIRE_CRACKLE 194
|
||||
#define BONUS_SPEECH1 195
|
||||
#define BONUS_SPEECH2 196
|
||||
#define BONUS_SPEECH3 197
|
||||
#define PIG_CAPTURE_DUKE 198
|
||||
#define BONUS_SPEECH4 199
|
||||
#define DUKE_LAND_HURT 200
|
||||
#define DUKE_HIT_STRIPPER1 201
|
||||
#define DUKE_TIP1 202
|
||||
#define DUKE_KILLED2 203
|
||||
#define PRED_ROAM2 204
|
||||
#define PIG_ROAM2 205
|
||||
#define DUKE_GETWEAPON1 206
|
||||
#define DUKE_SEARCH2 207
|
||||
#define DUKE_CRACK2 208
|
||||
#define DUKE_SEARCH 209
|
||||
#define DUKE_GET 210
|
||||
#define DUKE_LONGTERM_PAIN 211
|
||||
#define MONITOR_ACTIVE 212
|
||||
#define NITEVISION_ONOFF 213
|
||||
#define DUKE_HIT_STRIPPER2 214
|
||||
#define DUKE_CRACK_FIRST 215
|
||||
#define DUKE_USEMEDKIT 216
|
||||
#define DUKE_TAKEPILLS 217
|
||||
#define DUKE_PISSRELIEF 218
|
||||
#define SELECT_WEAPON 219
|
||||
#define WATER_GURGLE 220
|
||||
#define DUKE_GETWEAPON4 221
|
||||
#define JIBBED_ACTOR1 222
|
||||
#define JIBBED_ACTOR2 223
|
||||
#define JIBBED_ACTOR3 224
|
||||
#define JIBBED_ACTOR4 225
|
||||
#define JIBBED_ACTOR5 226
|
||||
#define JIBBED_ACTOR6 227
|
||||
#define JIBBED_ACTOR7 228
|
||||
#define DUKE_GOTHEALTHATLOW 229
|
||||
#define BOSSTALKTODUKE 230
|
||||
#define WAR_AMBIENCE1 231
|
||||
#define WAR_AMBIENCE2 232
|
||||
#define WAR_AMBIENCE3 233
|
||||
#define WAR_AMBIENCE4 234
|
||||
#define WAR_AMBIENCE5 235
|
||||
#define WAR_AMBIENCE6 236
|
||||
#define WAR_AMBIENCE7 237
|
||||
#define WAR_AMBIENCE8 238
|
||||
#define WAR_AMBIENCE9 239
|
||||
#define WAR_AMBIENCE10 240
|
||||
#define ALIEN_TALK1 241
|
||||
#define ALIEN_TALK2 242
|
||||
#define EXITMENUSOUND 243
|
||||
#define FLY_BY 244
|
||||
#define DUKE_SCREAM 245
|
||||
#define SHRINKER_HIT 246
|
||||
#define RATTY 247
|
||||
#define INTO_MENU 248
|
||||
#define BONUSMUSIC 249
|
||||
#define DUKE_BOOBY 250
|
||||
#define DUKE_TALKTOBOSSFALL 251
|
||||
#define DUKE_LOOKINTOMIRROR 252
|
||||
#define PIG_ROAM3 253
|
||||
#define KILLME 254
|
||||
#define DRON_JETSND 255
|
||||
#define SPACE_DOOR1 256
|
||||
#define SPACE_DOOR2 257
|
||||
#define SPACE_DOOR3 258
|
||||
#define SPACE_DOOR4 259
|
||||
#define SPACE_DOOR5 260
|
||||
#define ALIEN_ELEVATOR1 261
|
||||
#define VAULT_DOOR 262
|
||||
#define JIBBED_ACTOR13 263
|
||||
#define DUKE_GETWEAPON6 264
|
||||
#define JIBBED_ACTOR8 265
|
||||
#define JIBBED_ACTOR9 266
|
||||
#define JIBBED_ACTOR10 267
|
||||
#define JIBBED_ACTOR11 268
|
||||
#define JIBBED_ACTOR12 269
|
||||
#define DUKE_KILLED4 270
|
||||
#define DUKE_KILLED5 271
|
||||
#define ALIEN_SWITCH1 272
|
||||
#define DUKE_STEPONFECES 273
|
||||
#define DUKE_LONGTERM_PAIN2 274
|
||||
#define DUKE_LONGTERM_PAIN3 275
|
||||
#define DUKE_LONGTERM_PAIN4 276
|
||||
#define COMPANB2 277
|
||||
#define KTIT 278
|
||||
#define HELICOP_IDLE 279
|
||||
#define STEPNIT 280
|
||||
#define SPACE_AMBIENCE1 281
|
||||
#define SPACE_AMBIENCE2 282
|
||||
#define SLIM_HATCH 283
|
||||
#define RIPHEADNECK 284
|
||||
#define FOUNDJONES 285
|
||||
#define ALIEN_DOOR1 286
|
||||
#define ALIEN_DOOR2 287
|
||||
#define ENDSEQVOL3SND4 288
|
||||
#define ENDSEQVOL3SND5 289
|
||||
#define ENDSEQVOL3SND6 290
|
||||
#define ENDSEQVOL3SND7 291
|
||||
#define ENDSEQVOL3SND8 292
|
||||
#define ENDSEQVOL3SND9 293
|
||||
#define WHIPYOURASS 294
|
||||
#define ENDSEQVOL2SND1 295
|
||||
#define ENDSEQVOL2SND2 296
|
||||
#define ENDSEQVOL2SND3 297
|
||||
#define ENDSEQVOL2SND4 298
|
||||
#define ENDSEQVOL2SND5 299
|
||||
#define ENDSEQVOL2SND6 300
|
||||
#define ENDSEQVOL2SND7 301
|
||||
#define GENERIC_AMBIENCE23 302
|
||||
#define SOMETHINGFROZE 303
|
||||
#define DUKE_LONGTERM_PAIN5 304
|
||||
#define DUKE_LONGTERM_PAIN6 305
|
||||
#define DUKE_LONGTERM_PAIN7 306
|
||||
#define DUKE_LONGTERM_PAIN8 307
|
||||
#define WIND_REPEAT 308
|
||||
#define MYENEMY_ROAM 309
|
||||
#define MYENEMY_HURT 310
|
||||
#define MYENEMY_DEAD 311
|
||||
#define MYENEMY_SHOOT 312
|
||||
#define STORE_MUSIC 313
|
||||
#define STORE_MUSIC_BROKE 314
|
||||
#define ACTOR_GROWING 315
|
||||
#define NEWBEAST_ROAM 316
|
||||
#define NEWBEAST_RECOG 317
|
||||
#define NEWBEAST_ATTACK 318
|
||||
#define NEWBEAST_PAIN 319
|
||||
#define NEWBEAST_DYING 320
|
||||
#define NEWBEAST_SPIT 321
|
||||
#define VOL4_1 322
|
||||
#define SUPERMARKET 323
|
||||
#define MOUSEANNOY 324
|
||||
#define BOOKEM 325
|
||||
#define SUPERMARKETCRY 326
|
||||
#define DESTRUCT 327
|
||||
#define EATFOOD 328
|
||||
#define MAKEMYDAY 329
|
||||
#define WITNESSSTAND 330
|
||||
#define VACATIONSPEECH 331
|
||||
#define YIPPEE1 332
|
||||
#define YOHOO1 333
|
||||
#define YOHOO2 334
|
||||
#define DOLPHINSND 335
|
||||
#define TOUGHGALSND1 336
|
||||
#define TOUGHGALSND2 337
|
||||
#define TOUGHGALSND3 338
|
||||
#define TOUGHGALSND4 339
|
||||
#define TANK_ROAM 340
|
||||
#define BOS4_ROAM 341
|
||||
#define BOS4_RECOG 342
|
||||
#define BOS4_ATTACK 343
|
||||
#define BOS4_PAIN 344
|
||||
#define BOS4_DYING 345
|
||||
#define NEWBEAST_ATTACKMISS 346
|
||||
#define VOL4_2 347
|
||||
#define COOKINGDEEPFRIER 348
|
||||
#define WHINING_DOG 349
|
||||
#define DEAD_DOG 350
|
||||
#define LIGHTNING_SLAP 351
|
||||
#define THUNDER 352
|
||||
#define HAPPYMOUSESND1 353
|
||||
#define HAPPYMOUSESND2 354
|
||||
#define HAPPYMOUSESND3 355
|
||||
#define HAPPYMOUSESND4 356
|
||||
#define ALARM 357
|
||||
#define RAIN 358
|
||||
#define DTAG_GREENRUN 359
|
||||
#define DTAG_BROWNRUN 360
|
||||
#define DTAG_GREENSCORE 361
|
||||
#define DTAG_BROWNSCORE 362
|
||||
#define INTRO4_1 363
|
||||
#define INTRO4_2 364
|
||||
#define INTRO4_3 365
|
||||
#define INTRO4_4 366
|
||||
#define INTRO4_5 367
|
||||
#define INTRO4_6 368
|
||||
#define SCREECH 369
|
||||
#define BOSS4_DEADSPEECH 370
|
||||
#define BOSS4_FIRSTSEE 371
|
||||
#define PARTY_SPEECH 372
|
||||
#define POSTAL_SPEECH 373
|
||||
#define TGSPEECH 374
|
||||
#define DOGROOMSPEECH 375
|
||||
#define SMACKED 376
|
||||
#define MDEVSPEECH 377
|
||||
#define AREA51SPEECH 378
|
||||
#define JEEPSOUND 379
|
||||
#define BIGDOORSLAM 380
|
||||
#define BOS4_LAY 381
|
||||
#define WAVESOUND 382
|
||||
#define ILLBEBACK 383
|
||||
#define VOL4ENDSND1 384
|
||||
#define VOL4ENDSND2 385
|
||||
#define EXPANDERHIT 386
|
||||
#define SNAKESPEECH 387
|
||||
#define EXPANDERSHOOT 388
|
||||
#define GETBACKTOWORK 389
|
||||
#define JIBBED_ACTOR14 390
|
||||
#define JIBBED_ACTOR15 391
|
||||
#define INTRO4_B 392
|
||||
#define BIGBANG 393
|
||||
#define HORNSND 394
|
||||
#define BELLSND 395
|
||||
#define GOAWAY 396
|
||||
#define JOKE 397
|
|
@ -29,13 +29,14 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#ifndef sounds_public_h_
|
||||
#define sounds_public_h_
|
||||
|
||||
#include "dukerr/sounds_common.h"
|
||||
#include "sounds_common.h"
|
||||
#include "sound/s_soundinternal.h"
|
||||
#include "z_music.h"
|
||||
|
||||
BEGIN_DUKE_NS
|
||||
|
||||
// KEEPINSYNC lunatic/con_lang.lua
|
||||
#define MAXSOUNDS 4096
|
||||
#define LOUDESTVOLUME 111
|
||||
|
||||
enum esound_t
|
||||
|
|
383
source/duke3d/src/soundsdyn.cpp
Normal file
383
source/duke3d/src/soundsdyn.cpp
Normal file
|
@ -0,0 +1,383 @@
|
|||
//-------------------------------------------------------------------------
|
||||
/*
|
||||
Copyright (C) 2013 EDuke32 developers and contributors
|
||||
|
||||
This file is part of EDuke32.
|
||||
|
||||
EDuke32 is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License version 2
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
#include "ns.h" // Must come before everything else!
|
||||
|
||||
#include "compat.h"
|
||||
#include "build.h"
|
||||
|
||||
#include "namesdyn.h"
|
||||
#include "sounds.h"
|
||||
#include "soundsdyn.h"
|
||||
#include "global.h"
|
||||
|
||||
BEGIN_DUKE_NS
|
||||
|
||||
#ifdef DYNSOUNDREMAP_ENABLE
|
||||
# define DVPTR(x) &x
|
||||
#else
|
||||
# define DVPTR(x) NULL
|
||||
#endif
|
||||
|
||||
int16_t DynamicSoundMap[MAXSOUNDS];
|
||||
|
||||
struct dynitem
|
||||
{
|
||||
const char *str;
|
||||
int32_t *dynvalptr;
|
||||
const int16_t staticval;
|
||||
};
|
||||
|
||||
LUNATIC_EXTERN struct dynitem g_dynSoundList[] =
|
||||
{
|
||||
{ "ALIEN_SWITCH1", DVPTR(ALIEN_SWITCH1), ALIEN_SWITCH1__STATIC },
|
||||
{ "BIGBANG", DVPTR(BIGBANG), BIGBANG__STATIC },
|
||||
{ "BONUS_SPEECH1", DVPTR(BONUS_SPEECH1), BONUS_SPEECH1__STATIC },
|
||||
{ "BONUS_SPEECH2", DVPTR(BONUS_SPEECH2), BONUS_SPEECH2__STATIC },
|
||||
{ "BONUS_SPEECH3", DVPTR(BONUS_SPEECH3), BONUS_SPEECH3__STATIC },
|
||||
{ "BONUS_SPEECH4", DVPTR(BONUS_SPEECH4), BONUS_SPEECH4__STATIC },
|
||||
{ "BONUSMUSIC", DVPTR(BONUSMUSIC), BONUSMUSIC__STATIC },
|
||||
{ "BOS1_RECOG", DVPTR(BOS1_RECOG), BOS1_RECOG__STATIC },
|
||||
{ "BOS1_WALK", DVPTR(BOS1_WALK), BOS1_WALK__STATIC },
|
||||
{ "BOS2_RECOG", DVPTR(BOS2_RECOG), BOS2_RECOG__STATIC },
|
||||
{ "BOS3_RECOG", DVPTR(BOS3_RECOG), BOS3_RECOG__STATIC },
|
||||
{ "BOS4_RECOG", DVPTR(BOS4_RECOG), BOS4_RECOG__STATIC },
|
||||
{ "BOSS4_DEADSPEECH", DVPTR(BOSS4_DEADSPEECH), BOSS4_DEADSPEECH__STATIC },
|
||||
{ "BOSS4_FIRSTSEE", DVPTR(BOSS4_FIRSTSEE), BOSS4_FIRSTSEE__STATIC },
|
||||
{ "BOSSTALKTODUKE", DVPTR(BOSSTALKTODUKE), BOSSTALKTODUKE__STATIC },
|
||||
{ "CAPT_RECOG", DVPTR(CAPT_RECOG), CAPT_RECOG__STATIC },
|
||||
{ "CAT_FIRE", DVPTR(CAT_FIRE), CAT_FIRE__STATIC },
|
||||
{ "CHAINGUN_FIRE", DVPTR(CHAINGUN_FIRE), CHAINGUN_FIRE__STATIC },
|
||||
{ "COMM_RECOG", DVPTR(COMM_RECOG), COMM_RECOG__STATIC },
|
||||
{ "DRON_RECOG", DVPTR(DRON_RECOG), DRON_RECOG__STATIC },
|
||||
{ "DUKE_CRACK", DVPTR(DUKE_CRACK), DUKE_CRACK__STATIC },
|
||||
{ "DUKE_CRACK_FIRST", DVPTR(DUKE_CRACK_FIRST), DUKE_CRACK_FIRST__STATIC },
|
||||
{ "DUKE_CRACK2", DVPTR(DUKE_CRACK2), DUKE_CRACK2__STATIC },
|
||||
{ "DUKE_DRINKING", DVPTR(DUKE_DRINKING), DUKE_DRINKING__STATIC },
|
||||
{ "DUKE_GASP", DVPTR(DUKE_GASP), DUKE_GASP__STATIC },
|
||||
{ "DUKE_GET", DVPTR(DUKE_GET), DUKE_GET__STATIC },
|
||||
{ "DUKE_GETWEAPON2", DVPTR(DUKE_GETWEAPON2), DUKE_GETWEAPON2__STATIC },
|
||||
{ "DUKE_GETWEAPON6", DVPTR(DUKE_GETWEAPON6), DUKE_GETWEAPON6__STATIC },
|
||||
{ "DUKE_GOTHEALTHATLOW", DVPTR(DUKE_GOTHEALTHATLOW), DUKE_GOTHEALTHATLOW__STATIC },
|
||||
{ "DUKE_GRUNT", DVPTR(DUKE_GRUNT), DUKE_GRUNT__STATIC },
|
||||
{ "DUKE_HARTBEAT", DVPTR(DUKE_HARTBEAT), DUKE_HARTBEAT__STATIC },
|
||||
{ "DUKE_JETPACK_IDLE", DVPTR(DUKE_JETPACK_IDLE), DUKE_JETPACK_IDLE__STATIC },
|
||||
{ "DUKE_JETPACK_OFF", DVPTR(DUKE_JETPACK_OFF), DUKE_JETPACK_OFF__STATIC },
|
||||
{ "DUKE_JETPACK_ON", DVPTR(DUKE_JETPACK_ON), DUKE_JETPACK_ON__STATIC },
|
||||
{ "DUKE_LAND", DVPTR(DUKE_LAND), DUKE_LAND__STATIC },
|
||||
{ "DUKE_LAND_HURT", DVPTR(DUKE_LAND_HURT), DUKE_LAND_HURT__STATIC },
|
||||
{ "DUKE_LONGTERM_PAIN", DVPTR(DUKE_LONGTERM_PAIN), DUKE_LONGTERM_PAIN__STATIC },
|
||||
{ "DUKE_ONWATER", DVPTR(DUKE_ONWATER), DUKE_ONWATER__STATIC },
|
||||
{ "DUKE_PISSRELIEF", DVPTR(DUKE_PISSRELIEF), DUKE_PISSRELIEF__STATIC },
|
||||
{ "DUKE_SCREAM", DVPTR(DUKE_SCREAM), DUKE_SCREAM__STATIC },
|
||||
{ "DUKE_SEARCH", DVPTR(DUKE_SEARCH), DUKE_SEARCH__STATIC },
|
||||
{ "DUKE_SEARCH2", DVPTR(DUKE_SEARCH2), DUKE_SEARCH2__STATIC },
|
||||
{ "DUKE_TAKEPILLS", DVPTR(DUKE_TAKEPILLS), DUKE_TAKEPILLS__STATIC },
|
||||
{ "DUKE_UNDERWATER", DVPTR(DUKE_UNDERWATER), DUKE_UNDERWATER__STATIC },
|
||||
{ "DUKE_URINATE", DVPTR(DUKE_URINATE), DUKE_URINATE__STATIC },
|
||||
{ "DUKE_USEMEDKIT", DVPTR(DUKE_USEMEDKIT), DUKE_USEMEDKIT__STATIC },
|
||||
{ "DUKE_WALKINDUCTS", DVPTR(DUKE_WALKINDUCTS), DUKE_WALKINDUCTS__STATIC },
|
||||
{ "DUKETALKTOBOSS", DVPTR(DUKETALKTOBOSS), DUKETALKTOBOSS__STATIC },
|
||||
{ "EARTHQUAKE", DVPTR(EARTHQUAKE), EARTHQUAKE__STATIC },
|
||||
{ "EJECT_CLIP", DVPTR(EJECT_CLIP), EJECT_CLIP__STATIC },
|
||||
{ "ELEVATOR_OFF", DVPTR(ELEVATOR_OFF), ELEVATOR_OFF__STATIC },
|
||||
{ "ELEVATOR_ON", DVPTR(ELEVATOR_ON), ELEVATOR_ON__STATIC },
|
||||
{ "END_OF_LEVEL_WARN", DVPTR(END_OF_LEVEL_WARN), END_OF_LEVEL_WARN__STATIC },
|
||||
{ "ENDSEQVOL2SND1", DVPTR(ENDSEQVOL2SND1), ENDSEQVOL2SND1__STATIC },
|
||||
{ "ENDSEQVOL2SND2", DVPTR(ENDSEQVOL2SND2), ENDSEQVOL2SND2__STATIC },
|
||||
{ "ENDSEQVOL2SND3", DVPTR(ENDSEQVOL2SND3), ENDSEQVOL2SND3__STATIC },
|
||||
{ "ENDSEQVOL2SND4", DVPTR(ENDSEQVOL2SND4), ENDSEQVOL2SND4__STATIC },
|
||||
{ "ENDSEQVOL2SND5", DVPTR(ENDSEQVOL2SND5), ENDSEQVOL2SND5__STATIC },
|
||||
{ "ENDSEQVOL2SND6", DVPTR(ENDSEQVOL2SND6), ENDSEQVOL2SND6__STATIC },
|
||||
{ "ENDSEQVOL2SND7", DVPTR(ENDSEQVOL2SND7), ENDSEQVOL2SND7__STATIC },
|
||||
{ "ENDSEQVOL3SND2", DVPTR(ENDSEQVOL3SND2), ENDSEQVOL3SND2__STATIC },
|
||||
{ "ENDSEQVOL3SND3", DVPTR(ENDSEQVOL3SND3), ENDSEQVOL3SND3__STATIC },
|
||||
{ "ENDSEQVOL3SND4", DVPTR(ENDSEQVOL3SND4), ENDSEQVOL3SND4__STATIC },
|
||||
{ "ENDSEQVOL3SND5", DVPTR(ENDSEQVOL3SND5), ENDSEQVOL3SND5__STATIC },
|
||||
{ "ENDSEQVOL3SND6", DVPTR(ENDSEQVOL3SND6), ENDSEQVOL3SND6__STATIC },
|
||||
{ "ENDSEQVOL3SND7", DVPTR(ENDSEQVOL3SND7), ENDSEQVOL3SND7__STATIC },
|
||||
{ "ENDSEQVOL3SND8", DVPTR(ENDSEQVOL3SND8), ENDSEQVOL3SND8__STATIC },
|
||||
{ "ENDSEQVOL3SND9", DVPTR(ENDSEQVOL3SND9), ENDSEQVOL3SND9__STATIC },
|
||||
{ "EXITMENUSOUND", DVPTR(EXITMENUSOUND), EXITMENUSOUND__STATIC },
|
||||
{ "EXPANDERSHOOT", DVPTR(EXPANDERSHOOT), EXPANDERSHOOT__STATIC },
|
||||
{ "FLUSH_TOILET", DVPTR(FLUSH_TOILET), FLUSH_TOILET__STATIC },
|
||||
{ "FLY_BY", DVPTR(FLY_BY), FLY_BY__STATIC },
|
||||
{ "GENERIC_AMBIENCE17", DVPTR(GENERIC_AMBIENCE17), GENERIC_AMBIENCE17__STATIC },
|
||||
{ "GLASS_BREAKING", DVPTR(GLASS_BREAKING), GLASS_BREAKING__STATIC },
|
||||
{ "GLASS_HEAVYBREAK", DVPTR(GLASS_HEAVYBREAK), GLASS_HEAVYBREAK__STATIC },
|
||||
{ "INSERT_CLIP", DVPTR(INSERT_CLIP), INSERT_CLIP__STATIC },
|
||||
{ "INTRO4_1", DVPTR(INTRO4_1), INTRO4_1__STATIC },
|
||||
{ "INTRO4_2", DVPTR(INTRO4_2), INTRO4_2__STATIC },
|
||||
{ "INTRO4_3", DVPTR(INTRO4_3), INTRO4_3__STATIC },
|
||||
{ "INTRO4_4", DVPTR(INTRO4_4), INTRO4_4__STATIC },
|
||||
{ "INTRO4_5", DVPTR(INTRO4_5), INTRO4_5__STATIC },
|
||||
{ "INTRO4_6", DVPTR(INTRO4_6), INTRO4_6__STATIC },
|
||||
{ "INTRO4_B", DVPTR(INTRO4_B), INTRO4_B__STATIC },
|
||||
{ "ITEM_SPLASH", DVPTR(ITEM_SPLASH), ITEM_SPLASH__STATIC },
|
||||
{ "JIBBED_ACTOR5", DVPTR(JIBBED_ACTOR5), JIBBED_ACTOR5__STATIC },
|
||||
{ "JIBBED_ACTOR6", DVPTR(JIBBED_ACTOR6), JIBBED_ACTOR6__STATIC },
|
||||
{ "KICK_HIT", DVPTR(KICK_HIT), KICK_HIT__STATIC },
|
||||
{ "LASERTRIP_ARMING", DVPTR(LASERTRIP_ARMING), LASERTRIP_ARMING__STATIC },
|
||||
{ "LASERTRIP_EXPLODE", DVPTR(LASERTRIP_EXPLODE), LASERTRIP_EXPLODE__STATIC },
|
||||
{ "LASERTRIP_ONWALL", DVPTR(LASERTRIP_ONWALL), LASERTRIP_ONWALL__STATIC },
|
||||
{ "LIGHTNING_SLAP", DVPTR(LIGHTNING_SLAP), LIGHTNING_SLAP__STATIC },
|
||||
{ "MONITOR_ACTIVE", DVPTR(MONITOR_ACTIVE), MONITOR_ACTIVE__STATIC },
|
||||
{ "NITEVISION_ONOFF", DVPTR(NITEVISION_ONOFF), NITEVISION_ONOFF__STATIC },
|
||||
{ "OCTA_RECOG", DVPTR(OCTA_RECOG), OCTA_RECOG__STATIC },
|
||||
{ "PIG_RECOG", DVPTR(PIG_RECOG), PIG_RECOG__STATIC },
|
||||
{ "PIPEBOMB_BOUNCE", DVPTR(PIPEBOMB_BOUNCE), PIPEBOMB_BOUNCE__STATIC },
|
||||
{ "PIPEBOMB_EXPLODE", DVPTR(PIPEBOMB_EXPLODE), PIPEBOMB_EXPLODE__STATIC },
|
||||
{ "PISTOL_BODYHIT", DVPTR(PISTOL_BODYHIT), PISTOL_BODYHIT__STATIC },
|
||||
{ "PISTOL_FIRE", DVPTR(PISTOL_FIRE), PISTOL_FIRE__STATIC },
|
||||
{ "PISTOL_RICOCHET", DVPTR(PISTOL_RICOCHET), PISTOL_RICOCHET__STATIC },
|
||||
{ "POOLBALLHIT", DVPTR(POOLBALLHIT), POOLBALLHIT__STATIC },
|
||||
{ "PRED_RECOG", DVPTR(PRED_RECOG), PRED_RECOG__STATIC },
|
||||
{ "RATTY", DVPTR(RATTY), RATTY__STATIC },
|
||||
{ "RECO_ATTACK", DVPTR(RECO_ATTACK), RECO_ATTACK__STATIC },
|
||||
{ "RECO_PAIN", DVPTR(RECO_PAIN), RECO_PAIN__STATIC },
|
||||
{ "RECO_RECOG", DVPTR(RECO_RECOG), RECO_RECOG__STATIC },
|
||||
{ "RECO_ROAM", DVPTR(RECO_ROAM), RECO_ROAM__STATIC },
|
||||
{ "RIPHEADNECK", DVPTR(RIPHEADNECK), RIPHEADNECK__STATIC },
|
||||
{ "RPG_EXPLODE", DVPTR(RPG_EXPLODE), RPG_EXPLODE__STATIC },
|
||||
{ "RPG_SHOOT", DVPTR(RPG_SHOOT), RPG_SHOOT__STATIC },
|
||||
{ "SELECT_WEAPON", DVPTR(SELECT_WEAPON), SELECT_WEAPON__STATIC },
|
||||
{ "SHORT_CIRCUIT", DVPTR(SHORT_CIRCUIT), SHORT_CIRCUIT__STATIC },
|
||||
{ "SHOTGUN_COCK", DVPTR(SHOTGUN_COCK), SHOTGUN_COCK__STATIC },
|
||||
{ "SHOTGUN_FIRE", DVPTR(SHOTGUN_FIRE), SHOTGUN_FIRE__STATIC },
|
||||
{ "SHRINKER_FIRE", DVPTR(SHRINKER_FIRE), SHRINKER_FIRE__STATIC },
|
||||
{ "SHRINKER_HIT", DVPTR(SHRINKER_HIT), SHRINKER_HIT__STATIC },
|
||||
{ "SLIM_ATTACK", DVPTR(SLIM_ATTACK), SLIM_ATTACK__STATIC },
|
||||
{ "SLIM_DYING", DVPTR(SLIM_DYING), SLIM_DYING__STATIC },
|
||||
{ "SLIM_RECOG", DVPTR(SLIM_RECOG), SLIM_RECOG__STATIC },
|
||||
{ "SLIM_ROAM", DVPTR(SLIM_ROAM), SLIM_ROAM__STATIC },
|
||||
{ "SOMETHING_DRIPPING", DVPTR(SOMETHING_DRIPPING), SOMETHING_DRIPPING__STATIC },
|
||||
{ "SOMETHINGFROZE", DVPTR(SOMETHINGFROZE), SOMETHINGFROZE__STATIC },
|
||||
{ "SOMETHINGHITFORCE", DVPTR(SOMETHINGHITFORCE), SOMETHINGHITFORCE__STATIC },
|
||||
{ "SQUISHED", DVPTR(SQUISHED), SQUISHED__STATIC },
|
||||
{ "SUBWAY", DVPTR(SUBWAY), SUBWAY__STATIC },
|
||||
{ "SWITCH_ON", DVPTR(SWITCH_ON), SWITCH_ON__STATIC },
|
||||
{ "TELEPORTER", DVPTR(TELEPORTER), TELEPORTER__STATIC },
|
||||
{ "THUD", DVPTR(THUD), THUD__STATIC },
|
||||
{ "THUNDER", DVPTR(THUNDER), THUNDER__STATIC },
|
||||
{ "TURR_RECOG", DVPTR(TURR_RECOG), TURR_RECOG__STATIC },
|
||||
{ "VENT_BUST", DVPTR(VENT_BUST), VENT_BUST__STATIC },
|
||||
{ "VOL4ENDSND1", DVPTR(VOL4ENDSND1), VOL4ENDSND1__STATIC },
|
||||
{ "VOL4ENDSND2", DVPTR(VOL4ENDSND2), VOL4ENDSND2__STATIC },
|
||||
{ "WAR_AMBIENCE2", DVPTR(WAR_AMBIENCE2), WAR_AMBIENCE2__STATIC },
|
||||
{ "WHIPYOURASS", DVPTR(WHIPYOURASS), WHIPYOURASS__STATIC },
|
||||
{ "WIERDSHOT_FLY", DVPTR(WIERDSHOT_FLY), WIERDSHOT_FLY__STATIC },
|
||||
{ "WIND_AMBIENCE", DVPTR(WIND_AMBIENCE), WIND_AMBIENCE__STATIC },
|
||||
{ "WIND_REPEAT", DVPTR(WIND_REPEAT), WIND_REPEAT__STATIC },
|
||||
};
|
||||
|
||||
#ifdef DYNSOUNDREMAP_ENABLE
|
||||
|
||||
int32_t ALIEN_SWITCH1 = ALIEN_SWITCH1__STATIC;
|
||||
int32_t BIGBANG = BIGBANG__STATIC;
|
||||
int32_t BONUS_SPEECH1 = BONUS_SPEECH1__STATIC;
|
||||
int32_t BONUS_SPEECH2 = BONUS_SPEECH2__STATIC;
|
||||
int32_t BONUS_SPEECH3 = BONUS_SPEECH3__STATIC;
|
||||
int32_t BONUS_SPEECH4 = BONUS_SPEECH4__STATIC;
|
||||
int32_t BONUSMUSIC = BONUSMUSIC__STATIC;
|
||||
int32_t BOS1_RECOG = BOS1_RECOG__STATIC;
|
||||
int32_t BOS1_WALK = BOS1_WALK__STATIC;
|
||||
int32_t BOS2_RECOG = BOS2_RECOG__STATIC;
|
||||
int32_t BOS3_RECOG = BOS3_RECOG__STATIC;
|
||||
int32_t BOS4_RECOG = BOS4_RECOG__STATIC;
|
||||
int32_t BOSS4_DEADSPEECH = BOSS4_DEADSPEECH__STATIC;
|
||||
int32_t BOSS4_FIRSTSEE = BOSS4_FIRSTSEE__STATIC;
|
||||
int32_t BOSSTALKTODUKE = BOSSTALKTODUKE__STATIC;
|
||||
int32_t CAPT_RECOG = CAPT_RECOG__STATIC;
|
||||
int32_t CAT_FIRE = CAT_FIRE__STATIC;
|
||||
int32_t CHAINGUN_FIRE = CHAINGUN_FIRE__STATIC;
|
||||
int32_t COMM_RECOG = COMM_RECOG__STATIC;
|
||||
int32_t DRON_RECOG = DRON_RECOG__STATIC;
|
||||
int32_t DUKE_CRACK = DUKE_CRACK__STATIC;
|
||||
int32_t DUKE_CRACK_FIRST = DUKE_CRACK_FIRST__STATIC;
|
||||
int32_t DUKE_CRACK2 = DUKE_CRACK2__STATIC;
|
||||
int32_t DUKE_DRINKING = DUKE_DRINKING__STATIC;
|
||||
int32_t DUKE_GASP = DUKE_GASP__STATIC;
|
||||
int32_t DUKE_GET = DUKE_GET__STATIC;
|
||||
int32_t DUKE_GETWEAPON2 = DUKE_GETWEAPON2__STATIC;
|
||||
int32_t DUKE_GETWEAPON6 = DUKE_GETWEAPON6__STATIC;
|
||||
int32_t DUKE_GOTHEALTHATLOW = DUKE_GOTHEALTHATLOW__STATIC;
|
||||
int32_t DUKE_GRUNT = DUKE_GRUNT__STATIC;
|
||||
int32_t DUKE_HARTBEAT = DUKE_HARTBEAT__STATIC;
|
||||
int32_t DUKE_JETPACK_IDLE = DUKE_JETPACK_IDLE__STATIC;
|
||||
int32_t DUKE_JETPACK_OFF = DUKE_JETPACK_OFF__STATIC;
|
||||
int32_t DUKE_JETPACK_ON = DUKE_JETPACK_ON__STATIC;
|
||||
int32_t DUKE_LAND = DUKE_LAND__STATIC;
|
||||
int32_t DUKE_LAND_HURT = DUKE_LAND_HURT__STATIC;
|
||||
int32_t DUKE_LONGTERM_PAIN = DUKE_LONGTERM_PAIN__STATIC;
|
||||
int32_t DUKE_ONWATER = DUKE_ONWATER__STATIC;
|
||||
int32_t DUKE_PISSRELIEF = DUKE_PISSRELIEF__STATIC;
|
||||
int32_t DUKE_SCREAM = DUKE_SCREAM__STATIC;
|
||||
int32_t DUKE_SEARCH = DUKE_SEARCH__STATIC;
|
||||
int32_t DUKE_SEARCH2 = DUKE_SEARCH2__STATIC;
|
||||
int32_t DUKE_TAKEPILLS = DUKE_TAKEPILLS__STATIC;
|
||||
int32_t DUKE_UNDERWATER = DUKE_UNDERWATER__STATIC;
|
||||
int32_t DUKE_URINATE = DUKE_URINATE__STATIC;
|
||||
int32_t DUKE_USEMEDKIT = DUKE_USEMEDKIT__STATIC;
|
||||
int32_t DUKE_WALKINDUCTS = DUKE_WALKINDUCTS__STATIC;
|
||||
int32_t DUKETALKTOBOSS = DUKETALKTOBOSS__STATIC;
|
||||
int32_t EARTHQUAKE = EARTHQUAKE__STATIC;
|
||||
int32_t EJECT_CLIP = EJECT_CLIP__STATIC;
|
||||
int32_t ELEVATOR_OFF = ELEVATOR_OFF__STATIC;
|
||||
int32_t ELEVATOR_ON = ELEVATOR_ON__STATIC;
|
||||
int32_t END_OF_LEVEL_WARN = END_OF_LEVEL_WARN__STATIC;
|
||||
int32_t ENDSEQVOL2SND1 = ENDSEQVOL2SND1__STATIC;
|
||||
int32_t ENDSEQVOL2SND2 = ENDSEQVOL2SND2__STATIC;
|
||||
int32_t ENDSEQVOL2SND3 = ENDSEQVOL2SND3__STATIC;
|
||||
int32_t ENDSEQVOL2SND4 = ENDSEQVOL2SND4__STATIC;
|
||||
int32_t ENDSEQVOL2SND5 = ENDSEQVOL2SND5__STATIC;
|
||||
int32_t ENDSEQVOL2SND6 = ENDSEQVOL2SND6__STATIC;
|
||||
int32_t ENDSEQVOL2SND7 = ENDSEQVOL2SND7__STATIC;
|
||||
int32_t ENDSEQVOL3SND2 = ENDSEQVOL3SND2__STATIC;
|
||||
int32_t ENDSEQVOL3SND3 = ENDSEQVOL3SND3__STATIC;
|
||||
int32_t ENDSEQVOL3SND4 = ENDSEQVOL3SND4__STATIC;
|
||||
int32_t ENDSEQVOL3SND5 = ENDSEQVOL3SND5__STATIC;
|
||||
int32_t ENDSEQVOL3SND6 = ENDSEQVOL3SND6__STATIC;
|
||||
int32_t ENDSEQVOL3SND7 = ENDSEQVOL3SND7__STATIC;
|
||||
int32_t ENDSEQVOL3SND8 = ENDSEQVOL3SND8__STATIC;
|
||||
int32_t ENDSEQVOL3SND9 = ENDSEQVOL3SND9__STATIC;
|
||||
int32_t EXITMENUSOUND = EXITMENUSOUND__STATIC;
|
||||
int32_t EXPANDERSHOOT = EXPANDERSHOOT__STATIC;
|
||||
int32_t FLUSH_TOILET = FLUSH_TOILET__STATIC;
|
||||
int32_t FLY_BY = FLY_BY__STATIC;
|
||||
int32_t GENERIC_AMBIENCE17 = GENERIC_AMBIENCE17__STATIC;
|
||||
int32_t GLASS_BREAKING = GLASS_BREAKING__STATIC;
|
||||
int32_t GLASS_HEAVYBREAK = GLASS_HEAVYBREAK__STATIC;
|
||||
int32_t INSERT_CLIP = INSERT_CLIP__STATIC;
|
||||
int32_t INTRO4_1 = INTRO4_1__STATIC;
|
||||
int32_t INTRO4_2 = INTRO4_2__STATIC;
|
||||
int32_t INTRO4_3 = INTRO4_3__STATIC;
|
||||
int32_t INTRO4_4 = INTRO4_4__STATIC;
|
||||
int32_t INTRO4_5 = INTRO4_5__STATIC;
|
||||
int32_t INTRO4_6 = INTRO4_6__STATIC;
|
||||
int32_t INTRO4_B = INTRO4_B__STATIC;
|
||||
int32_t ITEM_SPLASH = ITEM_SPLASH__STATIC;
|
||||
int32_t JIBBED_ACTOR5 = JIBBED_ACTOR5__STATIC;
|
||||
int32_t JIBBED_ACTOR6 = JIBBED_ACTOR6__STATIC;
|
||||
int32_t KICK_HIT = KICK_HIT__STATIC;
|
||||
int32_t LASERTRIP_ARMING = LASERTRIP_ARMING__STATIC;
|
||||
int32_t LASERTRIP_EXPLODE = LASERTRIP_EXPLODE__STATIC;
|
||||
int32_t LASERTRIP_ONWALL = LASERTRIP_ONWALL__STATIC;
|
||||
int32_t LIGHTNING_SLAP = LIGHTNING_SLAP__STATIC;
|
||||
int32_t MONITOR_ACTIVE = MONITOR_ACTIVE__STATIC;
|
||||
int32_t NITEVISION_ONOFF = NITEVISION_ONOFF__STATIC;
|
||||
int32_t OCTA_RECOG = OCTA_RECOG__STATIC;
|
||||
int32_t PIG_RECOG = PIG_RECOG__STATIC;
|
||||
int32_t PIPEBOMB_BOUNCE = PIPEBOMB_BOUNCE__STATIC;
|
||||
int32_t PIPEBOMB_EXPLODE = PIPEBOMB_EXPLODE__STATIC;
|
||||
int32_t PISTOL_BODYHIT = PISTOL_BODYHIT__STATIC;
|
||||
int32_t PISTOL_FIRE = PISTOL_FIRE__STATIC;
|
||||
int32_t PISTOL_RICOCHET = PISTOL_RICOCHET__STATIC;
|
||||
int32_t POOLBALLHIT = POOLBALLHIT__STATIC;
|
||||
int32_t PRED_RECOG = PRED_RECOG__STATIC;
|
||||
int32_t RATTY = RATTY__STATIC;
|
||||
int32_t RECO_ATTACK = RECO_ATTACK__STATIC;
|
||||
int32_t RECO_PAIN = RECO_PAIN__STATIC;
|
||||
int32_t RECO_RECOG = RECO_RECOG__STATIC;
|
||||
int32_t RECO_ROAM = RECO_ROAM__STATIC;
|
||||
int32_t RIPHEADNECK = RIPHEADNECK__STATIC;
|
||||
int32_t RPG_EXPLODE = RPG_EXPLODE__STATIC;
|
||||
int32_t RPG_SHOOT = RPG_SHOOT__STATIC;
|
||||
int32_t SELECT_WEAPON = SELECT_WEAPON__STATIC;
|
||||
int32_t SHORT_CIRCUIT = SHORT_CIRCUIT__STATIC;
|
||||
int32_t SHOTGUN_COCK = SHOTGUN_COCK__STATIC;
|
||||
int32_t SHOTGUN_FIRE = SHOTGUN_FIRE__STATIC;
|
||||
int32_t SHRINKER_FIRE = SHRINKER_FIRE__STATIC;
|
||||
int32_t SHRINKER_HIT = SHRINKER_HIT__STATIC;
|
||||
int32_t SLIM_ATTACK = SLIM_ATTACK__STATIC;
|
||||
int32_t SLIM_DYING = SLIM_DYING__STATIC;
|
||||
int32_t SLIM_RECOG = SLIM_RECOG__STATIC;
|
||||
int32_t SLIM_ROAM = SLIM_ROAM__STATIC;
|
||||
int32_t SOMETHING_DRIPPING = SOMETHING_DRIPPING__STATIC;
|
||||
int32_t SOMETHINGFROZE = SOMETHINGFROZE__STATIC;
|
||||
int32_t SOMETHINGHITFORCE = SOMETHINGHITFORCE__STATIC;
|
||||
int32_t SQUISHED = SQUISHED__STATIC;
|
||||
int32_t SUBWAY = SUBWAY__STATIC;
|
||||
int32_t SWITCH_ON = SWITCH_ON__STATIC;
|
||||
int32_t TELEPORTER = TELEPORTER__STATIC;
|
||||
int32_t THUD = THUD__STATIC;
|
||||
int32_t THUNDER = THUNDER__STATIC;
|
||||
int32_t TURR_RECOG = TURR_RECOG__STATIC;
|
||||
int32_t VENT_BUST = VENT_BUST__STATIC;
|
||||
int32_t VOL4ENDSND1 = VOL4ENDSND1__STATIC;
|
||||
int32_t VOL4ENDSND2 = VOL4ENDSND2__STATIC;
|
||||
int32_t WAR_AMBIENCE2 = WAR_AMBIENCE2__STATIC;
|
||||
int32_t WHIPYOURASS = WHIPYOURASS__STATIC;
|
||||
int32_t WIERDSHOT_FLY = WIERDSHOT_FLY__STATIC;
|
||||
int32_t WIND_AMBIENCE = WIND_AMBIENCE__STATIC;
|
||||
int32_t WIND_REPEAT = WIND_REPEAT__STATIC;
|
||||
|
||||
#if !defined LUNATIC
|
||||
static hashtable_t h_names = {512, NULL};
|
||||
|
||||
void G_ProcessDynamicSoundMapping(const char *szLabel, int32_t lValue)
|
||||
{
|
||||
if ((unsigned)lValue >= MAXSOUNDS || !szLabel)
|
||||
return;
|
||||
|
||||
int const i = hash_find(&h_names,szLabel);
|
||||
|
||||
if (i>=0)
|
||||
{
|
||||
struct dynitem *di = &g_dynSoundList[i];
|
||||
#ifdef DEBUGGINGAIDS
|
||||
if (g_scriptDebug && di->staticval != lValue)
|
||||
OSD_Printf("REMAP %s (%d) --> %d\n", di->str, di->staticval, lValue);
|
||||
#endif
|
||||
*di->dynvalptr = lValue;
|
||||
}
|
||||
}
|
||||
|
||||
void initsoundhashnames(void)
|
||||
{
|
||||
hash_init(&h_names);
|
||||
|
||||
for (int i=0; i < ARRAY_SSIZE(g_dynSoundList); i++)
|
||||
hash_add(&h_names, g_dynSoundList[i].str, i, 0);
|
||||
}
|
||||
|
||||
void freesoundhashnames(void)
|
||||
{
|
||||
hash_free(&h_names);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// This is run after all CON define's have been processed to set up the
|
||||
// dynamic->static sound mapping.
|
||||
void G_InitDynamicSounds(void)
|
||||
{
|
||||
Bmemset(DynamicSoundMap, 0, sizeof(DynamicSoundMap));
|
||||
|
||||
for (auto & i : g_dynSoundList)
|
||||
#ifdef DYNSOUNDREMAP_ENABLE
|
||||
DynamicSoundMap[*(i.dynvalptr)] = i.staticval;
|
||||
#else
|
||||
DynamicSoundMap[i.staticval] = i.staticval;
|
||||
#endif
|
||||
|
||||
}
|
||||
END_DUKE_NS
|
338
source/duke3d/src/soundsdyn.h
Normal file
338
source/duke3d/src/soundsdyn.h
Normal file
|
@ -0,0 +1,338 @@
|
|||
//-------------------------------------------------------------------------
|
||||
/*
|
||||
Copyright (C) 2013 EDuke32 developers and contributors
|
||||
|
||||
This file is part of EDuke32.
|
||||
|
||||
EDuke32 is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License version 2
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
//-------------------------------------------------------------------------
|
||||
#ifndef soundsdyn_h__
|
||||
#define soundsdyn_h__
|
||||
|
||||
BEGIN_DUKE_NS
|
||||
|
||||
#define DYNSOUNDREMAP_ENABLE
|
||||
|
||||
|
||||
#define KICK_HIT__STATIC 0
|
||||
#define PISTOL_RICOCHET__STATIC 1
|
||||
#define PISTOL_BODYHIT__STATIC 2
|
||||
#define PISTOL_FIRE__STATIC 3
|
||||
#define EJECT_CLIP__STATIC 4
|
||||
#define INSERT_CLIP__STATIC 5
|
||||
#define CHAINGUN_FIRE__STATIC 6
|
||||
#define RPG_SHOOT__STATIC 7
|
||||
#define POOLBALLHIT__STATIC 8
|
||||
#define RPG_EXPLODE__STATIC 9
|
||||
#define CAT_FIRE__STATIC 10
|
||||
#define SHRINKER_FIRE__STATIC 11
|
||||
#define PIPEBOMB_BOUNCE__STATIC 13
|
||||
#define PIPEBOMB_EXPLODE__STATIC 14
|
||||
#define LASERTRIP_ONWALL__STATIC 15
|
||||
#define LASERTRIP_ARMING__STATIC 16
|
||||
#define LASERTRIP_EXPLODE__STATIC 17
|
||||
#define VENT_BUST__STATIC 18
|
||||
#define GLASS_BREAKING__STATIC 19
|
||||
#define GLASS_HEAVYBREAK__STATIC 20
|
||||
#define SHORT_CIRCUIT__STATIC 21
|
||||
#define ITEM_SPLASH__STATIC 22
|
||||
#define DUKE_GASP__STATIC 25
|
||||
#define SLIM_RECOG__STATIC 26
|
||||
#define DUKE_URINATE__STATIC 28
|
||||
#define ENDSEQVOL3SND2__STATIC 29
|
||||
#define ENDSEQVOL3SND3__STATIC 30
|
||||
#define DUKE_CRACK__STATIC 33
|
||||
#define SLIM_ATTACK__STATIC 34
|
||||
#define SOMETHINGHITFORCE__STATIC 35
|
||||
#define DUKE_DRINKING__STATIC 36
|
||||
#define DUKE_GRUNT__STATIC 38
|
||||
#define DUKE_HARTBEAT__STATIC 39
|
||||
#define DUKE_ONWATER__STATIC 40
|
||||
#define DUKE_LAND__STATIC 42
|
||||
#define DUKE_WALKINDUCTS__STATIC 43
|
||||
#define DUKE_UNDERWATER__STATIC 48
|
||||
#define DUKE_JETPACK_ON__STATIC 49
|
||||
#define DUKE_JETPACK_IDLE__STATIC 50
|
||||
#define DUKE_JETPACK_OFF__STATIC 51
|
||||
#define DUKETALKTOBOSS__STATIC 56
|
||||
#define SQUISHED__STATIC 69
|
||||
#define TELEPORTER__STATIC 70
|
||||
#define ELEVATOR_ON__STATIC 71
|
||||
#define ELEVATOR_OFF__STATIC 73
|
||||
#define SUBWAY__STATIC 75
|
||||
#define SWITCH_ON__STATIC 76
|
||||
#define FLUSH_TOILET__STATIC 79
|
||||
#define EARTHQUAKE__STATIC 81
|
||||
#define END_OF_LEVEL_WARN__STATIC 83
|
||||
#define WIND_AMBIENCE__STATIC 91
|
||||
#define SOMETHING_DRIPPING__STATIC 92
|
||||
#define BOS1_RECOG__STATIC 97
|
||||
#define BOS2_RECOG__STATIC 102
|
||||
#define DUKE_GETWEAPON2__STATIC 107
|
||||
#define SHOTGUN_FIRE__STATIC 109
|
||||
#define PRED_RECOG__STATIC 111
|
||||
#define CAPT_RECOG__STATIC 117
|
||||
#define PIG_RECOG__STATIC 121
|
||||
#define RECO_ROAM__STATIC 125
|
||||
#define RECO_RECOG__STATIC 126
|
||||
#define RECO_ATTACK__STATIC 127
|
||||
#define RECO_PAIN__STATIC 128
|
||||
#define DRON_RECOG__STATIC 131
|
||||
#define COMM_RECOG__STATIC 136
|
||||
#define OCTA_RECOG__STATIC 141
|
||||
#define TURR_RECOG__STATIC 146
|
||||
#define SLIM_DYING__STATIC 149
|
||||
#define BOS3_RECOG__STATIC 151
|
||||
#define BOS1_WALK__STATIC 156
|
||||
#define THUD__STATIC 158
|
||||
#define WIERDSHOT_FLY__STATIC 160
|
||||
#define SLIM_ROAM__STATIC 163
|
||||
#define SHOTGUN_COCK__STATIC 169
|
||||
#define GENERIC_AMBIENCE17__STATIC 177
|
||||
#define BONUS_SPEECH1__STATIC 195
|
||||
#define BONUS_SPEECH2__STATIC 196
|
||||
#define BONUS_SPEECH3__STATIC 197
|
||||
#define BONUS_SPEECH4__STATIC 199
|
||||
#define DUKE_LAND_HURT__STATIC 200
|
||||
#define DUKE_SEARCH2__STATIC 207
|
||||
#define DUKE_CRACK2__STATIC 208
|
||||
#define DUKE_SEARCH__STATIC 209
|
||||
#define DUKE_GET__STATIC 210
|
||||
#define DUKE_LONGTERM_PAIN__STATIC 211
|
||||
#define MONITOR_ACTIVE__STATIC 212
|
||||
#define NITEVISION_ONOFF__STATIC 213
|
||||
#define DUKE_CRACK_FIRST__STATIC 215
|
||||
#define DUKE_USEMEDKIT__STATIC 216
|
||||
#define DUKE_TAKEPILLS__STATIC 217
|
||||
#define DUKE_PISSRELIEF__STATIC 218
|
||||
#define SELECT_WEAPON__STATIC 219
|
||||
#define JIBBED_ACTOR5__STATIC 226
|
||||
#define JIBBED_ACTOR6__STATIC 227
|
||||
#define DUKE_GOTHEALTHATLOW__STATIC 229
|
||||
#define BOSSTALKTODUKE__STATIC 230
|
||||
#define WAR_AMBIENCE2__STATIC 232
|
||||
#define EXITMENUSOUND__STATIC 243
|
||||
#define FLY_BY__STATIC 244
|
||||
#define DUKE_SCREAM__STATIC 245
|
||||
#define SHRINKER_HIT__STATIC 246
|
||||
#define RATTY__STATIC 247
|
||||
#define BONUSMUSIC__STATIC 249
|
||||
#define DUKE_GETWEAPON6__STATIC 264
|
||||
#define ALIEN_SWITCH1__STATIC 272
|
||||
#define RIPHEADNECK__STATIC 284
|
||||
#define ENDSEQVOL3SND4__STATIC 288
|
||||
#define ENDSEQVOL3SND5__STATIC 289
|
||||
#define ENDSEQVOL3SND6__STATIC 290
|
||||
#define ENDSEQVOL3SND7__STATIC 291
|
||||
#define ENDSEQVOL3SND8__STATIC 292
|
||||
#define ENDSEQVOL3SND9__STATIC 293
|
||||
#define WHIPYOURASS__STATIC 294
|
||||
#define ENDSEQVOL2SND1__STATIC 295
|
||||
#define ENDSEQVOL2SND2__STATIC 296
|
||||
#define ENDSEQVOL2SND3__STATIC 297
|
||||
#define ENDSEQVOL2SND4__STATIC 298
|
||||
#define ENDSEQVOL2SND5__STATIC 299
|
||||
#define ENDSEQVOL2SND6__STATIC 300
|
||||
#define ENDSEQVOL2SND7__STATIC 301
|
||||
#define SOMETHINGFROZE__STATIC 303
|
||||
#define WIND_REPEAT__STATIC 308
|
||||
#define BOS4_RECOG__STATIC 342
|
||||
#define LIGHTNING_SLAP__STATIC 351
|
||||
#define THUNDER__STATIC 352
|
||||
#define INTRO4_1__STATIC 363
|
||||
#define INTRO4_2__STATIC 364
|
||||
#define INTRO4_3__STATIC 365
|
||||
#define INTRO4_4__STATIC 366
|
||||
#define INTRO4_5__STATIC 367
|
||||
#define INTRO4_6__STATIC 368
|
||||
#define BOSS4_DEADSPEECH__STATIC 370
|
||||
#define BOSS4_FIRSTSEE__STATIC 371
|
||||
#define VOL4ENDSND1__STATIC 384
|
||||
#define VOL4ENDSND2__STATIC 385
|
||||
#define EXPANDERSHOOT__STATIC 388
|
||||
#define INTRO4_B__STATIC 392
|
||||
#define BIGBANG__STATIC 393
|
||||
|
||||
extern int16_t DynamicSoundMap[MAXSOUNDS];
|
||||
|
||||
void G_InitDynamicSounds(void);
|
||||
|
||||
#ifdef DYNSOUNDREMAP_ENABLE
|
||||
|
||||
void G_ProcessDynamicSoundMapping(const char *szLabel, int32_t lValue);
|
||||
|
||||
#if !defined LUNATIC
|
||||
void initsoundhashnames(void);
|
||||
void freesoundhashnames(void);
|
||||
#endif
|
||||
|
||||
extern int32_t ALIEN_SWITCH1;
|
||||
extern int32_t BIGBANG;
|
||||
extern int32_t BONUS_SPEECH1;
|
||||
extern int32_t BONUS_SPEECH2;
|
||||
extern int32_t BONUS_SPEECH3;
|
||||
extern int32_t BONUS_SPEECH4;
|
||||
extern int32_t BONUSMUSIC;
|
||||
extern int32_t BOS1_RECOG;
|
||||
extern int32_t BOS1_WALK;
|
||||
extern int32_t BOS2_RECOG;
|
||||
extern int32_t BOS3_RECOG;
|
||||
extern int32_t BOS4_RECOG;
|
||||
extern int32_t BOSS4_DEADSPEECH;
|
||||
extern int32_t BOSS4_FIRSTSEE;
|
||||
extern int32_t BOSSTALKTODUKE;
|
||||
extern int32_t CAPT_RECOG;
|
||||
extern int32_t CAT_FIRE;
|
||||
extern int32_t CHAINGUN_FIRE;
|
||||
extern int32_t COMM_RECOG;
|
||||
extern int32_t DRON_RECOG;
|
||||
extern int32_t DUKE_CRACK;
|
||||
extern int32_t DUKE_CRACK_FIRST;
|
||||
extern int32_t DUKE_CRACK2;
|
||||
extern int32_t DUKE_DRINKING;
|
||||
extern int32_t DUKE_GASP;
|
||||
extern int32_t DUKE_GET;
|
||||
extern int32_t DUKE_GETWEAPON2;
|
||||
extern int32_t DUKE_GETWEAPON6;
|
||||
extern int32_t DUKE_GOTHEALTHATLOW;
|
||||
extern int32_t DUKE_GRUNT;
|
||||
extern int32_t DUKE_HARTBEAT;
|
||||
extern int32_t DUKE_JETPACK_IDLE;
|
||||
extern int32_t DUKE_JETPACK_OFF;
|
||||
extern int32_t DUKE_JETPACK_ON;
|
||||
extern int32_t DUKE_LAND;
|
||||
extern int32_t DUKE_LAND_HURT;
|
||||
extern int32_t DUKE_LONGTERM_PAIN;
|
||||
extern int32_t DUKE_ONWATER;
|
||||
extern int32_t DUKE_PISSRELIEF;
|
||||
extern int32_t DUKE_SCREAM;
|
||||
extern int32_t DUKE_SEARCH;
|
||||
extern int32_t DUKE_SEARCH2;
|
||||
extern int32_t DUKE_TAKEPILLS;
|
||||
extern int32_t DUKE_UNDERWATER;
|
||||
extern int32_t DUKE_URINATE;
|
||||
extern int32_t DUKE_USEMEDKIT;
|
||||
extern int32_t DUKE_WALKINDUCTS;
|
||||
extern int32_t DUKETALKTOBOSS;
|
||||
extern int32_t EARTHQUAKE;
|
||||
extern int32_t EJECT_CLIP;
|
||||
extern int32_t ELEVATOR_OFF;
|
||||
extern int32_t ELEVATOR_ON;
|
||||
extern int32_t END_OF_LEVEL_WARN;
|
||||
extern int32_t ENDSEQVOL2SND1;
|
||||
extern int32_t ENDSEQVOL2SND2;
|
||||
extern int32_t ENDSEQVOL2SND3;
|
||||
extern int32_t ENDSEQVOL2SND4;
|
||||
extern int32_t ENDSEQVOL2SND5;
|
||||
extern int32_t ENDSEQVOL2SND6;
|
||||
extern int32_t ENDSEQVOL2SND7;
|
||||
extern int32_t ENDSEQVOL3SND2;
|
||||
extern int32_t ENDSEQVOL3SND3;
|
||||
extern int32_t ENDSEQVOL3SND4;
|
||||
extern int32_t ENDSEQVOL3SND5;
|
||||
extern int32_t ENDSEQVOL3SND6;
|
||||
extern int32_t ENDSEQVOL3SND7;
|
||||
extern int32_t ENDSEQVOL3SND8;
|
||||
extern int32_t ENDSEQVOL3SND9;
|
||||
extern int32_t EXITMENUSOUND;
|
||||
extern int32_t EXPANDERSHOOT;
|
||||
extern int32_t FLUSH_TOILET;
|
||||
extern int32_t FLY_BY;
|
||||
extern int32_t GENERIC_AMBIENCE17;
|
||||
extern int32_t GLASS_BREAKING;
|
||||
extern int32_t GLASS_HEAVYBREAK;
|
||||
extern int32_t INSERT_CLIP;
|
||||
extern int32_t INTRO4_1;
|
||||
extern int32_t INTRO4_2;
|
||||
extern int32_t INTRO4_3;
|
||||
extern int32_t INTRO4_4;
|
||||
extern int32_t INTRO4_5;
|
||||
extern int32_t INTRO4_6;
|
||||
extern int32_t INTRO4_B;
|
||||
extern int32_t ITEM_SPLASH;
|
||||
extern int32_t JIBBED_ACTOR5;
|
||||
extern int32_t JIBBED_ACTOR6;
|
||||
extern int32_t KICK_HIT;
|
||||
extern int32_t LASERTRIP_ARMING;
|
||||
extern int32_t LASERTRIP_EXPLODE;
|
||||
extern int32_t LASERTRIP_ONWALL;
|
||||
extern int32_t LIGHTNING_SLAP;
|
||||
extern int32_t MONITOR_ACTIVE;
|
||||
extern int32_t NITEVISION_ONOFF;
|
||||
extern int32_t OCTA_RECOG;
|
||||
extern int32_t PIG_RECOG;
|
||||
extern int32_t PIPEBOMB_BOUNCE;
|
||||
extern int32_t PIPEBOMB_EXPLODE;
|
||||
extern int32_t PISTOL_BODYHIT;
|
||||
extern int32_t PISTOL_FIRE;
|
||||
extern int32_t PISTOL_RICOCHET;
|
||||
extern int32_t POOLBALLHIT;
|
||||
extern int32_t PRED_RECOG;
|
||||
extern int32_t RATTY;
|
||||
extern int32_t RECO_ATTACK;
|
||||
extern int32_t RECO_PAIN;
|
||||
extern int32_t RECO_RECOG;
|
||||
extern int32_t RECO_ROAM;
|
||||
extern int32_t RIPHEADNECK;
|
||||
extern int32_t RPG_EXPLODE;
|
||||
extern int32_t RPG_SHOOT;
|
||||
extern int32_t SELECT_WEAPON;
|
||||
extern int32_t SHORT_CIRCUIT;
|
||||
extern int32_t SHOTGUN_COCK;
|
||||
extern int32_t SHOTGUN_FIRE;
|
||||
extern int32_t SHRINKER_FIRE;
|
||||
extern int32_t SHRINKER_HIT;
|
||||
extern int32_t SLIM_ATTACK;
|
||||
extern int32_t SLIM_DYING;
|
||||
extern int32_t SLIM_RECOG;
|
||||
extern int32_t SLIM_ROAM;
|
||||
extern int32_t SOMETHING_DRIPPING;
|
||||
extern int32_t SOMETHINGFROZE;
|
||||
extern int32_t SOMETHINGHITFORCE;
|
||||
extern int32_t SQUISHED;
|
||||
extern int32_t SUBWAY;
|
||||
extern int32_t SWITCH_ON;
|
||||
extern int32_t TELEPORTER;
|
||||
extern int32_t THUD;
|
||||
extern int32_t THUNDER;
|
||||
extern int32_t TURR_RECOG;
|
||||
extern int32_t VENT_BUST;
|
||||
extern int32_t VOL4ENDSND1;
|
||||
extern int32_t VOL4ENDSND2;
|
||||
extern int32_t WAR_AMBIENCE2;
|
||||
extern int32_t WHIPYOURASS;
|
||||
extern int32_t WIERDSHOT_FLY;
|
||||
extern int32_t WIND_AMBIENCE;
|
||||
extern int32_t WIND_REPEAT;
|
||||
|
||||
#define DYNAMICSOUNDMAP(Soundnum) (DynamicSoundMap[Soundnum])
|
||||
|
||||
#else /* if !defined DYNSOUNDREMAP_ENABLE */
|
||||
|
||||
#define G_ProcessDynamicSoundMapping(x, y) ((void)(0))
|
||||
|
||||
#define initsoundhashnames() ((void)0)
|
||||
#define freesoundhashnames() ((void)0)
|
||||
|
||||
#include "soundefs.h"
|
||||
|
||||
#define DYNAMICSOUNDMAP(Soundnum) (Soundnum)
|
||||
|
||||
#endif
|
||||
|
||||
END_DUKE_NS
|
||||
|
||||
#endif // soundsdyn_h__
|
|
@ -1,240 +0,0 @@
|
|||
//-------------------------------------------------------------------------
|
||||
/*
|
||||
Copyright (C) 2010 EDuke32 developers and contributors
|
||||
|
||||
This file is part of EDuke32.
|
||||
|
||||
EDuke32 is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License version 2
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
#ifndef __actors_h_
|
||||
#define __actors_h_
|
||||
|
||||
BEGIN_DUKERR_NS
|
||||
|
||||
#define MAXSLEEPDIST 16384
|
||||
#define SLEEPTIME 1536
|
||||
#define ACTOR_FLOOR_OFFSET (1<<8)
|
||||
#define ZOFFSET (1<<8)
|
||||
#define ZOFFSET2 (16<<8)
|
||||
#define ZOFFSET3 (8<<8)
|
||||
#define ZOFFSET4 (12<<8)
|
||||
#define ZOFFSET5 (32<<8)
|
||||
#define ZOFFSET6 (4<<8)
|
||||
|
||||
#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
|
||||
#define STAT_EFFECTOR 3
|
||||
#define STAT_PROJECTILE 4
|
||||
#define STAT_MISC 5
|
||||
#define STAT_STANDABLE 6
|
||||
#define STAT_LOCATOR 7
|
||||
#define STAT_ACTIVATOR 8
|
||||
#define STAT_TRANSPORT 9
|
||||
#define STAT_PLAYER 10
|
||||
#define STAT_FX 11
|
||||
#define STAT_FALLER 12
|
||||
#define STAT_DUMMYPLAYER 13
|
||||
#define STAT_LIGHT 14
|
||||
#define STAT_RAROR 15
|
||||
#define STAT_NETALLOC (MAXSTATUS-1)
|
||||
|
||||
|
||||
// Defines the motion characteristics of an actor
|
||||
enum amoveflags_t
|
||||
{
|
||||
face_player = 1,
|
||||
geth = 2,
|
||||
getv = 4,
|
||||
random_angle = 8,
|
||||
face_player_slow = 16,
|
||||
spin = 32,
|
||||
face_player_smart = 64,
|
||||
fleeenemy = 128,
|
||||
jumptoplayer_only = 256,
|
||||
jumptoplayer_bits = 257, // NOTE: two bits set!
|
||||
seekplayer = 512,
|
||||
furthestdir = 1024,
|
||||
dodgebullet = 4096,
|
||||
justjump2 = 8192,
|
||||
windang = 16384,
|
||||
antifaceplayerslow = 32768
|
||||
};
|
||||
|
||||
// Defines for 'useractor' keyword
|
||||
enum uactortypes_t
|
||||
{
|
||||
notenemy,
|
||||
enemy,
|
||||
enemystayput
|
||||
};
|
||||
|
||||
// These macros are there to give names to the t_data[]/T*/vm.g_t[] indices
|
||||
// when used with actors. Greppability of source code is certainly a virtue.
|
||||
#define AC_COUNT(t) ((t)[0]) /* the actor's count */
|
||||
/* The ID of the actor's current move. In C-CON, the bytecode offset to the
|
||||
* move composite: */
|
||||
#define AC_MOVE_ID(t) ((t)[1])
|
||||
#define AC_ACTION_COUNT(t) ((t)[2]) /* the actor's action count */
|
||||
#define AC_CURFRAME(t) ((t)[3]) /* the actor's current frame offset */
|
||||
/* The ID of the actor's current action. In C-CON, the bytecode offset to the
|
||||
* action composite: */
|
||||
#define AC_ACTION_ID(t) ((t)[4])
|
||||
#define AC_AI_ID(t) ((t)[5]) /* the ID of the actor's current ai */
|
||||
|
||||
enum actionparams
|
||||
{
|
||||
ACTION_STARTFRAME = 0,
|
||||
ACTION_NUMFRAMES,
|
||||
ACTION_VIEWTYPE,
|
||||
ACTION_INCVAL,
|
||||
ACTION_DELAY,
|
||||
ACTION_FLAGS,
|
||||
ACTION_PARAM_COUNT,
|
||||
};
|
||||
|
||||
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)
|
||||
# define AC_MOVFLAGS(spr, a) ((spr)->hitag)
|
||||
|
||||
// (+ 40 16 16 4 8 6 8 6 4 20)
|
||||
#pragma pack(push, 1)
|
||||
struct actor_t
|
||||
{
|
||||
int32_t t_data[10]; // 40b sometimes used to hold offsets to con code
|
||||
|
||||
int32_t flags; // 4b
|
||||
vec3_t bpos; // 12b
|
||||
int32_t floorz, ceilingz; // 8b
|
||||
vec2_t lastv; // 8b
|
||||
int16_t picnum, ang, extra, owner; // 8b
|
||||
int16_t movflag, tempang, timetosleep; // 6b
|
||||
int16_t stayput; // 2b
|
||||
|
||||
uint8_t cgg, lasttransport; // 2b
|
||||
// NOTE: 'dispicnum' is updated every frame, not in sync with game tics!
|
||||
int16_t dispicnum; // 2b
|
||||
|
||||
#ifdef POLYMER
|
||||
int16_t lightId, lightmaxrange; // 4b
|
||||
_prlight *lightptr; // 4b/8b aligned on 96 bytes
|
||||
uint8_t lightcount, filler[3];
|
||||
#endif
|
||||
};
|
||||
|
||||
#pragma pack(pop)
|
||||
|
||||
struct projectile_t;
|
||||
|
||||
struct tiledata_t
|
||||
{
|
||||
intptr_t *execPtr; // pointer to CON script for this tile, formerly actorscrptr
|
||||
intptr_t *loadPtr; // pointer to load time CON script, formerly actorLoadEventScrPtr or something
|
||||
projectile_t *proj;
|
||||
projectile_t *defproj;
|
||||
uint32_t flags; // formerly SpriteFlags, ActorType
|
||||
int32_t cacherange; // formerly SpriteCache
|
||||
};
|
||||
|
||||
|
||||
// KEEPINSYNC lunatic/con_lang.lua
|
||||
enum sflags_t
|
||||
{
|
||||
SFLAG_SHADOW = 0x00000001,
|
||||
SFLAG_NVG = 0x00000002,
|
||||
SFLAG_NOSHADE = 0x00000004,
|
||||
SFLAG_PROJECTILE = 0x00000008,
|
||||
SFLAG_DECAL = 0x00000010,
|
||||
SFLAG_BADGUY = 0x00000020,
|
||||
SFLAG_NOPAL = 0x00000040,
|
||||
SFLAG_NOEVENTCODE = 0x00000080,
|
||||
SFLAG_NOLIGHT = 0x00000100,
|
||||
SFLAG_USEACTIVATOR = 0x00000200,
|
||||
SFLAG_NULL = 0x00000400, // null sprite in multiplayer
|
||||
SFLAG_NOCLIP = 0x00000800, // clipmove it with cliptype 0
|
||||
SFLAG_NOFLOORSHADOW = 0x00001000, // for temp. internal use, per-tile flag not checked
|
||||
SFLAG_SMOOTHMOVE = 0x00002000,
|
||||
SFLAG_NOTELEPORT = 0x00004000,
|
||||
SFLAG_BADGUYSTAYPUT = 0x00008000,
|
||||
SFLAG_CACHE = 0x00010000,
|
||||
// rotation-fixed wrt a pivot point to prevent position diverging due to
|
||||
// roundoff error accumulation:
|
||||
SFLAG_ROTFIXED = 0x00020000,
|
||||
SFLAG_HARDCODED_BADGUY = 0x00040000,
|
||||
SFLAG_DIDNOSE7WATER = 0x00080000, // used temporarily
|
||||
SFLAG_NODAMAGEPUSH = 0x00100000,
|
||||
SFLAG_NOWATERDIP = 0x00200000,
|
||||
SFLAG_HURTSPAWNBLOOD = 0x00400000,
|
||||
SFLAG_GREENSLIMEFOOD = 0x00800000,
|
||||
SFLAG_REALCLIPDIST = 0x01000000,
|
||||
SFLAG_WAKEUPBADGUYS = 0x02000000,
|
||||
SFLAG_DAMAGEEVENT = 0x04000000,
|
||||
SFLAG_NOWATERSECTOR = 0x08000000,
|
||||
SFLAG_QUEUEDFORDELETE = 0x10000000,
|
||||
SFLAG_BADGUY_TILE = 0x20000000, // these are from RedNukem and had to be renumbered.
|
||||
SFLAG_KILLCOUNT = 0x40000000,
|
||||
SFLAG_NOCANSEECHECK = 0x80000000,
|
||||
};
|
||||
|
||||
// Custom projectiles "workslike" flags.
|
||||
// XXX: Currently not predefined from CON.
|
||||
enum pflags_t
|
||||
{
|
||||
PROJECTILE_HITSCAN = 0x00000001,
|
||||
PROJECTILE_RPG = 0x00000002,
|
||||
PROJECTILE_BOUNCESOFFWALLS = 0x00000004,
|
||||
PROJECTILE_BOUNCESOFFMIRRORS = 0x00000008,
|
||||
PROJECTILE_KNEE = 0x00000010,
|
||||
PROJECTILE_WATERBUBBLES = 0x00000020,
|
||||
PROJECTILE_TIMED = 0x00000040,
|
||||
PROJECTILE_BOUNCESOFFSPRITES = 0x00000080,
|
||||
PROJECTILE_SPIT = 0x00000100,
|
||||
PROJECTILE_COOLEXPLOSION1 = 0x00000200,
|
||||
PROJECTILE_BLOOD = 0x00000400,
|
||||
PROJECTILE_LOSESVELOCITY = 0x00000800,
|
||||
PROJECTILE_NOAIM = 0x00001000,
|
||||
PROJECTILE_RANDDECALSIZE = 0x00002000,
|
||||
PROJECTILE_EXPLODEONTIMER = 0x00004000,
|
||||
PROJECTILE_RPG_IMPACT = 0x00008000,
|
||||
PROJECTILE_RADIUS_PICNUM = 0x00010000,
|
||||
PROJECTILE_ACCURATE_AUTOAIM = 0x00020000,
|
||||
PROJECTILE_FORCEIMPACT = 0x00040000,
|
||||
PROJECTILE_REALCLIPDIST = 0x00080000,
|
||||
PROJECTILE_ACCURATE = 0x00100000,
|
||||
PROJECTILE_NOSETOWNERSHADE = 0x00200000,
|
||||
PROJECTILE_RPG_IMPACT_DAMAGE = 0x00400000,
|
||||
PROJECTILE_MOVED = 0x80000000, // internal flag, do not document
|
||||
PROJECTILE_TYPE_MASK = PROJECTILE_HITSCAN | PROJECTILE_RPG | PROJECTILE_KNEE | PROJECTILE_BLOOD,
|
||||
};
|
||||
|
||||
|
||||
END_DUKE_NS
|
||||
|
||||
#endif
|
||||
|
|
@ -13,6 +13,7 @@ set( PCH_SOURCES
|
|||
src/gameexec.cpp
|
||||
src/gamevars.cpp
|
||||
src/global.cpp
|
||||
src/namesdyn.cpp
|
||||
src/net.cpp
|
||||
src/osdcmds.cpp
|
||||
src/player.cpp
|
||||
|
@ -23,6 +24,7 @@ set( PCH_SOURCES
|
|||
src/text.cpp
|
||||
src/sector.cpp
|
||||
src/sounds.cpp
|
||||
src/soundsdyn.cpp
|
||||
src/rrdh.cpp)
|
||||
|
||||
add_game_library( rr )
|
||||
|
|
|
@ -420,7 +420,7 @@ int32_t A_MoveSprite(int32_t spriteNum, vec3_t const * const change, uint32_t cl
|
|||
{
|
||||
// Handle potential stayput condition (map-provided or hard-coded).
|
||||
if (newSectnum < 0
|
||||
|| ((actor[spriteNum].stayput >= 0 && actor[spriteNum].stayput != newSectnum)
|
||||
|| ((actor[spriteNum].actorstayput >= 0 && actor[spriteNum].actorstayput != newSectnum)
|
||||
|| (!RR && ((pSprite->picnum == BOSS2 && pSprite->pal == 0 && sector[newSectnum].lotag != ST_3)
|
||||
|| ((pSprite->picnum == BOSS1 || pSprite->picnum == BOSS2) && sector[newSectnum].lotag == ST_1_ABOVE_WATER)
|
||||
|| (sector[newSectnum].lotag == ST_1_ABOVE_WATER
|
||||
|
|
|
@ -24,13 +24,132 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#define actors_h_
|
||||
|
||||
#include "player.h"
|
||||
# include "dukerr/namesdyn.h"
|
||||
#include "dukerr/actors.h"
|
||||
# include "namesdyn.h"
|
||||
|
||||
BEGIN_RR_NS
|
||||
|
||||
#define MAXSLEEPDIST 16384
|
||||
#define SLEEPTIME 1536
|
||||
#define ZOFFSET (1<<8)
|
||||
#define ZOFFSET2 (16<<8)
|
||||
#define ZOFFSET3 (8<<8)
|
||||
#define ZOFFSET4 (12<<8)
|
||||
#define ZOFFSET5 (32<<8)
|
||||
#define ZOFFSET6 (4<<8)
|
||||
|
||||
#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
|
||||
#define STAT_EFFECTOR 3
|
||||
#define STAT_PROJECTILE 4
|
||||
#define STAT_MISC 5
|
||||
#define STAT_STANDABLE 6
|
||||
#define STAT_LOCATOR 7
|
||||
#define STAT_ACTIVATOR 8
|
||||
#define STAT_TRANSPORT 9
|
||||
#define STAT_PLAYER 10
|
||||
#define STAT_FX 11
|
||||
#define STAT_FALLER 12
|
||||
#define STAT_DUMMYPLAYER 13
|
||||
#define STAT_LIGHT 14
|
||||
#define STAT_RAROR 15
|
||||
#define STAT_NETALLOC MAXSTATUS-1
|
||||
|
||||
|
||||
// Defines the motion characteristics of an actor
|
||||
enum amoveflags_t
|
||||
{
|
||||
face_player = 1,
|
||||
geth = 2,
|
||||
getv = 4,
|
||||
random_angle = 8,
|
||||
face_player_slow = 16,
|
||||
spin = 32,
|
||||
face_player_smart = 64,
|
||||
fleeenemy = 128,
|
||||
jumptoplayer_only = 256,
|
||||
jumptoplayer_bits = 257, // NOTE: two bits set!
|
||||
seekplayer = 512,
|
||||
furthestdir = 1024,
|
||||
dodgebullet = 4096,
|
||||
justjump2 = 8192,
|
||||
windang = 16384,
|
||||
antifaceplayerslow = 32768
|
||||
};
|
||||
|
||||
// Defines for 'useractor' keyword
|
||||
enum uactortypes_t
|
||||
{
|
||||
notenemy,
|
||||
enemy,
|
||||
enemystayput
|
||||
};
|
||||
|
||||
// These macros are there to give names to the t_data[]/T*/vm.g_t[] indices
|
||||
// when used with actors. Greppability of source code is certainly a virtue.
|
||||
#define AC_COUNT(t) ((t)[0]) /* the actor's count */
|
||||
/* The ID of the actor's current move. In C-CON, the bytecode offset to the
|
||||
* move composite: */
|
||||
#define AC_MOVE_ID(t) ((t)[1])
|
||||
#define AC_ACTION_COUNT(t) ((t)[2]) /* the actor's action count */
|
||||
#define AC_CURFRAME(t) ((t)[3]) /* the actor's current frame offset */
|
||||
/* The ID of the actor's current action. In C-CON, the bytecode offset to the
|
||||
* action composite: */
|
||||
#define AC_ACTION_ID(t) ((t)[4])
|
||||
#define AC_AI_ID(t) ((t)[5]) /* the ID of the actor's current ai */
|
||||
|
||||
enum actionparams
|
||||
{
|
||||
ACTION_STARTFRAME = 0,
|
||||
ACTION_NUMFRAMES,
|
||||
ACTION_VIEWTYPE,
|
||||
ACTION_INCVAL,
|
||||
ACTION_DELAY,
|
||||
ACTION_FLAGS,
|
||||
ACTION_PARAM_COUNT,
|
||||
};
|
||||
|
||||
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)
|
||||
# define AC_MOVFLAGS(spr, a) ((spr)->hitag)
|
||||
|
||||
// (+ 40 16 16 4 8 6 8 6 4 20)
|
||||
#pragma pack(push, 1)
|
||||
typedef struct
|
||||
{
|
||||
int32_t t_data[10]; // 40b sometimes used to hold offsets to con code
|
||||
|
||||
int32_t flags; // 4b
|
||||
vec3_t bpos; // 12b
|
||||
int32_t floorz, ceilingz; // 8b
|
||||
vec2_t lastv; // 8b
|
||||
int16_t picnum, ang, extra, owner; // 8b
|
||||
int16_t movflag, tempang, timetosleep; // 6b
|
||||
int16_t actorstayput; // 2b
|
||||
|
||||
uint8_t cgg, lasttransport; // 2b
|
||||
// NOTE: 'dispicnum' is updated every frame, not in sync with game tics!
|
||||
int16_t dispicnum; // 2b
|
||||
|
||||
#ifdef POLYMER
|
||||
int16_t lightId, lightmaxrange; // 4b
|
||||
_prlight *lightptr; // 4b/8b aligned on 96 bytes
|
||||
uint8_t lightcount, filler[3];
|
||||
#endif
|
||||
} actor_t;
|
||||
|
||||
// this struct needs to match the beginning of actor_t above
|
||||
typedef struct
|
||||
{
|
||||
|
@ -42,7 +161,7 @@ typedef struct
|
|||
vec2_t lastv; // 8b
|
||||
int16_t picnum, ang, extra, owner; // 8b
|
||||
int16_t movflag, tempang, timetosleep; // 6b
|
||||
int16_t stayput;
|
||||
int16_t actorstayput;
|
||||
|
||||
uint8_t cgg, lasttransport;
|
||||
|
||||
|
@ -50,6 +169,84 @@ typedef struct
|
|||
int16_t netIndex;
|
||||
} netactor_t;
|
||||
#pragma pack(pop)
|
||||
|
||||
typedef struct
|
||||
{
|
||||
intptr_t *execPtr; // pointer to CON script for this tile, formerly actorscrptr
|
||||
intptr_t *loadPtr; // pointer to load time CON script, formerly actorLoadEventScrPtr or something
|
||||
uint32_t flags; // formerly SpriteFlags, ActorType
|
||||
int32_t cacherange; // formerly SpriteCache
|
||||
} tiledata_t;
|
||||
|
||||
|
||||
// KEEPINSYNC lunatic/con_lang.lua
|
||||
enum sflags_t
|
||||
{
|
||||
SFLAG_SHADOW = 0x00000001,
|
||||
SFLAG_NVG = 0x00000002,
|
||||
SFLAG_NOSHADE = 0x00000004,
|
||||
SFLAG_PROJECTILE = 0x00000008,
|
||||
SFLAG_DECAL = 0x00000010,
|
||||
SFLAG_BADGUY = 0x00000020,
|
||||
SFLAG_NOPAL = 0x00000040,
|
||||
SFLAG_NOEVENTCODE = 0x00000080,
|
||||
SFLAG_NOLIGHT = 0x00000100,
|
||||
SFLAG_USEACTIVATOR = 0x00000200,
|
||||
SFLAG_NULL = 0x00000400, // null sprite in multiplayer
|
||||
SFLAG_NOCLIP = 0x00000800, // clipmove it with cliptype 0
|
||||
SFLAG_NOFLOORSHADOW = 0x00001000, // for temp. internal use, per-tile flag not checked
|
||||
SFLAG_SMOOTHMOVE = 0x00002000,
|
||||
SFLAG_NOTELEPORT = 0x00004000,
|
||||
SFLAG_BADGUYSTAYPUT = 0x00008000,
|
||||
SFLAG_CACHE = 0x00010000,
|
||||
// rotation-fixed wrt a pivot point to prevent position diverging due to
|
||||
// roundoff error accumulation:
|
||||
SFLAG_ROTFIXED = 0x00020000,
|
||||
SFLAG_HARDCODED_BADGUY = 0x00040000,
|
||||
SFLAG_DIDNOSE7WATER = 0x00080000, // used temporarily
|
||||
SFLAG_NODAMAGEPUSH = 0x00100000,
|
||||
SFLAG_NOWATERDIP = 0x00200000,
|
||||
SFLAG_HURTSPAWNBLOOD = 0x00400000,
|
||||
SFLAG_GREENSLIMEFOOD = 0x00800000,
|
||||
SFLAG_REALCLIPDIST = 0x01000000,
|
||||
SFLAG_WAKEUPBADGUYS = 0x02000000,
|
||||
SFLAG_DAMAGEEVENT = 0x04000000,
|
||||
SFLAG_BADGUY_TILE = 0x08000000,
|
||||
SFLAG_KILLCOUNT = 0x10000000,
|
||||
SFLAG_NOCANSEECHECK = 0x20000000,
|
||||
};
|
||||
|
||||
// Custom projectiles "workslike" flags.
|
||||
// XXX: Currently not predefined from CON.
|
||||
enum pflags_t
|
||||
{
|
||||
PROJECTILE_HITSCAN = 0x00000001,
|
||||
PROJECTILE_RPG = 0x00000002,
|
||||
PROJECTILE_BOUNCESOFFWALLS = 0x00000004,
|
||||
PROJECTILE_BOUNCESOFFMIRRORS = 0x00000008,
|
||||
PROJECTILE_KNEE = 0x00000010,
|
||||
PROJECTILE_WATERBUBBLES = 0x00000020,
|
||||
PROJECTILE_TIMED = 0x00000040,
|
||||
PROJECTILE_BOUNCESOFFSPRITES = 0x00000080,
|
||||
PROJECTILE_SPIT = 0x00000100,
|
||||
PROJECTILE_COOLEXPLOSION1 = 0x00000200,
|
||||
PROJECTILE_BLOOD = 0x00000400,
|
||||
PROJECTILE_LOSESVELOCITY = 0x00000800,
|
||||
PROJECTILE_NOAIM = 0x00001000,
|
||||
PROJECTILE_RANDDECALSIZE = 0x00002000,
|
||||
PROJECTILE_EXPLODEONTIMER = 0x00004000,
|
||||
PROJECTILE_RPG_IMPACT = 0x00008000,
|
||||
PROJECTILE_RADIUS_PICNUM = 0x00010000,
|
||||
PROJECTILE_ACCURATE_AUTOAIM = 0x00020000,
|
||||
PROJECTILE_FORCEIMPACT = 0x00040000,
|
||||
PROJECTILE_REALCLIPDIST = 0x00080000,
|
||||
PROJECTILE_ACCURATE = 0x00100000,
|
||||
PROJECTILE_NOSETOWNERSHADE = 0x00200000,
|
||||
PROJECTILE_RPG_IMPACT_DAMAGE = 0x00400000,
|
||||
PROJECTILE_MOVED = 0x80000000, // internal flag, do not document
|
||||
PROJECTILE_TYPE_MASK = PROJECTILE_HITSCAN | PROJECTILE_RPG | PROJECTILE_KNEE | PROJECTILE_BLOOD,
|
||||
};
|
||||
|
||||
extern tiledata_t g_tile[MAXTILES];
|
||||
extern actor_t actor[MAXSPRITES];
|
||||
extern int32_t block_deletesprite;
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
|
||||
#include "common.h"
|
||||
#include "dukerr/common_game.h"
|
||||
#include "common_game.h"
|
||||
|
||||
BEGIN_RR_NS
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
#include "gamecontrol.h"
|
||||
|
||||
BEGIN_DUKERR_NS
|
||||
BEGIN_RR_NS
|
||||
|
||||
|
||||
#define DUKE (g_gameType & GAMEFLAG_DUKE)
|
||||
|
@ -21,8 +21,18 @@ BEGIN_DUKERR_NS
|
|||
#define NAM_WW2GI (g_gameType & (GAMEFLAG_NAM|GAMEFLAG_WW2GI))
|
||||
#define SHAREWARE (g_gameType & GAMEFLAG_SHAREWARE)
|
||||
#define DEER (g_gameType & GAMEFLAG_DEER)
|
||||
#define DUKEBETA ((g_gameType & GAMEFLAG_DUKEBETA) == GAMEFLAG_DUKEBETA)
|
||||
#define FURY (g_gameType & GAMEFLAG_FURY)
|
||||
//#define DUKEBETA ((g_gameType & GAMEFLAG_DUKEBETA) == GAMEFLAG_DUKEBETA)
|
||||
//#define IONMAIDEN (g_gameType & GAMEFLAG_IONMAIDEN)
|
||||
|
||||
enum Games_t {
|
||||
GAME_DUKE = 0,
|
||||
GAME_RR,
|
||||
GAME_RRRA,
|
||||
GAME_NAM,
|
||||
GAME_NAPALM,
|
||||
//GAME_WW2GI,
|
||||
GAMECOUNT
|
||||
};
|
||||
|
||||
typedef enum basepal_ {
|
||||
BASEPAL = 0,
|
||||
|
@ -39,6 +49,17 @@ typedef enum basepal_ {
|
|||
#include "v_text.h"
|
||||
|
||||
|
||||
extern int loaddefinitions_game(const char *fn, int32_t preload);
|
||||
|
||||
//////////
|
||||
|
||||
extern void G_InitMultiPsky(int CLOUDYOCEAN__DYN, int MOONSKY1__DYN, int BIGORBIT1__DYN, int LA__DYN);
|
||||
extern void G_SetupGlobalPsky(void);
|
||||
|
||||
//////////
|
||||
|
||||
extern void G_LoadLookups(void);
|
||||
|
||||
//////////
|
||||
|
||||
END_RR_NS
|
|
@ -37,7 +37,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#include "menu/menu.h"
|
||||
#include "gstrings.h"
|
||||
#include "version.h"
|
||||
#include "dukerr/namesdyn.h"
|
||||
#include "namesdyn.h"
|
||||
#include "../../glbackend/glbackend.h"
|
||||
|
||||
|
||||
|
|
|
@ -727,6 +727,8 @@ nextdemo_nomenu:
|
|||
// if fast-forwarding, we must update totalclock
|
||||
totalclock += TICSPERFRAME;
|
||||
|
||||
// OSD_Printf("t:%d, l+T:%d; cnt:%d, goal:%d%s", totalclock, (lockclock+TICSPERFRAME),
|
||||
// g_demo_cnt, g_demo_goalCnt, g_demo_cnt>=g_demo_goalCnt?" ":"\n");
|
||||
if (g_demo_cnt>=g_demo_goalCnt)
|
||||
{
|
||||
g_demo_goalCnt = 0;
|
||||
|
@ -812,6 +814,16 @@ nextdemo_nomenu:
|
|||
|
||||
if (g_demo_showStats)
|
||||
{
|
||||
#if 0
|
||||
if (g_demo_cnt<tmpdifftime)
|
||||
gametext_center(100, "DIFF");
|
||||
|
||||
{
|
||||
char buf[32];
|
||||
Bsprintf(buf, "RC:%4d TC:%5d", ud.reccnt, g_demo_cnt);
|
||||
gametext_center_number(100, buf);
|
||||
}
|
||||
#endif
|
||||
j=g_demo_cnt/REALGAMETICSPERSEC;
|
||||
Bsprintf(buf, "%02d:%02d", j/60, j%60);
|
||||
gametext_widenumber(18, 16, buf);
|
||||
|
@ -900,6 +912,9 @@ nextdemo_nomenu:
|
|||
|
||||
if (foundemo)
|
||||
{
|
||||
#if KRANDDEBUG
|
||||
krd_print("krandplay.log");
|
||||
#endif
|
||||
g_demo_recFilePtr.Close();
|
||||
}
|
||||
|
||||
|
@ -916,6 +931,11 @@ nextdemo_nomenu:
|
|||
if (g_player[myconnectindex].ps->gm&MODE_MENU)
|
||||
goto RECHECK;
|
||||
|
||||
#if KRANDDEBUG
|
||||
if (foundemo)
|
||||
krd_print("krandplay.log");
|
||||
#endif
|
||||
|
||||
// finished playing a demo and not in menu:
|
||||
// return so that e.g. the title can be shown
|
||||
return 1;
|
||||
|
|
|
@ -109,25 +109,26 @@ EDUKE32_STATIC_ASSERT(7 <= MAXTILES-MAXUSERTILES);
|
|||
END_RR_NS
|
||||
|
||||
#include "actors.h"
|
||||
#include "dukerr/common_game.h"
|
||||
#include "common_game.h"
|
||||
#include "config.h"
|
||||
#include "gamecontrol.h"
|
||||
#include "game.h"
|
||||
#include "gamedef.h"
|
||||
#include "gamedefs.h"
|
||||
#include "gameexec.h"
|
||||
#include "gamevars.h"
|
||||
#include "global.h"
|
||||
#include "inv.h"
|
||||
#include "dukerr/macros.h"
|
||||
#include "dukerr/namesdyn.h"
|
||||
#include "macros.h"
|
||||
#include "namesdyn.h"
|
||||
#include "net.h"
|
||||
#include "player.h"
|
||||
#include "dukerr/quotes.h"
|
||||
#include "quotes.h"
|
||||
#include "rts.h"
|
||||
#include "text.h"
|
||||
#include "sector.h"
|
||||
#include "sounds.h"
|
||||
#include "dukerr/soundsdyn.h"
|
||||
#include "soundsdyn.h"
|
||||
#include "rrdh.h"
|
||||
|
||||
BEGIN_RR_NS
|
||||
|
|
51
source/rr/src/events_defs.h
Normal file
51
source/rr/src/events_defs.h
Normal file
|
@ -0,0 +1,51 @@
|
|||
|
||||
#ifndef EDUKE32_EVENTS_DEFS_H_
|
||||
#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,
|
||||
EVENT_RESETWEAPONS,
|
||||
EVENT_RESETINVENTORY,
|
||||
EVENT_HOLSTER,
|
||||
EVENT_LOOKLEFT, // 5
|
||||
EVENT_LOOKRIGHT,
|
||||
EVENT_SOARUP,
|
||||
EVENT_SOARDOWN,
|
||||
EVENT_CROUCH,
|
||||
EVENT_JUMP, // 10
|
||||
EVENT_RETURNTOCENTER,
|
||||
EVENT_LOOKUP,
|
||||
EVENT_LOOKDOWN,
|
||||
EVENT_AIMUP,
|
||||
EVENT_FIRE, // 15
|
||||
EVENT_CHANGEWEAPON,
|
||||
EVENT_GETSHOTRANGE,
|
||||
EVENT_GETAUTOAIMANGLE,
|
||||
EVENT_GETLOADTILE,
|
||||
EVENT_CHEATGETSTEROIDS, // 20
|
||||
EVENT_CHEATGETHEAT,
|
||||
EVENT_CHEATGETBOOT,
|
||||
EVENT_CHEATGETSHIELD,
|
||||
EVENT_CHEATGETSCUBA,
|
||||
EVENT_CHEATGETHOLODUKE, // 25
|
||||
EVENT_CHEATGETJETPACK,
|
||||
EVENT_CHEATGETFIRSTAID,
|
||||
EVENT_QUICKKICK,
|
||||
EVENT_INVENTORY,
|
||||
EVENT_USENIGHTVISION, // 30
|
||||
EVENT_USESTEROIDS,
|
||||
EVENT_INVENTORYLEFT,
|
||||
EVENT_INVENTORYRIGHT,
|
||||
EVENT_HOLODUKEON,
|
||||
EVENT_HOLODUKEOFF, // 35
|
||||
EVENT_USEMEDKIT,
|
||||
EVENT_USEJETPACK,
|
||||
EVENT_TURNAROUND,
|
||||
MAXEVENTS,
|
||||
EVENT_AIMDOWN = EVENT_AIMUP,
|
||||
};
|
||||
|
||||
#endif
|
|
@ -1,4 +1,4 @@
|
|||
//-------------------------------------------------------------------------
|
||||
//-------------------------------------------------------------------------
|
||||
/*
|
||||
Copyright (C) 2016 EDuke32 developers and contributors
|
||||
|
||||
|
@ -63,9 +63,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
|
||||
BEGIN_RR_NS
|
||||
|
||||
extern void G_InitMultiPsky(int CLOUDYOCEAN__DYN, int MOONSKY1__DYN, int BIGORBIT1__DYN, int LA__DYN);
|
||||
extern void G_LoadLookups(void);
|
||||
|
||||
|
||||
int32_t g_quitDeadline = 0;
|
||||
|
||||
|
@ -79,6 +76,8 @@ int32_t vote_map = -1, vote_episode = -1;
|
|||
|
||||
int32_t g_Debug = 0;
|
||||
|
||||
const char *defaultrtsfilename[GAMECOUNT] = { "DUKE.RTS", "REDNECK.RTS", "REDNECK.RTS", "NAM.RTS", "NAPALM.RTS" };
|
||||
|
||||
int32_t g_Shareware = 0;
|
||||
|
||||
int32_t tempwallptr;
|
||||
|
@ -95,6 +94,30 @@ int32_t g_levelTextTime = 0;
|
|||
extern char forcegl;
|
||||
#endif
|
||||
|
||||
const char *G_DefaultRtsFile(void)
|
||||
{
|
||||
if (DUKE)
|
||||
return defaultrtsfilename[GAME_DUKE];
|
||||
else if (NAPALM)
|
||||
{
|
||||
if (!fileSystem.FileExists(defaultrtsfilename[GAME_NAPALM]) && fileSystem.FileExists(defaultrtsfilename[GAME_NAM]))
|
||||
return defaultrtsfilename[GAME_NAM]; // NAM/NAPALM Sharing
|
||||
else
|
||||
return defaultrtsfilename[GAME_NAPALM];
|
||||
}
|
||||
else if (NAM)
|
||||
{
|
||||
if (!fileSystem.FileExists(defaultrtsfilename[GAME_NAM]) && fileSystem.FileExists(defaultrtsfilename[GAME_NAPALM]))
|
||||
return defaultrtsfilename[GAME_NAPALM]; // NAM/NAPALM Sharing
|
||||
else
|
||||
return defaultrtsfilename[GAME_NAM];
|
||||
}
|
||||
else if (RR)
|
||||
return defaultrtsfilename[GAME_RR];
|
||||
|
||||
return defaultrtsfilename[0];
|
||||
}
|
||||
|
||||
enum gametokens
|
||||
{
|
||||
T_INCLUDE = 0,
|
||||
|
@ -1526,7 +1549,7 @@ int32_t A_InsertSprite(int16_t whatsect,int32_t s_x,int32_t s_y,int32_t s_z,int1
|
|||
actor[i].ceilingz = actor[s_ow].ceilingz;
|
||||
}
|
||||
|
||||
actor[i].stayput = actor[i].extra = -1;
|
||||
actor[i].actorstayput = actor[i].extra = -1;
|
||||
#ifdef POLYMER
|
||||
actor[i].lightId = -1;
|
||||
#endif
|
||||
|
@ -1609,7 +1632,7 @@ int A_Spawn(int spriteNum, int tileNum)
|
|||
pActor->floorz = sector[pSprite->sectnum].floorz;
|
||||
pActor->ceilingz = sector[pSprite->sectnum].ceilingz;
|
||||
|
||||
pActor->stayput = pActor->extra = -1;
|
||||
pActor->actorstayput = pActor->extra = -1;
|
||||
|
||||
#ifdef POLYMER
|
||||
pActor->lightId = -1;
|
||||
|
@ -1720,7 +1743,7 @@ default_case:
|
|||
A_Fall(newSprite);
|
||||
|
||||
if (A_CheckSpriteFlags(newSprite, SFLAG_BADGUYSTAYPUT))
|
||||
pActor->stayput = pSprite->sectnum;
|
||||
pActor->actorstayput = pSprite->sectnum;
|
||||
|
||||
if (!RR || A_CheckSpriteFlags(newSprite, SFLAG_KILLCOUNT))
|
||||
g_player[myconnectindex].ps->max_actors_killed++;
|
||||
|
@ -2873,7 +2896,7 @@ rrbloodpool_fallthrough:
|
|||
case COMMANDERSTAYPUT__STATIC:
|
||||
case BOSS4STAYPUT__STATIC:
|
||||
if (RR) goto default_case;
|
||||
pActor->stayput = pSprite->sectnum;
|
||||
pActor->actorstayput = pSprite->sectnum;
|
||||
fallthrough__;
|
||||
case BOSS1__STATIC:
|
||||
case BOSS2__STATIC:
|
||||
|
@ -3035,7 +3058,7 @@ rrbloodpool_fallthrough:
|
|||
case CHEERSTAYPUT__STATICRR:
|
||||
case SBMOVE__STATICRR:
|
||||
if ((RRRA && pSprite->picnum == SBMOVE) || (!RRRA && (pSprite->picnum == SBSWIPE || pSprite->picnum == CHEERSTAYPUT))) goto default_case;
|
||||
pActor->stayput = pSprite->sectnum;
|
||||
pActor->actorstayput = pSprite->sectnum;
|
||||
fallthrough__;
|
||||
case BOULDER__STATICRR:
|
||||
case BOULDER1__STATICRR:
|
||||
|
@ -6934,8 +6957,6 @@ static void G_Startup(void)
|
|||
G_FatalEngineError();
|
||||
|
||||
G_InitDynamicTiles();
|
||||
if (RR) PHEIGHT = PHEIGHT_RR;
|
||||
|
||||
G_InitDynamicSounds();
|
||||
|
||||
// These depend on having the dynamic tile and/or sound mappings set up:
|
||||
|
|
|
@ -27,6 +27,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#endif
|
||||
|
||||
#include "fix16.h"
|
||||
#include "gamedefs.h"
|
||||
#include "gamedef.h"
|
||||
#include "net.h"
|
||||
#include "mmulti.h"
|
||||
|
@ -199,6 +200,9 @@ static inline int Menu_HaveUserMap(void)
|
|||
return (boardfilename[0] != 0 && m_level_number == 7 && ud.m_volume_number == 0);
|
||||
}
|
||||
|
||||
extern const char *defaultrtsfilename[GAMECOUNT];
|
||||
extern const char *G_DefaultRtsFile(void);
|
||||
|
||||
#ifdef LEGACY_ROR
|
||||
extern char ror_protectedsectors[MAXSECTORS];
|
||||
#endif
|
||||
|
|
|
@ -23,12 +23,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#include "ns.h" // Must come before everything else!
|
||||
|
||||
#include "duke3d.h"
|
||||
#include "dukerr/namesdyn.h"
|
||||
#include "namesdyn.h"
|
||||
#include "gamedef.h"
|
||||
#include "gameexec.h"
|
||||
#include "savegame.h"
|
||||
#include "common.h"
|
||||
#include "dukerr/common_game.h"
|
||||
#include "common_game.h"
|
||||
#include "cheats.h"
|
||||
#include "m_argv.h"
|
||||
|
||||
|
@ -63,7 +63,7 @@ static int32_t g_numBraces = 0;
|
|||
static int32_t C_ParseCommand(int32_t loop);
|
||||
static int32_t C_SetScriptSize(int32_t size);
|
||||
|
||||
static intptr_t apScriptGameEventEnd[MAXEVENTS_RR];
|
||||
static intptr_t apScriptGameEventEnd[MAXEVENTS];
|
||||
static intptr_t g_parsingActorPtr;
|
||||
static intptr_t g_scriptEventOffset;
|
||||
static char *textptr;
|
||||
|
@ -324,6 +324,7 @@ void C_InitHashes()
|
|||
for (auto &varvar : varvartable)
|
||||
inthash_add(&h_varvar, varvar.x, varvar.y, 0);
|
||||
|
||||
//inithashnames();
|
||||
initsoundhashnames();
|
||||
|
||||
for (tokenmap_t const & keyword : vm_keywords)
|
||||
|
@ -1315,6 +1316,8 @@ static int32_t C_ParseCommand(int32_t loop)
|
|||
hash_add(&h_labels,label+(g_labelCnt<<6),g_labelCnt,0);
|
||||
labeltype[g_labelCnt] = LABEL_DEFINE;
|
||||
labelcode[g_labelCnt++] = *(g_scriptPtr-1);
|
||||
//if (*(g_scriptPtr-1) >= 0 && *(g_scriptPtr-1) < MAXTILES && g_dynamicTileMapping)
|
||||
// G_ProcessDynamicTileMapping(label+((g_labelCnt-1)<<6),*(g_scriptPtr-1));
|
||||
}
|
||||
g_scriptPtr -= 2;
|
||||
continue;
|
||||
|
@ -1729,7 +1732,7 @@ static int32_t C_ParseCommand(int32_t loop)
|
|||
g_currentEvent = j;
|
||||
//Bsprintf(g_szBuf,"Adding Event for %d at %lX",j, g_parsingEventPtr);
|
||||
//AddLog(g_szBuf);
|
||||
if (EDUKE32_PREDICT_FALSE((unsigned)j > MAXEVENTS_RR-1))
|
||||
if (EDUKE32_PREDICT_FALSE((unsigned)j > MAXEVENTS-1))
|
||||
{
|
||||
initprintf("%s:%d: error: invalid event ID.\n",g_scriptFileName,g_lineNumber);
|
||||
g_errorCnt++;
|
||||
|
@ -2721,6 +2724,7 @@ void C_Compile(const char *fileName)
|
|||
for (auto *i : tables_free)
|
||||
hash_free(i);
|
||||
|
||||
//freehashnames();
|
||||
freesoundhashnames();
|
||||
|
||||
if (g_scriptDebug)
|
||||
|
|
|
@ -28,7 +28,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#include "cheats.h"
|
||||
#include "common.h" // tokenlist
|
||||
#include "player.h" // projectile_t
|
||||
#include "dukerr/events_defs.h"
|
||||
|
||||
BEGIN_RR_NS
|
||||
|
||||
|
@ -81,7 +80,8 @@ extern int32_t g_weaponVarID; // var ID of "WEAPON"
|
|||
extern int32_t g_worksLikeVarID; // var ID of "WORKSLIKE"
|
||||
extern int32_t g_zRangeVarID; // var ID of "ZRANGE"
|
||||
|
||||
extern intptr_t apScriptEvents[MAXEVENTS_RR];
|
||||
#include "events_defs.h"
|
||||
extern intptr_t apScriptEvents[MAXEVENTS];
|
||||
|
||||
extern char g_scriptFileName[BMAX_PATH];
|
||||
|
||||
|
|
0
source/rr/src/gamedefs.h
Normal file
0
source/rr/src/gamedefs.h
Normal file
|
@ -130,7 +130,7 @@ static void VM_DeleteSprite(int const spriteNum, int const playerNum)
|
|||
A_DeleteSprite(spriteNum);
|
||||
}
|
||||
|
||||
intptr_t apScriptEvents[MAXEVENTS_RR];
|
||||
intptr_t apScriptEvents[MAXEVENTS];
|
||||
static uspritetype dummy_sprite;
|
||||
static actor_t dummy_actor;
|
||||
|
||||
|
@ -1389,7 +1389,7 @@ GAMEEXEC_STATIC void VM_Execute(native_t loop)
|
|||
vm.pActor->timetosleep = SLEEPTIME;
|
||||
continue;
|
||||
|
||||
case CON_IFACTORNOTSTAYPUT: VM_CONDITIONAL(vm.pActor->stayput == -1); continue;
|
||||
case CON_IFACTORNOTSTAYPUT: VM_CONDITIONAL(vm.pActor->actorstayput == -1); continue;
|
||||
|
||||
case CON_IFCANSEE:
|
||||
{
|
||||
|
@ -1911,7 +1911,7 @@ GAMEEXEC_STATIC void VM_Execute(native_t loop)
|
|||
}
|
||||
else P_AddKills(pPlayer, *insptr);
|
||||
insptr++;
|
||||
vm.pActor->stayput = -1;
|
||||
vm.pActor->actorstayput = -1;
|
||||
continue;
|
||||
|
||||
case CON_LOTSOFGLASS:
|
||||
|
|
|
@ -25,7 +25,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#include "duke3d.h"
|
||||
#include "menus.h"
|
||||
#include "savegame.h"
|
||||
#include "dukerr/namesdyn.h"
|
||||
#include "namesdyn.h"
|
||||
#include "gamevars.h"
|
||||
|
||||
//#include "vfs.h"
|
||||
|
|
|
@ -99,6 +99,24 @@ int32_t g_spriteGravity = 176;
|
|||
int32_t g_timerTicsPerSecond = TICRATE;
|
||||
int32_t g_tripbombRadius = 3880;
|
||||
|
||||
int16_t g_blimpSpawnItems[15] =
|
||||
{
|
||||
RPGSPRITE__STATIC,
|
||||
CHAINGUNSPRITE__STATIC,
|
||||
DEVISTATORAMMO__STATIC,
|
||||
RPGAMMO__STATIC,
|
||||
RPGAMMO__STATIC,
|
||||
JETPACK__STATIC,
|
||||
SHIELD__STATIC,
|
||||
FIRSTAID__STATIC,
|
||||
STEROIDS__STATIC,
|
||||
RPGAMMO__STATIC,
|
||||
RPGAMMO__STATIC,
|
||||
RPGSPRITE__STATIC,
|
||||
RPGAMMO__STATIC,
|
||||
FREEZESPRITE__STATIC,
|
||||
FREEZEAMMO__STATIC
|
||||
};
|
||||
|
||||
char CheatKeys[2] = { sc_D, sc_N };
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#include "compat.h"
|
||||
#include "duke3d.h"
|
||||
#include "mmulti.h"
|
||||
#include "dukerr/quotes.h"
|
||||
#include "quotes.h"
|
||||
#include "sector.h"
|
||||
#include "sounds.h"
|
||||
|
||||
|
@ -275,6 +275,7 @@ extern int32_t g_timerTicsPerSecond;
|
|||
extern int32_t g_tripbombRadius;
|
||||
extern int32_t g_volumeCnt;
|
||||
|
||||
extern int16_t g_blimpSpawnItems[15];
|
||||
extern int32_t g_gametypeFlags[MAXGAMETYPES];
|
||||
|
||||
extern const char *s_buildDate;
|
||||
|
|
153
source/rr/src/keys.h
Normal file
153
source/rr/src/keys.h
Normal file
|
@ -0,0 +1,153 @@
|
|||
//-------------------------------------------------------------------------
|
||||
/*
|
||||
Copyright (C) 2010 EDuke32 developers and contributors
|
||||
|
||||
This file is part of EDuke32.
|
||||
|
||||
EDuke32 is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License version 2
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
#ifndef KEYS_H
|
||||
|
||||
BEGIN_RR_NS
|
||||
|
||||
|
||||
#define KEYS_H
|
||||
|
||||
#define NUM_CODES 128
|
||||
|
||||
#define ESC 0x1B
|
||||
#define ENTER 0x0D
|
||||
|
||||
#define KEYSC_ESC 0x01
|
||||
#define KEYSC_1 0x02
|
||||
#define KEYSC_2 0x03
|
||||
#define KEYSC_3 0x04
|
||||
#define KEYSC_4 0x05
|
||||
#define KEYSC_5 0x06
|
||||
#define KEYSC_6 0x07
|
||||
#define KEYSC_7 0x08
|
||||
#define KEYSC_8 0x09
|
||||
#define KEYSC_9 0x0a
|
||||
#define KEYSC_0 0x0b
|
||||
#define KEYSC_DASH 0x0c
|
||||
#define KEYSC_EQUAL 0x0d
|
||||
|
||||
#define KEYSC_BS 0x0e
|
||||
#define KEYSC_TAB 0x0f
|
||||
#define KEYSC_Q 0x10
|
||||
#define KEYSC_W 0x11
|
||||
#define KEYSC_E 0x12
|
||||
#define KEYSC_R 0x13
|
||||
#define KEYSC_T 0x14
|
||||
#define KEYSC_Y 0x15
|
||||
#define KEYSC_U 0x16
|
||||
#define KEYSC_I 0x17
|
||||
#define KEYSC_O 0x18
|
||||
#define KEYSC_P 0x19
|
||||
#define KEYSC_LBRACK 0x1a
|
||||
#define KEYSC_RBRACK 0x1b
|
||||
#define KEYSC_ENTER 0x1c
|
||||
|
||||
#define KEYSC_LCTRL 0x1d
|
||||
#define KEYSC_A 0x1e
|
||||
#define KEYSC_S 0x1f
|
||||
#define KEYSC_D 0x20
|
||||
#define KEYSC_F 0x21
|
||||
#define KEYSC_G 0x22
|
||||
#define KEYSC_H 0x23
|
||||
#define KEYSC_J 0x24
|
||||
#define KEYSC_K 0x25
|
||||
#define KEYSC_L 0x26
|
||||
#define KEYSC_SEMI 0x27
|
||||
#define KEYSC_QUOTE 0x28
|
||||
#define KEYSC_BQUOTE 0x29
|
||||
#define KEYSC_TILDE 0x29
|
||||
|
||||
#define KEYSC_LSHIFT 0x2a
|
||||
#define KEYSC_BSLASH 0x2b
|
||||
#define KEYSC_Z 0x2c
|
||||
#define KEYSC_X 0x2d
|
||||
#define KEYSC_C 0x2e
|
||||
#define KEYSC_V 0x2f
|
||||
#define KEYSC_B 0x30
|
||||
#define KEYSC_N 0x31
|
||||
#define KEYSC_M 0x32
|
||||
#define KEYSC_COMMA 0x33
|
||||
#define KEYSC_PERIOD 0x34
|
||||
#define KEYSC_SLASH 0x35
|
||||
#define KEYSC_RSHIFT 0x36
|
||||
#define KEYSC_gSTAR 0x37
|
||||
|
||||
#define KEYSC_LALT 0x38
|
||||
#define KEYSC_SPACE 0x39
|
||||
#define KEYSC_CAPS 0x3a
|
||||
|
||||
#define KEYSC_F1 0x3b
|
||||
#define KEYSC_F2 0x3c
|
||||
#define KEYSC_F3 0x3d
|
||||
#define KEYSC_F4 0x3e
|
||||
#define KEYSC_F5 0x3f
|
||||
#define KEYSC_F6 0x40
|
||||
#define KEYSC_F7 0x41
|
||||
#define KEYSC_F8 0x42
|
||||
#define KEYSC_F9 0x43
|
||||
#define KEYSC_F10 0x44
|
||||
|
||||
#define KEYSC_gNUM 0x45
|
||||
#define KEYSC_SCROLL 0x46
|
||||
|
||||
#define KEYSC_gHOME 0x47
|
||||
#define KEYSC_gUP 0x48
|
||||
#define KEYSC_gPGUP 0x49
|
||||
#define KEYSC_gMINUS 0x4a
|
||||
#define KEYSC_gLEFT 0x4b
|
||||
#define KEYSC_gKP5 0x4c
|
||||
#define KEYSC_gRIGHT 0x4d
|
||||
#define KEYSC_gPLUS 0x4e
|
||||
#define KEYSC_gEND 0x4f
|
||||
#define KEYSC_gDOWN 0x50
|
||||
#define KEYSC_gPGDN 0x51
|
||||
#define KEYSC_gINS 0x52
|
||||
#define KEYSC_gDEL 0x53
|
||||
|
||||
#define KEYSC_F11 0x57
|
||||
#define KEYSC_F12 0x58
|
||||
|
||||
#define KEYSC_gENTER 0x9C
|
||||
#define KEYSC_RCTRL 0x9D
|
||||
#define KEYSC_gSLASH 0xB5
|
||||
#define KEYSC_RALT 0xB8
|
||||
#define KEYSC_PRTSCN 0xB7
|
||||
#define KEYSC_PAUSE 0xC5
|
||||
#define KEYSC_HOME 0xC7
|
||||
#define KEYSC_UP 0xC8
|
||||
#define KEYSC_PGUP 0xC9
|
||||
#define KEYSC_LEFT 0xCB
|
||||
#define KEYSC_RIGHT 0xCD
|
||||
#define KEYSC_END 0xCF
|
||||
#define KEYSC_DOWN 0xD0
|
||||
#define KEYSC_PGDN 0xD1
|
||||
#define KEYSC_INSERT 0xD2
|
||||
#define KEYSC_DELETE 0xD3
|
||||
|
||||
#define asc_Esc 27
|
||||
#define asc_Enter 13
|
||||
#define asc_Space 32
|
||||
|
||||
END_RR_NS
|
||||
|
||||
#endif
|
|
@ -25,7 +25,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
|
||||
#include "mmulti.h"
|
||||
|
||||
BEGIN_DUKERR_NS
|
||||
BEGIN_RR_NS
|
||||
|
||||
// Macros, some from SW source
|
||||
|
||||
|
@ -207,6 +207,6 @@ static FORCE_INLINE int32_t krand2(void)
|
|||
#define T5(i) actor[i].t_data[4]
|
||||
#define T6(i) actor[i].t_data[5]
|
||||
|
||||
END_DUKERR_NS
|
||||
END_RR_NS
|
||||
|
||||
#endif
|
|
@ -25,9 +25,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#include "build.h"
|
||||
|
||||
#include "namesdyn.h"
|
||||
#include "global.h"
|
||||
#include "gamecontrol.h"
|
||||
|
||||
BEGIN_DUKERR_NS
|
||||
BEGIN_RR_NS
|
||||
|
||||
#define DVPTR(x) &x
|
||||
|
||||
|
@ -42,31 +43,6 @@ struct dynitem
|
|||
const int16_t staticval_rr;
|
||||
};
|
||||
|
||||
int16_t g_blimpSpawnItems[15] =
|
||||
{
|
||||
RPGSPRITE__STATIC,
|
||||
CHAINGUNSPRITE__STATIC,
|
||||
DEVISTATORAMMO__STATIC,
|
||||
RPGAMMO__STATIC,
|
||||
RPGAMMO__STATIC,
|
||||
JETPACK__STATIC,
|
||||
SHIELD__STATIC,
|
||||
FIRSTAID__STATIC,
|
||||
STEROIDS__STATIC,
|
||||
RPGAMMO__STATIC,
|
||||
RPGAMMO__STATIC,
|
||||
RPGSPRITE__STATIC,
|
||||
RPGAMMO__STATIC,
|
||||
FREEZESPRITE__STATIC,
|
||||
FREEZEAMMO__STATIC
|
||||
};
|
||||
|
||||
int16_t WeaponPickupSprites[MAX_WEAPONS] = { KNEE__STATIC, FIRSTGUNSPRITE__STATIC, SHOTGUNSPRITE__STATIC,
|
||||
CHAINGUNSPRITE__STATIC, RPGSPRITE__STATIC, HEAVYHBOMB__STATIC, SHRINKERSPRITE__STATIC, DEVISTATORSPRITE__STATIC,
|
||||
TRIPBOMBSPRITE__STATIC, FREEZESPRITE__STATIC, HEAVYHBOMB__STATIC, SHRINKERSPRITE__STATIC
|
||||
};
|
||||
|
||||
|
||||
static struct dynitem g_dynTileList[] =
|
||||
{
|
||||
{ "SECTOREFFECTOR", DVPTR(SECTOREFFECTOR), SECTOREFFECTOR__STATIC, SECTOREFFECTOR__STATICRR },
|
||||
|
@ -669,7 +645,6 @@ static struct dynitem g_dynTileList[] =
|
|||
{ "FOOTPRINT", DVPTR(FOOTPRINT), FOOTPRINT__STATIC, FOOTPRINT__STATICRR },
|
||||
{ "POOP", DVPTR(POOP), POOP__STATIC, POOP__STATICRR },
|
||||
{ "FRAMEEFFECT1", DVPTR(FRAMEEFFECT1), FRAMEEFFECT1__STATIC, FRAMEEFFECT1__STATICRR },
|
||||
{ "FRAMEEFFECT1_13", DVPTR(FRAMEEFFECT1_13), FRAMEEFFECT1_13__STATIC, FRAMEEFFECT1_13__STATICRR },
|
||||
{ "PANNEL3", DVPTR(PANNEL3), PANNEL3__STATIC, PANNEL3__STATICRR },
|
||||
{ "SCREENBREAK14", DVPTR(SCREENBREAK14), SCREENBREAK14__STATIC, SCREENBREAK14__STATICRR },
|
||||
{ "SCREENBREAK15", DVPTR(SCREENBREAK15), SCREENBREAK15__STATIC, SCREENBREAK15__STATICRR },
|
||||
|
@ -2090,7 +2065,6 @@ int32_t FEM9 = FEM9__STATIC;
|
|||
int32_t FOOTPRINT = FOOTPRINT__STATIC;
|
||||
int32_t POOP = POOP__STATIC;
|
||||
int32_t FRAMEEFFECT1 = FRAMEEFFECT1__STATIC;
|
||||
int32_t FRAMEEFFECT1_13 = FRAMEEFFECT1_13__STATIC;
|
||||
int32_t PANNEL3 = PANNEL3__STATIC;
|
||||
int32_t SCREENBREAK14 = SCREENBREAK14__STATIC;
|
||||
int32_t SCREENBREAK15 = SCREENBREAK15__STATIC;
|
||||
|
@ -2909,6 +2883,7 @@ int32_t MAMA = 0;
|
|||
int32_t MAMAJIBA = 0;
|
||||
int32_t MAMAJIBB = 0;
|
||||
|
||||
#if 0
|
||||
static hashtable_t h_names = {512, NULL};
|
||||
|
||||
void G_ProcessDynamicTileMapping(const char *szLabel, int32_t lValue)
|
||||
|
@ -2922,6 +2897,10 @@ void G_ProcessDynamicTileMapping(const char *szLabel, int32_t lValue)
|
|||
if (i>=0)
|
||||
{
|
||||
struct dynitem *di = &g_dynTileList[i];
|
||||
#ifdef DEBUGGINGAIDS
|
||||
if (g_scriptDebug && di->staticval != lValue)
|
||||
OSD_Printf("REMAP %s (%d) --> %d\n", di->str, di->staticval, lValue);
|
||||
#endif
|
||||
*di->dynvalptr = lValue;
|
||||
}
|
||||
}
|
||||
|
@ -2940,6 +2919,7 @@ void freehashnames(void)
|
|||
{
|
||||
hash_free(&h_names);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
static struct dynitem g_dynWeaponList[] =
|
||||
|
@ -2990,17 +2970,18 @@ void G_InitDynamicTiles(void)
|
|||
|
||||
Bmemset(DynamicTileMap, 0, sizeof(DynamicTileMap));
|
||||
|
||||
if (g_gameType & GAMEFLAG_RR)
|
||||
if (RR)
|
||||
{
|
||||
for (i = 0; g_dynTileList[i].staticval >= 0; i++) {
|
||||
*(g_dynTileList[i].dynvalptr) = -g_dynTileList[i].staticval_rr;
|
||||
if ((g_gameType & GAMEFLAG_RRRA) && *(g_dynTileList[i].dynvalptr) == -UFO1__STATICRR) *(g_dynTileList[i].dynvalptr) = -UFO1__STATICRRRA;
|
||||
if (RRRA && *(g_dynTileList[i].dynvalptr) == -UFO1__STATICRR) *(g_dynTileList[i].dynvalptr) = -UFO1__STATICRRRA;
|
||||
DynamicTileMap[*(g_dynTileList[i].dynvalptr)] = g_dynTileList[i].staticval_rr;
|
||||
NameToTileIndex.Insert(g_dynTileList[i].str, *(g_dynTileList[i].dynvalptr));
|
||||
}
|
||||
for (i = 0; g_dynWeaponList[i].staticval >= 0; i++)
|
||||
*(g_dynWeaponList[i].dynvalptr) = g_dynWeaponList[i].staticval_rr;
|
||||
|
||||
PHEIGHT = PHEIGHT_RR;
|
||||
}
|
||||
|
||||
for (i=0; g_dynTileList[i].staticval >= 0; i++)
|
||||
|
@ -3031,7 +3012,7 @@ void G_InitDynamicTiles(void)
|
|||
g_blimpSpawnItems[13] = FREEZESPRITE;
|
||||
g_blimpSpawnItems[14] = FREEZEAMMO;
|
||||
|
||||
if (g_gameType & GAMEFLAG_RR)
|
||||
if (RR)
|
||||
{
|
||||
WeaponPickupSprites[0] = KNEE;
|
||||
WeaponPickupSprites[1] = FIRSTGUNSPRITE;
|
||||
|
@ -3061,5 +3042,10 @@ void G_InitDynamicTiles(void)
|
|||
WeaponPickupSprites[10] = HEAVYHBOMB;
|
||||
WeaponPickupSprites[11] = SHRINKERSPRITE;
|
||||
}
|
||||
|
||||
// ouch... the big background image takes up a fuckload of memory and takes a second to load!
|
||||
#ifdef EDUKE32_GLES
|
||||
MENUSCREEN = LOADSCREEN = BETASCREEN;
|
||||
#endif
|
||||
}
|
||||
END_DUKERR_NS
|
||||
END_RR_NS
|
|
@ -23,7 +23,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#ifndef namesdyn_h__
|
||||
#define namesdyn_h__
|
||||
|
||||
BEGIN_DUKERR_NS
|
||||
BEGIN_RR_NS
|
||||
|
||||
|
||||
#define SECTOREFFECTOR__STATIC 1
|
||||
|
@ -625,7 +625,6 @@ BEGIN_DUKERR_NS
|
|||
#define FEM9__STATIC 3450
|
||||
#define FOOTPRINT__STATIC 3701
|
||||
#define POOP__STATIC 4094
|
||||
#define FRAMEEFFECT1_13__STATIC 3999
|
||||
#define FRAMEEFFECT1__STATIC 4095
|
||||
#define PANNEL3__STATIC 4099
|
||||
#define SCREENBREAK14__STATIC 4120
|
||||
|
@ -1312,7 +1311,6 @@ BEGIN_DUKERR_NS
|
|||
#define FOOTPRINT__STATICRR -1160
|
||||
#define POOP__STATICRR -2998
|
||||
#define FRAMEEFFECT1__STATICRR -2999
|
||||
#define FRAMEEFFECT1_13__STATICRR -3000
|
||||
#define PANNEL3__STATICRR -3005
|
||||
#define SCREENBREAK14__STATICRR -3008
|
||||
#define SCREENBREAK15__STATICRR -3009
|
||||
|
@ -2731,7 +2729,6 @@ extern int32_t FEM9;
|
|||
extern int32_t FOOTPRINT;
|
||||
extern int32_t POOP;
|
||||
extern int32_t FRAMEEFFECT1;
|
||||
extern int32_t FRAMEEFFECT1_13;
|
||||
extern int32_t PANNEL3;
|
||||
extern int32_t SCREENBREAK14;
|
||||
extern int32_t SCREENBREAK15;
|
||||
|
@ -3596,9 +3593,6 @@ extern int32_t CHICKEN_WEAPON;
|
|||
|
||||
#define DYNAMICWEAPONMAP(Weaponnum) (DynamicWeaponMap[Weaponnum])
|
||||
|
||||
extern int16_t g_blimpSpawnItems[15];
|
||||
extern int16_t WeaponPickupSprites[MAX_WEAPONS];
|
||||
|
||||
END_DUKERR_NS
|
||||
END_RR_NS
|
||||
|
||||
#endif // namesdyn_h__
|
|
@ -4580,7 +4580,10 @@ static int32_t P_DoCounters(int playerNum)
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int16_t WeaponPickupSprites[MAX_WEAPONS] = { KNEE__STATIC, FIRSTGUNSPRITE__STATIC, SHOTGUNSPRITE__STATIC,
|
||||
CHAINGUNSPRITE__STATIC, RPGSPRITE__STATIC, HEAVYHBOMB__STATIC, SHRINKERSPRITE__STATIC, DEVISTATORSPRITE__STATIC,
|
||||
TRIPBOMBSPRITE__STATIC, FREEZESPRITE__STATIC, HEAVYHBOMB__STATIC, SHRINKERSPRITE__STATIC
|
||||
};
|
||||
// this is used for player deaths
|
||||
void P_DropWeapon(int const playerNum)
|
||||
{
|
||||
|
@ -8765,7 +8768,7 @@ HORIZONLY:;
|
|||
}
|
||||
else if (TEST_SYNC_KEY(playerBits, SK_AIM_DOWN) && (!RRRA || !pPlayer->on_motorcycle))
|
||||
{
|
||||
if (VM_OnEvent(/*EVENT_AIMDOWN*/EVENT_AIMUP,pPlayer->i,playerNum) == 0) // changed to allow the constant to be reused in EDuke.
|
||||
if (VM_OnEvent(EVENT_AIMDOWN,pPlayer->i,playerNum) == 0)
|
||||
{
|
||||
pPlayer->q16horiz -= fix16_from_int(6<<(int)(TEST_SYNC_KEY(playerBits, SK_RUN)));
|
||||
centerHoriz++;
|
||||
|
|
|
@ -24,7 +24,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#define player_h_
|
||||
|
||||
#include "inv.h"
|
||||
#include "dukerr/namesdyn.h"
|
||||
#include "namesdyn.h"
|
||||
#include "fix16.h"
|
||||
#include "net.h"
|
||||
|
||||
|
@ -299,6 +299,7 @@ typedef struct {
|
|||
extern input_t inputfifo[MOVEFIFOSIZ][MAXPLAYERS];
|
||||
extern playerspawn_t g_playerSpawnPoints[MAXPLAYERS];
|
||||
extern playerdata_t *const g_player;
|
||||
extern int16_t WeaponPickupSprites[MAX_WEAPONS];
|
||||
extern hudweapon_t hudweap;
|
||||
extern int32_t g_levelTextTime;
|
||||
extern int32_t g_numObituaries;
|
||||
|
|
|
@ -36,8 +36,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
|
||||
BEGIN_RR_NS
|
||||
|
||||
extern void G_SetupGlobalPsky(void);
|
||||
|
||||
static int32_t g_whichPalForPlayer = 9;
|
||||
|
||||
static uint8_t precachehightile[2][MAXTILES>>3];
|
||||
|
@ -828,7 +826,7 @@ void P_ResetPlayer(int playerNum)
|
|||
actor[pPlayer->i].cgg = 0;
|
||||
actor[pPlayer->i].movflag = 0;
|
||||
actor[pPlayer->i].tempang = 0;
|
||||
actor[pPlayer->i].stayput = -1;
|
||||
actor[pPlayer->i].actorstayput = -1;
|
||||
actor[pPlayer->i].dispicnum = 0;
|
||||
actor[pPlayer->i].owner = pPlayer->i;
|
||||
actor[pPlayer->i].t_data[4] = 0;
|
||||
|
|
97
source/rr/src/quotes.h
Normal file
97
source/rr/src/quotes.h
Normal file
|
@ -0,0 +1,97 @@
|
|||
//-------------------------------------------------------------------------
|
||||
/*
|
||||
Copyright (C) 2011 EDuke32 developers and contributors
|
||||
|
||||
This file is part of EDuke32.
|
||||
|
||||
EDuke32 is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License version 2
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
#ifndef quotes_h_
|
||||
#define quotes_h_
|
||||
|
||||
#include "quotemgr.h"
|
||||
|
||||
#define OBITQUOTEINDEX (MAXQUOTES-128)
|
||||
#define SUICIDEQUOTEINDEX (MAXQUOTES-32)
|
||||
|
||||
#define QUOTE_SHOW_MAP_OFF 1
|
||||
#define QUOTE_ACTIVATED 2
|
||||
#define QUOTE_MEDKIT 3
|
||||
#define QUOTE_LOCKED 4
|
||||
#define QUOTE_CHEAT_EVERYTHING 5
|
||||
#define QUOTE_BOOTS 6
|
||||
#define QUOTE_WASTED 7
|
||||
#define QUOTE_UNLOCKED 8
|
||||
#define QUOTE_FOUND_SECRET 9
|
||||
#define QUOTE_SQUISHED 10
|
||||
#define QUOTE_USED_STEROIDS 12
|
||||
#define QUOTE_DEAD 13
|
||||
#define QUOTE_DEACTIVATED 15
|
||||
#define QUOTE_CHEAT_GODMODE_ON 17
|
||||
#define QUOTE_CHEAT_GODMODE_OFF 18
|
||||
#define QUOTE_CROSSHAIR_OFF 21
|
||||
#define QUOTE_CHEATS_DISABLED 22
|
||||
#define QUOTE_MESSAGES_ON 23
|
||||
#define QUOTE_MESSAGES_OFF 24
|
||||
#define QUOTE_MUSIC 26
|
||||
#define QUOTE_CHEAT_STEROIDS 37
|
||||
#define QUOTE_F1HELP 40
|
||||
#define QUOTE_MOUSE_AIMING_OFF 44
|
||||
#define QUOTE_HOLODUKE_ON 47
|
||||
#define QUOTE_HOLODUKE_OFF 48
|
||||
#define QUOTE_HOLODUKE_NOT_FOUND 49
|
||||
#define QUOTE_JETPACK_NOT_FOUND 50
|
||||
#define QUOTE_JETPACK_ON 52
|
||||
#define QUOTE_JETPACK_OFF 53
|
||||
#define QUOTE_NEED_BLUE_KEY 70
|
||||
#define QUOTE_NEED_RED_KEY 71
|
||||
#define QUOTE_NEED_YELLOW_KEY 72
|
||||
#define QUOTE_WEAPON_LOWERED 73
|
||||
#define QUOTE_WEAPON_RAISED 74
|
||||
#define QUOTE_BOOTS_ON 75
|
||||
#define QUOTE_SCUBA_ON 76
|
||||
#define QUOTE_CHEAT_ALLEN 79
|
||||
#define QUOTE_MIGHTY_FOOT 80
|
||||
#define QUOTE_WEAPON_MODE_OFF 82
|
||||
#define QUOTE_MAP_FOLLOW_OFF 83
|
||||
#define QUOTE_RUN_MODE_OFF 85
|
||||
#define QUOTE_JETPACK 88
|
||||
#define QUOTE_SCUBA 89
|
||||
#define QUOTE_STEROIDS 90
|
||||
#define QUOTE_HOLODUKE 91
|
||||
#define QUOTE_CHEAT_TODD 99
|
||||
#define QUOTE_CHEAT_UNLOCK 100
|
||||
#define QUOTE_NVG 101
|
||||
#define QUOTE_WEREGONNAFRYYOURASS 102
|
||||
#define QUOTE_SCREEN_SAVED 103
|
||||
#define QUOTE_CHEAT_BETA 105
|
||||
#define QUOTE_NVG_OFF 107
|
||||
#define QUOTE_VIEW_MODE_OFF 109
|
||||
#define QUOTE_SHOW_MAP_ON 111
|
||||
#define QUOTE_CHEAT_NOCLIP 113
|
||||
#define QUOTE_SAVE_BAD_VERSION 114
|
||||
#define QUOTE_RESERVED 115
|
||||
#define QUOTE_RESERVED2 116
|
||||
#define QUOTE_RESERVED3 117
|
||||
#define QUOTE_SAVE_DEAD 118
|
||||
#define QUOTE_CHEAT_ALL_WEAPONS 119
|
||||
#define QUOTE_CHEAT_ALL_INV 120
|
||||
#define QUOTE_CHEAT_ALL_KEYS 121
|
||||
#define QUOTE_RESERVED4 122
|
||||
#define QUOTE_SAVE_BAD_PLAYERS 124
|
||||
|
||||
#endif
|
|
@ -25,8 +25,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
|
||||
#include "actors.h" // actor_t
|
||||
#include "gamevars.h"
|
||||
#include "dukerr/macros.h"
|
||||
#include "dukerr/namesdyn.h" // for G_GetForcefieldPicnum()
|
||||
#include "macros.h"
|
||||
#include "namesdyn.h" // for G_GetForcefieldPicnum()
|
||||
#include "player.h" // playerspawn_t
|
||||
|
||||
BEGIN_RR_NS
|
||||
|
|
418
source/rr/src/soundefs.h
Normal file
418
source/rr/src/soundefs.h
Normal file
|
@ -0,0 +1,418 @@
|
|||
//-------------------------------------------------------------------------
|
||||
/*
|
||||
Copyright (C) 2010 EDuke32 developers and contributors
|
||||
|
||||
This file is part of EDuke32.
|
||||
|
||||
EDuke32 is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License version 2
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
#define KICK_HIT 0
|
||||
#define PISTOL_RICOCHET 1
|
||||
#define PISTOL_BODYHIT 2
|
||||
#define PISTOL_FIRE 3
|
||||
#define EJECT_CLIP 4
|
||||
#define INSERT_CLIP 5
|
||||
#define CHAINGUN_FIRE 6
|
||||
#define RPG_SHOOT 7
|
||||
#define POOLBALLHIT 8
|
||||
#define RPG_EXPLODE 9
|
||||
#define CAT_FIRE 10
|
||||
#define SHRINKER_FIRE 11
|
||||
#define ACTOR_SHRINKING 12
|
||||
#define PIPEBOMB_BOUNCE 13
|
||||
#define PIPEBOMB_EXPLODE 14
|
||||
#define LASERTRIP_ONWALL 15
|
||||
#define LASERTRIP_ARMING 16
|
||||
#define LASERTRIP_EXPLODE 17
|
||||
#define VENT_BUST 18
|
||||
#define GLASS_BREAKING 19
|
||||
#define GLASS_HEAVYBREAK 20
|
||||
#define SHORT_CIRCUIT 21
|
||||
#define ITEM_SPLASH 22
|
||||
#define DUKE_BREATHING 23
|
||||
#define DUKE_EXHALING 24
|
||||
#define DUKE_GASP 25
|
||||
#define SLIM_RECOG 26
|
||||
// #define ENDSEQVOL3SND1 27
|
||||
#define DUKE_URINATE 28
|
||||
#define ENDSEQVOL3SND2 29
|
||||
#define ENDSEQVOL3SND3 30
|
||||
#define DUKE_PASSWIND 32
|
||||
#define DUKE_CRACK 33
|
||||
#define SLIM_ATTACK 34
|
||||
#define SOMETHINGHITFORCE 35
|
||||
#define DUKE_DRINKING 36
|
||||
#define DUKE_KILLED1 37
|
||||
#define DUKE_GRUNT 38
|
||||
#define DUKE_HARTBEAT 39
|
||||
#define DUKE_ONWATER 40
|
||||
#define DUKE_DEAD 41
|
||||
#define DUKE_LAND 42
|
||||
#define DUKE_WALKINDUCTS 43
|
||||
#define DUKE_GLAD 44
|
||||
#define DUKE_YES 45
|
||||
#define DUKE_HEHE 46
|
||||
#define DUKE_SHUCKS 47
|
||||
#define DUKE_UNDERWATER 48
|
||||
#define DUKE_JETPACK_ON 49
|
||||
#define DUKE_JETPACK_IDLE 50
|
||||
#define DUKE_JETPACK_OFF 51
|
||||
#define LIZTROOP_GROWL 52
|
||||
#define LIZTROOP_TALK1 53
|
||||
#define LIZTROOP_TALK2 54
|
||||
#define LIZTROOP_TALK3 55
|
||||
#define DUKETALKTOBOSS 56
|
||||
#define LIZCAPT_GROWL 57
|
||||
#define LIZCAPT_TALK1 58
|
||||
#define LIZCAPT_TALK2 59
|
||||
#define LIZCAPT_TALK3 60
|
||||
#define LIZARD_BEG 61
|
||||
#define LIZARD_PAIN 62
|
||||
#define LIZARD_DEATH 63
|
||||
#define LIZARD_SPIT 64
|
||||
#define DRONE1_HISSRATTLE 65
|
||||
#define DRONE1_HISSSCREECH 66
|
||||
#define DUKE_TIP2 67
|
||||
#define FLESH_BURNING 68
|
||||
#define SQUISHED 69
|
||||
#define TELEPORTER 70
|
||||
#define ELEVATOR_ON 71
|
||||
#define DUKE_KILLED3 72
|
||||
#define ELEVATOR_OFF 73
|
||||
#define DOOR_OPERATE1 74
|
||||
#define SUBWAY 75
|
||||
#define SWITCH_ON 76
|
||||
#define FAN 77
|
||||
#define DUKE_GETWEAPON3 78
|
||||
#define FLUSH_TOILET 79
|
||||
#define HOVER_CRAFT 80
|
||||
#define EARTHQUAKE 81
|
||||
#define INTRUDER_ALERT 82
|
||||
#define END_OF_LEVEL_WARN 83
|
||||
#define ENGINE_OPERATING 84
|
||||
#define REACTOR_ON 85
|
||||
#define COMPUTER_AMBIENCE 86
|
||||
#define GEARS_GRINDING 87
|
||||
#define BUBBLE_AMBIENCE 88
|
||||
#define MACHINE_AMBIENCE 89
|
||||
#define SEWER_AMBIENCE 90
|
||||
#define WIND_AMBIENCE 91
|
||||
#define SOMETHING_DRIPPING 92
|
||||
#define STEAM_HISSING 93
|
||||
#define THEATER_BREATH 94
|
||||
#define BAR_MUSIC 95
|
||||
#define BOS1_ROAM 96
|
||||
#define BOS1_RECOG 97
|
||||
#define BOS1_ATTACK1 98
|
||||
#define BOS1_PAIN 99
|
||||
#define BOS1_DYING 100
|
||||
#define BOS2_ROAM 101
|
||||
#define BOS2_RECOG 102
|
||||
#define BOS2_ATTACK 103
|
||||
#define BOS2_PAIN 104
|
||||
#define BOS2_DYING 105
|
||||
#define GETATOMICHEALTH 106
|
||||
#define DUKE_GETWEAPON2 107
|
||||
#define BOS3_DYING 108
|
||||
#define SHOTGUN_FIRE 109
|
||||
#define PRED_ROAM 110
|
||||
#define PRED_RECOG 111
|
||||
#define PRED_ATTACK 112
|
||||
#define PRED_PAIN 113
|
||||
#define PRED_DYING 114
|
||||
#define CAPT_ROAM 115
|
||||
#define CAPT_ATTACK 116
|
||||
#define CAPT_RECOG 117
|
||||
#define CAPT_PAIN 118
|
||||
#define CAPT_DYING 119
|
||||
#define PIG_ROAM 120
|
||||
#define PIG_RECOG 121
|
||||
#define PIG_ATTACK 122
|
||||
#define PIG_PAIN 123
|
||||
#define PIG_DYING 124
|
||||
#define RECO_ROAM 125
|
||||
#define RECO_RECOG 126
|
||||
#define RECO_ATTACK 127
|
||||
#define RECO_PAIN 128
|
||||
#define RECO_DYING 129
|
||||
#define DRON_ROAM 130
|
||||
#define DRON_RECOG 131
|
||||
#define DRON_ATTACK1 132
|
||||
#define DRON_PAIN 133
|
||||
#define DRON_DYING 134
|
||||
#define COMM_ROAM 135
|
||||
#define COMM_RECOG 136
|
||||
#define COMM_ATTACK 137
|
||||
#define COMM_PAIN 138
|
||||
#define COMM_DYING 139
|
||||
#define OCTA_ROAM 140
|
||||
#define OCTA_RECOG 141
|
||||
#define OCTA_ATTACK1 142
|
||||
#define OCTA_PAIN 143
|
||||
#define OCTA_DYING 144
|
||||
#define TURR_ROAM 145
|
||||
#define TURR_RECOG 146
|
||||
#define TURR_ATTACK 147
|
||||
#define DUMPSTER_MOVE 148
|
||||
#define SLIM_DYING 149
|
||||
#define BOS3_ROAM 150
|
||||
#define BOS3_RECOG 151
|
||||
#define BOS3_ATTACK1 152
|
||||
#define BOS3_PAIN 153
|
||||
#define BOS1_ATTACK2 154
|
||||
#define COMM_SPIN 155
|
||||
#define BOS1_WALK 156
|
||||
#define DRON_ATTACK2 157
|
||||
#define THUD 158
|
||||
#define OCTA_ATTACK2 159
|
||||
#define WIERDSHOT_FLY 160
|
||||
#define TURR_PAIN 161
|
||||
#define TURR_DYING 162
|
||||
#define SLIM_ROAM 163
|
||||
#define LADY_SCREAM 164
|
||||
#define DOOR_OPERATE2 165
|
||||
#define DOOR_OPERATE3 166
|
||||
#define DOOR_OPERATE4 167
|
||||
#define BORNTOBEWILDSND 168
|
||||
#define SHOTGUN_COCK 169
|
||||
#define GENERIC_AMBIENCE1 170
|
||||
#define GENERIC_AMBIENCE2 171
|
||||
#define GENERIC_AMBIENCE3 172
|
||||
#define GENERIC_AMBIENCE4 173
|
||||
#define GENERIC_AMBIENCE5 174
|
||||
#define GENERIC_AMBIENCE6 175
|
||||
#define BOS3_ATTACK2 176
|
||||
#define GENERIC_AMBIENCE17 177
|
||||
#define GENERIC_AMBIENCE18 178
|
||||
#define GENERIC_AMBIENCE19 179
|
||||
#define GENERIC_AMBIENCE20 180
|
||||
#define GENERIC_AMBIENCE21 181
|
||||
#define GENERIC_AMBIENCE22 182
|
||||
#define SECRETLEVELSND 183
|
||||
#define GENERIC_AMBIENCE8 184
|
||||
#define GENERIC_AMBIENCE9 185
|
||||
#define GENERIC_AMBIENCE10 186
|
||||
#define GENERIC_AMBIENCE11 187
|
||||
#define GENERIC_AMBIENCE12 188
|
||||
#define GENERIC_AMBIENCE13 189
|
||||
#define GENERIC_AMBIENCE14 190
|
||||
#define GENERIC_AMBIENCE15 192
|
||||
#define GENERIC_AMBIENCE16 193
|
||||
#define FIRE_CRACKLE 194
|
||||
#define BONUS_SPEECH1 195
|
||||
#define BONUS_SPEECH2 196
|
||||
#define BONUS_SPEECH3 197
|
||||
#define PIG_CAPTURE_DUKE 198
|
||||
#define BONUS_SPEECH4 199
|
||||
#define DUKE_LAND_HURT 200
|
||||
#define DUKE_HIT_STRIPPER1 201
|
||||
#define DUKE_TIP1 202
|
||||
#define DUKE_KILLED2 203
|
||||
#define PRED_ROAM2 204
|
||||
#define PIG_ROAM2 205
|
||||
#define DUKE_GETWEAPON1 206
|
||||
#define DUKE_SEARCH2 207
|
||||
#define DUKE_CRACK2 208
|
||||
#define DUKE_SEARCH 209
|
||||
#define DUKE_GET 210
|
||||
#define DUKE_LONGTERM_PAIN 211
|
||||
#define MONITOR_ACTIVE 212
|
||||
#define NITEVISION_ONOFF 213
|
||||
#define DUKE_HIT_STRIPPER2 214
|
||||
#define DUKE_CRACK_FIRST 215
|
||||
#define DUKE_USEMEDKIT 216
|
||||
#define DUKE_TAKEPILLS 217
|
||||
#define DUKE_PISSRELIEF 218
|
||||
#define SELECT_WEAPON 219
|
||||
#define WATER_GURGLE 220
|
||||
#define DUKE_GETWEAPON4 221
|
||||
#define JIBBED_ACTOR1 222
|
||||
#define JIBBED_ACTOR2 223
|
||||
#define JIBBED_ACTOR3 224
|
||||
#define JIBBED_ACTOR4 225
|
||||
#define JIBBED_ACTOR5 226
|
||||
#define JIBBED_ACTOR6 227
|
||||
#define JIBBED_ACTOR7 228
|
||||
#define DUKE_GOTHEALTHATLOW 229
|
||||
#define BOSSTALKTODUKE 230
|
||||
#define WAR_AMBIENCE1 231
|
||||
#define WAR_AMBIENCE2 232
|
||||
#define WAR_AMBIENCE3 233
|
||||
#define WAR_AMBIENCE4 234
|
||||
#define WAR_AMBIENCE5 235
|
||||
#define WAR_AMBIENCE6 236
|
||||
#define WAR_AMBIENCE7 237
|
||||
#define WAR_AMBIENCE8 238
|
||||
#define WAR_AMBIENCE9 239
|
||||
#define WAR_AMBIENCE10 240
|
||||
#define ALIEN_TALK1 241
|
||||
#define ALIEN_TALK2 242
|
||||
#define EXITMENUSOUND 243
|
||||
#define FLY_BY 244
|
||||
#define DUKE_SCREAM 245
|
||||
#define SHRINKER_HIT 246
|
||||
#define RATTY 247
|
||||
#define INTO_MENU 248
|
||||
#define BONUSMUSIC 249
|
||||
#define DUKE_BOOBY 250
|
||||
#define DUKE_TALKTOBOSSFALL 251
|
||||
#define DUKE_LOOKINTOMIRROR 252
|
||||
#define PIG_ROAM3 253
|
||||
#define KILLME 254
|
||||
#define DRON_JETSND 255
|
||||
#define SPACE_DOOR1 256
|
||||
#define SPACE_DOOR2 257
|
||||
#define SPACE_DOOR3 258
|
||||
#define SPACE_DOOR4 259
|
||||
#define SPACE_DOOR5 260
|
||||
#define ALIEN_ELEVATOR1 261
|
||||
#define VAULT_DOOR 262
|
||||
#define JIBBED_ACTOR13 263
|
||||
#define DUKE_GETWEAPON6 264
|
||||
#define JIBBED_ACTOR8 265
|
||||
#define JIBBED_ACTOR9 266
|
||||
#define JIBBED_ACTOR10 267
|
||||
#define JIBBED_ACTOR11 268
|
||||
#define JIBBED_ACTOR12 269
|
||||
#define DUKE_KILLED4 270
|
||||
#define DUKE_KILLED5 271
|
||||
#define ALIEN_SWITCH1 272
|
||||
#define DUKE_STEPONFECES 273
|
||||
#define DUKE_LONGTERM_PAIN2 274
|
||||
#define DUKE_LONGTERM_PAIN3 275
|
||||
#define DUKE_LONGTERM_PAIN4 276
|
||||
#define COMPANB2 277
|
||||
#define KTIT 278
|
||||
#define HELICOP_IDLE 279
|
||||
#define STEPNIT 280
|
||||
#define SPACE_AMBIENCE1 281
|
||||
#define SPACE_AMBIENCE2 282
|
||||
#define SLIM_HATCH 283
|
||||
#define RIPHEADNECK 284
|
||||
#define FOUNDJONES 285
|
||||
#define ALIEN_DOOR1 286
|
||||
#define ALIEN_DOOR2 287
|
||||
#define ENDSEQVOL3SND4 288
|
||||
#define ENDSEQVOL3SND5 289
|
||||
#define ENDSEQVOL3SND6 290
|
||||
#define ENDSEQVOL3SND7 291
|
||||
#define ENDSEQVOL3SND8 292
|
||||
#define ENDSEQVOL3SND9 293
|
||||
#define WHIPYOURASS 294
|
||||
#define ENDSEQVOL2SND1 295
|
||||
#define ENDSEQVOL2SND2 296
|
||||
#define ENDSEQVOL2SND3 297
|
||||
#define ENDSEQVOL2SND4 298
|
||||
#define ENDSEQVOL2SND5 299
|
||||
#define ENDSEQVOL2SND6 300
|
||||
#define ENDSEQVOL2SND7 301
|
||||
#define GENERIC_AMBIENCE23 302
|
||||
#define SOMETHINGFROZE 303
|
||||
#define DUKE_LONGTERM_PAIN5 304
|
||||
#define DUKE_LONGTERM_PAIN6 305
|
||||
#define DUKE_LONGTERM_PAIN7 306
|
||||
#define DUKE_LONGTERM_PAIN8 307
|
||||
#define WIND_REPEAT 308
|
||||
#define MYENEMY_ROAM 309
|
||||
#define MYENEMY_HURT 310
|
||||
#define MYENEMY_DEAD 311
|
||||
#define MYENEMY_SHOOT 312
|
||||
#define STORE_MUSIC 313
|
||||
#define STORE_MUSIC_BROKE 314
|
||||
#define ACTOR_GROWING 315
|
||||
#define NEWBEAST_ROAM 316
|
||||
#define NEWBEAST_RECOG 317
|
||||
#define NEWBEAST_ATTACK 318
|
||||
#define NEWBEAST_PAIN 319
|
||||
#define NEWBEAST_DYING 320
|
||||
#define NEWBEAST_SPIT 321
|
||||
#define VOL4_1 322
|
||||
#define SUPERMARKET 323
|
||||
#define MOUSEANNOY 324
|
||||
#define BOOKEM 325
|
||||
#define SUPERMARKETCRY 326
|
||||
#define DESTRUCT 327
|
||||
#define EATFOOD 328
|
||||
#define MAKEMYDAY 329
|
||||
#define WITNESSSTAND 330
|
||||
#define VACATIONSPEECH 331
|
||||
#define YIPPEE1 332
|
||||
#define YOHOO1 333
|
||||
#define YOHOO2 334
|
||||
#define DOLPHINSND 335
|
||||
#define TOUGHGALSND1 336
|
||||
#define TOUGHGALSND2 337
|
||||
#define TOUGHGALSND3 338
|
||||
#define TOUGHGALSND4 339
|
||||
#define TANK_ROAM 340
|
||||
#define BOS4_ROAM 341
|
||||
#define BOS4_RECOG 342
|
||||
#define BOS4_ATTACK 343
|
||||
#define BOS4_PAIN 344
|
||||
#define BOS4_DYING 345
|
||||
#define NEWBEAST_ATTACKMISS 346
|
||||
#define VOL4_2 347
|
||||
#define COOKINGDEEPFRIER 348
|
||||
#define WHINING_DOG 349
|
||||
#define DEAD_DOG 350
|
||||
#define LIGHTNING_SLAP 351
|
||||
#define THUNDER 352
|
||||
#define HAPPYMOUSESND1 353
|
||||
#define HAPPYMOUSESND2 354
|
||||
#define HAPPYMOUSESND3 355
|
||||
#define HAPPYMOUSESND4 356
|
||||
#define ALARM 357
|
||||
#define RAIN 358
|
||||
#define DTAG_GREENRUN 359
|
||||
#define DTAG_BROWNRUN 360
|
||||
#define DTAG_GREENSCORE 361
|
||||
#define DTAG_BROWNSCORE 362
|
||||
#define INTRO4_1 363
|
||||
#define INTRO4_2 364
|
||||
#define INTRO4_3 365
|
||||
#define INTRO4_4 366
|
||||
#define INTRO4_5 367
|
||||
#define INTRO4_6 368
|
||||
#define SCREECH 369
|
||||
#define BOSS4_DEADSPEECH 370
|
||||
#define BOSS4_FIRSTSEE 371
|
||||
#define PARTY_SPEECH 372
|
||||
#define POSTAL_SPEECH 373
|
||||
#define TGSPEECH 374
|
||||
#define DOGROOMSPEECH 375
|
||||
#define SMACKED 376
|
||||
#define MDEVSPEECH 377
|
||||
#define AREA51SPEECH 378
|
||||
#define JEEPSOUND 379
|
||||
#define BIGDOORSLAM 380
|
||||
#define BOS4_LAY 381
|
||||
#define WAVESOUND 382
|
||||
#define ILLBEBACK 383
|
||||
#define VOL4ENDSND1 384
|
||||
#define VOL4ENDSND2 385
|
||||
#define EXPANDERHIT 386
|
||||
#define SNAKESPEECH 387
|
||||
#define EXPANDERSHOOT 388
|
||||
#define GETBACKTOWORK 389
|
||||
#define JIBBED_ACTOR14 390
|
||||
#define JIBBED_ACTOR15 391
|
||||
#define INTRO4_B 392
|
||||
#define BIGBANG 393
|
||||
#define HORNSND 394
|
||||
#define BELLSND 395
|
||||
#define GOAWAY 396
|
||||
#define JOKE 397
|
|
@ -29,13 +29,14 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#ifndef sounds_public_h_
|
||||
#define sounds_public_h_
|
||||
|
||||
#include "dukerr/sounds_common.h"
|
||||
#include "sounds_common.h"
|
||||
#include "sound/s_soundinternal.h"
|
||||
#include "z_music.h"
|
||||
|
||||
BEGIN_RR_NS
|
||||
|
||||
// KEEPINSYNC lunatic/con_lang.lua
|
||||
#define MAXSOUNDS 4096
|
||||
#define LOUDESTVOLUME 111
|
||||
|
||||
enum esound_t
|
||||
|
|
38
source/rr/src/sounds_common.h
Normal file
38
source/rr/src/sounds_common.h
Normal file
|
@ -0,0 +1,38 @@
|
|||
//-------------------------------------------------------------------------
|
||||
/*
|
||||
Copyright (C) 2013 EDuke32 developers and contributors
|
||||
|
||||
This file is part of EDuke32.
|
||||
|
||||
EDuke32 is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License version 2
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
#ifndef EDUKE32_SOUNDS_COMMON_H
|
||||
#define EDUKE32_SOUNDS_COMMON_H
|
||||
|
||||
// Sound flags
|
||||
enum {
|
||||
SF_LOOP = 1,
|
||||
SF_MSFX = 2,
|
||||
SF_TALK = 4,
|
||||
SF_ADULT = 8,
|
||||
SF_GLOBAL = 16,
|
||||
SF_ONEINST_INTERNAL = 32,
|
||||
|
||||
SF_DTAG = 128,
|
||||
};
|
||||
|
||||
#endif
|
|
@ -25,9 +25,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#include "build.h"
|
||||
|
||||
#include "namesdyn.h"
|
||||
#include "sounds.h"
|
||||
#include "soundsdyn.h"
|
||||
#include "global.h"
|
||||
|
||||
BEGIN_DUKERR_NS
|
||||
BEGIN_RR_NS
|
||||
|
||||
#ifdef DYNSOUNDREMAP_ENABLE
|
||||
# define DVPTR(x) &x
|
||||
|
@ -332,10 +334,12 @@ static hashtable_t h_names = {512, NULL};
|
|||
|
||||
void G_ProcessDynamicSoundMapping(const char *szLabel, int32_t lValue)
|
||||
{
|
||||
int32_t i;
|
||||
|
||||
if ((unsigned)lValue >= MAXSOUNDS || !szLabel)
|
||||
return;
|
||||
|
||||
int i = hash_find(&h_names,szLabel);
|
||||
i = hash_find(&h_names,szLabel);
|
||||
if (i>=0)
|
||||
{
|
||||
struct sdynitem *di = &g_dynSoundList[i];
|
||||
|
@ -349,10 +353,11 @@ void G_ProcessDynamicSoundMapping(const char *szLabel, int32_t lValue)
|
|||
|
||||
void initsoundhashnames(void)
|
||||
{
|
||||
int32_t i;
|
||||
|
||||
hash_init(&h_names);
|
||||
|
||||
for (int i=0; g_dynSoundList[i].staticval >= 0; i++)
|
||||
for (i=0; g_dynSoundList[i].staticval >= 0; i++)
|
||||
hash_add(&h_names, g_dynSoundList[i].str, i, 0);
|
||||
}
|
||||
|
||||
|
@ -366,10 +371,11 @@ void freesoundhashnames(void)
|
|||
// dynamic->static sound mapping.
|
||||
void G_InitDynamicSounds(void)
|
||||
{
|
||||
int32_t i;
|
||||
|
||||
Bmemset(DynamicSoundMap, 0, sizeof(DynamicSoundMap));
|
||||
|
||||
for (int i = 0; g_dynSoundList[i].staticval >= 0; i++)
|
||||
for (i=0; g_dynSoundList[i].staticval >= 0; i++)
|
||||
#ifdef DYNSOUNDREMAP_ENABLE
|
||||
DynamicSoundMap[*(g_dynSoundList[i].dynvalptr)] = g_dynSoundList[i].staticval;
|
||||
#else
|
|
@ -20,11 +20,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
*/
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
BEGIN_DUKERR_NS
|
||||
BEGIN_RR_NS
|
||||
|
||||
#define DYNSOUNDREMAP_ENABLE
|
||||
|
||||
#define MAXSOUNDS 4096
|
||||
|
||||
#define KICK_HIT__STATIC 0
|
||||
#define PISTOL_RICOCHET__STATIC 1
|
|
@ -78,6 +78,38 @@ BEGIN_SW_NS
|
|||
|
||||
#define DEFAULTSOCKETNUMBER 0x8849
|
||||
|
||||
// Default RTS file
|
||||
|
||||
#define DEFAULTRTSFILE "sw.rts"
|
||||
|
||||
// Default RTS path
|
||||
|
||||
#define DEFAULTRTSPATH ".\\"
|
||||
|
||||
// Default UserLevel path
|
||||
|
||||
#define DEFAULTLEVELPATH ".\\"
|
||||
|
||||
// Default External Control file
|
||||
|
||||
#define DEFAULTCONTROLFILE "EXTERNAL.EXE"
|
||||
|
||||
// Default Help file
|
||||
|
||||
#define DEFAULTHELPFILE "SWHELP.EXE"
|
||||
|
||||
// RTS extension
|
||||
|
||||
#define RTSEXTENSION "RTS"
|
||||
|
||||
// MAP extension
|
||||
|
||||
#define MAPEXTENSION "MAP"
|
||||
|
||||
// Default Player name
|
||||
|
||||
#define DEFAULTPLAYERNAME "KATO"
|
||||
|
||||
// Default Macros
|
||||
|
||||
#define MACRO1 "Burn baby burn..."
|
||||
|
|
|
@ -516,9 +516,9 @@ ImageScroller "CreditsMenu"
|
|||
{
|
||||
ifgame(Duke, Nam, WW2GI)
|
||||
{
|
||||
ImageItem "#2504", 990
|
||||
ImageItem "#2505", 991
|
||||
ImageItem "#2506", 992
|
||||
ImageItem "CREDITSTEXT1", 990
|
||||
ImageItem "CREDITSTEXT2", 991
|
||||
ImageItem "CREDITSTEXT3", 992
|
||||
animatedtransition
|
||||
class "Duke.ImageScrollerMenu"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue