diff --git a/source/rr/src/actors.h b/source/rr/src/actors.h index fbe92fec4..597fc4d72 100644 --- a/source/rr/src/actors.h +++ b/source/rr/src/actors.h @@ -175,8 +175,6 @@ typedef struct { intptr_t *execPtr; // pointer to CON script for this tile, formerly actorscrptr intptr_t *loadPtr; // pointer to load time CON script, formerly actorLoadEventScrPtr or something - projectile_t *proj; - projectile_t *defproj; uint32_t flags; // formerly SpriteFlags, ActorType int32_t cacherange; // formerly SpriteCache } tiledata_t; diff --git a/source/rr/src/gamedef.cpp b/source/rr/src/gamedef.cpp index 280c5b92c..f773ddf8c 100644 --- a/source/rr/src/gamedef.cpp +++ b/source/rr/src/gamedef.cpp @@ -2479,9 +2479,6 @@ void C_ReportError(int32_t iError) case ERROR_CLOSEBRACKET: initprintf("%s:%d: error: found more `}' than `{' before `%s'.\n",g_scriptFileName,g_lineNumber,tempbuf); break; - case ERROR_EVENTONLY: - initprintf("%s:%d: error: keyword `%s' only available during events.\n",g_scriptFileName,g_lineNumber,tempbuf); - break; case ERROR_EXCEEDSMAXTILES: initprintf("%s:%d: error: `%s' value exceeds MAXTILES. Maximum is %d.\n",g_scriptFileName,g_lineNumber,tempbuf,MAXTILES-1); break; @@ -2494,72 +2491,18 @@ void C_ReportError(int32_t iError) case ERROR_ISAKEYWORD: initprintf("%s:%d: error: symbol `%s' is a keyword.\n",g_scriptFileName,g_lineNumber,label+(g_labelCnt<<6)); break; - case ERROR_NOENDSWITCH: - initprintf("%s:%d: error: did not find `endswitch' before `%s'.\n",g_scriptFileName,g_lineNumber,label+(g_labelCnt<<6)); - break; - case ERROR_NOTAGAMEDEF: - initprintf("%s:%d: error: symbol `%s' is not a definition.\n",g_scriptFileName,g_lineNumber,label+(g_labelCnt<<6)); - break; - case ERROR_NOTAGAMEVAR: - initprintf("%s:%d: error: symbol `%s' is not a variable.\n",g_scriptFileName,g_lineNumber,label+(g_labelCnt<<6)); - break; - case ERROR_NOTAGAMEARRAY: - initprintf("%s:%d: error: symbol `%s' is not an array.\n",g_scriptFileName,g_lineNumber,label+(g_labelCnt<<6)); - break; - case ERROR_GAMEARRAYBNC: - initprintf("%s:%d: error: malformed array index: expected ], found %c\n",g_scriptFileName,g_lineNumber,*textptr); - break; - case ERROR_GAMEARRAYBNO: - initprintf("%s:%d: error: malformed array index: expected [, found %c\n",g_scriptFileName,g_lineNumber,*textptr); - break; - case ERROR_INVALIDARRAYWRITE: - initprintf("%s:%d: error: arrays can only be written to using `setarray'.\n",g_scriptFileName,g_lineNumber); - break; case ERROR_OPENBRACKET: initprintf("%s:%d: error: found more `{' than `}' before `%s'.\n",g_scriptFileName,g_lineNumber,tempbuf); break; case ERROR_PARAMUNDEFINED: initprintf("%s:%d: error: parameter `%s' is undefined.\n",g_scriptFileName,g_lineNumber,tempbuf); break; - case ERROR_NOTAMEMBER: - initprintf("%s:%d: error: symbol `%s' is not a valid structure member.\n",g_scriptFileName,g_lineNumber,label+(g_labelCnt<<6)); - break; case ERROR_SYNTAXERROR: initprintf("%s:%d: error: syntax error.\n",g_scriptFileName,g_lineNumber); break; - case ERROR_VARREADONLY: - initprintf("%s:%d: error: variable `%s' is read-only.\n",g_scriptFileName,g_lineNumber,label+(g_labelCnt<<6)); - break; - case ERROR_ARRAYREADONLY: - initprintf("%s:%d: error: array `%s' is read-only.\n",g_scriptFileName,g_lineNumber,label+(g_labelCnt<<6)); - break; - case ERROR_VARTYPEMISMATCH: - initprintf("%s:%d: error: variable `%s' is of the wrong type.\n",g_scriptFileName,g_lineNumber,label+(g_labelCnt<<6)); - break; - case WARNING_BADGAMEVAR: - initprintf("%s:%d: warning: variable `%s' should be either per-player OR per-actor, not both.\n",g_scriptFileName,g_lineNumber,label+(g_labelCnt<<6)); - break; - case WARNING_DUPLICATECASE: - initprintf("%s:%d: warning: duplicate case ignored.\n",g_scriptFileName,g_lineNumber); - break; - case WARNING_DUPLICATEDEFINITION: - initprintf("%s:%d: warning: duplicate definition `%s' ignored.\n",g_scriptFileName,g_lineNumber,label+(g_labelCnt<<6)); - break; - case WARNING_EVENTSYNC: - initprintf("%s:%d: warning: found `%s' within a local event.\n",g_scriptFileName,g_lineNumber,tempbuf); - break; case WARNING_LABELSONLY: initprintf("%s:%d: warning: expected a label, found a constant.\n",g_scriptFileName,g_lineNumber); break; - case WARNING_NAMEMATCHESVAR: - initprintf("%s:%d: warning: symbol `%s' already used for variable.\n",g_scriptFileName,g_lineNumber,label+(g_labelCnt<<6)); - break; - case WARNING_VARMASKSKEYWORD: - initprintf("%s:%d: warning: variable `%s' masks keyword.\n", g_scriptFileName, g_lineNumber, label+(g_labelCnt<<6)); - break; - case WARNING_ARRAYMASKSKEYWORD: - initprintf("%s:%d: warning: array `%s' masks keyword.\n", g_scriptFileName, g_lineNumber, label+(g_labelCnt<<6)); - break; } } diff --git a/source/rr/src/gamedef.h b/source/rr/src/gamedef.h index 3e4c1c8d4..8e1b9ab51 100644 --- a/source/rr/src/gamedef.h +++ b/source/rr/src/gamedef.h @@ -42,7 +42,6 @@ enum LABEL_ACTION = 8, LABEL_AI = 16, LABEL_MOVE = 32, - LABEL_EVENT = 64, }; #define LABEL_HASPARM2 1 @@ -73,38 +72,6 @@ extern hashtable_t h_gamefuncs; extern hashtable_t h_labels; -extern int32_t g_aimAngleVarID; // var ID of "AUTOAIMANGLE" -extern int32_t g_angRangeVarID; // var ID of "ANGRANGE" -extern int32_t g_hitagVarID; // var ID of "HITAG" -extern int32_t g_lotagVarID; // var ID of "LOTAG" -extern int32_t g_returnVarID; // var ID of "RETURN" -extern int32_t g_textureVarID; // var ID of "TEXTURE" -extern int32_t g_thisActorVarID; // var ID of "THISACTOR" -extern int32_t g_weaponVarID; // var ID of "WEAPON" -extern int32_t g_worksLikeVarID; // var ID of "WORKSLIKE" -extern int32_t g_zRangeVarID; // var ID of "ZRANGE" - -// KEEPINSYNC gamevars.c: "special vars for struct access" -enum QuickStructureAccess_t -{ - STRUCT_SPRITE, - STRUCT_SECTOR, - STRUCT_WALL, - STRUCT_PLAYER, - STRUCT_ACTORVAR, - STRUCT_PLAYERVAR, - STRUCT_TSPR, - STRUCT_PROJECTILE, - STRUCT_THISPROJECTILE, - STRUCT_USERDEF, - STRUCT_INPUT, - STRUCT_TILEDATA, - STRUCT_PALDATA, - NUMQUICKSTRUCTS, -}; - -extern int32_t g_structVarIDs; - extern char g_scriptFileName[BMAX_PATH]; extern const uint32_t CheatFunctionFlags[]; @@ -118,8 +85,6 @@ extern int32_t g_warningCnt; extern uint32_t g_scriptcrc; extern int32_t otherp; -extern const char *EventNames[]; // MAXEVENTS - extern intptr_t *g_scriptPtr; typedef struct @@ -139,9 +104,6 @@ extern const memberlabel_t TsprLabels[]; extern const memberlabel_t UserdefsLabels[]; extern const memberlabel_t WallLabels[]; -typedef projectile_t defaultprojectile_t; - -extern defaultprojectile_t DefaultProjectile; int32_t C_AllocQuote(int32_t qnum); void C_InitQuotes(void); @@ -185,526 +147,17 @@ typedef struct { extern char const * VM_GetKeywordForID(int32_t id); -// KEEPINSYNC lunatic/con_lang.lua -enum SystemString_t { - STR_MAPNAME, - STR_MAPFILENAME, - STR_PLAYERNAME, - STR_VERSION, - STR_GAMETYPE, - STR_VOLUMENAME, - STR_YOURTIME, - STR_PARTIME, - STR_DESIGNERTIME, - STR_BESTTIME, - STR_USERMAPFILENAME, -}; - enum ScriptError_t { ERROR_CLOSEBRACKET, - ERROR_EVENTONLY, ERROR_EXCEEDSMAXTILES, ERROR_EXPECTEDKEYWORD, ERROR_FOUNDWITHIN, ERROR_ISAKEYWORD, - ERROR_NOENDSWITCH, - ERROR_NOTAGAMEDEF, - ERROR_NOTAGAMEVAR, - ERROR_NOTAGAMEARRAY, - ERROR_GAMEARRAYBNC, - ERROR_GAMEARRAYBNO, - ERROR_INVALIDARRAYWRITE, ERROR_OPENBRACKET, ERROR_PARAMUNDEFINED, - ERROR_NOTAMEMBER, ERROR_SYNTAXERROR, - ERROR_VARREADONLY, - ERROR_ARRAYREADONLY, - ERROR_VARTYPEMISMATCH, - WARNING_BADGAMEVAR, - WARNING_DUPLICATECASE, - WARNING_DUPLICATEDEFINITION, - WARNING_EVENTSYNC, - WARNING_LABELSONLY, - WARNING_NAMEMATCHESVAR, - WARNING_VARMASKSKEYWORD, - WARNING_ARRAYMASKSKEYWORD -}; - -enum PlayerLabel_t -{ - PLAYER_ZOOM, - PLAYER_EXITX, - PLAYER_EXITY, - PLAYER_LOOGIEX, - PLAYER_LOOGIEY, - PLAYER_NUMLOOGS, - PLAYER_LOOGCNT, - PLAYER_POSX, - PLAYER_POSY, - PLAYER_POSZ, - PLAYER_HORIZ, - PLAYER_OHORIZ, - PLAYER_OHORIZOFF, - PLAYER_INVDISPTIME, - PLAYER_BOBPOSX, - PLAYER_BOBPOSY, - PLAYER_OPOSX, - PLAYER_OPOSY, - PLAYER_OPOSZ, - PLAYER_PYOFF, - PLAYER_OPYOFF, - PLAYER_POSXV, - PLAYER_POSYV, - PLAYER_POSZV, - PLAYER_LAST_PISSED_TIME, - PLAYER_TRUEFZ, - PLAYER_TRUECZ, - PLAYER_PLAYER_PAR, - PLAYER_VISIBILITY, - PLAYER_BOBCOUNTER, - PLAYER_WEAPON_SWAY, - PLAYER_PALS_TIME, - PLAYER_RANDOMFLAMEX, - PLAYER_CRACK_TIME, - PLAYER_AIM_MODE, - PLAYER_ANG, - PLAYER_OANG, - PLAYER_ANGVEL, - PLAYER_CURSECTNUM, - PLAYER_LOOK_ANG, - PLAYER_LAST_EXTRA, - PLAYER_SUBWEAPON, - PLAYER_AMMO_AMOUNT, - PLAYER_WACKEDBYACTOR, - PLAYER_FRAG, - PLAYER_FRAGGEDSELF, - PLAYER_CURR_WEAPON, - PLAYER_LAST_WEAPON, - PLAYER_TIPINCS, - PLAYER_HORIZOFF, - PLAYER_WANTWEAPONFIRE, - PLAYER_HOLODUKE_AMOUNT, - PLAYER_NEWOWNER, - PLAYER_HURT_DELAY, - PLAYER_HBOMB_HOLD_DELAY, - PLAYER_JUMPING_COUNTER, - PLAYER_AIRLEFT, - PLAYER_KNEE_INCS, - PLAYER_ACCESS_INCS, - PLAYER_FTA, - PLAYER_FTQ, - PLAYER_ACCESS_WALLNUM, - PLAYER_ACCESS_SPRITENUM, - PLAYER_KICKBACK_PIC, - PLAYER_GOT_ACCESS, - PLAYER_WEAPON_ANG, - PLAYER_FIRSTAID_AMOUNT, - PLAYER_SOMETHINGONPLAYER, - PLAYER_ON_CRANE, - PLAYER_I, - PLAYER_ONE_PARALLAX_SECTNUM, - PLAYER_OVER_SHOULDER_ON, - PLAYER_RANDOM_CLUB_FRAME, - PLAYER_FIST_INCS, - PLAYER_ONE_EIGHTY_COUNT, - PLAYER_CHEAT_PHASE, - PLAYER_DUMMYPLAYERSPRITE, - PLAYER_EXTRA_EXTRA8, - PLAYER_QUICK_KICK, - PLAYER_HEAT_AMOUNT, - PLAYER_ACTORSQU, - PLAYER_TIMEBEFOREEXIT, - PLAYER_CUSTOMEXITSOUND, - PLAYER_WEAPRECS, - PLAYER_WEAPRECCNT, - PLAYER_INTERFACE_TOGGLE_FLAG, - PLAYER_ROTSCRNANG, - PLAYER_DEAD_FLAG, - PLAYER_SHOW_EMPTY_WEAPON, - PLAYER_SCUBA_AMOUNT, - PLAYER_JETPACK_AMOUNT, - PLAYER_STEROIDS_AMOUNT, - PLAYER_SHIELD_AMOUNT, - PLAYER_HOLODUKE_ON, - PLAYER_PYCOUNT, - PLAYER_WEAPON_POS, - PLAYER_FRAG_PS, - PLAYER_TRANSPORTER_HOLD, - PLAYER_CLIPDIST, - PLAYER_LAST_FULL_WEAPON, - PLAYER_FOOTPRINTSHADE, - PLAYER_BOOT_AMOUNT, - PLAYER_SCREAM_VOICE, - PLAYER_GM, - PLAYER_ON_WARPING_SECTOR, - PLAYER_FOOTPRINTCOUNT, - PLAYER_HBOMB_ON, - PLAYER_JUMPING_TOGGLE, - PLAYER_RAPID_FIRE_HOLD, - PLAYER_ON_GROUND, - PLAYER_NAME, - PLAYER_INVEN_ICON, - PLAYER_BUTTONPALETTE, - PLAYER_JETPACK_ON, - PLAYER_SPRITEBRIDGE, - PLAYER_LASTRANDOMSPOT, - PLAYER_SCUBA_ON, - PLAYER_FOOTPRINTPAL, - PLAYER_HEAT_ON, - PLAYER_HOLSTER_WEAPON, - PLAYER_FALLING_COUNTER, - PLAYER_GOTWEAPON, - PLAYER_REFRESH_INVENTORY, - PLAYER_PALETTE, - PLAYER_TOGGLE_KEY_FLAG, - PLAYER_KNUCKLE_INCS, - PLAYER_WALKING_SND_TOGGLE, - PLAYER_PALOOKUP, - PLAYER_HARD_LANDING, - PLAYER_MAX_SECRET_ROOMS, - PLAYER_SECRET_ROOMS, - PLAYER_PALS, - PLAYER_MAX_ACTORS_KILLED, - PLAYER_ACTORS_KILLED, - PLAYER_RETURN_TO_CENTER, - PLAYER_RUNSPEED, - PLAYER_SBS, - PLAYER_RELOADING, - PLAYER_AUTO_AIM, - PLAYER_MOVEMENT_LOCK, - PLAYER_SOUND_PITCH, - PLAYER_WEAPONSWITCH, - PLAYER_TEAM, - PLAYER_MAX_PLAYER_HEALTH, - PLAYER_MAX_SHIELD_AMOUNT, - PLAYER_MAX_AMMO_AMOUNT, - PLAYER_LAST_QUICK_KICK, - PLAYER_AUTOSTEP, - PLAYER_AUTOSTEP_SBW, - PLAYER_HUDPAL, - PLAYER_INDEX, - PLAYER_CONNECTED, - PLAYER_FRAGS, - PLAYER_DEATHS, - PLAYER_LAST_USED_WEAPON, - PLAYER_END -}; - -enum UserdefsLabel_t -{ - USERDEFS_GOD, - USERDEFS_WARP_ON, - USERDEFS_CASHMAN, - USERDEFS_EOG, - USERDEFS_SHOWALLMAP, - USERDEFS_SHOW_HELP, - USERDEFS_SCROLLMODE, - USERDEFS_CLIPPING, - USERDEFS_USER_NAME, - USERDEFS_RIDECULE, - USERDEFS_SAVEGAME, - USERDEFS_PWLOCKOUT, - USERDEFS_RTSNAME, - USERDEFS_OVERHEAD_ON, - USERDEFS_LAST_OVERHEAD, - USERDEFS_SHOWWEAPONS, - USERDEFS_PAUSE_ON, - USERDEFS_FROM_BONUS, - USERDEFS_CAMERASPRITE, - USERDEFS_LAST_CAMSPRITE, - USERDEFS_LAST_LEVEL, - USERDEFS_SECRETLEVEL, - USERDEFS_CONST_VISIBILITY, - USERDEFS_UW_FRAMERATE, - USERDEFS_CAMERA_TIME, - USERDEFS_FOLFVEL, - USERDEFS_FOLAVEL, - USERDEFS_FOLX, - USERDEFS_FOLY, - USERDEFS_FOLA, - USERDEFS_RECCNT, - USERDEFS_ENTERED_NAME, - USERDEFS_SCREEN_TILTING, - USERDEFS_SHADOWS, - USERDEFS_FTA_ON, - USERDEFS_EXECUTIONS, - USERDEFS_AUTO_RUN, - USERDEFS_COORDS, - USERDEFS_TICKRATE, - USERDEFS_M_COOP, - USERDEFS_COOP, - USERDEFS_SCREEN_SIZE, - USERDEFS_LOCKOUT, - USERDEFS_CROSSHAIR, - USERDEFS_PLAYERAI, - USERDEFS_RESPAWN_MONSTERS, - USERDEFS_RESPAWN_ITEMS, - USERDEFS_RESPAWN_INVENTORY, - USERDEFS_RECSTAT, - USERDEFS_MONSTERS_OFF, - USERDEFS_BRIGHTNESS, - USERDEFS_M_RESPAWN_ITEMS, - USERDEFS_M_RESPAWN_MONSTERS, - USERDEFS_M_RESPAWN_INVENTORY, - USERDEFS_M_RECSTAT, - USERDEFS_M_MONSTERS_OFF, - USERDEFS_DETAIL, - USERDEFS_M_FFIRE, - USERDEFS_FFIRE, - USERDEFS_M_PLAYER_SKILL, - USERDEFS_M_LEVEL_NUMBER, - USERDEFS_M_VOLUME_NUMBER, - USERDEFS_MULTIMODE, - USERDEFS_PLAYER_SKILL, - USERDEFS_LEVEL_NUMBER, - USERDEFS_VOLUME_NUMBER, - USERDEFS_M_MARKER, - USERDEFS_MARKER, - USERDEFS_MOUSEFLIP, - USERDEFS_STATUSBARSCALE, - USERDEFS_DRAWWEAPON, - USERDEFS_MOUSEAIMING, - USERDEFS_WEAPONSWITCH, - USERDEFS_DEMOCAMS, - USERDEFS_COLOR, - USERDEFS_MSGDISPTIME, - USERDEFS_STATUSBARMODE, - USERDEFS_M_NOEXITS, - USERDEFS_NOEXITS, - USERDEFS_AUTOVOTE, - USERDEFS_AUTOMSG, - USERDEFS_IDPLAYERS, - USERDEFS_TEAM, - USERDEFS_VIEWBOB, - USERDEFS_WEAPONSWAY, - USERDEFS_ANGLEINTERPOLATION, - USERDEFS_OBITUARIES, - USERDEFS_LEVELSTATS, - USERDEFS_CROSSHAIRSCALE, - USERDEFS_ALTHUD, - USERDEFS_DISPLAY_BONUS_SCREEN, - USERDEFS_SHOW_LEVEL_TEXT, - USERDEFS_WEAPONSCALE, - USERDEFS_TEXTSCALE, - USERDEFS_RUNKEY_MODE, - USERDEFS_M_ORIGIN_X, - USERDEFS_M_ORIGIN_Y, - USERDEFS_PLAYERBEST, - USERDEFS_MUSICTOGGLE, - USERDEFS_USEVOXELS, - USERDEFS_USEHIGHTILE, - USERDEFS_USEMODELS, - USERDEFS_GAMETYPEFLAGS, - USERDEFS_M_GAMETYPEFLAGS, - USERDEFS_GLOBALFLAGS, - USERDEFS_GLOBALGAMEFLAGS, - USERDEFS_VM_PLAYER, - USERDEFS_VM_SPRITE, - USERDEFS_VM_DISTANCE, - USERDEFS_SOUNDTOGGLE, - USERDEFS_GAMETEXT_TRACKING, - USERDEFS_MGAMETEXT_TRACKING, - USERDEFS_MENUTEXT_TRACKING, - USERDEFS_MAXSPRITESONSCREEN, - USERDEFS_SCREENAREA_X1, - USERDEFS_SCREENAREA_Y1, - USERDEFS_SCREENAREA_X2, - USERDEFS_SCREENAREA_Y2, - USERDEFS_SCREENFADE, - USERDEFS_MENUBACKGROUND, - USERDEFS_STATUSBARFLAGS, - USERDEFS_STATUSBARRANGE, - USERDEFS_STATUSBARCUSTOM, - USERDEFS_HUDONTOP, - USERDEFS_MENU_SLIDEBARZ, - USERDEFS_MENU_SLIDEBARMARGIN, - USERDEFS_MENU_SLIDECURSORZ, - USERDEFS_GLOBAL_R, - USERDEFS_GLOBAL_G, - USERDEFS_GLOBAL_B, - USERDEFS_DEFAULT_VOLUME, - USERDEFS_DEFAULT_SKILL, - USERDEFS_MENU_SHADEDESELECTED, - USERDEFS_MENU_SHADEDISABLED, - USERDEFS_MENUTEXT_ZOOM, - USERDEFS_MENUTEXT_XSPACE, - USERDEFS_MENUTEXT_PAL, - USERDEFS_MENUTEXT_PALSELECTED, - USERDEFS_MENUTEXT_PALDESELECTED, - USERDEFS_MENUTEXT_PALDISABLED, - USERDEFS_MENUTEXT_PALSELECTED_RIGHT, - USERDEFS_MENUTEXT_PALDESELECTED_RIGHT, - USERDEFS_MENUTEXT_PALDISABLED_RIGHT, - USERDEFS_GAMETEXT_ZOOM, - USERDEFS_GAMETEXT_XSPACE, - USERDEFS_GAMETEXT_PAL, - USERDEFS_GAMETEXT_PALSELECTED, - USERDEFS_GAMETEXT_PALDESELECTED, - USERDEFS_GAMETEXT_PALDISABLED, - USERDEFS_GAMETEXT_PALSELECTED_RIGHT, - USERDEFS_GAMETEXT_PALDESELECTED_RIGHT, - USERDEFS_GAMETEXT_PALDISABLED_RIGHT, - USERDEFS_MINITEXT_ZOOM, - USERDEFS_MINITEXT_XSPACE, - USERDEFS_MINITEXT_TRACKING, - USERDEFS_MINITEXT_PAL, - USERDEFS_MINITEXT_PALSELECTED, - USERDEFS_MINITEXT_PALDESELECTED, - USERDEFS_MINITEXT_PALDISABLED, - USERDEFS_MINITEXT_PALSELECTED_RIGHT, - USERDEFS_MINITEXT_PALDESELECTED_RIGHT, - USERDEFS_MINITEXT_PALDISABLED_RIGHT, - USERDEFS_MENUTITLE_PAL, - USERDEFS_SLIDEBAR_PALSELECTED, - USERDEFS_SLIDEBAR_PALDISABLED, - USERDEFS_USER_MAP, - USERDEFS_M_USER_MAP, - USERDEFS_MUSIC_EPISODE, - USERDEFS_MUSIC_LEVEL, - USERDEFS_SHADOW_PAL, - USERDEFS_MENU_SCROLLBARTILENUM, - USERDEFS_MENU_SCROLLBARZ, - USERDEFS_MENU_SCROLLCURSORZ, - USERDEFS_RETURN, - USERDEFS_USERBYTEVERSION, - USERDEFS_AUTOSAVE, - USERDEFS_END -}; - -enum SectorLabel_t -{ - SECTOR_WALLPTR, - SECTOR_WALLNUM, - SECTOR_CEILINGZ, - SECTOR_CEILINGZGOAL, - SECTOR_CEILINGZVEL, - SECTOR_FLOORZ, - SECTOR_FLOORZGOAL, - SECTOR_FLOORZVEL, - SECTOR_CEILINGSTAT, - SECTOR_FLOORSTAT, - SECTOR_CEILINGPICNUM, - SECTOR_CEILINGSLOPE, - SECTOR_CEILINGSHADE, - SECTOR_CEILINGPAL, - SECTOR_CEILINGXPANNING, - SECTOR_CEILINGYPANNING, - SECTOR_FLOORPICNUM, - SECTOR_FLOORSLOPE, - SECTOR_FLOORSHADE, - SECTOR_FLOORPAL, - SECTOR_FLOORXPANNING, - SECTOR_FLOORYPANNING, - SECTOR_VISIBILITY, - SECTOR_FOGPAL, - SECTOR_LOTAG, - SECTOR_HITAG, - SECTOR_EXTRA, - SECTOR_CEILINGBUNCH, - SECTOR_FLOORBUNCH, - SECTOR_ULOTAG, - SECTOR_UHITAG, - SECTOR_END -}; - -enum WallLabel_t -{ - WALL_X, - WALL_Y, - WALL_POINT2, - WALL_NEXTWALL, - WALL_NEXTSECTOR, - WALL_CSTAT, - WALL_PICNUM, - WALL_OVERPICNUM, - WALL_SHADE, - WALL_PAL, - WALL_XREPEAT, - WALL_YREPEAT, - WALL_XPANNING, - WALL_YPANNING, - WALL_LOTAG, - WALL_HITAG, - WALL_EXTRA, - WALL_ULOTAG, - WALL_UHITAG, - WALL_BLEND, - WALL_END -}; - -enum ActorLabel_t -{ - ACTOR_X, - ACTOR_Y, - ACTOR_Z, - ACTOR_CSTAT, - ACTOR_PICNUM, - ACTOR_SHADE, - ACTOR_PAL, - ACTOR_CLIPDIST, - ACTOR_DETAIL, - ACTOR_XREPEAT, - ACTOR_YREPEAT, - ACTOR_XOFFSET, - ACTOR_YOFFSET, - ACTOR_SECTNUM, - ACTOR_STATNUM, - ACTOR_ANG, - ACTOR_OWNER, - ACTOR_XVEL, - ACTOR_YVEL, - ACTOR_ZVEL, - ACTOR_LOTAG, - ACTOR_HITAG, - ACTOR_EXTRA, - ACTOR_HTCGG, - ACTOR_HTPICNUM, - ACTOR_HTANG, - ACTOR_HTEXTRA, - ACTOR_HTOWNER, - ACTOR_HTMOVFLAG, - ACTOR_HTTEMPANG, - ACTOR_HTACTORSTAYPUT, - ACTOR_HTDISPICNUM, - ACTOR_HTTIMETOSLEEP, - ACTOR_HTFLOORZ, - ACTOR_HTCEILINGZ, - ACTOR_HTLASTVX, - ACTOR_HTLASTVY, - ACTOR_HTBPOSX, - ACTOR_HTBPOSY, - ACTOR_HTBPOSZ, - ACTOR_HTG_T, - ACTOR_ANGOFF, - ACTOR_PITCH, - ACTOR_ROLL, - ACTOR_MDXOFF, - ACTOR_MDYOFF, - ACTOR_MDZOFF, - ACTOR_MDFLAGS, - ACTOR_XPANNING, - ACTOR_YPANNING, - ACTOR_HTFLAGS, - ACTOR_ALPHA, - ACTOR_ULOTAG, - ACTOR_UHITAG, - ACTOR_ISVALID, - ACTOR_END -}; - -enum InputLabel_t -{ - INPUT_AVEL, - INPUT_Q16AVEL, - INPUT_HORZ, - INPUT_Q16HORZ, - INPUT_FVEL, - INPUT_SVEL, - INPUT_BITS, - INPUT_EXTBITS, - INPUT_END + WARNING_LABELSONLY }; enum ScriptKeywords_t diff --git a/source/rr/src/gameexec.cpp b/source/rr/src/gameexec.cpp index 2f7f3e7ce..178a07604 100644 --- a/source/rr/src/gameexec.cpp +++ b/source/rr/src/gameexec.cpp @@ -54,22 +54,9 @@ enum vmflags_t int32_t g_tw; int32_t g_errorLineNum; -int32_t g_currentEventExec = -1; intptr_t const *insptr; -int32_t g_returnVarID = -1; // var ID of "RETURN" -int32_t g_weaponVarID = -1; // var ID of "WEAPON" -int32_t g_worksLikeVarID = -1; // var ID of "WORKSLIKE" -int32_t g_zRangeVarID = -1; // var ID of "ZRANGE" -int32_t g_angRangeVarID = -1; // var ID of "ANGRANGE" -int32_t g_aimAngleVarID = -1; // var ID of "AUTOAIMANGLE" -int32_t g_lotagVarID = -1; // var ID of "LOTAG" -int32_t g_hitagVarID = -1; // var ID of "HITAG" -int32_t g_textureVarID = -1; // var ID of "TEXTURE" -int32_t g_thisActorVarID = -1; // var ID of "THISACTOR" -int32_t g_structVarIDs = -1; - // for timing events and actors uint32_t g_actorCalls[MAXTILES]; double g_actorTotalMs[MAXTILES], g_actorMinMs[MAXTILES], g_actorMaxMs[MAXTILES]; @@ -89,7 +76,7 @@ GAMEEXEC_STATIC void VM_Execute(native_t loop); void VM_ScriptInfo(intptr_t const *ptr, int range) { - if (!apScript || (!vm.pSprite && !vm.pPlayer && g_currentEventExec == -1)) + if (!apScript || (!vm.pSprite && !vm.pPlayer)) return; if (ptr) diff --git a/source/rr/src/gameexec.h b/source/rr/src/gameexec.h index f1110456e..7efa35290 100644 --- a/source/rr/src/gameexec.h +++ b/source/rr/src/gameexec.h @@ -38,7 +38,6 @@ extern int32_t ticrandomseed; extern vmstate_t vm; extern int32_t g_tw; extern int32_t g_errorLineNum; -extern int32_t g_currentEventExec; void A_LoadActor(int32_t spriteNum); diff --git a/source/rr/src/player.cpp b/source/rr/src/player.cpp index fe5eb90bf..1cdec1fb6 100644 --- a/source/rr/src/player.cpp +++ b/source/rr/src/player.cpp @@ -325,18 +325,6 @@ static int GetAutoAimAng(int spriteNum, int playerNum, int projecTile, int zAdju return returnSprite; } -int Proj_GetDamage(projectile_t const *pProj) -{ - Bassert(pProj); - - int damage = pProj->extra; - - if (pProj->extra_rand > 0) - damage += (krand2() % pProj->extra_rand); - - return damage; -} - static void Proj_MaybeAddSpread(int doSpread, int32_t *zvel, int *shootAng, int zRange, int angRange) { if (doSpread) diff --git a/source/rr/src/player.h b/source/rr/src/player.h index 77c213634..2adebcf13 100644 --- a/source/rr/src/player.h +++ b/source/rr/src/player.h @@ -57,27 +57,6 @@ extern int32_t PHEIGHT; #define MAX_WEAPON_RECS 256 -enum weaponflags_t { - WEAPON_SPAWNTYPE1 = 0x00000000, // just spawn - WEAPON_HOLSTER_CLEARS_CLIP = 0x00000001, // 'holstering' clears the current clip - WEAPON_GLOWS = 0x00000002, // weapon 'glows' (shrinker and grower) - WEAPON_AUTOMATIC = 0x00000004, // automatic fire (continues while 'fire' is held down - WEAPON_FIREEVERYOTHER = 0x00000008, // during 'hold time' fire every frame - WEAPON_FIREEVERYTHIRD = 0x00000010, // during 'hold time' fire every third frame - WEAPON_RANDOMRESTART = 0x00000020, // restart for automatic is 'randomized' by RND 3 - WEAPON_AMMOPERSHOT = 0x00000040, // uses ammo for each shot (for automatic) - WEAPON_BOMB_TRIGGER = 0x00000080, // weapon is the 'bomb' trigger - WEAPON_NOVISIBLE = 0x00000100, // weapon use does not cause user to become 'visible' - WEAPON_THROWIT = 0x00000200, // weapon 'throws' the 'shoots' item... - WEAPON_CHECKATRELOAD = 0x00000400, // check weapon availability at 'reload' time - WEAPON_STANDSTILL = 0x00000800, // player stops jumping before actual fire (like tripbomb in duke) - WEAPON_SPAWNTYPE2 = 0x00001000, // spawn like shotgun shells - WEAPON_SPAWNTYPE3 = 0x00002000, // spawn like chaingun shells - WEAPON_SEMIAUTO = 0x00004000, // cancel button press after each shot - WEAPON_RELOAD_TIMING = 0x00008000, // special casing for pistol reload sounds - WEAPON_RESET = 0x00010000 // cycle weapon back to frame 1 if fire is held, 0 if not -}; - enum gamemode_t { MODE_MENU = 0x00000001, MODE_DEMO = 0x00000002, @@ -245,47 +224,6 @@ typedef struct { } playerdata_t; #pragma pack(pop) -// KEEPINSYNC lunatic/con_lang.lua -typedef struct -{ - // NOTE: the member names must be identical to aplWeapon* suffixes. - int32_t WorksLike; // What the original works like - int32_t Clip; // number of items in magazine - int32_t Reload; // delay to reload (include fire) - int32_t FireDelay; // delay to fire - int32_t TotalTime; // The total time the weapon is cycling before next fire. - int32_t HoldDelay; // delay after release fire button to fire (0 for none) - int32_t Flags; // Flags for weapon - int32_t Shoots; // what the weapon shoots - int32_t SpawnTime; // the frame at which to spawn an item - int32_t Spawn; // the item to spawn - int32_t ShotsPerBurst; // number of shots per 'burst' (one ammo per 'burst') - int32_t InitialSound; // Sound made when weapon starts firing. zero for no sound - int32_t FireSound; // Sound made when firing (each time for automatic) - int32_t Sound2Time; // Alternate sound time - int32_t Sound2Sound; // Alternate sound sound ID - int32_t ReloadSound1; // Sound of magazine being removed - int32_t ReloadSound2; // Sound of magazine being inserted - int32_t SelectSound; // Sound of weapon being selected - int32_t FlashColor; // Muzzle flash color -} weapondata_t; - -typedef struct { - int32_t workslike, cstat; // 8b - int32_t hitradius, range, flashcolor; // 12b - int16_t spawns, sound, isound, vel; // 8b - int16_t decal, trail, tnum, drop; // 8b - int16_t offset, bounces, bsound; // 6b - int16_t toffset; // 2b - int16_t extra, extra_rand; // 4b - int8_t sxrepeat, syrepeat, txrepeat, tyrepeat; // 4b - int8_t shade, xrepeat, yrepeat, pal; // 4b - int8_t movecnt; // 1b - uint8_t clipdist; // 1b - int8_t filler[2]; // 2b - int32_t userdata; // 4b -} projectile_t; - // KEEPINSYNC lunatic/_defs_game.lua typedef struct { int32_t cur, count; // "cur" is the only member that is *used* @@ -350,8 +288,6 @@ int P_GetOverheadPal(const DukePlayer_t *pPlayer); void P_MadeNoise(int playerNum); int P_HasKey(int sectNum, int playerNum); -int Proj_GetDamage(projectile_t const *pProj); - // Get the player index given an APLAYER sprite pointer. static inline int P_GetP(const void *pSprite) {