Build 5474
SVN-
When RETURN is set to INT32_MIN in EVENT_CHANGEMENU, cancel any animations in addition to not changing the current menu.
SVN handles and Git names are merged into one person.
When RETURN is set to INT32_MIN in EVENT_CHANGEMENU, cancel any animations in addition to not changing the current menu.
Correct handling of size-zero gamearrays: Prevent a crash upon loading a savegame containing them, and allow resizearray to zero.
Fix a harmless "Internal compiler error" warning when using quick structure access on userdef.
Add "defstate" token which functions identically as in M32script: synonymous with CON's "state" only at top-level (when defining a state). Useful for syntax highlighting.
Add EVENT_PREDRAW2DSCREEN.
Add SFLAG_HURTSPAWNBLOOD, which allows actors (particularly useractor enemies) to spawn blood when hurt as hardcoded enemies do.
Add userdef members "globalflags" and "globalgameflags", which control the values specified by the def commands of the same name.
Expose all structs to inline access. Tiledata and paldata are still to-do.
DONT_BUILD.
Add player[].index, which returns the player ID that you put in. Mostly useful to get the magic value of THISACTOR when applied to the player struct.
DONT_BUILD.
Correct the month used in automatic names of savegames created by the "save" CON command.
Add events for the remaining player-related HUD display functions:
EVENT_DISPLAYSPIT - loogies from the SPIT projectile EVENT_DISPLAYFIST - nukebutton fist (shrunk fists are part of EVENT_DISPLAYWEAPON) EVENT_DISPLAYKNEE - pstomp knee (quick kick is part of EVENT_DISPLAYWEAPON) EVENT_DISPLAYKNUCKLES - knuckle crack idle animation EVENT_DISPLAYSCUBA - scuba gear EVENT_DISPLAYTIP - tip hand EVENT_DISPLAYACCESS - access cards / keycards
Replace the use of an "snum" parameter in the screen display functions with screenpeek because we need to keep screenpeek accurate for CON anyway.
Add two new structs, tiledata and paldata, accessible only through quick-access.
Add checks to prevent invalid reads/writes when using get/setprojectile on a tile number that does not have a projectile defined for it.
Add projectile workslike flag PROJECTILE_NOSETOWNERSHADE = 0x00200000 = 2097152 that prevents actors from inheriting a projectile's shade when shooting it.
Really fix get/setprojectile.
weapons.con.sample: Update to use the hudpal member so that fogpals and custom makepalookup definitions display properly.
Fix a mistake in r5086 that broke get/setprojectile.
Add read-only player structure member "hudpal", that returns the result of P_GetHudPal().
Add EVENT_WORLD, EVENT_PREWORLD, and EVENT_PRELEVEL, which respectively function as EVENT_GAME, EVENT_PREGAME, and EVENT_LOADACTOR, but only running once instead of per-actor.
Redefine "break" within events to mean "skip the remainder of this event block", not "skip the remainder of execution of this event, through all chained blocks". The latter behavior is still available through the "return" keyword.
Add token "appendevent", which functions identically to "onevent" except that the event's code is chained to the end of any previous events, instead of the beginning.
Fix processing the bytecode in an incorrect order when executing setplayer on a member with a second parameter, a missed instance of a consideration from r5086.
Remove the restriction that prevents userdef access when the current player is not myconnectindex.
Implement tilesizx/y gamearrays in a fashion similar to M32Script's solution: a STRIDE2 flag.
Modify the parsing of definevolumename and defineskillname so that they only look for the text before a newline.
// valid definevolumename 3 <text> // invalid definevolumename 3 <text>
Add quick access for the remaining structures without it.
Enumify quick structure access.
Factor fast struct access and get<struct> out into single functions.
Add PLAYER_PALETTE to quick player struct access, and add a setter that calls P_SetGamePalette().
Replace the drawing code for the level stats with nearly equivalent code that can be much more easily reproduced in CON.
Add EVENT_DISPLAYROOMSCAMERA and EVENT_DISPLAYSTART.
EVENT_DISPLAYROOMSCAMERA functions exactly like EVENT_DISPLAYROOMS, including RETURN values, but for the ud.camerasprite >= 0 case. EVENT_DISPLAYSTART is executed immediately after the screen background is cleared and drawn. Ensure its RETURN value is zero, because it is currently not being used. WARNING: Consult the devs before using EVENT_DISPLAYSTART. Its position in the display code sequence is not finalized.
Add EVENT_DISPLAYCAMERAOSD. Set RETURN to -1 to disable it.
From this event, if "getactor[THISACTOR].htg_t 0" is zero, then the camera is functional. Nonzero values indicate the camera has been destroyed, which is only possible when the CAMERASDESTRUCTABLE parameter of gamestartup has been enabled.
Add EVENT_DISPLAYLEVELSTATS. Set RETURN to -1 to disable them.
Add read-only userdef members "gametypeflags" and "m_gametypeflags", which return GametypeFlags[ud.coop] and GametypeFlags[ud.m_coop] respectively.
Add read-only userdef members "usevoxels", "usehightile", and "usemodels".
Add "resetplayerflags". Flag 1 means "don't ask the user if they want to load".
Add "definevolumeflags", currently equipped to hide an episode from the single player and/or multiplayer screens.
enum { EF_HIDEFROMSP = 1<<0, EF_HIDEFROMMP = 1<<1, };
Extend undefinevolume so that it also undefines all levels in the specified volume.
Rename "cutscene" command to "startcutscene".
Replace erroneous use of EVENT_DISPLAYCROSSHAIR with new event EVENT_DISPLAYCURSOR.
Provide a RETURN value of -2 to EVENT_DISPLAYLOADINGSCREEN after G_CacheMapData().
Add undefinevolume, undefineskill, and undefinelevel.