diff --git a/src/p_acs.cpp b/src/p_acs.cpp index 8b18077e8..29230616f 100644 --- a/src/p_acs.cpp +++ b/src/p_acs.cpp @@ -86,6 +86,466 @@ #include "g_levellocals.h" #include "stats.h" + // P-codes for ACS scripts + enum + { +/* 0*/ PCD_NOP, + PCD_TERMINATE, + PCD_SUSPEND, + PCD_PUSHNUMBER, + PCD_LSPEC1, + PCD_LSPEC2, + PCD_LSPEC3, + PCD_LSPEC4, + PCD_LSPEC5, + PCD_LSPEC1DIRECT, +/* 10*/ PCD_LSPEC2DIRECT, + PCD_LSPEC3DIRECT, + PCD_LSPEC4DIRECT, + PCD_LSPEC5DIRECT, + PCD_ADD, + PCD_SUBTRACT, + PCD_MULTIPLY, + PCD_DIVIDE, + PCD_MODULUS, + PCD_EQ, +/* 20*/ PCD_NE, + PCD_LT, + PCD_GT, + PCD_LE, + PCD_GE, + PCD_ASSIGNSCRIPTVAR, + PCD_ASSIGNMAPVAR, + PCD_ASSIGNWORLDVAR, + PCD_PUSHSCRIPTVAR, + PCD_PUSHMAPVAR, +/* 30*/ PCD_PUSHWORLDVAR, + PCD_ADDSCRIPTVAR, + PCD_ADDMAPVAR, + PCD_ADDWORLDVAR, + PCD_SUBSCRIPTVAR, + PCD_SUBMAPVAR, + PCD_SUBWORLDVAR, + PCD_MULSCRIPTVAR, + PCD_MULMAPVAR, + PCD_MULWORLDVAR, +/* 40*/ PCD_DIVSCRIPTVAR, + PCD_DIVMAPVAR, + PCD_DIVWORLDVAR, + PCD_MODSCRIPTVAR, + PCD_MODMAPVAR, + PCD_MODWORLDVAR, + PCD_INCSCRIPTVAR, + PCD_INCMAPVAR, + PCD_INCWORLDVAR, + PCD_DECSCRIPTVAR, +/* 50*/ PCD_DECMAPVAR, + PCD_DECWORLDVAR, + PCD_GOTO, + PCD_IFGOTO, + PCD_DROP, + PCD_DELAY, + PCD_DELAYDIRECT, + PCD_RANDOM, + PCD_RANDOMDIRECT, + PCD_THINGCOUNT, +/* 60*/ PCD_THINGCOUNTDIRECT, + PCD_TAGWAIT, + PCD_TAGWAITDIRECT, + PCD_POLYWAIT, + PCD_POLYWAITDIRECT, + PCD_CHANGEFLOOR, + PCD_CHANGEFLOORDIRECT, + PCD_CHANGECEILING, + PCD_CHANGECEILINGDIRECT, + PCD_RESTART, +/* 70*/ PCD_ANDLOGICAL, + PCD_ORLOGICAL, + PCD_ANDBITWISE, + PCD_ORBITWISE, + PCD_EORBITWISE, + PCD_NEGATELOGICAL, + PCD_LSHIFT, + PCD_RSHIFT, + PCD_UNARYMINUS, + PCD_IFNOTGOTO, +/* 80*/ PCD_LINESIDE, + PCD_SCRIPTWAIT, + PCD_SCRIPTWAITDIRECT, + PCD_CLEARLINESPECIAL, + PCD_CASEGOTO, + PCD_BEGINPRINT, + PCD_ENDPRINT, + PCD_PRINTSTRING, + PCD_PRINTNUMBER, + PCD_PRINTCHARACTER, +/* 90*/ PCD_PLAYERCOUNT, + PCD_GAMETYPE, + PCD_GAMESKILL, + PCD_TIMER, + PCD_SECTORSOUND, + PCD_AMBIENTSOUND, + PCD_SOUNDSEQUENCE, + PCD_SETLINETEXTURE, + PCD_SETLINEBLOCKING, + PCD_SETLINESPECIAL, +/*100*/ PCD_THINGSOUND, + PCD_ENDPRINTBOLD, // [RH] End of Hexen p-codes + PCD_ACTIVATORSOUND, + PCD_LOCALAMBIENTSOUND, + PCD_SETLINEMONSTERBLOCKING, + PCD_PLAYERBLUESKULL, // [BC] Start of new [Skull Tag] pcodes + PCD_PLAYERREDSKULL, + PCD_PLAYERYELLOWSKULL, + PCD_PLAYERMASTERSKULL, + PCD_PLAYERBLUECARD, +/*110*/ PCD_PLAYERREDCARD, + PCD_PLAYERYELLOWCARD, + PCD_PLAYERMASTERCARD, + PCD_PLAYERBLACKSKULL, + PCD_PLAYERSILVERSKULL, + PCD_PLAYERGOLDSKULL, + PCD_PLAYERBLACKCARD, + PCD_PLAYERSILVERCARD, + PCD_ISNETWORKGAME, + PCD_PLAYERTEAM, +/*120*/ PCD_PLAYERHEALTH, + PCD_PLAYERARMORPOINTS, + PCD_PLAYERFRAGS, + PCD_PLAYEREXPERT, + PCD_BLUETEAMCOUNT, + PCD_REDTEAMCOUNT, + PCD_BLUETEAMSCORE, + PCD_REDTEAMSCORE, + PCD_ISONEFLAGCTF, + PCD_LSPEC6, // These are never used. They should probably +/*130*/ PCD_LSPEC6DIRECT, // be given names like PCD_DUMMY. + PCD_PRINTNAME, + PCD_MUSICCHANGE, + PCD_CONSOLECOMMANDDIRECT, + PCD_CONSOLECOMMAND, + PCD_SINGLEPLAYER, // [RH] End of Skull Tag p-codes + PCD_FIXEDMUL, + PCD_FIXEDDIV, + PCD_SETGRAVITY, + PCD_SETGRAVITYDIRECT, +/*140*/ PCD_SETAIRCONTROL, + PCD_SETAIRCONTROLDIRECT, + PCD_CLEARINVENTORY, + PCD_GIVEINVENTORY, + PCD_GIVEINVENTORYDIRECT, + PCD_TAKEINVENTORY, + PCD_TAKEINVENTORYDIRECT, + PCD_CHECKINVENTORY, + PCD_CHECKINVENTORYDIRECT, + PCD_SPAWN, +/*150*/ PCD_SPAWNDIRECT, + PCD_SPAWNSPOT, + PCD_SPAWNSPOTDIRECT, + PCD_SETMUSIC, + PCD_SETMUSICDIRECT, + PCD_LOCALSETMUSIC, + PCD_LOCALSETMUSICDIRECT, + PCD_PRINTFIXED, + PCD_PRINTLOCALIZED, + PCD_MOREHUDMESSAGE, +/*160*/ PCD_OPTHUDMESSAGE, + PCD_ENDHUDMESSAGE, + PCD_ENDHUDMESSAGEBOLD, + PCD_SETSTYLE, + PCD_SETSTYLEDIRECT, + PCD_SETFONT, + PCD_SETFONTDIRECT, + PCD_PUSHBYTE, + PCD_LSPEC1DIRECTB, + PCD_LSPEC2DIRECTB, +/*170*/ PCD_LSPEC3DIRECTB, + PCD_LSPEC4DIRECTB, + PCD_LSPEC5DIRECTB, + PCD_DELAYDIRECTB, + PCD_RANDOMDIRECTB, + PCD_PUSHBYTES, + PCD_PUSH2BYTES, + PCD_PUSH3BYTES, + PCD_PUSH4BYTES, + PCD_PUSH5BYTES, +/*180*/ PCD_SETTHINGSPECIAL, + PCD_ASSIGNGLOBALVAR, + PCD_PUSHGLOBALVAR, + PCD_ADDGLOBALVAR, + PCD_SUBGLOBALVAR, + PCD_MULGLOBALVAR, + PCD_DIVGLOBALVAR, + PCD_MODGLOBALVAR, + PCD_INCGLOBALVAR, + PCD_DECGLOBALVAR, +/*190*/ PCD_FADETO, + PCD_FADERANGE, + PCD_CANCELFADE, + PCD_PLAYMOVIE, + PCD_SETFLOORTRIGGER, + PCD_SETCEILINGTRIGGER, + PCD_GETACTORX, + PCD_GETACTORY, + PCD_GETACTORZ, + PCD_STARTTRANSLATION, +/*200*/ PCD_TRANSLATIONRANGE1, + PCD_TRANSLATIONRANGE2, + PCD_ENDTRANSLATION, + PCD_CALL, + PCD_CALLDISCARD, + PCD_RETURNVOID, + PCD_RETURNVAL, + PCD_PUSHMAPARRAY, + PCD_ASSIGNMAPARRAY, + PCD_ADDMAPARRAY, +/*210*/ PCD_SUBMAPARRAY, + PCD_MULMAPARRAY, + PCD_DIVMAPARRAY, + PCD_MODMAPARRAY, + PCD_INCMAPARRAY, + PCD_DECMAPARRAY, + PCD_DUP, + PCD_SWAP, + PCD_WRITETOINI, + PCD_GETFROMINI, +/*220*/ PCD_SIN, + PCD_COS, + PCD_VECTORANGLE, + PCD_CHECKWEAPON, + PCD_SETWEAPON, + PCD_TAGSTRING, + PCD_PUSHWORLDARRAY, + PCD_ASSIGNWORLDARRAY, + PCD_ADDWORLDARRAY, + PCD_SUBWORLDARRAY, +/*230*/ PCD_MULWORLDARRAY, + PCD_DIVWORLDARRAY, + PCD_MODWORLDARRAY, + PCD_INCWORLDARRAY, + PCD_DECWORLDARRAY, + PCD_PUSHGLOBALARRAY, + PCD_ASSIGNGLOBALARRAY, + PCD_ADDGLOBALARRAY, + PCD_SUBGLOBALARRAY, + PCD_MULGLOBALARRAY, +/*240*/ PCD_DIVGLOBALARRAY, + PCD_MODGLOBALARRAY, + PCD_INCGLOBALARRAY, + PCD_DECGLOBALARRAY, + PCD_SETMARINEWEAPON, + PCD_SETACTORPROPERTY, + PCD_GETACTORPROPERTY, + PCD_PLAYERNUMBER, + PCD_ACTIVATORTID, + PCD_SETMARINESPRITE, +/*250*/ PCD_GETSCREENWIDTH, + PCD_GETSCREENHEIGHT, + PCD_THING_PROJECTILE2, + PCD_STRLEN, + PCD_SETHUDSIZE, + PCD_GETCVAR, + PCD_CASEGOTOSORTED, + PCD_SETRESULTVALUE, + PCD_GETLINEROWOFFSET, + PCD_GETACTORFLOORZ, +/*260*/ PCD_GETACTORANGLE, + PCD_GETSECTORFLOORZ, + PCD_GETSECTORCEILINGZ, + PCD_LSPEC5RESULT, + PCD_GETSIGILPIECES, + PCD_GETLEVELINFO, + PCD_CHANGESKY, + PCD_PLAYERINGAME, + PCD_PLAYERISBOT, + PCD_SETCAMERATOTEXTURE, +/*270*/ PCD_ENDLOG, + PCD_GETAMMOCAPACITY, + PCD_SETAMMOCAPACITY, + PCD_PRINTMAPCHARARRAY, // [JB] start of new p-codes + PCD_PRINTWORLDCHARARRAY, + PCD_PRINTGLOBALCHARARRAY, // [JB] end of new p-codes + PCD_SETACTORANGLE, // [GRB] + PCD_GRABINPUT, // Unused but acc defines them + PCD_SETMOUSEPOINTER, // " + PCD_MOVEMOUSEPOINTER, // " +/*280*/ PCD_SPAWNPROJECTILE, + PCD_GETSECTORLIGHTLEVEL, + PCD_GETACTORCEILINGZ, + PCD_SETACTORPOSITION, + PCD_CLEARACTORINVENTORY, + PCD_GIVEACTORINVENTORY, + PCD_TAKEACTORINVENTORY, + PCD_CHECKACTORINVENTORY, + PCD_THINGCOUNTNAME, + PCD_SPAWNSPOTFACING, +/*290*/ PCD_PLAYERCLASS, // [GRB] + //[MW] start my p-codes + PCD_ANDSCRIPTVAR, + PCD_ANDMAPVAR, + PCD_ANDWORLDVAR, + PCD_ANDGLOBALVAR, + PCD_ANDMAPARRAY, + PCD_ANDWORLDARRAY, + PCD_ANDGLOBALARRAY, + PCD_EORSCRIPTVAR, + PCD_EORMAPVAR, +/*300*/ PCD_EORWORLDVAR, + PCD_EORGLOBALVAR, + PCD_EORMAPARRAY, + PCD_EORWORLDARRAY, + PCD_EORGLOBALARRAY, + PCD_ORSCRIPTVAR, + PCD_ORMAPVAR, + PCD_ORWORLDVAR, + PCD_ORGLOBALVAR, + PCD_ORMAPARRAY, +/*310*/ PCD_ORWORLDARRAY, + PCD_ORGLOBALARRAY, + PCD_LSSCRIPTVAR, + PCD_LSMAPVAR, + PCD_LSWORLDVAR, + PCD_LSGLOBALVAR, + PCD_LSMAPARRAY, + PCD_LSWORLDARRAY, + PCD_LSGLOBALARRAY, + PCD_RSSCRIPTVAR, +/*320*/ PCD_RSMAPVAR, + PCD_RSWORLDVAR, + PCD_RSGLOBALVAR, + PCD_RSMAPARRAY, + PCD_RSWORLDARRAY, + PCD_RSGLOBALARRAY, + //[MW] end my p-codes + PCD_GETPLAYERINFO, // [GRB] + PCD_CHANGELEVEL, + PCD_SECTORDAMAGE, + PCD_REPLACETEXTURES, +/*330*/ PCD_NEGATEBINARY, + PCD_GETACTORPITCH, + PCD_SETACTORPITCH, + PCD_PRINTBIND, + PCD_SETACTORSTATE, + PCD_THINGDAMAGE2, + PCD_USEINVENTORY, + PCD_USEACTORINVENTORY, + PCD_CHECKACTORCEILINGTEXTURE, + PCD_CHECKACTORFLOORTEXTURE, +/*340*/ PCD_GETACTORLIGHTLEVEL, + PCD_SETMUGSHOTSTATE, + PCD_THINGCOUNTSECTOR, + PCD_THINGCOUNTNAMESECTOR, + PCD_CHECKPLAYERCAMERA, // [TN] + PCD_MORPHACTOR, // [MH] + PCD_UNMORPHACTOR, // [MH] + PCD_GETPLAYERINPUT, + PCD_CLASSIFYACTOR, + PCD_PRINTBINARY, +/*350*/ PCD_PRINTHEX, + PCD_CALLFUNC, + PCD_SAVESTRING, // [FDARI] create string (temporary) + PCD_PRINTMAPCHRANGE, // [FDARI] output range (print part of array) + PCD_PRINTWORLDCHRANGE, + PCD_PRINTGLOBALCHRANGE, + PCD_STRCPYTOMAPCHRANGE, // [FDARI] input range (copy string to all/part of array) + PCD_STRCPYTOWORLDCHRANGE, + PCD_STRCPYTOGLOBALCHRANGE, + PCD_PUSHFUNCTION, // from Eternity +/*360*/ PCD_CALLSTACK, // from Eternity + PCD_SCRIPTWAITNAMED, + PCD_TRANSLATIONRANGE3, + PCD_GOTOSTACK, + PCD_ASSIGNSCRIPTARRAY, + PCD_PUSHSCRIPTARRAY, + PCD_ADDSCRIPTARRAY, + PCD_SUBSCRIPTARRAY, + PCD_MULSCRIPTARRAY, + PCD_DIVSCRIPTARRAY, +/*370*/ PCD_MODSCRIPTARRAY, + PCD_INCSCRIPTARRAY, + PCD_DECSCRIPTARRAY, + PCD_ANDSCRIPTARRAY, + PCD_EORSCRIPTARRAY, + PCD_ORSCRIPTARRAY, + PCD_LSSCRIPTARRAY, + PCD_RSSCRIPTARRAY, + PCD_PRINTSCRIPTCHARARRAY, + PCD_PRINTSCRIPTCHRANGE, +/*380*/ PCD_STRCPYTOSCRIPTCHRANGE, + PCD_LSPEC5EX, + PCD_LSPEC5EXRESULT, + PCD_TRANSLATIONRANGE4, + PCD_TRANSLATIONRANGE5, + +/*381*/ PCODE_COMMAND_COUNT + }; + + // Some constants used by ACS scripts + enum { + LINE_FRONT = 0, + LINE_BACK = 1 + }; + enum { + SIDE_FRONT = 0, + SIDE_BACK = 1 + }; + enum { + TEXTURE_TOP = 0, + TEXTURE_MIDDLE = 1, + TEXTURE_BOTTOM = 2 + }; + enum { + GAME_SINGLE_PLAYER = 0, + GAME_NET_COOPERATIVE = 1, + GAME_NET_DEATHMATCH = 2, + GAME_TITLE_MAP = 3 + }; + enum { + CLASS_FIGHTER = 0, + CLASS_CLERIC = 1, + CLASS_MAGE = 2 + }; + enum { + SKILL_VERY_EASY = 0, + SKILL_EASY = 1, + SKILL_NORMAL = 2, + SKILL_HARD = 3, + SKILL_VERY_HARD = 4 + }; + enum { + BLOCK_NOTHING = 0, + BLOCK_CREATURES = 1, + BLOCK_EVERYTHING = 2, + BLOCK_RAILING = 3, + BLOCK_PLAYERS = 4 + }; + enum { + LEVELINFO_PAR_TIME, + LEVELINFO_CLUSTERNUM, + LEVELINFO_LEVELNUM, + LEVELINFO_TOTAL_SECRETS, + LEVELINFO_FOUND_SECRETS, + LEVELINFO_TOTAL_ITEMS, + LEVELINFO_FOUND_ITEMS, + LEVELINFO_TOTAL_MONSTERS, + LEVELINFO_KILLED_MONSTERS, + LEVELINFO_SUCK_TIME + }; + enum { + PLAYERINFO_TEAM, + PLAYERINFO_AIMDIST, + PLAYERINFO_COLOR, + PLAYERINFO_GENDER, + PLAYERINFO_NEVERSWITCH, + PLAYERINFO_MOVEBOB, + PLAYERINFO_STILLBOB, + PLAYERINFO_PLAYERCLASS, + PLAYERINFO_FOV, + PLAYERINFO_DESIREDFOV, + }; + + + extern FILE *Logfile; FRandom pr_acs ("ACS"); diff --git a/src/p_acs.h b/src/p_acs.h index f675338b4..4943ef401 100644 --- a/src/p_acs.h +++ b/src/p_acs.h @@ -391,463 +391,6 @@ class DLevelScript : public DObject HAS_OBJECT_POINTERS public: - // P-codes for ACS scripts - enum - { -/* 0*/ PCD_NOP, - PCD_TERMINATE, - PCD_SUSPEND, - PCD_PUSHNUMBER, - PCD_LSPEC1, - PCD_LSPEC2, - PCD_LSPEC3, - PCD_LSPEC4, - PCD_LSPEC5, - PCD_LSPEC1DIRECT, -/* 10*/ PCD_LSPEC2DIRECT, - PCD_LSPEC3DIRECT, - PCD_LSPEC4DIRECT, - PCD_LSPEC5DIRECT, - PCD_ADD, - PCD_SUBTRACT, - PCD_MULTIPLY, - PCD_DIVIDE, - PCD_MODULUS, - PCD_EQ, -/* 20*/ PCD_NE, - PCD_LT, - PCD_GT, - PCD_LE, - PCD_GE, - PCD_ASSIGNSCRIPTVAR, - PCD_ASSIGNMAPVAR, - PCD_ASSIGNWORLDVAR, - PCD_PUSHSCRIPTVAR, - PCD_PUSHMAPVAR, -/* 30*/ PCD_PUSHWORLDVAR, - PCD_ADDSCRIPTVAR, - PCD_ADDMAPVAR, - PCD_ADDWORLDVAR, - PCD_SUBSCRIPTVAR, - PCD_SUBMAPVAR, - PCD_SUBWORLDVAR, - PCD_MULSCRIPTVAR, - PCD_MULMAPVAR, - PCD_MULWORLDVAR, -/* 40*/ PCD_DIVSCRIPTVAR, - PCD_DIVMAPVAR, - PCD_DIVWORLDVAR, - PCD_MODSCRIPTVAR, - PCD_MODMAPVAR, - PCD_MODWORLDVAR, - PCD_INCSCRIPTVAR, - PCD_INCMAPVAR, - PCD_INCWORLDVAR, - PCD_DECSCRIPTVAR, -/* 50*/ PCD_DECMAPVAR, - PCD_DECWORLDVAR, - PCD_GOTO, - PCD_IFGOTO, - PCD_DROP, - PCD_DELAY, - PCD_DELAYDIRECT, - PCD_RANDOM, - PCD_RANDOMDIRECT, - PCD_THINGCOUNT, -/* 60*/ PCD_THINGCOUNTDIRECT, - PCD_TAGWAIT, - PCD_TAGWAITDIRECT, - PCD_POLYWAIT, - PCD_POLYWAITDIRECT, - PCD_CHANGEFLOOR, - PCD_CHANGEFLOORDIRECT, - PCD_CHANGECEILING, - PCD_CHANGECEILINGDIRECT, - PCD_RESTART, -/* 70*/ PCD_ANDLOGICAL, - PCD_ORLOGICAL, - PCD_ANDBITWISE, - PCD_ORBITWISE, - PCD_EORBITWISE, - PCD_NEGATELOGICAL, - PCD_LSHIFT, - PCD_RSHIFT, - PCD_UNARYMINUS, - PCD_IFNOTGOTO, -/* 80*/ PCD_LINESIDE, - PCD_SCRIPTWAIT, - PCD_SCRIPTWAITDIRECT, - PCD_CLEARLINESPECIAL, - PCD_CASEGOTO, - PCD_BEGINPRINT, - PCD_ENDPRINT, - PCD_PRINTSTRING, - PCD_PRINTNUMBER, - PCD_PRINTCHARACTER, -/* 90*/ PCD_PLAYERCOUNT, - PCD_GAMETYPE, - PCD_GAMESKILL, - PCD_TIMER, - PCD_SECTORSOUND, - PCD_AMBIENTSOUND, - PCD_SOUNDSEQUENCE, - PCD_SETLINETEXTURE, - PCD_SETLINEBLOCKING, - PCD_SETLINESPECIAL, -/*100*/ PCD_THINGSOUND, - PCD_ENDPRINTBOLD, // [RH] End of Hexen p-codes - PCD_ACTIVATORSOUND, - PCD_LOCALAMBIENTSOUND, - PCD_SETLINEMONSTERBLOCKING, - PCD_PLAYERBLUESKULL, // [BC] Start of new [Skull Tag] pcodes - PCD_PLAYERREDSKULL, - PCD_PLAYERYELLOWSKULL, - PCD_PLAYERMASTERSKULL, - PCD_PLAYERBLUECARD, -/*110*/ PCD_PLAYERREDCARD, - PCD_PLAYERYELLOWCARD, - PCD_PLAYERMASTERCARD, - PCD_PLAYERBLACKSKULL, - PCD_PLAYERSILVERSKULL, - PCD_PLAYERGOLDSKULL, - PCD_PLAYERBLACKCARD, - PCD_PLAYERSILVERCARD, - PCD_ISNETWORKGAME, - PCD_PLAYERTEAM, -/*120*/ PCD_PLAYERHEALTH, - PCD_PLAYERARMORPOINTS, - PCD_PLAYERFRAGS, - PCD_PLAYEREXPERT, - PCD_BLUETEAMCOUNT, - PCD_REDTEAMCOUNT, - PCD_BLUETEAMSCORE, - PCD_REDTEAMSCORE, - PCD_ISONEFLAGCTF, - PCD_LSPEC6, // These are never used. They should probably -/*130*/ PCD_LSPEC6DIRECT, // be given names like PCD_DUMMY. - PCD_PRINTNAME, - PCD_MUSICCHANGE, - PCD_CONSOLECOMMANDDIRECT, - PCD_CONSOLECOMMAND, - PCD_SINGLEPLAYER, // [RH] End of Skull Tag p-codes - PCD_FIXEDMUL, - PCD_FIXEDDIV, - PCD_SETGRAVITY, - PCD_SETGRAVITYDIRECT, -/*140*/ PCD_SETAIRCONTROL, - PCD_SETAIRCONTROLDIRECT, - PCD_CLEARINVENTORY, - PCD_GIVEINVENTORY, - PCD_GIVEINVENTORYDIRECT, - PCD_TAKEINVENTORY, - PCD_TAKEINVENTORYDIRECT, - PCD_CHECKINVENTORY, - PCD_CHECKINVENTORYDIRECT, - PCD_SPAWN, -/*150*/ PCD_SPAWNDIRECT, - PCD_SPAWNSPOT, - PCD_SPAWNSPOTDIRECT, - PCD_SETMUSIC, - PCD_SETMUSICDIRECT, - PCD_LOCALSETMUSIC, - PCD_LOCALSETMUSICDIRECT, - PCD_PRINTFIXED, - PCD_PRINTLOCALIZED, - PCD_MOREHUDMESSAGE, -/*160*/ PCD_OPTHUDMESSAGE, - PCD_ENDHUDMESSAGE, - PCD_ENDHUDMESSAGEBOLD, - PCD_SETSTYLE, - PCD_SETSTYLEDIRECT, - PCD_SETFONT, - PCD_SETFONTDIRECT, - PCD_PUSHBYTE, - PCD_LSPEC1DIRECTB, - PCD_LSPEC2DIRECTB, -/*170*/ PCD_LSPEC3DIRECTB, - PCD_LSPEC4DIRECTB, - PCD_LSPEC5DIRECTB, - PCD_DELAYDIRECTB, - PCD_RANDOMDIRECTB, - PCD_PUSHBYTES, - PCD_PUSH2BYTES, - PCD_PUSH3BYTES, - PCD_PUSH4BYTES, - PCD_PUSH5BYTES, -/*180*/ PCD_SETTHINGSPECIAL, - PCD_ASSIGNGLOBALVAR, - PCD_PUSHGLOBALVAR, - PCD_ADDGLOBALVAR, - PCD_SUBGLOBALVAR, - PCD_MULGLOBALVAR, - PCD_DIVGLOBALVAR, - PCD_MODGLOBALVAR, - PCD_INCGLOBALVAR, - PCD_DECGLOBALVAR, -/*190*/ PCD_FADETO, - PCD_FADERANGE, - PCD_CANCELFADE, - PCD_PLAYMOVIE, - PCD_SETFLOORTRIGGER, - PCD_SETCEILINGTRIGGER, - PCD_GETACTORX, - PCD_GETACTORY, - PCD_GETACTORZ, - PCD_STARTTRANSLATION, -/*200*/ PCD_TRANSLATIONRANGE1, - PCD_TRANSLATIONRANGE2, - PCD_ENDTRANSLATION, - PCD_CALL, - PCD_CALLDISCARD, - PCD_RETURNVOID, - PCD_RETURNVAL, - PCD_PUSHMAPARRAY, - PCD_ASSIGNMAPARRAY, - PCD_ADDMAPARRAY, -/*210*/ PCD_SUBMAPARRAY, - PCD_MULMAPARRAY, - PCD_DIVMAPARRAY, - PCD_MODMAPARRAY, - PCD_INCMAPARRAY, - PCD_DECMAPARRAY, - PCD_DUP, - PCD_SWAP, - PCD_WRITETOINI, - PCD_GETFROMINI, -/*220*/ PCD_SIN, - PCD_COS, - PCD_VECTORANGLE, - PCD_CHECKWEAPON, - PCD_SETWEAPON, - PCD_TAGSTRING, - PCD_PUSHWORLDARRAY, - PCD_ASSIGNWORLDARRAY, - PCD_ADDWORLDARRAY, - PCD_SUBWORLDARRAY, -/*230*/ PCD_MULWORLDARRAY, - PCD_DIVWORLDARRAY, - PCD_MODWORLDARRAY, - PCD_INCWORLDARRAY, - PCD_DECWORLDARRAY, - PCD_PUSHGLOBALARRAY, - PCD_ASSIGNGLOBALARRAY, - PCD_ADDGLOBALARRAY, - PCD_SUBGLOBALARRAY, - PCD_MULGLOBALARRAY, -/*240*/ PCD_DIVGLOBALARRAY, - PCD_MODGLOBALARRAY, - PCD_INCGLOBALARRAY, - PCD_DECGLOBALARRAY, - PCD_SETMARINEWEAPON, - PCD_SETACTORPROPERTY, - PCD_GETACTORPROPERTY, - PCD_PLAYERNUMBER, - PCD_ACTIVATORTID, - PCD_SETMARINESPRITE, -/*250*/ PCD_GETSCREENWIDTH, - PCD_GETSCREENHEIGHT, - PCD_THING_PROJECTILE2, - PCD_STRLEN, - PCD_SETHUDSIZE, - PCD_GETCVAR, - PCD_CASEGOTOSORTED, - PCD_SETRESULTVALUE, - PCD_GETLINEROWOFFSET, - PCD_GETACTORFLOORZ, -/*260*/ PCD_GETACTORANGLE, - PCD_GETSECTORFLOORZ, - PCD_GETSECTORCEILINGZ, - PCD_LSPEC5RESULT, - PCD_GETSIGILPIECES, - PCD_GETLEVELINFO, - PCD_CHANGESKY, - PCD_PLAYERINGAME, - PCD_PLAYERISBOT, - PCD_SETCAMERATOTEXTURE, -/*270*/ PCD_ENDLOG, - PCD_GETAMMOCAPACITY, - PCD_SETAMMOCAPACITY, - PCD_PRINTMAPCHARARRAY, // [JB] start of new p-codes - PCD_PRINTWORLDCHARARRAY, - PCD_PRINTGLOBALCHARARRAY, // [JB] end of new p-codes - PCD_SETACTORANGLE, // [GRB] - PCD_GRABINPUT, // Unused but acc defines them - PCD_SETMOUSEPOINTER, // " - PCD_MOVEMOUSEPOINTER, // " -/*280*/ PCD_SPAWNPROJECTILE, - PCD_GETSECTORLIGHTLEVEL, - PCD_GETACTORCEILINGZ, - PCD_SETACTORPOSITION, - PCD_CLEARACTORINVENTORY, - PCD_GIVEACTORINVENTORY, - PCD_TAKEACTORINVENTORY, - PCD_CHECKACTORINVENTORY, - PCD_THINGCOUNTNAME, - PCD_SPAWNSPOTFACING, -/*290*/ PCD_PLAYERCLASS, // [GRB] - //[MW] start my p-codes - PCD_ANDSCRIPTVAR, - PCD_ANDMAPVAR, - PCD_ANDWORLDVAR, - PCD_ANDGLOBALVAR, - PCD_ANDMAPARRAY, - PCD_ANDWORLDARRAY, - PCD_ANDGLOBALARRAY, - PCD_EORSCRIPTVAR, - PCD_EORMAPVAR, -/*300*/ PCD_EORWORLDVAR, - PCD_EORGLOBALVAR, - PCD_EORMAPARRAY, - PCD_EORWORLDARRAY, - PCD_EORGLOBALARRAY, - PCD_ORSCRIPTVAR, - PCD_ORMAPVAR, - PCD_ORWORLDVAR, - PCD_ORGLOBALVAR, - PCD_ORMAPARRAY, -/*310*/ PCD_ORWORLDARRAY, - PCD_ORGLOBALARRAY, - PCD_LSSCRIPTVAR, - PCD_LSMAPVAR, - PCD_LSWORLDVAR, - PCD_LSGLOBALVAR, - PCD_LSMAPARRAY, - PCD_LSWORLDARRAY, - PCD_LSGLOBALARRAY, - PCD_RSSCRIPTVAR, -/*320*/ PCD_RSMAPVAR, - PCD_RSWORLDVAR, - PCD_RSGLOBALVAR, - PCD_RSMAPARRAY, - PCD_RSWORLDARRAY, - PCD_RSGLOBALARRAY, - //[MW] end my p-codes - PCD_GETPLAYERINFO, // [GRB] - PCD_CHANGELEVEL, - PCD_SECTORDAMAGE, - PCD_REPLACETEXTURES, -/*330*/ PCD_NEGATEBINARY, - PCD_GETACTORPITCH, - PCD_SETACTORPITCH, - PCD_PRINTBIND, - PCD_SETACTORSTATE, - PCD_THINGDAMAGE2, - PCD_USEINVENTORY, - PCD_USEACTORINVENTORY, - PCD_CHECKACTORCEILINGTEXTURE, - PCD_CHECKACTORFLOORTEXTURE, -/*340*/ PCD_GETACTORLIGHTLEVEL, - PCD_SETMUGSHOTSTATE, - PCD_THINGCOUNTSECTOR, - PCD_THINGCOUNTNAMESECTOR, - PCD_CHECKPLAYERCAMERA, // [TN] - PCD_MORPHACTOR, // [MH] - PCD_UNMORPHACTOR, // [MH] - PCD_GETPLAYERINPUT, - PCD_CLASSIFYACTOR, - PCD_PRINTBINARY, -/*350*/ PCD_PRINTHEX, - PCD_CALLFUNC, - PCD_SAVESTRING, // [FDARI] create string (temporary) - PCD_PRINTMAPCHRANGE, // [FDARI] output range (print part of array) - PCD_PRINTWORLDCHRANGE, - PCD_PRINTGLOBALCHRANGE, - PCD_STRCPYTOMAPCHRANGE, // [FDARI] input range (copy string to all/part of array) - PCD_STRCPYTOWORLDCHRANGE, - PCD_STRCPYTOGLOBALCHRANGE, - PCD_PUSHFUNCTION, // from Eternity -/*360*/ PCD_CALLSTACK, // from Eternity - PCD_SCRIPTWAITNAMED, - PCD_TRANSLATIONRANGE3, - PCD_GOTOSTACK, - PCD_ASSIGNSCRIPTARRAY, - PCD_PUSHSCRIPTARRAY, - PCD_ADDSCRIPTARRAY, - PCD_SUBSCRIPTARRAY, - PCD_MULSCRIPTARRAY, - PCD_DIVSCRIPTARRAY, -/*370*/ PCD_MODSCRIPTARRAY, - PCD_INCSCRIPTARRAY, - PCD_DECSCRIPTARRAY, - PCD_ANDSCRIPTARRAY, - PCD_EORSCRIPTARRAY, - PCD_ORSCRIPTARRAY, - PCD_LSSCRIPTARRAY, - PCD_RSSCRIPTARRAY, - PCD_PRINTSCRIPTCHARARRAY, - PCD_PRINTSCRIPTCHRANGE, -/*380*/ PCD_STRCPYTOSCRIPTCHRANGE, - PCD_LSPEC5EX, - PCD_LSPEC5EXRESULT, - PCD_TRANSLATIONRANGE4, - PCD_TRANSLATIONRANGE5, - -/*381*/ PCODE_COMMAND_COUNT - }; - - // Some constants used by ACS scripts - enum { - LINE_FRONT = 0, - LINE_BACK = 1 - }; - enum { - SIDE_FRONT = 0, - SIDE_BACK = 1 - }; - enum { - TEXTURE_TOP = 0, - TEXTURE_MIDDLE = 1, - TEXTURE_BOTTOM = 2 - }; - enum { - GAME_SINGLE_PLAYER = 0, - GAME_NET_COOPERATIVE = 1, - GAME_NET_DEATHMATCH = 2, - GAME_TITLE_MAP = 3 - }; - enum { - CLASS_FIGHTER = 0, - CLASS_CLERIC = 1, - CLASS_MAGE = 2 - }; - enum { - SKILL_VERY_EASY = 0, - SKILL_EASY = 1, - SKILL_NORMAL = 2, - SKILL_HARD = 3, - SKILL_VERY_HARD = 4 - }; - enum { - BLOCK_NOTHING = 0, - BLOCK_CREATURES = 1, - BLOCK_EVERYTHING = 2, - BLOCK_RAILING = 3, - BLOCK_PLAYERS = 4 - }; - enum { - LEVELINFO_PAR_TIME, - LEVELINFO_CLUSTERNUM, - LEVELINFO_LEVELNUM, - LEVELINFO_TOTAL_SECRETS, - LEVELINFO_FOUND_SECRETS, - LEVELINFO_TOTAL_ITEMS, - LEVELINFO_FOUND_ITEMS, - LEVELINFO_TOTAL_MONSTERS, - LEVELINFO_KILLED_MONSTERS, - LEVELINFO_SUCK_TIME - }; - enum { - PLAYERINFO_TEAM, - PLAYERINFO_AIMDIST, - PLAYERINFO_COLOR, - PLAYERINFO_GENDER, - PLAYERINFO_NEVERSWITCH, - PLAYERINFO_MOVEBOB, - PLAYERINFO_STILLBOB, - PLAYERINFO_PLAYERCLASS, - PLAYERINFO_FOV, - PLAYERINFO_DESIREDFOV, - }; enum EScriptState { diff --git a/src/r_defs.h b/src/r_defs.h index 300ef3b8c..ff7d3a860 100644 --- a/src/r_defs.h +++ b/src/r_defs.h @@ -83,13 +83,6 @@ struct vertexdata_t uint32_t flags; }; -#ifdef USE_FLOAT -typedef float vtype; -#elif !defined USE_FIXED -typedef double vtype; -#endif - - struct vertex_t { DVector2 p;