mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 08:52:00 +00:00
- constant cleanup.
This commit is contained in:
parent
5d93e946c2
commit
f2380f8829
38 changed files with 628 additions and 1087 deletions
41
source/build/include/cstat.h
Normal file
41
source/build/include/cstat.h
Normal file
|
@ -0,0 +1,41 @@
|
|||
// nobody uses these. What's so cool about naked numbers? :(
|
||||
|
||||
// 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)
|
||||
|
||||
#define CSTAT_WALL_BLOCK BIT(0)
|
||||
#define CSTAT_WALL_BOTTOM_SWAP BIT(1)
|
||||
#define CSTAT_WALL_ALIGN_BOTTOM BIT(2)
|
||||
#define CSTAT_WALL_XFLIP BIT(3)
|
||||
#define CSTAT_WALL_MASKED BIT(4)
|
||||
#define CSTAT_WALL_1WAY BIT(5)
|
||||
#define CSTAT_WALL_BLOCK_HITSCAN BIT(6)
|
||||
#define CSTAT_WALL_TRANSLUCENT BIT(7)
|
||||
#define CSTAT_WALL_YFLIP BIT(8)
|
||||
#define CSTAT_WALL_TRANS_FLIP BIT(9)
|
||||
#define CSTAT_WALL_BLOCK_ACTOR (BIT(14)) // my def
|
||||
#define CSTAT_WALL_WARP_HITSCAN (BIT(15)) // my def
|
|
@ -14,11 +14,14 @@
|
|||
// uint32_t ti_Data;
|
||||
// };
|
||||
|
||||
#define TAG_DONE (0) /* Used to indicate the end of the Tag list */
|
||||
#define TAG_END (0) /* Ditto */
|
||||
/* list pointed to in ti_Data */
|
||||
enum tags : uint32_t
|
||||
{
|
||||
TAG_DONE = (0), /* Used to indicate the end of the Tag list */
|
||||
TAG_END = (0), /* Ditto */
|
||||
/* list pointed to in ti_Data */
|
||||
|
||||
#define TAG_USER ((uint32_t)(1u<<30))
|
||||
TAG_USER = ((uint32_t)(1u << 30))
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
|
|
|
@ -55,3 +55,5 @@ set( PCH_SOURCES
|
|||
)
|
||||
|
||||
add_game_library2( duke )
|
||||
|
||||
include_directories( src )
|
||||
|
|
|
@ -77,19 +77,3 @@ void fall_common(int g_i, int g_p, int JIBS6, int DRONE, int BLOODPOOL, int SHOT
|
|||
void checkavailweapon(struct player_struct* p);
|
||||
void deletesprite(int num);
|
||||
|
||||
// tile names which are identical for all games.
|
||||
enum
|
||||
{
|
||||
SECTOREFFECTOR = 1,
|
||||
ACTIVATOR = 2,
|
||||
TOUCHPLATE = 3,
|
||||
ACTIVATORLOCKED = 4,
|
||||
MUSICANDSFX = 5,
|
||||
LOCATORS = 6,
|
||||
CYCLER = 7,
|
||||
MASTERSWITCH = 8,
|
||||
RESPAWN = 9,
|
||||
GPSPEED = 10,
|
||||
FOF = 13,
|
||||
};
|
||||
|
||||
|
|
|
@ -43,6 +43,7 @@ This file is a combination of code from the following sources:
|
|||
#include "global.h"
|
||||
#include "names.h"
|
||||
#include "stats.h"
|
||||
#include "constants.h"
|
||||
|
||||
BEGIN_DUKE_NS
|
||||
|
||||
|
@ -51,6 +52,19 @@ int otherp;
|
|||
int adjustfall(spritetype* s, int c);
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
// this was once a macro
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void RANDOMSCRAP(spritetype *s, int i)
|
||||
{
|
||||
int r1 = krand2(), r2 = krand2(), r3 = krand2(), r4 = krand2(), r5 = krand2(), r6 = krand2(), r7 = krand2();
|
||||
int v = isRR() ? 16 : 48;
|
||||
EGS(s->sectnum, s->x + (r7 & 255) - 128, s->y + (r6 & 255) - 128, s->z - (8 << 8) - (r5 & 8191), TILE_SCRAP6 + (r4 & 15), -8, v, v, r3 & 2047, (r2 & 63) + 64, -512 - (r1 & 2047), i, 5);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
// wrapper to ensure that if a sound actor is killed, the sound is stopped as well.
|
||||
|
@ -1507,7 +1521,7 @@ bool queball(int i, int pocket, int queball, int stripeball)
|
|||
// if(s->pal == 12)
|
||||
{
|
||||
j = getincangle(ps[p].getang(), getangle(s->x - ps[p].posx, s->y - ps[p].posy));
|
||||
if (j > -64 && j < 64 && PlayerInput(p, SK_OPEN))
|
||||
if (j > -64 && j < 64 && PlayerInput(p, SKB_OPEN))
|
||||
if (ps[p].toggle_key_flag == 1)
|
||||
{
|
||||
int a = headspritestat[STAT_ACTOR];
|
||||
|
|
|
@ -2108,13 +2108,13 @@ void movetransports_d(void)
|
|||
else if (!(sectlotag == 1 && ps[p].on_ground == 1)) break;
|
||||
|
||||
if (onfloorz == 0 && abs(sprite[i].z - ps[p].posz) < 6144)
|
||||
if ((ps[p].jetpack_on == 0) || (ps[p].jetpack_on && (PlayerInput(p, SK_JUMP))) ||
|
||||
(ps[p].jetpack_on && (PlayerInput(p, SK_CROUCH) ^ !!ps[p].crouch_toggle)))
|
||||
if ((ps[p].jetpack_on == 0) || (ps[p].jetpack_on && (PlayerInput(p, SKB_JUMP))) ||
|
||||
(ps[p].jetpack_on && (PlayerInput(p, SKB_CROUCH) ^ !!ps[p].crouch_toggle)))
|
||||
{
|
||||
ps[p].oposx = ps[p].posx += sprite[sprite[i].owner].x - sprite[i].x;
|
||||
ps[p].oposy = ps[p].posy += sprite[sprite[i].owner].y - sprite[i].y;
|
||||
|
||||
if (ps[p].jetpack_on && (PlayerInput(p, SK_JUMP) || ps[p].jetpack_on < 11))
|
||||
if (ps[p].jetpack_on && (PlayerInput(p, SKB_JUMP) || ps[p].jetpack_on < 11))
|
||||
ps[p].posz = sprite[sprite[i].owner].z - 6144;
|
||||
else ps[p].posz = sprite[sprite[i].owner].z + 6144;
|
||||
ps[p].oposz = ps[p].posz;
|
||||
|
@ -2131,7 +2131,7 @@ void movetransports_d(void)
|
|||
|
||||
k = 0;
|
||||
|
||||
if (onfloorz && sectlotag == ST_1_ABOVE_WATER && ps[p].on_ground && ps[p].posz > (sector[sect].floorz - (16 << 8)) && (PlayerInput(p, SK_CROUCH) || ps[p].poszv > 2048))
|
||||
if (onfloorz && sectlotag == ST_1_ABOVE_WATER && ps[p].on_ground && ps[p].posz > (sector[sect].floorz - (16 << 8)) && (PlayerInput(p, SKB_CROUCH) || ps[p].poszv > 2048))
|
||||
// if( onfloorz && sectlotag == 1 && ps[p].posz > (sector[sect].floorz-(6<<8)) )
|
||||
{
|
||||
k = 1;
|
||||
|
@ -2459,7 +2459,7 @@ static void greenslime(int i)
|
|||
|
||||
s->ang = ps[p].getang();
|
||||
|
||||
if ((PlayerInput(p, SK_FIRE) || (ps[p].quick_kick > 0)) && sprite[ps[p].i].extra > 0)
|
||||
if ((PlayerInput(p, SKB_FIRE) || (ps[p].quick_kick > 0)) && sprite[ps[p].i].extra > 0)
|
||||
if (ps[p].quick_kick > 0 || (ps[p].curr_weapon != HANDREMOTE_WEAPON && ps[p].curr_weapon != HANDBOMB_WEAPON && ps[p].curr_weapon != TRIPBOMB_WEAPON && ps[p].ammo_amount[ps[p].curr_weapon] >= 0))
|
||||
{
|
||||
for (x = 0; x < 8; x++)
|
||||
|
|
|
@ -1756,13 +1756,13 @@ void movetransports_r(void)
|
|||
else break;
|
||||
|
||||
if (onfloorz == 0 && abs(sprite[i].z - ps[p].posz) < 6144)
|
||||
if ((ps[p].jetpack_on == 0) || (ps[p].jetpack_on && PlayerInput(p, SK_JUMP)) ||
|
||||
(ps[p].jetpack_on && PlayerInput(p, SK_CROUCH)))
|
||||
if ((ps[p].jetpack_on == 0) || (ps[p].jetpack_on && PlayerInput(p, SKB_JUMP)) ||
|
||||
(ps[p].jetpack_on && PlayerInput(p, SKB_CROUCH)))
|
||||
{
|
||||
ps[p].oposx = ps[p].posx += sprite[OW].x - sprite[i].x;
|
||||
ps[p].oposy = ps[p].posy += sprite[OW].y - sprite[i].y;
|
||||
|
||||
if (ps[p].jetpack_on && (PlayerInput(p, SK_JUMP) || ps[p].jetpack_on < 11))
|
||||
if (ps[p].jetpack_on && (PlayerInput(p, SKB_JUMP) || ps[p].jetpack_on < 11))
|
||||
ps[p].posz = sprite[OW].z - 6144;
|
||||
else ps[p].posz = sprite[OW].z + 6144;
|
||||
ps[p].oposz = ps[p].posz;
|
||||
|
|
|
@ -323,7 +323,7 @@ void animatesprites_d(int x,int y,int a,int smoothratio)
|
|||
t->cstat |= 2;
|
||||
if ( screenpeek == myconnectindex && numplayers >= 2 )
|
||||
{
|
||||
t->x = omyx + mulscale16((int)(myx - omyx), smoothratio);
|
||||
t->x = omyx + mulscale16((int)( myx - omyx), smoothratio);
|
||||
t->y = omyy + mulscale16((int)(myy - omyy), smoothratio);
|
||||
t->z = omyz + mulscale16((int)(myz - omyz), smoothratio) + (40 << 8);
|
||||
t->ang = omyang + mulscale16((int)(((myang + 1024 - omyang) & 2047) - 1024), smoothratio);
|
||||
|
|
|
@ -1,63 +0,0 @@
|
|||
//
|
||||
// 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 RR (g_gameType & GAMEFLAG_RRALL)
|
||||
#define RRRA (g_gameType & GAMEFLAG_RRRA)
|
||||
#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 DEER (g_gameType & GAMEFLAG_DEER)
|
||||
//#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
|
||||
};
|
||||
|
||||
enum basepal_t {
|
||||
BASEPAL = 0,
|
||||
WATERPAL,
|
||||
SLIMEPAL,
|
||||
TITLEPAL,
|
||||
DREALMSPAL,
|
||||
ENDINGPAL, // 5
|
||||
ANIMPAL, // not used anymore
|
||||
DRUGPAL,
|
||||
BASEPALCOUNT
|
||||
};
|
||||
|
||||
#include "v_text.h"
|
||||
|
||||
|
||||
extern void G_InitMultiPsky(int CLOUDYOCEAN__DYN, int MOONSKY1__DYN, int BIGORBIT1__DYN, int LA__DYN);
|
||||
extern void G_SetupGlobalPsky(void);
|
||||
|
||||
//////////
|
||||
|
||||
extern void genspriteremaps(void);
|
||||
|
||||
//////////
|
||||
|
||||
END_DUKE_NS
|
||||
|
||||
#endif
|
|
@ -130,7 +130,7 @@ protected:
|
|||
|
||||
class DukeMainMenu : public DukeListMenu
|
||||
{
|
||||
virtual void Init(DMenu* parent = NULL, FListMenuDescriptor* desc = NULL) override
|
||||
virtual void Init(DMenu* parent = nullptr, FListMenuDescriptor* desc = nullptr) override
|
||||
{
|
||||
DukeListMenu::Init(parent, desc);
|
||||
}
|
||||
|
@ -139,7 +139,7 @@ class DukeMainMenu : public DukeListMenu
|
|||
{
|
||||
DukeListMenu::PreDraw();
|
||||
double x = origin.X + 160;
|
||||
if (RRRA)
|
||||
if (isRRRA())
|
||||
{
|
||||
DrawTexture(twod, tileGetTexture(TILE_THREEDEE), x-5, origin.Y+57, DTA_FullscreenScale, 3, DTA_VirtualWidth, 320, DTA_VirtualHeight, 200, DTA_ScaleX, 0.253, DTA_ScaleY, 0.253, DTA_CenterBottomOffset, true, TAG_DONE);
|
||||
}
|
||||
|
|
|
@ -101,19 +101,17 @@ EDUKE32_STATIC_ASSERT(7 <= MAXTILES-MAXUSERTILES);
|
|||
END_DUKE_NS
|
||||
|
||||
#include "zz_actors.h"
|
||||
#include "common_game.h"
|
||||
#include "gamecontrol.h"
|
||||
#include "game.h"
|
||||
#include "gamedef.h"
|
||||
#include "gameexec.h"
|
||||
#include "gamevar.h"
|
||||
#include "global.h"
|
||||
#include "inv.h"
|
||||
#include "macros.h"
|
||||
#include "names.h"
|
||||
#include "net.h"
|
||||
#include "player.h"
|
||||
#include "quotes.h"
|
||||
#include "quotemgr.h"
|
||||
#include "rts.h"
|
||||
#include "sector.h"
|
||||
#include "sounds.h"
|
||||
|
@ -124,71 +122,6 @@ BEGIN_DUKE_NS
|
|||
extern FFont* IndexFont;
|
||||
extern FFont* DigiFont;
|
||||
|
||||
// Order is that of EDuke32 by necessity because it exposes the key binds to scripting by index instead of by name.
|
||||
enum GameFunction_t
|
||||
{
|
||||
gamefunc_Move_Forward,
|
||||
gamefunc_Move_Backward,
|
||||
gamefunc_Turn_Left,
|
||||
gamefunc_Turn_Right,
|
||||
gamefunc_Strafe,
|
||||
gamefunc_Fire,
|
||||
gamefunc_Open,
|
||||
gamefunc_Run,
|
||||
gamefunc_Alt_Fire, // Duke3D, Blood
|
||||
gamefunc_Jump,
|
||||
gamefunc_Crouch,
|
||||
gamefunc_Look_Up,
|
||||
gamefunc_Look_Down,
|
||||
gamefunc_Look_Left,
|
||||
gamefunc_Look_Right,
|
||||
gamefunc_Strafe_Left,
|
||||
gamefunc_Strafe_Right,
|
||||
gamefunc_Aim_Up,
|
||||
gamefunc_Aim_Down,
|
||||
gamefunc_Weapon_1, // CCMD
|
||||
gamefunc_Weapon_2, // CCMD
|
||||
gamefunc_Weapon_3, // CCMD
|
||||
gamefunc_Weapon_4, // CCMD
|
||||
gamefunc_Weapon_5, // CCMD
|
||||
gamefunc_Weapon_6, // CCMD
|
||||
gamefunc_Weapon_7, // CCMD
|
||||
gamefunc_Weapon_8, // CCMD
|
||||
gamefunc_Weapon_9, // CCMD
|
||||
gamefunc_Weapon_10, // CCMD
|
||||
gamefunc_Inventory, // CCMD
|
||||
gamefunc_Inventory_Left, // CCMD
|
||||
gamefunc_Inventory_Right, // CCMD
|
||||
gamefunc_Holo_Duke, // CCMD // Duke3D, RR
|
||||
gamefunc_Jetpack, // CCMD
|
||||
gamefunc_NightVision, // CCMD
|
||||
gamefunc_MedKit, // CCMD
|
||||
gamefunc_TurnAround,
|
||||
gamefunc_SendMessage,
|
||||
gamefunc_Map, // CCMD
|
||||
gamefunc_Shrink_Screen, // CCMD
|
||||
gamefunc_Enlarge_Screen, // CCMD
|
||||
gamefunc_Center_View, // CCMD
|
||||
gamefunc_Holster_Weapon, // CCMD
|
||||
gamefunc_Show_Opponents_Weapon, // CCMD
|
||||
gamefunc_Map_Follow_Mode, // CCMD
|
||||
gamefunc_See_Coop_View, // CCMD
|
||||
gamefunc_Mouse_Aiming, // CCMD
|
||||
gamefunc_Toggle_Crosshair, // CCMD
|
||||
gamefunc_Steroids, // CCMD
|
||||
gamefunc_Quick_Kick, // CCMD
|
||||
gamefunc_Next_Weapon, // CCMD
|
||||
gamefunc_Previous_Weapon, // CCMD
|
||||
gamefunc_Dpad_Select,
|
||||
gamefunc_Dpad_Aiming,
|
||||
gamefunc_Last_Weapon, // CCMD
|
||||
gamefunc_Alt_Weapon,
|
||||
gamefunc_Third_Person_View, // CCMD
|
||||
gamefunc_Show_DukeMatch_Scores, // CCMD
|
||||
gamefunc_Toggle_Crouch, // This is the last one used by EDuke32.
|
||||
NUM_ACTIONS
|
||||
};
|
||||
|
||||
struct GameInterface : ::GameInterface
|
||||
{
|
||||
const char* Name() override { return "Duke"; }
|
||||
|
|
|
@ -33,6 +33,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#include "palette.h"
|
||||
#include "cmdlib.h"
|
||||
#include "screenjob.h"
|
||||
#include "constants.h"
|
||||
|
||||
BEGIN_DUKE_NS
|
||||
|
||||
|
@ -118,9 +119,6 @@ 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);
|
||||
|
||||
extern int32_t g_Shareware;
|
||||
extern int32_t cameraclock;
|
||||
extern int32_t cameradist;
|
||||
|
@ -261,84 +259,6 @@ static inline int32_t calc_smoothratio(ClockTicks totalclk, ClockTicks ototalclk
|
|||
return CalcSmoothRatio(totalclk, ototalclk, REALGAMETICSPERSEC);
|
||||
}
|
||||
|
||||
// sector effector lotags
|
||||
enum
|
||||
{
|
||||
SE_0_ROTATING_SECTOR = 0,
|
||||
SE_1_PIVOT = 1,
|
||||
SE_2_EARTHQUAKE = 2,
|
||||
SE_3_RANDOM_LIGHTS_AFTER_SHOT_OUT = 3,
|
||||
SE_4_RANDOM_LIGHTS = 4,
|
||||
SE_5_BOSS = 5,
|
||||
SE_6_SUBWAY = 6,
|
||||
// ^^ potentially incomplete substitution in code
|
||||
// vv almost surely complete substitution
|
||||
SE_7_TELEPORT = 7,
|
||||
SE_8_UP_OPEN_DOOR_LIGHTS = 8,
|
||||
SE_9_DOWN_OPEN_DOOR_LIGHTS = 9,
|
||||
SE_10_DOOR_AUTO_CLOSE = 10,
|
||||
SE_11_SWINGING_DOOR = 11,
|
||||
SE_12_LIGHT_SWITCH = 12,
|
||||
SE_13_EXPLOSIVE = 13,
|
||||
SE_14_SUBWAY_CAR = 14,
|
||||
SE_15_SLIDING_DOOR = 15,
|
||||
SE_16_REACTOR = 16,
|
||||
SE_17_WARP_ELEVATOR = 17,
|
||||
SE_18_INCREMENTAL_SECTOR_RISE_FALL = 18,
|
||||
SE_19_EXPLOSION_LOWERS_CEILING = 19,
|
||||
SE_20_STRETCH_BRIDGE = 20,
|
||||
SE_21_DROP_FLOOR = 21,
|
||||
SE_22_TEETH_DOOR = 22,
|
||||
SE_23_ONE_WAY_TELEPORT = 23,
|
||||
SE_24_CONVEYOR = 24,
|
||||
SE_25_PISTON = 25,
|
||||
SE_26 = 26,
|
||||
SE_27_DEMO_CAM = 27,
|
||||
SE_28_LIGHTNING = 28,
|
||||
SE_29_WAVES = 29,
|
||||
SE_30_TWO_WAY_TRAIN = 30,
|
||||
SE_31_FLOOR_RISE_FALL = 31,
|
||||
SE_32_CEILING_RISE_FALL = 32,
|
||||
SE_33_QUAKE_DEBRIS = 33,
|
||||
SE_34 = 34, // XXX
|
||||
SE_35 = 35, // XXX
|
||||
SE_36_PROJ_SHOOTER = 36,
|
||||
SE_47_LIGHT_SWITCH = 47,
|
||||
SE_48_LIGHT_SWITCH = 48,
|
||||
SE_49_POINT_LIGHT = 49,
|
||||
SE_50_SPOT_LIGHT = 50,
|
||||
SE_130 = 130,
|
||||
SE_131 = 131,
|
||||
};
|
||||
|
||||
// sector lotags
|
||||
enum
|
||||
{
|
||||
ST_0_NO_EFFECT = 0,
|
||||
ST_1_ABOVE_WATER = 1,
|
||||
ST_2_UNDERWATER = 2,
|
||||
ST_3 = 3,
|
||||
// ^^^ maybe not complete substitution in code
|
||||
ST_9_SLIDING_ST_DOOR = 9,
|
||||
ST_15_WARP_ELEVATOR = 15,
|
||||
ST_16_PLATFORM_DOWN = 16,
|
||||
ST_17_PLATFORM_UP = 17,
|
||||
ST_18_ELEVATOR_DOWN = 18,
|
||||
ST_19_ELEVATOR_UP = 19,
|
||||
ST_20_CEILING_DOOR = 20,
|
||||
ST_21_FLOOR_DOOR = 21,
|
||||
ST_22_SPLITTING_DOOR = 22,
|
||||
ST_23_SWINGING_DOOR = 23,
|
||||
ST_25_SLIDING_DOOR = 25,
|
||||
ST_26_SPLITTING_ST_DOOR = 26,
|
||||
ST_27_STRETCH_BRIDGE = 27,
|
||||
ST_28_DROP_FLOOR = 28,
|
||||
ST_29_TEETH_DOOR = 29,
|
||||
ST_30_ROTATE_RISE_BRIDGE = 30,
|
||||
ST_31_TWO_WAY_TRAIN = 31,
|
||||
// left: ST 32767, 65534, 65535
|
||||
};
|
||||
|
||||
|
||||
static inline void G_NewGame_EnterLevel(void)
|
||||
{
|
||||
|
@ -365,6 +285,14 @@ int initreactor(int j, int i, bool isrecon);
|
|||
void spawneffector(int i);
|
||||
void gameexitfrommenu();
|
||||
|
||||
extern void G_InitMultiPsky(int CLOUDYOCEAN__DYN, int MOONSKY1__DYN, int BIGORBIT1__DYN, int LA__DYN);
|
||||
extern void G_SetupGlobalPsky(void);
|
||||
|
||||
//////////
|
||||
|
||||
extern void genspriteremaps(void);
|
||||
|
||||
|
||||
struct Dispatcher
|
||||
{
|
||||
// global stuff
|
||||
|
|
|
@ -139,10 +139,10 @@ void gameexitfrommenu()
|
|||
}
|
||||
|
||||
// shareware and TEN screens
|
||||
if (!VOLUMEALL && !RR)
|
||||
if (!VOLUMEALL && !isRR())
|
||||
showtwoscreens([](bool) {});
|
||||
|
||||
endoomName = RR ? "redneck.bin" : VOLUMEALL ? "duke3d.bin" : "dukesw.bin";
|
||||
endoomName = isRR() ? "redneck.bin" : VOLUMEALL ? "duke3d.bin" : "dukesw.bin";
|
||||
ST_Endoom();
|
||||
}
|
||||
|
||||
|
|
|
@ -1122,7 +1122,7 @@ int parse(void)
|
|||
s = g_sp->xvel;
|
||||
|
||||
// sigh... this was yet another place where number literals were used as bit masks for every single value, making the code totally unreadable.
|
||||
if( (l& pducking) && ps[g_p].on_ground && (PlayerInput(g_p, SK_CROUCH) ^ !!(ps[g_p].crouch_toggle) ))
|
||||
if( (l& pducking) && ps[g_p].on_ground && (PlayerInput(g_p, SKB_CROUCH) ^ !!(ps[g_p].crouch_toggle) ))
|
||||
j = 1;
|
||||
else if( (l& pfalling) && ps[g_p].jumping_counter == 0 && !ps[g_p].on_ground && ps[g_p].poszv > 2048 )
|
||||
j = 1;
|
||||
|
@ -1130,15 +1130,15 @@ int parse(void)
|
|||
j = 1;
|
||||
else if( (l& pstanding) && s >= 0 && s < 8)
|
||||
j = 1;
|
||||
else if( (l& pwalking) && s >= 8 && !(PlayerInput(g_p, SK_RUN)) )
|
||||
else if( (l& pwalking) && s >= 8 && !(PlayerInput(g_p, SKB_RUN)) )
|
||||
j = 1;
|
||||
else if( (l& prunning) && s >= 8 && PlayerInput(g_p, SK_RUN) )
|
||||
else if( (l& prunning) && s >= 8 && PlayerInput(g_p, SKB_RUN) )
|
||||
j = 1;
|
||||
else if( (l& phigher) && ps[g_p].posz < (g_sp->z-(48<<8)) )
|
||||
j = 1;
|
||||
else if( (l& pwalkingback) && s <= -8 && !(PlayerInput(g_p, SK_RUN)) )
|
||||
else if( (l& pwalkingback) && s <= -8 && !(PlayerInput(g_p, SKB_RUN)) )
|
||||
j = 1;
|
||||
else if( (l& prunningback) && s <= -8 && (PlayerInput(g_p, SK_RUN)) )
|
||||
else if( (l& prunningback) && s <= -8 && (PlayerInput(g_p, SKB_RUN)) )
|
||||
j = 1;
|
||||
else if( (l& pkicking) && ( ps[g_p].quick_kick > 0 || ( ps[g_p].curr_weapon == KNEE_WEAPON && ps[g_p].kickback_pic > 0 ) ) )
|
||||
j = 1;
|
||||
|
@ -1203,7 +1203,7 @@ int parse(void)
|
|||
parseifelse( (( hittype[g_i].floorz - hittype[g_i].ceilingz ) >> 8 ) < *insptr);
|
||||
break;
|
||||
case concmd_ifhitspace:
|
||||
parseifelse(PlayerInput(g_p, SK_OPEN));
|
||||
parseifelse(PlayerInput(g_p, SKB_OPEN));
|
||||
break;
|
||||
case concmd_ifoutside:
|
||||
parseifelse(sector[g_sp->sectnum].ceilingstat & 1);
|
||||
|
|
|
@ -175,7 +175,7 @@ void mploadsave()
|
|||
|
||||
multiflag = 0;
|
||||
|
||||
if(j == 0 && !RR)
|
||||
if(j == 0 && !isRR())
|
||||
{
|
||||
if(multiwho != myconnectindex)
|
||||
{
|
||||
|
@ -225,7 +225,7 @@ int domovethings()
|
|||
j = -1;
|
||||
for (i = connecthead; i >= 0; i = connectpoint2[i])
|
||||
{
|
||||
if (PlayerInput(i, SK_GAMEQUIT))
|
||||
if (PlayerInput(i, SKB_GAMEQUIT))
|
||||
{
|
||||
if (i == myconnectindex) gameexitfrommenu();
|
||||
if (screenpeek == i)
|
||||
|
|
|
@ -27,9 +27,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#include "compat.h"
|
||||
#include "duke3d.h"
|
||||
#include "mmulti.h"
|
||||
#include "quotes.h"
|
||||
#include "quotemgr.h"
|
||||
#include "sector.h"
|
||||
#include "sounds.h"
|
||||
#include "constants.h"
|
||||
|
||||
BEGIN_DUKE_NS
|
||||
|
||||
|
@ -342,22 +343,22 @@ inline bool isIn(int value, const std::initializer_list<int> &list)
|
|||
|
||||
|
||||
// these are mainly here to avoid directly accessing the input data so that it can be more easily refactored later.
|
||||
inline bool PlayerInput(int pl, int bit)
|
||||
inline bool PlayerInput(int pl, ESyncBits bit)
|
||||
{
|
||||
return TEST_SYNC_KEY(g_player[pl].input->bits, bit);
|
||||
return (!!((g_player[pl].input->bits) &bit));
|
||||
}
|
||||
|
||||
inline void PlayerSetInput(int pl, int bit)
|
||||
inline void PlayerSetInput(int pl, ESyncBits bit)
|
||||
{
|
||||
g_player[pl].input->bits |= (1 << bit);
|
||||
g_player[pl].input->bits |= bit;
|
||||
}
|
||||
|
||||
inline void PlayerClearInput(int pl, int bit)
|
||||
inline void PlayerClearInput(int pl, ESyncBits bit)
|
||||
{
|
||||
g_player[pl].input->bits &= ~(1 << bit);
|
||||
g_player[pl].input->bits &= ~bit;
|
||||
}
|
||||
|
||||
inline int PlayerInputBits(int pl, int bits)
|
||||
inline ESyncBits PlayerInputBits(int pl, ESyncBits bits)
|
||||
{
|
||||
return (g_player[pl].input->bits & bits);
|
||||
}
|
||||
|
|
|
@ -60,13 +60,13 @@ void hud_input(int snum)
|
|||
p = &ps[snum];
|
||||
|
||||
i = p->aim_mode;
|
||||
p->aim_mode = PlayerInput(snum, SK_AIMMODE);
|
||||
p->aim_mode = PlayerInput(snum, SKB_AIMMODE);
|
||||
if (p->aim_mode < i)
|
||||
p->return_to_center = 9;
|
||||
|
||||
if (isRR())
|
||||
{
|
||||
if (PlayerInput(snum, SK_QUICK_KICK) && p->last_pissed_time == 0)
|
||||
if (PlayerInput(snum, SKB_QUICK_KICK) && p->last_pissed_time == 0)
|
||||
{
|
||||
if (!isRRRA() || sprite[p->i].extra > 0)
|
||||
{
|
||||
|
@ -85,7 +85,7 @@ void hud_input(int snum)
|
|||
}
|
||||
else
|
||||
{
|
||||
if (PlayerInput(snum, SK_QUICK_KICK) && p->quick_kick == 0 && (p->curr_weapon != KNEE_WEAPON || p->kickback_pic == 0))
|
||||
if (PlayerInput(snum, SKB_QUICK_KICK) && p->quick_kick == 0 && (p->curr_weapon != KNEE_WEAPON || p->kickback_pic == 0))
|
||||
{
|
||||
SetGameVarID(g_iReturnVarID, 0, -1, snum);
|
||||
OnEvent(EVENT_QUICKKICK, -1, snum, -1);
|
||||
|
@ -99,16 +99,16 @@ void hud_input(int snum)
|
|||
|
||||
// WTF??? In the original source this was a soup of numeric literals, i.e. totally incomprehensible.
|
||||
// The bit mask has been exported to the bit type enum.
|
||||
if (!PlayerInputBits(snum, SK_INTERFACE_BITS))
|
||||
if (!PlayerInputBits(snum, SKB_INTERFACE_BITS))
|
||||
p->interface_toggle_flag = 0;
|
||||
else if (p->interface_toggle_flag == 0)
|
||||
{
|
||||
p->interface_toggle_flag = 1;
|
||||
|
||||
if (PlayerInput(snum, SK_PAUSE))
|
||||
if (PlayerInput(snum, SKB_PAUSE))
|
||||
{
|
||||
ud.pause_on = !ud.pause_on;
|
||||
if (ud.pause_on == 1 && PlayerInput(snum, SK_RUN)) ud.pause_on = 2; // Mode 2 is silent, i.e. prints no notification.
|
||||
if (ud.pause_on == 1 && PlayerInput(snum, SKB_RUN)) ud.pause_on = 2; // Mode 2 is silent, i.e. prints no notification.
|
||||
Mus_SetPaused(ud.pause_on);
|
||||
S_PauseSounds(ud.pause_on);
|
||||
}
|
||||
|
@ -118,7 +118,7 @@ void hud_input(int snum)
|
|||
if (sprite[p->i].extra <= 0) return;
|
||||
|
||||
// Activate an inventory item. This just forwards to the other inventory bits. If the inventory selector was taken out of the playsim this could be removed.
|
||||
if (PlayerInput(snum, SK_INVENTORY) && p->newowner == -1)
|
||||
if (PlayerInput(snum, SKB_INVENTORY) && p->newowner == -1)
|
||||
{
|
||||
SetGameVarID(g_iReturnVarID, 0, -1, snum);
|
||||
OnEvent(EVENT_INVENTORY, -1, snum, -1);
|
||||
|
@ -127,16 +127,16 @@ void hud_input(int snum)
|
|||
switch (p->inven_icon)
|
||||
{
|
||||
// Yet another place where no symbolic constants were used. :(
|
||||
case ICON_JETPACK: PlayerSetInput(snum, SK_JETPACK); break;
|
||||
case ICON_HOLODUKE: PlayerSetInput(snum, SK_HOLODUKE); break;
|
||||
case ICON_HEATS: PlayerSetInput(snum, SK_NIGHTVISION); break;
|
||||
case ICON_FIRSTAID: PlayerSetInput(snum, SK_MEDKIT); break;
|
||||
case ICON_STEROIDS: PlayerSetInput(snum, SK_STEROIDS); break;
|
||||
case ICON_JETPACK: PlayerSetInput(snum, SKB_JETPACK); break;
|
||||
case ICON_HOLODUKE: PlayerSetInput(snum, SKB_HOLODUKE); break;
|
||||
case ICON_HEATS: PlayerSetInput(snum, SKB_NIGHTVISION); break;
|
||||
case ICON_FIRSTAID: PlayerSetInput(snum, SKB_MEDKIT); break;
|
||||
case ICON_STEROIDS: PlayerSetInput(snum, SKB_STEROIDS); break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!isRR() && PlayerInput(snum, SK_NIGHTVISION))
|
||||
if (!isRR() && PlayerInput(snum, SKB_NIGHTVISION))
|
||||
{
|
||||
SetGameVarID(g_iReturnVarID, 0, -1, snum);
|
||||
OnEvent(EVENT_USENIGHTVISION, -1, snum, -1);
|
||||
|
@ -150,7 +150,7 @@ void hud_input(int snum)
|
|||
}
|
||||
}
|
||||
|
||||
if (PlayerInput(snum, SK_STEROIDS))
|
||||
if (PlayerInput(snum, SKB_STEROIDS))
|
||||
{
|
||||
SetGameVarID(g_iReturnVarID, 0, -1, snum);
|
||||
OnEvent(EVENT_USESTEROIDS, -1, snum, -1);
|
||||
|
@ -167,11 +167,11 @@ void hud_input(int snum)
|
|||
return;
|
||||
}
|
||||
|
||||
if (PlayerInput(snum, SK_INV_LEFT) || PlayerInput(snum, SK_INV_RIGHT))
|
||||
if (PlayerInput(snum, SKB_INV_LEFT) || PlayerInput(snum, SKB_INV_RIGHT))
|
||||
{
|
||||
p->invdisptime = 26 * 2;
|
||||
|
||||
if (PlayerInput(snum, SK_INV_RIGHT)) k = 1;
|
||||
if (PlayerInput(snum, SKB_INV_RIGHT)) k = 1;
|
||||
else k = 0;
|
||||
|
||||
dainv = p->inven_icon;
|
||||
|
@ -233,13 +233,13 @@ void hud_input(int snum)
|
|||
else dainv = 0;
|
||||
|
||||
// These events force us to keep the inventory selector in the playsim as opposed to the UI where it really belongs.
|
||||
if (PlayerInput(snum, SK_INV_LEFT))
|
||||
if (PlayerInput(snum, SKB_INV_LEFT))
|
||||
{
|
||||
SetGameVarID(g_iReturnVarID, dainv, -1, snum);
|
||||
OnEvent(EVENT_INVENTORYLEFT, -1, snum, -1);
|
||||
dainv = GetGameVarID(g_iReturnVarID, -1, snum);
|
||||
}
|
||||
if (PlayerInput(snum, SK_INV_RIGHT))
|
||||
if (PlayerInput(snum, SKB_INV_RIGHT))
|
||||
{
|
||||
SetGameVarID(g_iReturnVarID, dainv, -1, snum);
|
||||
OnEvent(EVENT_INVENTORYRIGHT, -1, snum, -1);
|
||||
|
@ -251,14 +251,14 @@ void hud_input(int snum)
|
|||
if (dainv >= 1 && dainv < 8) FTA(invquotes[dainv - 1], p);
|
||||
}
|
||||
|
||||
j = (PlayerInputBits(snum, SK_WEAPONMASK_BITS) >> SK_WEAPON_BITS) - 1;
|
||||
j = (PlayerInputBits(snum, SKB_WEAPONMASK_BITS) >> SK_WEAPON_BITS) - 1;
|
||||
if (j > 0 && p->kickback_pic > 0)
|
||||
p->wantweaponfire = j;
|
||||
|
||||
// Here we have to be extra careful that the weapons do not get mixed up, so let's keep the code for Duke and RR completely separate.
|
||||
fi.selectweapon(snum, j);
|
||||
|
||||
if (PlayerInput(snum, SK_HOLSTER))
|
||||
if (PlayerInput(snum, SKB_HOLSTER))
|
||||
{
|
||||
if (p->curr_weapon > KNEE_WEAPON)
|
||||
{
|
||||
|
@ -277,7 +277,7 @@ void hud_input(int snum)
|
|||
}
|
||||
}
|
||||
|
||||
if (PlayerInput(snum, SK_HOLODUKE) && (isRR() || p->newowner == -1))
|
||||
if (PlayerInput(snum, SKB_HOLODUKE) && (isRR() || p->newowner == -1))
|
||||
{
|
||||
SetGameVarID(g_iReturnVarID, 0, -1, snum);
|
||||
OnEvent(EVENT_HOLODUKEON, -1, snum, -1);
|
||||
|
@ -333,7 +333,7 @@ void hud_input(int snum)
|
|||
}
|
||||
}
|
||||
|
||||
if (isRR() && PlayerInput(snum, SK_NIGHTVISION) && p->newowner == -1)
|
||||
if (isRR() && PlayerInput(snum, SKB_NIGHTVISION) && p->newowner == -1)
|
||||
{
|
||||
SetGameVarID(g_iReturnVarID, 0, -1, snum);
|
||||
OnEvent(EVENT_USENIGHTVISION, -1, snum, -1);
|
||||
|
@ -365,7 +365,7 @@ void hud_input(int snum)
|
|||
}
|
||||
}
|
||||
|
||||
if (PlayerInput(snum, SK_MEDKIT))
|
||||
if (PlayerInput(snum, SKB_MEDKIT))
|
||||
{
|
||||
SetGameVarID(g_iReturnVarID, 0, -1, snum);
|
||||
OnEvent(EVENT_USEMEDKIT, -1, snum, -1);
|
||||
|
@ -418,7 +418,7 @@ void hud_input(int snum)
|
|||
}
|
||||
}
|
||||
|
||||
if (PlayerInput(snum, SK_JETPACK) && (isRR() || p->newowner == -1))
|
||||
if (PlayerInput(snum, SKB_JETPACK) && (isRR() || p->newowner == -1))
|
||||
{
|
||||
SetGameVarID(g_iReturnVarID, 0, -1, snum);
|
||||
OnEvent(EVENT_USEJETPACK, -1, snum, -1);
|
||||
|
@ -486,7 +486,7 @@ void hud_input(int snum)
|
|||
}
|
||||
}
|
||||
|
||||
if (PlayerInput(snum, SK_TURNAROUND) && p->one_eighty_count == 0)
|
||||
if (PlayerInput(snum, SKB_TURNAROUND) && p->one_eighty_count == 0)
|
||||
{
|
||||
SetGameVarID(g_iReturnVarID, 0, -1, snum);
|
||||
OnEvent(EVENT_TURNAROUND, -1, snum, -1);
|
||||
|
|
|
@ -1,57 +0,0 @@
|
|||
//-------------------------------------------------------------------------
|
||||
/*
|
||||
Copyright (C) 2016 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.
|
||||
*/
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
#pragma once
|
||||
|
||||
BEGIN_DUKE_NS
|
||||
|
||||
enum dukeinv_t
|
||||
{
|
||||
GET_STEROIDS, // 0
|
||||
GET_SHIELD,
|
||||
GET_SCUBA,
|
||||
GET_HOLODUKE,
|
||||
GET_JETPACK,
|
||||
GET_DUMMY1, // 5
|
||||
GET_ACCESS,
|
||||
GET_HEATS,
|
||||
GET_DUMMY2,
|
||||
GET_FIRSTAID,
|
||||
GET_BOOTS, // 10
|
||||
GET_MAX
|
||||
};
|
||||
|
||||
// these are not in the same order as the above, and it can't be changed for compat reasons. lame!
|
||||
enum dukeinvicon_t
|
||||
{
|
||||
ICON_NONE, // 0
|
||||
ICON_FIRSTAID,
|
||||
ICON_STEROIDS,
|
||||
ICON_HOLODUKE,
|
||||
ICON_JETPACK,
|
||||
ICON_HEATS, // 5
|
||||
ICON_SCUBA,
|
||||
ICON_BOOTS,
|
||||
ICON_MAX
|
||||
};
|
||||
|
||||
END_DUKE_NS
|
|
@ -37,12 +37,7 @@ static FORCE_INLINE int32_t krand2(void)
|
|||
|
||||
#define BGSTRETCH (hud_bgstretch ? 1024 : 0)
|
||||
|
||||
#define RANDOMSCRAP(s, i) \
|
||||
{ \
|
||||
int32_t const r1 = krand2(), r2 = krand2(), r3 = krand2(), r4 = krand2(), r5 = krand2(), r6 = krand2(), r7 = krand2(); \
|
||||
A_InsertSprite(s->sectnum,s->x+(r7&255)-128,s->y+(r6&255)-128,s->z-ZOFFSET3-(r5&8191),\
|
||||
TILE_SCRAP6+(r4&15),-8,RR?16:48,RR?16:48,r3&2047,(r2&63)+64,-512-(r1&2047),i,5); \
|
||||
}
|
||||
void RANDOMSCRAP(spritetype* s, int i);
|
||||
|
||||
#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)
|
||||
|
@ -57,8 +52,6 @@ static FORCE_INLINE int32_t krand2(void)
|
|||
|
||||
#define BIT(shift) (1u<<(shift))
|
||||
|
||||
#define TEST_SYNC_KEY(bits, sync_num) (!!TEST((bits), BIT(sync_num)))
|
||||
|
||||
inline bool AFLAMABLE(int X)
|
||||
{
|
||||
return (X == TILE_BOX || X == TILE_TREE1 || X == TILE_TREE2 || X == TILE_TIRE || X == TILE_CONE);
|
||||
|
@ -70,78 +63,6 @@ inline bool AFLAMABLE(int X)
|
|||
// NETWORK - REDEFINABLE SHARED (SYNC) KEYS BIT POSITIONS
|
||||
//
|
||||
|
||||
enum
|
||||
{
|
||||
// Todo: Make this bit masks - cannot be done before eliminating all old code using it
|
||||
SK_JUMP = 0 ,
|
||||
SK_CROUCH = 1 ,
|
||||
SK_FIRE = 2 ,
|
||||
SK_AIM_UP = 3 ,
|
||||
SK_AIM_DOWN = 4 ,
|
||||
SK_RUN = 5 ,
|
||||
SK_LOOK_LEFT = 6 ,
|
||||
SK_LOOK_RIGHT = 7 ,
|
||||
// weapons take up 4 bits...
|
||||
SK_WEAPON_BITS = 8 ,
|
||||
SK_WEAPON_BITS1 = 9 ,
|
||||
SK_WEAPON_BITS2 = 10,
|
||||
SK_WEAPON_BITS3 = 11,
|
||||
SK_STEROIDS = 12,
|
||||
SK_LOOK_UP = 13,
|
||||
SK_LOOK_DOWN = 14,
|
||||
SK_NIGHTVISION = 15,
|
||||
SK_MEDKIT = 16,
|
||||
SK_MULTIFLAG = 17,
|
||||
SK_CENTER_VIEW = 18,
|
||||
SK_HOLSTER = 19,
|
||||
SK_INV_LEFT = 20,
|
||||
SK_PAUSE = 21,
|
||||
SK_QUICK_KICK = 22,
|
||||
SK_AIMMODE = 23,
|
||||
SK_HOLODUKE = 24,
|
||||
SK_JETPACK = 25,
|
||||
SK_GAMEQUIT = 26,
|
||||
SK_INV_RIGHT = 27,
|
||||
SK_TURNAROUND = 28,
|
||||
SK_OPEN = 29,
|
||||
SK_INVENTORY = 30,
|
||||
SK_ESCAPE = 31,
|
||||
|
||||
SKB_JUMP = 1 << 0,
|
||||
SKB_CROUCH = 1 << 1,
|
||||
SKB_FIRE = 1 << 2,
|
||||
SKB_AIM_UP = 1 << 3,
|
||||
SKB_AIM_DOWN = 1 << 4,
|
||||
SKB_RUN = 1 << 5,
|
||||
SKB_LOOK_LEFT = 1 << 6,
|
||||
SKB_LOOK_RIGHT = 1 << 7,
|
||||
SKB_STEROIDS = 1 << 12,
|
||||
SKB_LOOK_UP = 1 << 13,
|
||||
SKB_LOOK_DOWN = 1 << 14,
|
||||
SKB_NIGHTVISION = 1 << 15,
|
||||
SKB_MEDKIT = 1 << 16,
|
||||
SKB_MULTIFLAG = 1 << 17,
|
||||
SKB_CENTER_VIEW = 1 << 18,
|
||||
SKB_HOLSTER = 1 << 19,
|
||||
SKB_INV_LEFT = 1 << 20,
|
||||
SKB_PAUSE = 1 << 21,
|
||||
SKB_QUICK_KICK = 1 << 22,
|
||||
SKB_AIMMODE = 1 << 23,
|
||||
SKB_HOLODUKE = 1 << 24,
|
||||
SKB_JETPACK = 1 << 25,
|
||||
SKB_GAMEQUIT = 1 << 26,
|
||||
SKB_INV_RIGHT = 1 << 27,
|
||||
SKB_TURNAROUND = 1 << 28,
|
||||
SKB_OPEN = 1 << 29,
|
||||
SKB_INVENTORY = 1 << 30,
|
||||
SKB_ESCAPE = 1 << 31,
|
||||
|
||||
SK_WEAPONMASK_BITS = (15u << SK_WEAPON_BITS),
|
||||
SK_INTERFACE_BITS = (SK_WEAPONMASK_BITS | BIT(SK_STEROIDS) | BIT(SK_NIGHTVISION) | BIT(SK_MEDKIT) | BIT(SK_QUICK_KICK) | \
|
||||
BIT(SK_HOLSTER) | BIT(SK_INV_LEFT) | BIT(SK_PAUSE) | BIT(SK_HOLODUKE) | BIT(SK_JETPACK) | BIT(SK_INV_RIGHT) | \
|
||||
BIT(SK_TURNAROUND) | BIT(SK_OPEN) | BIT(SK_INVENTORY) | BIT(SK_ESCAPE)),
|
||||
|
||||
};
|
||||
// rotatesprite flags
|
||||
#define ROTATE_SPRITE_TRANSLUCENT (BIT(0))
|
||||
#define ROTATE_SPRITE_VIEW_CLIP (BIT(1)) // clip to view
|
||||
|
@ -155,45 +76,7 @@ enum
|
|||
|
||||
#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)
|
||||
|
||||
#define CSTAT_WALL_BLOCK BIT(0)
|
||||
#define CSTAT_WALL_BOTTOM_SWAP BIT(1)
|
||||
#define CSTAT_WALL_ALIGN_BOTTOM BIT(2)
|
||||
#define CSTAT_WALL_XFLIP BIT(3)
|
||||
#define CSTAT_WALL_MASKED BIT(4)
|
||||
#define CSTAT_WALL_1WAY BIT(5)
|
||||
#define CSTAT_WALL_BLOCK_HITSCAN BIT(6)
|
||||
#define CSTAT_WALL_TRANSLUCENT BIT(7)
|
||||
#define CSTAT_WALL_YFLIP BIT(8)
|
||||
#define CSTAT_WALL_TRANS_FLIP BIT(9)
|
||||
#define CSTAT_WALL_BLOCK_ACTOR (BIT(14)) // my def
|
||||
#define CSTAT_WALL_WARP_HITSCAN (BIT(15)) // my def
|
||||
|
||||
//cstat, bit 0: 1 = Blocking sprite (use with clipmove, getzrange) "B"
|
||||
// bit 1: 1 = 50/50 transluscence, 0 = normal "T"
|
||||
|
|
|
@ -750,7 +750,7 @@ void horizAngleAdjust(int snum, int delta)
|
|||
#endif
|
||||
}
|
||||
|
||||
void playerLookUp(int snum, int sb_snum)
|
||||
void playerLookUp(int snum, ESyncBits sb_snum)
|
||||
{
|
||||
auto p = &ps[snum];
|
||||
SetGameVarID(g_iReturnVarID, 0, p->i, snum);
|
||||
|
@ -762,7 +762,7 @@ void playerLookUp(int snum, int sb_snum)
|
|||
}
|
||||
}
|
||||
|
||||
void playerLookDown(int snum, int sb_snum)
|
||||
void playerLookDown(int snum, ESyncBits sb_snum)
|
||||
{
|
||||
auto p = &ps[snum];
|
||||
SetGameVarID(g_iReturnVarID, 0, p->i, snum);
|
||||
|
@ -774,7 +774,7 @@ void playerLookDown(int snum, int sb_snum)
|
|||
}
|
||||
}
|
||||
|
||||
void playerAimUp(int snum, int sb_snum)
|
||||
void playerAimUp(int snum, ESyncBits sb_snum)
|
||||
{
|
||||
auto p = &ps[snum];
|
||||
SetGameVarID(g_iReturnVarID, 0, p->i, snum);
|
||||
|
@ -785,7 +785,7 @@ void playerAimUp(int snum, int sb_snum)
|
|||
}
|
||||
}
|
||||
|
||||
void playerAimDown(int snum, int sb_snum)
|
||||
void playerAimDown(int snum, ESyncBits sb_snum)
|
||||
{
|
||||
auto p = &ps[snum];
|
||||
SetGameVarID(g_iReturnVarID, 0, p->i, snum);
|
||||
|
|
|
@ -23,11 +23,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#ifndef player_h_
|
||||
#define player_h_
|
||||
|
||||
#include "inv.h"
|
||||
#include "names.h"
|
||||
#include "fix16.h"
|
||||
#include "net.h"
|
||||
#include "tarray.h"
|
||||
#include "constants.h"
|
||||
|
||||
BEGIN_DUKE_NS
|
||||
|
||||
|
@ -134,7 +134,7 @@ typedef struct STATUSBARTYPE {
|
|||
} DukeStatus_t;
|
||||
|
||||
typedef struct {
|
||||
uint32_t bits;
|
||||
ESyncBits bits;
|
||||
int16_t fvel, svel;
|
||||
fix16_t q16avel, q16horz;
|
||||
} input_t;
|
||||
|
@ -440,10 +440,10 @@ void playerJump(int snum, int fz, int cz);
|
|||
void playerLookLeft(int snum);
|
||||
void playerLookRight(int snum);
|
||||
void playerCenterView(int snum);
|
||||
void playerLookUp(int snum, int sb_snum);
|
||||
void playerLookDown(int snum, int sb_snum);
|
||||
void playerAimUp(int snum, int sb_snum);
|
||||
void playerAimDown(int snum, int sb_snum);
|
||||
void playerLookUp(int snum, ESyncBits sb_snum);
|
||||
void playerLookDown(int snum, ESyncBits sb_snum);
|
||||
void playerAimUp(int snum, ESyncBits sb_snum);
|
||||
void playerAimDown(int snum, ESyncBits sb_snum);
|
||||
bool view(struct player_struct* pp, int* vx, int* vy, int* vz, short* vsectnum, int ang, int horiz);
|
||||
|
||||
extern int lastvisinc;
|
||||
|
|
|
@ -44,7 +44,7 @@ source as it is released.
|
|||
BEGIN_DUKE_NS
|
||||
|
||||
void fireweapon_ww(int snum);
|
||||
void operateweapon_ww(int snum, int sb_snum, int psect);
|
||||
void operateweapon_ww(int snum, ESyncBits sb_snum, int psect);
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
|
@ -1265,7 +1265,7 @@ void selectweapon_d(int snum, int j) // playernum, weaponnum
|
|||
|
||||
if (p->holster_weapon)
|
||||
{
|
||||
PlayerSetInput(snum, SK_HOLSTER);
|
||||
PlayerSetInput(snum, SKB_HOLSTER);
|
||||
p->weapon_pos = -9;
|
||||
}
|
||||
else if (j >= MIN_WEAPON && p->gotweapon[j] && (unsigned int)p->curr_weapon != j) switch (j)
|
||||
|
@ -1496,7 +1496,7 @@ int doincrements_d(struct player_struct* p)
|
|||
}
|
||||
spritesound(DUKE_CRACK_FIRST, p->i);
|
||||
}
|
||||
else if (p->knuckle_incs == 22 || PlayerInput(snum, SK_FIRE))
|
||||
else if (p->knuckle_incs == 22 || PlayerInput(snum, SKB_FIRE))
|
||||
p->knuckle_incs = 0;
|
||||
|
||||
return 1;
|
||||
|
@ -1550,7 +1550,7 @@ void checkweapons_d(struct player_struct* p)
|
|||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
static void operateJetpack(int snum, int sb_snum, int psectlotag, int fz, int cz, int shrunk)
|
||||
static void operateJetpack(int snum, ESyncBits sb_snum, int psectlotag, int fz, int cz, int shrunk)
|
||||
{
|
||||
int j;
|
||||
auto p = &ps[snum];
|
||||
|
@ -1621,7 +1621,7 @@ static void operateJetpack(int snum, int sb_snum, int psectlotag, int fz, int cz
|
|||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
static void movement(int snum, int sb_snum, int psect, int fz, int cz, int shrunk, int truefdist)
|
||||
static void movement(int snum, ESyncBits sb_snum, int psect, int fz, int cz, int shrunk, int truefdist)
|
||||
{
|
||||
int j;
|
||||
auto p = &ps[snum];
|
||||
|
@ -1806,7 +1806,7 @@ static void movement(int snum, int sb_snum, int psect, int fz, int cz, int shrun
|
|||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
static void underwater(int snum, int sb_snum, int psect, int fz, int cz)
|
||||
static void underwater(int snum, ESyncBits sb_snum, int psect, int fz, int cz)
|
||||
{
|
||||
int j;
|
||||
auto p = &ps[snum];
|
||||
|
@ -2055,7 +2055,7 @@ static void fireweapon(int snum)
|
|||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
static void operateweapon(int snum, int sb_snum, int psect)
|
||||
static void operateweapon(int snum, ESyncBits sb_snum, int psect)
|
||||
{
|
||||
auto p = &ps[snum];
|
||||
int pi = p->i;
|
||||
|
@ -2076,7 +2076,7 @@ static void operateweapon(int snum, int sb_snum, int psect)
|
|||
{
|
||||
p->ammo_amount[HANDBOMB_WEAPON]--;
|
||||
|
||||
if (p->on_ground && (sb_snum & 2))
|
||||
if (p->on_ground && (sb_snum & SKB_CROUCH))
|
||||
{
|
||||
k = 15;
|
||||
i = ((p->gethorizsum() - 100) * 20);
|
||||
|
@ -2505,7 +2505,7 @@ static void operateweapon(int snum, int sb_snum, int psect)
|
|||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
static void processweapon(int snum, int sb_snum, int psect)
|
||||
static void processweapon(int snum, ESyncBits sb_snum, int psect)
|
||||
{
|
||||
auto p = &ps[snum];
|
||||
int pi = p->i;
|
||||
|
@ -2590,7 +2590,7 @@ void processinput_d(int snum)
|
|||
{
|
||||
int j, i, k, doubvel, fz, cz, hz, lz, truefdist, x, y;
|
||||
char shrunk;
|
||||
unsigned long sb_snum;
|
||||
ESyncBits sb_snum;
|
||||
short psect, psectlotag, tempsect, pi;
|
||||
struct player_struct* p;
|
||||
spritetype* s;
|
||||
|
@ -2602,7 +2602,7 @@ void processinput_d(int snum)
|
|||
g_player[snum].horizAngleAdjust = 0;
|
||||
g_player[snum].horizSkew = 0;
|
||||
|
||||
if (p->cheat_phase <= 0) sb_snum = PlayerInputBits(snum, ~0);
|
||||
if (p->cheat_phase <= 0) sb_snum = PlayerInputBits(snum, SKB_ALL);
|
||||
else sb_snum = 0;
|
||||
|
||||
auto sb_fvel = PlayerInputForwardVel(snum);
|
||||
|
@ -3157,12 +3157,12 @@ HORIZONLY:
|
|||
processweapon(snum, sb_snum, psect);
|
||||
}
|
||||
|
||||
void processweapon_d(int s, int ss, int p)
|
||||
void processweapon_d(int s, ESyncBits ss, int p)
|
||||
{
|
||||
processweapon(s, ss, p);
|
||||
}
|
||||
|
||||
void processmove_d(int snum, int sb_snum, int psect, int fz, int cz, int shrunk, int truefdist)
|
||||
void processmove_d(int snum, ESyncBits sb_snum, int psect, int fz, int cz, int shrunk, int truefdist)
|
||||
{
|
||||
int psectlotag = sector[psect].lotag;
|
||||
auto p = &ps[snum];
|
||||
|
|
|
@ -1068,7 +1068,7 @@ void selectweapon_r(int snum, int j)
|
|||
|
||||
if (p->holster_weapon)
|
||||
{
|
||||
PlayerSetInput(snum, SK_HOLSTER);
|
||||
PlayerSetInput(snum, SKB_HOLSTER);
|
||||
p->weapon_pos = -9;
|
||||
}
|
||||
else if (j >= MIN_WEAPON && p->gotweapon[j] && p->curr_weapon != j) switch (j)
|
||||
|
@ -1456,7 +1456,7 @@ int doincrements_r(struct player_struct* p)
|
|||
else spritesound(DUKE_CRACK2, p->i);
|
||||
}
|
||||
}
|
||||
else if (p->knuckle_incs == 22 || PlayerInput(snum, SK_FIRE))
|
||||
else if (p->knuckle_incs == 22 || PlayerInput(snum, SKB_FIRE))
|
||||
p->knuckle_incs = 0;
|
||||
|
||||
return 1;
|
||||
|
@ -1558,7 +1558,7 @@ void checkweapons_r(struct player_struct* p)
|
|||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
/*static*/ void onMotorcycle(int snum, int &sb_snum)
|
||||
static void onMotorcycle(int snum, ESyncBits &sb_snum)
|
||||
{
|
||||
auto p = &ps[snum];
|
||||
auto pi = p->i;
|
||||
|
@ -1847,7 +1847,7 @@ void checkweapons_r(struct player_struct* p)
|
|||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
/*static*/ void onBoat(int snum, int& sb_snum)
|
||||
static void onBoat(int snum, ESyncBits& sb_snum)
|
||||
{
|
||||
auto p = &ps[snum];
|
||||
auto pi = p->i;
|
||||
|
@ -2127,7 +2127,7 @@ void checkweapons_r(struct player_struct* p)
|
|||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
static void movement(int snum, int sb_snum, int psect, int fz, int cz, int shrunk, int truefdist)
|
||||
static void movement(int snum, ESyncBits sb_snum, int psect, int fz, int cz, int shrunk, int truefdist)
|
||||
{
|
||||
auto p = &ps[snum];
|
||||
auto pi = p->i;
|
||||
|
@ -2355,7 +2355,7 @@ static void movement(int snum, int sb_snum, int psect, int fz, int cz, int shrun
|
|||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
static void underwater(int snum, int sb_snum, int psect, int fz, int cz)
|
||||
static void underwater(int snum, ESyncBits sb_snum, int psect, int fz, int cz)
|
||||
{
|
||||
int j;
|
||||
auto p = &ps[snum];
|
||||
|
@ -2775,7 +2775,7 @@ static void fireweapon(int snum)
|
|||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
static void operateweapon(int snum, int sb_snum, int psect)
|
||||
static void operateweapon(int snum, ESyncBits sb_snum, int psect)
|
||||
{
|
||||
auto p = &ps[snum];
|
||||
int pi = p->i;
|
||||
|
@ -3368,7 +3368,7 @@ static void operateweapon(int snum, int sb_snum, int psect)
|
|||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
static void processweapon(int snum, int sb_snum, int psect)
|
||||
static void processweapon(int snum, ESyncBits sb_snum, int psect)
|
||||
{
|
||||
auto p = &ps[snum];
|
||||
int pi = p->i;
|
||||
|
@ -3433,7 +3433,7 @@ void processinput_r(int snum)
|
|||
{
|
||||
int j, i, k, doubvel, fz, cz, hz, lz, truefdist, x, y, var60;
|
||||
char shrunk;
|
||||
int sb_snum;
|
||||
ESyncBits sb_snum;
|
||||
short psect, psectlotag, tempsect, pi;
|
||||
struct player_struct* p;
|
||||
spritetype* s;
|
||||
|
@ -4260,12 +4260,12 @@ HORIZONLY:
|
|||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void processweapon_r(int s, int ss, int p)
|
||||
void processweapon_r(int s, ESyncBits ss, int p)
|
||||
{
|
||||
processweapon(s, ss, p);
|
||||
}
|
||||
|
||||
void processmove_r(int snum, int sb_snum, int psect, int fz, int cz, int shrunk, int truefdist)
|
||||
void processmove_r(int snum, ESyncBits sb_snum, int psect, int fz, int cz, int shrunk, int truefdist)
|
||||
{
|
||||
int psectlotag = sector[psect].lotag;
|
||||
auto p = &ps[snum];
|
||||
|
|
|
@ -309,7 +309,7 @@ void fireweapon_ww(int snum)
|
|||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void operateweapon_ww(int snum, int sb_snum, int psect)
|
||||
void operateweapon_ww(int snum, ESyncBits sb_snum, int psect)
|
||||
{
|
||||
auto p = &ps[snum];
|
||||
int pi = p->i;
|
||||
|
|
|
@ -104,7 +104,7 @@ void fakedomovethings(void)
|
|||
input *syn;
|
||||
struct player_struct *p;
|
||||
int i, j, k, doubvel, fz, cz, hz, lz, x, y;
|
||||
unsigned int sb_snum;
|
||||
ESyncBits sb_snum;
|
||||
short psect, psectlotag, tempsect, backcstat;
|
||||
uint8_t shrunk, spritebridge;
|
||||
|
||||
|
|
|
@ -1,97 +0,0 @@
|
|||
//-------------------------------------------------------------------------
|
||||
/*
|
||||
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
|
|
@ -289,7 +289,7 @@ void updateviewport(void)
|
|||
int x1 = scale(ss, xdim, 160);
|
||||
int x2 = xdim - x1;
|
||||
|
||||
int y1 = scale(ss, (200 * 100) - ((tilesiz[TILE_BOTTOMSTATUSBAR].y >> (RR ? 1 : 0)) * ud.statusbarscale), 200 - tilesiz[TILE_BOTTOMSTATUSBAR].y);
|
||||
int y1 = scale(ss, (200 * 100) - ((tilesiz[TILE_BOTTOMSTATUSBAR].y >> (isRR() ? 1 : 0)) * ud.statusbarscale), 200 - tilesiz[TILE_BOTTOMSTATUSBAR].y);
|
||||
int y2 = 200 * 100 - y1;
|
||||
|
||||
if (isRR() && ud.screen_size <= 12)
|
||||
|
|
|
@ -27,16 +27,6 @@ BEGIN_DUKE_NS
|
|||
extern void showtwoscreens(CompletionFunc func);
|
||||
extern void doorders(CompletionFunc func);
|
||||
|
||||
#ifdef DEBUGGINGAIDS
|
||||
typedef struct {
|
||||
uint32_t lastgtic;
|
||||
uint32_t lastnumins, numins;
|
||||
int32_t numonscreen;
|
||||
} sprstat_t;
|
||||
|
||||
extern sprstat_t g_spriteStat;
|
||||
#endif
|
||||
|
||||
extern int32_t dr_yxaspect, dr_viewingrange;
|
||||
extern int32_t g_noLogoAnim, g_noLogo;
|
||||
|
||||
|
|
|
@ -1536,7 +1536,7 @@ void checksectors_d(int snum)
|
|||
|
||||
if (p->gm & MODE_TYPE || sprite[p->i].extra <= 0) return;
|
||||
|
||||
if (ud.cashman && PlayerInput(snum, SK_OPEN))
|
||||
if (ud.cashman && PlayerInput(snum, SKB_OPEN))
|
||||
fi.lotsofmoney(&sprite[p->i], 2);
|
||||
|
||||
if (p->newowner >= 0)
|
||||
|
@ -1549,13 +1549,13 @@ void checksectors_d(int snum)
|
|||
}
|
||||
}
|
||||
|
||||
if (!(PlayerInput(snum, SK_OPEN)) && !PlayerInput(snum, SK_ESCAPE))
|
||||
if (!(PlayerInput(snum, SKB_OPEN)) && !PlayerInput(snum, SKB_ESCAPE))
|
||||
p->toggle_key_flag = 0;
|
||||
|
||||
else if (!p->toggle_key_flag)
|
||||
{
|
||||
|
||||
if (PlayerInput(snum, SK_ESCAPE))
|
||||
if (PlayerInput(snum, SKB_ESCAPE))
|
||||
{
|
||||
if (p->newowner >= 0)
|
||||
{
|
||||
|
@ -1757,7 +1757,7 @@ void checksectors_d(int snum)
|
|||
}
|
||||
}
|
||||
|
||||
if (!PlayerInput(snum, SK_OPEN)) return;
|
||||
if (!PlayerInput(snum, SKB_OPEN)) return;
|
||||
else if (p->newowner >= 0) { i = -1; goto CLEARCAMERAS; }
|
||||
|
||||
if (neartagwall == -1 && neartagsector == -1 && neartagsprite == -1)
|
||||
|
|
|
@ -2509,11 +2509,11 @@ void checksectors_r(int snum)
|
|||
|
||||
if (p->gm & MODE_TYPE || sprite[p->i].extra <= 0) return;
|
||||
|
||||
if (ud.cashman && PlayerInput(snum, SK_OPEN))
|
||||
if (ud.cashman && PlayerInput(snum, SKB_OPEN))
|
||||
fi.lotsofmoney(&sprite[p->i], 2);
|
||||
|
||||
|
||||
if (!(PlayerInput(snum, SK_OPEN)) && !PlayerInput(snum, SK_ESCAPE))
|
||||
if (!(PlayerInput(snum, SKB_OPEN)) && !PlayerInput(snum, SKB_ESCAPE))
|
||||
p->toggle_key_flag = 0;
|
||||
|
||||
else if (!p->toggle_key_flag)
|
||||
|
@ -2735,7 +2735,7 @@ void checksectors_r(int snum)
|
|||
}
|
||||
}
|
||||
|
||||
if (!PlayerInput(snum, SK_OPEN)) return;
|
||||
if (!PlayerInput(snum, SKB_OPEN)) return;
|
||||
|
||||
if (neartagwall == -1 && neartagsector == -1 && neartagsprite == -1)
|
||||
if (abs(hits(p->i)) < 512)
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
//-------------------------------------------------------------------------
|
||||
/*
|
||||
Copyright (C) 2010 EDuke32 developers and contributors
|
||||
Copyright (C) 1996, 2003 - 3D Realms Entertainment
|
||||
|
||||
This file is part of EDuke32.
|
||||
This file is part of Duke Nukem 3D version 1.5 - Atomic Edition
|
||||
|
||||
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.
|
||||
Duke Nukem 3D is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
@ -16,408 +17,414 @@ 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.
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
Original Source: 1996 - Todd Replogle
|
||||
Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms
|
||||
Modifications for JonoF's port by Jonathon Fowler (jf@jonof.id.au)
|
||||
*/
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
#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
|
||||
#define FLAMETHROWER_INTRO 398
|
||||
#define FLAMETHROWER_LOOP 399
|
||||
#define FLAMETHROWER_END 400
|
||||
#define E5L7_DUKE_QUIT_YOU 401
|
||||
|
||||
enum
|
||||
{
|
||||
KICK_HIT = 0,
|
||||
PISTOL_RICOCHET = 1,
|
||||
PISTOL_BODYHIT = 2,
|
||||
PISTOL_FIRE = 3,
|
||||
EJECT_CLIP = 4,
|
||||
INSERT_CLIP = 5,
|
||||
CHAINGUN_FIRE = 6,
|
||||
RPG_SHOOT = 7,
|
||||
POOLBALLHIT = 8,
|
||||
RPG_EXPLODE = 9,
|
||||
CAT_FIRE = 10,
|
||||
SHRINKER_FIRE = 11,
|
||||
ACTOR_SHRINKING = 12,
|
||||
PIPEBOMB_BOUNCE = 13,
|
||||
PIPEBOMB_EXPLODE = 14,
|
||||
LASERTRIP_ONWALL = 15,
|
||||
LASERTRIP_ARMING = 16,
|
||||
LASERTRIP_EXPLODE = 17,
|
||||
VENT_BUST = 18,
|
||||
GLASS_BREAKING = 19,
|
||||
GLASS_HEAVYBREAK = 20,
|
||||
SHORT_CIRCUIT = 21,
|
||||
ITEM_SPLASH = 22,
|
||||
DUKE_BREATHING = 23,
|
||||
DUKE_EXHALING = 24,
|
||||
DUKE_GASP = 25,
|
||||
SLIM_RECOG = 26,
|
||||
|
||||
DUKE_URINATE = 28,
|
||||
ENDSEQVOL3SND2 = 29,
|
||||
ENDSEQVOL3SND3 = 30,
|
||||
DUKE_PASSWIND = 32,
|
||||
DUKE_CRACK = 33,
|
||||
SLIM_ATTACK = 34,
|
||||
SOMETHINGHITFORCE = 35,
|
||||
DUKE_DRINKING = 36,
|
||||
DUKE_KILLED1 = 37,
|
||||
DUKE_GRUNT = 38,
|
||||
DUKE_HARTBEAT = 39,
|
||||
DUKE_ONWATER = 40,
|
||||
DUKE_DEAD = 41,
|
||||
DUKE_LAND = 42,
|
||||
DUKE_WALKINDUCTS = 43,
|
||||
DUKE_GLAD = 44,
|
||||
DUKE_YES = 45,
|
||||
DUKE_HEHE = 46,
|
||||
DUKE_SHUCKS = 47,
|
||||
DUKE_UNDERWATER = 48,
|
||||
DUKE_JETPACK_ON = 49,
|
||||
DUKE_JETPACK_IDLE = 50,
|
||||
DUKE_JETPACK_OFF = 51,
|
||||
LIZTROOP_GROWL = 52,
|
||||
LIZTROOP_TALK1 = 53,
|
||||
LIZTROOP_TALK2 = 54,
|
||||
LIZTROOP_TALK3 = 55,
|
||||
DUKETALKTOBOSS = 56,
|
||||
LIZCAPT_GROWL = 57,
|
||||
LIZCAPT_TALK1 = 58,
|
||||
LIZCAPT_TALK2 = 59,
|
||||
LIZCAPT_TALK3 = 60,
|
||||
LIZARD_BEG = 61,
|
||||
LIZARD_PAIN = 62,
|
||||
LIZARD_DEATH = 63,
|
||||
LIZARD_SPIT = 64,
|
||||
DRONE1_HISSRATTLE = 65,
|
||||
DRONE1_HISSSCREECH = 66,
|
||||
DUKE_TIP2 = 67,
|
||||
FLESH_BURNING = 68,
|
||||
SQUISHED = 69,
|
||||
TELEPORTER = 70,
|
||||
ELEVATOR_ON = 71,
|
||||
DUKE_KILLED3 = 72,
|
||||
ELEVATOR_OFF = 73,
|
||||
DOOR_OPERATE1 = 74,
|
||||
SUBWAY = 75,
|
||||
SWITCH_ON = 76,
|
||||
FAN = 77,
|
||||
DUKE_GETWEAPON3 = 78,
|
||||
FLUSH_TOILET = 79,
|
||||
HOVER_CRAFT = 80,
|
||||
EARTHQUAKE = 81,
|
||||
INTRUDER_ALERT = 82,
|
||||
END_OF_LEVEL_WARN = 83,
|
||||
ENGINE_OPERATING = 84,
|
||||
REACTOR_ON = 85,
|
||||
COMPUTER_AMBIENCE = 86,
|
||||
GEARS_GRINDING = 87,
|
||||
BUBBLE_AMBIENCE = 88,
|
||||
MACHINE_AMBIENCE = 89,
|
||||
SEWER_AMBIENCE = 90,
|
||||
WIND_AMBIENCE = 91,
|
||||
SOMETHING_DRIPPING = 92,
|
||||
STEAM_HISSING = 93,
|
||||
THEATER_BREATH = 94,
|
||||
BAR_MUSIC = 95,
|
||||
BOS1_ROAM = 96,
|
||||
BOS1_RECOG = 97,
|
||||
BOS1_ATTACK1 = 98,
|
||||
BOS1_PAIN = 99,
|
||||
BOS1_DYING =100,
|
||||
BOS2_ROAM =101,
|
||||
BOS2_RECOG =102,
|
||||
BOS2_ATTACK =103,
|
||||
BOS2_PAIN =104,
|
||||
BOS2_DYING =105,
|
||||
GETATOMICHEALTH =106,
|
||||
DUKE_GETWEAPON2 =107,
|
||||
BOS3_DYING =108,
|
||||
SHOTGUN_FIRE =109,
|
||||
PRED_ROAM =110,
|
||||
PRED_RECOG =111,
|
||||
PRED_ATTACK =112,
|
||||
PRED_PAIN =113,
|
||||
PRED_DYING =114,
|
||||
CAPT_ROAM =115,
|
||||
CAPT_ATTACK =116,
|
||||
CAPT_RECOG =117,
|
||||
CAPT_PAIN =118,
|
||||
CAPT_DYING =119,
|
||||
PIG_ROAM =120,
|
||||
PIG_RECOG =121,
|
||||
PIG_ATTACK =122,
|
||||
PIG_PAIN =123,
|
||||
PIG_DYING =124,
|
||||
RECO_ROAM =125,
|
||||
RECO_RECOG =126,
|
||||
RECO_ATTACK =127,
|
||||
RECO_PAIN =128,
|
||||
RECO_DYING =129,
|
||||
DRON_ROAM =130,
|
||||
DRON_RECOG =131,
|
||||
DRON_ATTACK1 =132,
|
||||
DRON_PAIN =133,
|
||||
DRON_DYING =134,
|
||||
COMM_ROAM =135,
|
||||
COMM_RECOG =136,
|
||||
COMM_ATTACK =137,
|
||||
COMM_PAIN =138,
|
||||
COMM_DYING =139,
|
||||
OCTA_ROAM =140,
|
||||
OCTA_RECOG =141,
|
||||
OCTA_ATTACK1 =142,
|
||||
OCTA_PAIN =143,
|
||||
OCTA_DYING =144,
|
||||
TURR_ROAM =145,
|
||||
TURR_RECOG =146,
|
||||
TURR_ATTACK =147,
|
||||
DUMPSTER_MOVE =148,
|
||||
SLIM_DYING =149,
|
||||
BOS3_ROAM =150,
|
||||
BOS3_RECOG =151,
|
||||
BOS3_ATTACK1 =152,
|
||||
BOS3_PAIN =153,
|
||||
BOS1_ATTACK2 =154,
|
||||
COMM_SPIN =155,
|
||||
BOS1_WALK =156,
|
||||
DRON_ATTACK2 =157,
|
||||
THUD =158,
|
||||
OCTA_ATTACK2 =159,
|
||||
WIERDSHOT_FLY =160,
|
||||
TURR_PAIN =161,
|
||||
TURR_DYING =162,
|
||||
SLIM_ROAM =163,
|
||||
LADY_SCREAM =164,
|
||||
DOOR_OPERATE2 =165,
|
||||
DOOR_OPERATE3 =166,
|
||||
DOOR_OPERATE4 =167,
|
||||
BORNTOBEWILDSND =168,
|
||||
SHOTGUN_COCK =169,
|
||||
GENERIC_AMBIENCE1 =170,
|
||||
GENERIC_AMBIENCE2 =171,
|
||||
GENERIC_AMBIENCE3 =172,
|
||||
GENERIC_AMBIENCE4 =173,
|
||||
GENERIC_AMBIENCE5 =174,
|
||||
GENERIC_AMBIENCE6 =175,
|
||||
BOS3_ATTACK2 =176,
|
||||
GENERIC_AMBIENCE17 =177,
|
||||
GENERIC_AMBIENCE18 =178,
|
||||
GENERIC_AMBIENCE19 =179,
|
||||
GENERIC_AMBIENCE20 =180,
|
||||
GENERIC_AMBIENCE21 =181,
|
||||
GENERIC_AMBIENCE22 =182,
|
||||
SECRETLEVELSND =183,
|
||||
GENERIC_AMBIENCE8 =184,
|
||||
GENERIC_AMBIENCE9 =185,
|
||||
GENERIC_AMBIENCE10 =186,
|
||||
GENERIC_AMBIENCE11 =187,
|
||||
GENERIC_AMBIENCE12 =188,
|
||||
GENERIC_AMBIENCE13 =189,
|
||||
GENERIC_AMBIENCE14 =190,
|
||||
GENERIC_AMBIENCE15 =192,
|
||||
GENERIC_AMBIENCE16 =193,
|
||||
FIRE_CRACKLE =194,
|
||||
BONUS_SPEECH1 =195,
|
||||
BONUS_SPEECH2 =196,
|
||||
BONUS_SPEECH3 =197,
|
||||
PIG_CAPTURE_DUKE =198,
|
||||
BONUS_SPEECH4 =199,
|
||||
DUKE_LAND_HURT =200,
|
||||
DUKE_HIT_STRIPPER1 =201,
|
||||
DUKE_TIP1 =202,
|
||||
DUKE_KILLED2 =203,
|
||||
PRED_ROAM2 =204,
|
||||
PIG_ROAM2 =205,
|
||||
DUKE_GETWEAPON1 =206,
|
||||
DUKE_SEARCH2 =207,
|
||||
DUKE_CRACK2 =208,
|
||||
DUKE_SEARCH =209,
|
||||
DUKE_GET =210,
|
||||
DUKE_LONGTERM_PAIN =211,
|
||||
MONITOR_ACTIVE =212,
|
||||
NITEVISION_ONOFF =213,
|
||||
DUKE_HIT_STRIPPER2 =214,
|
||||
DUKE_CRACK_FIRST =215,
|
||||
DUKE_USEMEDKIT =216,
|
||||
DUKE_TAKEPILLS =217,
|
||||
DUKE_PISSRELIEF =218,
|
||||
SELECT_WEAPON =219,
|
||||
WATER_GURGLE =220,
|
||||
DUKE_GETWEAPON4 =221,
|
||||
JIBBED_ACTOR1 =222,
|
||||
JIBBED_ACTOR2 =223,
|
||||
JIBBED_ACTOR3 =224,
|
||||
JIBBED_ACTOR4 =225,
|
||||
JIBBED_ACTOR5 =226,
|
||||
JIBBED_ACTOR6 =227,
|
||||
JIBBED_ACTOR7 =228,
|
||||
DUKE_GOTHEALTHATLOW =229,
|
||||
BOSSTALKTODUKE =230,
|
||||
WAR_AMBIENCE1 =231,
|
||||
WAR_AMBIENCE2 =232,
|
||||
WAR_AMBIENCE3 =233,
|
||||
WAR_AMBIENCE4 =234,
|
||||
WAR_AMBIENCE5 =235,
|
||||
WAR_AMBIENCE6 =236,
|
||||
WAR_AMBIENCE7 =237,
|
||||
WAR_AMBIENCE8 =238,
|
||||
WAR_AMBIENCE9 =239,
|
||||
WAR_AMBIENCE10 =240,
|
||||
ALIEN_TALK1 =241,
|
||||
ALIEN_TALK2 =242,
|
||||
EXITMENUSOUND =243,
|
||||
FLY_BY =244,
|
||||
DUKE_SCREAM =245,
|
||||
SHRINKER_HIT =246,
|
||||
RATTY =247,
|
||||
INTO_MENU =248,
|
||||
BONUSMUSIC =249,
|
||||
DUKE_BOOBY =250,
|
||||
DUKE_TALKTOBOSSFALL =251,
|
||||
DUKE_LOOKINTOMIRROR =252,
|
||||
PIG_ROAM3 =253,
|
||||
KILLME =254,
|
||||
DRON_JETSND =255,
|
||||
SPACE_DOOR1 =256,
|
||||
SPACE_DOOR2 =257,
|
||||
SPACE_DOOR3 =258,
|
||||
SPACE_DOOR4 =259,
|
||||
SPACE_DOOR5 =260,
|
||||
ALIEN_ELEVATOR1 =261,
|
||||
VAULT_DOOR =262,
|
||||
JIBBED_ACTOR13 =263,
|
||||
DUKE_GETWEAPON6 =264,
|
||||
JIBBED_ACTOR8 =265,
|
||||
JIBBED_ACTOR9 =266,
|
||||
JIBBED_ACTOR10 =267,
|
||||
JIBBED_ACTOR11 =268,
|
||||
JIBBED_ACTOR12 =269,
|
||||
DUKE_KILLED4 =270,
|
||||
DUKE_KILLED5 =271,
|
||||
ALIEN_SWITCH1 =272,
|
||||
DUKE_STEPONFECES =273,
|
||||
DUKE_LONGTERM_PAIN2 =274,
|
||||
DUKE_LONGTERM_PAIN3 =275,
|
||||
DUKE_LONGTERM_PAIN4 =276,
|
||||
COMPANB2 =277,
|
||||
KTIT =278,
|
||||
HELICOP_IDLE =279,
|
||||
STEPNIT =280,
|
||||
SPACE_AMBIENCE1 =281,
|
||||
SPACE_AMBIENCE2 =282,
|
||||
SLIM_HATCH =283,
|
||||
RIPHEADNECK =284,
|
||||
FOUNDJONES =285,
|
||||
ALIEN_DOOR1 =286,
|
||||
ALIEN_DOOR2 =287,
|
||||
ENDSEQVOL3SND4 =288,
|
||||
ENDSEQVOL3SND5 =289,
|
||||
ENDSEQVOL3SND6 =290,
|
||||
ENDSEQVOL3SND7 =291,
|
||||
ENDSEQVOL3SND8 =292,
|
||||
ENDSEQVOL3SND9 =293,
|
||||
WHIPYOURASS =294,
|
||||
ENDSEQVOL2SND1 =295,
|
||||
ENDSEQVOL2SND2 =296,
|
||||
ENDSEQVOL2SND3 =297,
|
||||
ENDSEQVOL2SND4 =298,
|
||||
ENDSEQVOL2SND5 =299,
|
||||
ENDSEQVOL2SND6 =300,
|
||||
ENDSEQVOL2SND7 =301,
|
||||
GENERIC_AMBIENCE23 =302,
|
||||
SOMETHINGFROZE =303,
|
||||
DUKE_LONGTERM_PAIN5 =304,
|
||||
DUKE_LONGTERM_PAIN6 =305,
|
||||
DUKE_LONGTERM_PAIN7 =306,
|
||||
DUKE_LONGTERM_PAIN8 =307,
|
||||
WIND_REPEAT =308,
|
||||
MYENEMY_ROAM =309,
|
||||
MYENEMY_HURT =310,
|
||||
MYENEMY_DEAD =311,
|
||||
MYENEMY_SHOOT =312,
|
||||
STORE_MUSIC =313,
|
||||
STORE_MUSIC_BROKE =314,
|
||||
ACTOR_GROWING =315,
|
||||
NEWBEAST_ROAM =316,
|
||||
NEWBEAST_RECOG =317,
|
||||
NEWBEAST_ATTACK =318,
|
||||
NEWBEAST_PAIN =319,
|
||||
NEWBEAST_DYING =320,
|
||||
NEWBEAST_SPIT =321,
|
||||
VOL4_1 =322,
|
||||
SUPERMARKET =323,
|
||||
MOUSEANNOY =324,
|
||||
BOOKEM =325,
|
||||
SUPERMARKETCRY =326,
|
||||
DESTRUCT =327,
|
||||
EATFOOD =328,
|
||||
MAKEMYDAY =329,
|
||||
WITNESSSTAND =330,
|
||||
VACATIONSPEECH =331,
|
||||
YIPPEE1 =332,
|
||||
YOHOO1 =333,
|
||||
YOHOO2 =334,
|
||||
DOLPHINSND =335,
|
||||
TOUGHGALSND1 =336,
|
||||
TOUGHGALSND2 =337,
|
||||
TOUGHGALSND3 =338,
|
||||
TOUGHGALSND4 =339,
|
||||
TANK_ROAM =340,
|
||||
BOS4_ROAM =341,
|
||||
BOS4_RECOG =342,
|
||||
BOS4_ATTACK =343,
|
||||
BOS4_PAIN =344,
|
||||
BOS4_DYING =345,
|
||||
NEWBEAST_ATTACKMISS =346,
|
||||
VOL4_2 =347,
|
||||
COOKINGDEEPFRIER =348,
|
||||
WHINING_DOG =349,
|
||||
DEAD_DOG =350,
|
||||
LIGHTNING_SLAP =351,
|
||||
THUNDER =352,
|
||||
HAPPYMOUSESND1 =353,
|
||||
HAPPYMOUSESND2 =354,
|
||||
HAPPYMOUSESND3 =355,
|
||||
HAPPYMOUSESND4 =356,
|
||||
ALARM =357,
|
||||
RAIN =358,
|
||||
DTAG_GREENRUN =359,
|
||||
DTAG_BROWNRUN =360,
|
||||
DTAG_GREENSCORE =361,
|
||||
DTAG_BROWNSCORE =362,
|
||||
INTRO4_1 =363,
|
||||
INTRO4_2 =364,
|
||||
INTRO4_3 =365,
|
||||
INTRO4_4 =366,
|
||||
INTRO4_5 =367,
|
||||
INTRO4_6 =368,
|
||||
SCREECH =369,
|
||||
BOSS4_DEADSPEECH =370,
|
||||
BOSS4_FIRSTSEE =371,
|
||||
PARTY_SPEECH =372,
|
||||
POSTAL_SPEECH =373,
|
||||
TGSPEECH =374,
|
||||
DOGROOMSPEECH =375,
|
||||
SMACKED =376,
|
||||
MDEVSPEECH =377,
|
||||
AREA51SPEECH =378,
|
||||
JEEPSOUND =379,
|
||||
BIGDOORSLAM =380,
|
||||
BOS4_LAY =381,
|
||||
WAVESOUND =382,
|
||||
ILLBEBACK =383,
|
||||
VOL4ENDSND1 =384,
|
||||
VOL4ENDSND2 =385,
|
||||
EXPANDERHIT =386,
|
||||
SNAKESPEECH =387,
|
||||
EXPANDERSHOOT =388,
|
||||
GETBACKTOWORK =389,
|
||||
JIBBED_ACTOR14 =390,
|
||||
JIBBED_ACTOR15 =391,
|
||||
INTRO4_B =392,
|
||||
BIGBANG =393,
|
||||
SMACKIT =394,
|
||||
BELLSND =395,
|
||||
GOAWAY =396,
|
||||
JOKE =397,
|
||||
FLAMETHROWER_INTRO =398,
|
||||
FLAMETHROWER_LOOP =399,
|
||||
FLAMETHROWER_END =400,
|
||||
E5L7_DUKE_QUIT_YOU =401,
|
||||
};
|
|
@ -344,7 +344,7 @@ void S_Update(void)
|
|||
int32_t ca, cs;
|
||||
|
||||
auto& gm = g_player[myconnectindex].ps->gm;
|
||||
if (RR && !Mus_IsPlaying() && (gm && gm & MODE_GAME))
|
||||
if (isRR() && !Mus_IsPlaying() && (gm && gm & MODE_GAME))
|
||||
S_PlayRRMusic();
|
||||
|
||||
S_GetCamera(&c, &ca, &cs);
|
||||
|
@ -597,13 +597,13 @@ static bool cd_disabled = false; // This is in case mus_redbook is enabled bu
|
|||
void S_PlayLevelMusic(unsigned int m)
|
||||
{
|
||||
auto& mr = m == USERMAPMUSICFAKESLOT ? userMapRecord : mapList[m];
|
||||
if (RR && mr.music.IsEmpty() && mus_redbook && !cd_disabled) return;
|
||||
if (isRR() && mr.music.IsEmpty() && mus_redbook && !cd_disabled) return;
|
||||
Mus_Play(mr.labelName, mr.music, true);
|
||||
}
|
||||
|
||||
void S_PlaySpecialMusic(unsigned int m)
|
||||
{
|
||||
if (RR) return; // Can only be MUS_LOADING, RR does not use it.
|
||||
if (isRR()) return; // Can only be MUS_LOADING, isRR() does not use it.
|
||||
auto& musicfn = mapList[m].music;
|
||||
if (musicfn.IsNotEmpty())
|
||||
{
|
||||
|
@ -620,7 +620,7 @@ void S_PlaySpecialMusic(unsigned int m)
|
|||
|
||||
void S_PlayRRMusic(int newTrack)
|
||||
{
|
||||
if (!RR || !mus_redbook || cd_disabled || currentLevel->music.IsNotEmpty())
|
||||
if (!isRR() || !mus_redbook || cd_disabled || currentLevel->music.IsNotEmpty())
|
||||
return;
|
||||
Mus_Stop();
|
||||
|
||||
|
|
|
@ -44,28 +44,6 @@ BEGIN_DUKE_NS
|
|||
#define ACTOR_MAXFALLINGZVEL 6144
|
||||
#define ACTOR_ONWATER_ADDZ (24<<8)
|
||||
|
||||
// KEEPINSYNC lunatic/con_lang.lua
|
||||
enum
|
||||
{
|
||||
STAT_DEFAULT = 0,
|
||||
STAT_ACTOR = 1,
|
||||
STAT_ZOMBIEACTOR = 2,
|
||||
STAT_EFFECTOR = 3,
|
||||
STAT_PROJECTILE = 4,
|
||||
STAT_MISC = 5,
|
||||
STAT_STANDABLE = 6,
|
||||
STAT_LOCATOR = 7,
|
||||
STAT_ACTIVATOR = 8,
|
||||
STAT_TRANSPORT = 9,
|
||||
STAT_PLAYER = 10,
|
||||
STAT_FX = 11,
|
||||
STAT_FALLER = 12,
|
||||
STAT_DUMMYPLAYER = 13,
|
||||
STAT_LIGHT = 14,
|
||||
STAT_RAROR = 15,
|
||||
STAT_NETALLOC = MAXSTATUS-1
|
||||
};
|
||||
|
||||
|
||||
// Defines the motion characteristics of an actor
|
||||
enum amoveflags_t
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
#include "palettecontainer.h"
|
||||
|
||||
#include "common.h"
|
||||
#include "common_game.h"
|
||||
|
||||
BEGIN_DUKE_NS
|
||||
|
||||
|
|
|
@ -121,7 +121,7 @@ void G_HandleLocalKeys(void)
|
|||
{
|
||||
if (G_ChangeHudLayout(1))
|
||||
{
|
||||
S_PlaySound(RR ? 341 : THUD, CHAN_AUTO, CHANF_UI);
|
||||
S_PlaySound(isRR() ? 341 : THUD, CHAN_AUTO, CHANF_UI);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -138,7 +138,7 @@ void G_HandleLocalKeys(void)
|
|||
{
|
||||
if (G_ChangeHudLayout(-1))
|
||||
{
|
||||
S_PlaySound(RR ? 341 : THUD, CHAN_AUTO, CHANF_UI);
|
||||
S_PlaySound(isRR() ? 341 : THUD, CHAN_AUTO, CHANF_UI);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -223,7 +223,7 @@ void G_HandleLocalKeys(void)
|
|||
{
|
||||
buttonMap.ClearButton(gamefunc_Third_Person_View);
|
||||
|
||||
if (!RRRA || (!g_player[myconnectindex].ps->OnMotorcycle && !g_player[myconnectindex].ps->OnBoat))
|
||||
if (!isRRRA() || (!g_player[myconnectindex].ps->OnMotorcycle && !g_player[myconnectindex].ps->OnBoat))
|
||||
{
|
||||
g_player[myconnectindex].ps->over_shoulder_on = !g_player[myconnectindex].ps->over_shoulder_on;
|
||||
|
||||
|
@ -557,7 +557,7 @@ static const char* actions[] = {
|
|||
"Inventory",
|
||||
"Inventory_Left",
|
||||
"Inventory_Right",
|
||||
"Holo_Duke", // Duke3D", RR
|
||||
"Holo_Duke", // Duke3D", isRR()
|
||||
"Jetpack",
|
||||
"NightVision",
|
||||
"MedKit",
|
||||
|
@ -644,14 +644,14 @@ int GameInterface::app_main()
|
|||
S_InitSound();
|
||||
|
||||
|
||||
if (RR)
|
||||
if (isRR())
|
||||
{
|
||||
g_cdTrack = -1;
|
||||
}
|
||||
|
||||
InitCheats();
|
||||
|
||||
if (SHAREWARE)
|
||||
if (VOLUMEONE)
|
||||
g_Shareware = 1;
|
||||
else
|
||||
{
|
||||
|
@ -701,7 +701,7 @@ int GameInterface::app_main()
|
|||
tileDelete(TILE_MIRROR);
|
||||
skiptile = TILE_W_FORCEFIELD + 1;
|
||||
|
||||
if (RR)
|
||||
if (isRR())
|
||||
tileDelete(0);
|
||||
|
||||
tileDelete(13);
|
||||
|
@ -823,9 +823,9 @@ MAIN_LOOP_RESTART:
|
|||
{
|
||||
ototalclock += TICSPERFRAME;
|
||||
|
||||
if (RRRA && g_player[myconnectindex].ps->OnMotorcycle)
|
||||
if (isRRRA() && g_player[myconnectindex].ps->OnMotorcycle)
|
||||
P_GetInputMotorcycle(myconnectindex);
|
||||
else if (RRRA && g_player[myconnectindex].ps->OnBoat)
|
||||
else if (isRRRA() && g_player[myconnectindex].ps->OnBoat)
|
||||
P_GetInputBoat(myconnectindex);
|
||||
else
|
||||
P_GetInput(myconnectindex);
|
||||
|
@ -868,9 +868,9 @@ MAIN_LOOP_RESTART:
|
|||
|
||||
if (G_FPSLimit())
|
||||
{
|
||||
if (RRRA && g_player[myconnectindex].ps->OnMotorcycle)
|
||||
if (isRRRA() && g_player[myconnectindex].ps->OnMotorcycle)
|
||||
P_GetInputMotorcycle(myconnectindex);
|
||||
else if (RRRA && g_player[myconnectindex].ps->OnBoat)
|
||||
else if (isRRRA() && g_player[myconnectindex].ps->OnBoat)
|
||||
P_GetInputBoat(myconnectindex);
|
||||
else
|
||||
P_GetInput(myconnectindex);
|
||||
|
|
|
@ -206,7 +206,7 @@ void P_GetInput(int const playerNum)
|
|||
|
||||
if (localInput.fvel < keyMove && localInput.fvel > -keyMove)
|
||||
{
|
||||
if (RR)
|
||||
if (isRR())
|
||||
{
|
||||
/*if (buttonMap.ButtonDown(gamefunc_Quick_Kick))
|
||||
{
|
||||
|
@ -283,7 +283,7 @@ void P_GetInput(int const playerNum)
|
|||
else if (weaponSelection == gamefunc_Weapon_1-1)
|
||||
weaponSelection = 0;
|
||||
|
||||
if ((localInput.bits & 0xf00) == 0)
|
||||
if ((localInput.bits & SKB_WEAPONMASK_BITS) == 0)
|
||||
localInput.bits |= (weaponSelection << SK_WEAPON_BITS);
|
||||
|
||||
localInput.bits |= (buttonMap.ButtonDown(gamefunc_Fire) << SK_FIRE);
|
||||
|
@ -333,14 +333,14 @@ void P_GetInput(int const playerNum)
|
|||
localInput.bits |= inputState.GetKeyStatus(sc_Pause) << SK_PAUSE;
|
||||
//localInput.bits |= ((uint32_t)inputState.GetKeyStatus(sc_Escape)) << SK_ESCAPE; fixme.This needs to be done differently
|
||||
|
||||
if (RR)
|
||||
if (isRR())
|
||||
{
|
||||
if (TEST_SYNC_KEY(localInput.bits, SK_CROUCH))
|
||||
localInput.bits &= ~(1 << SK_JUMP);
|
||||
if (localInput.bits & SKB_CROUCH)
|
||||
localInput.bits &= ~SKB_JUMP;
|
||||
if (pPlayer->drink_amt > 88)
|
||||
localInput.bits |= 1 << SK_LOOK_LEFT;
|
||||
localInput.bits |= SKB_LOOK_LEFT;
|
||||
if (pPlayer->drink_amt > 99)
|
||||
localInput.bits |= 1 << SK_LOOK_DOWN;
|
||||
localInput.bits |= SKB_LOOK_DOWN;
|
||||
}
|
||||
|
||||
if (buttonMap.ButtonDown(gamefunc_Dpad_Select))
|
||||
|
@ -635,11 +635,6 @@ void P_GetInputMotorcycle(int playerNum)
|
|||
localInput.q16avel = fix16_sadd(localInput.q16avel, input.q16avel);
|
||||
pPlayer->q16ang = fix16_sadd(pPlayer->q16ang, input.q16avel) & 0x7FFFFFF;
|
||||
localInput.fvel = clamp((input.fvel += pPlayer->MotoSpeed), -(MAXVELMOTO / 8), MAXVELMOTO);
|
||||
|
||||
if (TEST_SYNC_KEY(localInput.bits, SK_JUMP))
|
||||
{
|
||||
localInput.bits |= 1;
|
||||
}
|
||||
}
|
||||
|
||||
void P_GetInputBoat(int playerNum)
|
||||
|
|
|
@ -52,7 +52,7 @@ static inline int G_CheckExitSprite(int spriteNum) { return ((uint16_t)sprite[sp
|
|||
|
||||
void G_InitRRRASkies(void)
|
||||
{
|
||||
if (!RRRA)
|
||||
if (!isRRRA())
|
||||
return;
|
||||
|
||||
for (bssize_t i = 0; i < MAXSECTORS; i++)
|
||||
|
@ -100,7 +100,7 @@ void G_NewGame(int volumeNum, int levelNum, int skillNum)
|
|||
G_BonusScreen(1);
|
||||
}
|
||||
|
||||
if (RR && !RRRA && ud.level_number == 6 && ud.volume_number == 0)
|
||||
if (isRR() && !isRRRA() && ud.level_number == 6 && ud.volume_number == 0)
|
||||
G_BonusScreen(0);
|
||||
#endif
|
||||
|
||||
|
@ -117,7 +117,7 @@ void G_NewGame(int volumeNum, int levelNum, int skillNum)
|
|||
int const UserMap = Menu_HaveUserMap();
|
||||
|
||||
// we don't want the intro to play after the multiplayer setup screen
|
||||
if (!RR && (!g_netServer && ud.multimode < 2) && UserMap == 0 &&
|
||||
if (!isRR() && (!g_netServer && ud.multimode < 2) && UserMap == 0 &&
|
||||
levelNum == 0 && volumeNum == 3)
|
||||
{
|
||||
e4intro([](bool) {});
|
||||
|
@ -139,17 +139,17 @@ void G_NewGame(int volumeNum, int levelNum, int skillNum)
|
|||
{
|
||||
for (bssize_t weaponNum = 0; weaponNum < 12/*MAX_WEAPONS*/; weaponNum++)
|
||||
{
|
||||
auto const worksLike = WW2GI ? PWEAPON(0, weaponNum, WorksLike) : weaponNum;
|
||||
auto const worksLike = isWW2GI() ? PWEAPON(0, weaponNum, WorksLike) : weaponNum;
|
||||
if (worksLike == PISTOL_WEAPON)
|
||||
{
|
||||
pPlayer->curr_weapon = weaponNum;
|
||||
pPlayer->gotweapon.Set(weaponNum);
|
||||
pPlayer->ammo_amount[weaponNum] = min<int16_t>(max_ammo_amount[weaponNum], 48);
|
||||
}
|
||||
else if (worksLike == KNEE_WEAPON || (!RR && worksLike == HANDREMOTE_WEAPON) || (RRRA && worksLike == SLINGBLADE_WEAPON))
|
||||
else if (worksLike == KNEE_WEAPON || (!isRR() && worksLike == HANDREMOTE_WEAPON) || (isRRRA() && worksLike == SLINGBLADE_WEAPON))
|
||||
{
|
||||
pPlayer->gotweapon.Set(weaponNum);
|
||||
if (RRRA)
|
||||
if (isRRRA())
|
||||
pPlayer->ammo_amount[KNEE_WEAPON] = 1;
|
||||
}
|
||||
}
|
||||
|
@ -248,7 +248,7 @@ static int LoadTheMap(MapRecord &mi, DukePlayer_t *pPlayer, int gameMode)
|
|||
SECRET_SetMapName(currentLevel->DisplayName(), currentLevel->name);
|
||||
STAT_NewLevel(boardfilename);
|
||||
G_LoadMapHack(levelName, boardfilename);
|
||||
userMapRecord.music = G_SetupFilenameBasedMusic(boardfilename, !RR ? "dethtoll.mid" : nullptr);
|
||||
userMapRecord.music = G_SetupFilenameBasedMusic(boardfilename, !isRR() ? "dethtoll.mid" : nullptr);
|
||||
}
|
||||
else if (engineLoadBoard(mi.fileName, VOLUMEONE, &pPlayer->pos, &lbang, &pPlayer->cursectnum) < 0)
|
||||
{
|
||||
|
@ -263,7 +263,7 @@ static int LoadTheMap(MapRecord &mi, DukePlayer_t *pPlayer, int gameMode)
|
|||
G_LoadMapHack(levelName, mi.fileName);
|
||||
}
|
||||
|
||||
if (RR && !RRRA && ud.volume_number == 1 && ud.level_number == 1)
|
||||
if (isRR() && !isRRRA() && ud.volume_number == 1 && ud.level_number == 1)
|
||||
{
|
||||
for (bssize_t i = PISTOL_WEAPON; i < MAX_WEAPONS; i++)
|
||||
g_player[0].ps->ammo_amount[i] = 0;
|
||||
|
@ -281,7 +281,7 @@ static int LoadTheMap(MapRecord &mi, DukePlayer_t *pPlayer, int gameMode)
|
|||
|
||||
G_InitRRRASkies();
|
||||
|
||||
if (RRRA && ud.level_number == 2 && ud.volume_number == 0)
|
||||
if (isRRRA() && ud.level_number == 2 && ud.volume_number == 0)
|
||||
{
|
||||
for (bssize_t i = PISTOL_WEAPON; i < MAX_WEAPONS; i++)
|
||||
g_player[0].ps->ammo_amount[i] = 0;
|
||||
|
@ -347,8 +347,8 @@ int G_EnterLevel(int gameMode)
|
|||
}
|
||||
}
|
||||
|
||||
// Redirect the final RR level to a valid map record so that currentLevel can point to something.
|
||||
mii = (RR && g_lastLevel)? 127 : (ud.volume_number*MAXLEVELS)+ud.level_number;
|
||||
// Redirect the final isRR() level to a valid map record so that currentLevel can point to something.
|
||||
mii = (isRR() && g_lastLevel)? 127 : (ud.volume_number*MAXLEVELS)+ud.level_number;
|
||||
auto& mi = mapList[mii];
|
||||
|
||||
if (mi.fileName.IsEmpty() && !Menu_HaveUserMap())
|
||||
|
@ -368,7 +368,7 @@ int G_EnterLevel(int gameMode)
|
|||
if (res != 0) return res;
|
||||
|
||||
// Try this first so that it can disable the CD player if no tracks are found.
|
||||
if (RR && !(gameMode & MODE_DEMO))
|
||||
if (isRR() && !(gameMode & MODE_DEMO))
|
||||
S_PlayRRMusic();
|
||||
|
||||
if (ud.recstat != 2)
|
||||
|
|
|
@ -158,7 +158,7 @@ void G_DisplayRest(int32_t smoothratio)
|
|||
}
|
||||
}
|
||||
palaccum_add(&tint, &pp->pals, pp->pals.f);
|
||||
if (!RR)
|
||||
if (!isRR())
|
||||
{
|
||||
static const palette_t loogiepal = { 0, 63, 0, 0 };
|
||||
|
||||
|
@ -207,7 +207,7 @@ void G_DisplayRest(int32_t smoothratio)
|
|||
{
|
||||
if (ud.overhead_on != 2)
|
||||
{
|
||||
if (!RR && pp->newowner >= 0)
|
||||
if (!isRR() && pp->newowner >= 0)
|
||||
cameratext(pp->newowner);
|
||||
else
|
||||
{
|
||||
|
@ -217,7 +217,7 @@ void G_DisplayRest(int32_t smoothratio)
|
|||
if (pp->over_shoulder_on == 0)
|
||||
fi.displaymasks(screenpeek);
|
||||
}
|
||||
if (!RR)
|
||||
if (!isRR())
|
||||
moveclouds();
|
||||
}
|
||||
|
||||
|
@ -278,7 +278,7 @@ void G_DisplayRest(int32_t smoothratio)
|
|||
if (isRR()) drawstatusbar_r(screenpeek);
|
||||
else drawstatusbar_d(screenpeek);
|
||||
|
||||
if (!DEER && g_player[myconnectindex].ps->newowner == -1 && ud.overhead_on == 0 && cl_crosshair && ud.camerasprite == -1)
|
||||
if (g_player[myconnectindex].ps->newowner == -1 && ud.overhead_on == 0 && cl_crosshair && ud.camerasprite == -1)
|
||||
{
|
||||
int32_t a = TILE_CROSSHAIR;
|
||||
|
||||
|
@ -288,7 +288,7 @@ void G_DisplayRest(int32_t smoothratio)
|
|||
//vec2_t crosshairpos = { ud.returnvar[0], ud.returnvar[1] };
|
||||
uint32_t crosshair_o = 1|2;
|
||||
uint32_t crosshair_scale = divscale16(cl_crosshairscale, 100);
|
||||
if (RR)
|
||||
if (isRR())
|
||||
crosshair_scale >>= 1;
|
||||
|
||||
rotatesprite_win(crosshairpos.x, crosshairpos.y, crosshair_scale, 0, a, 0, 0, crosshair_o);
|
||||
|
|
Loading…
Reference in a new issue