Commit Graph

628 Commits

Author SHA1 Message Date
hendricks266 dc10cd210b Lunatic: Fix build, part 12. playerswhenstarted --> g_mostConcurrentPlayers
git-svn-id: https://svn.eduke32.com/eduke32@5995 1a8010ca-5511-0410-912e-c29ae57300e0
2017-01-05 05:29:47 +00:00
hendricks266 21ac609dd9 Lunatic: Fix build, part 11. g_spriteDeleteQueueSize --> g_deleteQueueSize
git-svn-id: https://svn.eduke32.com/eduke32@5994 1a8010ca-5511-0410-912e-c29ae57300e0
2017-01-05 05:29:44 +00:00
hendricks266 d267ae71de Lunatic: Fix build, part 10. g_currentFrameRate --> g_frameRate
git-svn-id: https://svn.eduke32.com/eduke32@5993 1a8010ca-5511-0410-912e-c29ae57300e0
2017-01-05 05:29:40 +00:00
hendricks266 ca3449bd52 Lunatic: Fix build, part 9. ScriptQuotes --> apStrings
git-svn-id: https://svn.eduke32.com/eduke32@5992 1a8010ca-5511-0410-912e-c29ae57300e0
2017-01-05 05:29:37 +00:00
hendricks266 e036de108d Lunatic: Fix build, part 8. MapInfo --> g_mapInfo
git-svn-id: https://svn.eduke32.com/eduke32@5991 1a8010ca-5511-0410-912e-c29ae57300e0
2017-01-05 05:29:33 +00:00
hendricks266 9f41addab0 Lunatic: Fix build, part 7. M_ChangeMenu --> Menu_Change
git-svn-id: https://svn.eduke32.com/eduke32@5990 1a8010ca-5511-0410-912e-c29ae57300e0
2017-01-05 05:29:29 +00:00
hendricks266 aa89d88569 Add S_StopAllSounds function, guaranteed to be present at link time, whether stubbed (for KenBuild's editor) or calling audiolib's FX_StopAllSounds (for Lunatic).
Also, m32exec should not directly touch audiolib. Only sounds_mapster32.c should interacti with it. KenBuild and its editor do not link to audiolib.

git-svn-id: https://svn.eduke32.com/eduke32@5989 1a8010ca-5511-0410-912e-c29ae57300e0
2017-01-05 05:29:25 +00:00
hendricks266 22f73a9ab5 Lunatic: Fix build, part 5. EpisodeNames --> g_volumeNames
git-svn-id: https://svn.eduke32.com/eduke32@5988 1a8010ca-5511-0410-912e-c29ae57300e0
2017-01-05 05:29:20 +00:00
hendricks266 dcc542c6fc Lunatic: Fix build, part 4. BlimpSpawnSprites --> g_blimpSpawnItems
git-svn-id: https://svn.eduke32.com/eduke32@5987 1a8010ca-5511-0410-912e-c29ae57300e0
2017-01-05 05:29:17 +00:00
hendricks266 7c76b0fc42 Lunatic, KenBuild, SW: window([xy])([12]) --> windowxy$2.$1
git-svn-id: https://svn.eduke32.com/eduke32@5984 1a8010ca-5511-0410-912e-c29ae57300e0
2017-01-05 05:29:06 +00:00
hendricks266 0a14982d4e Some recent cleanup changed uses of int32_t to int, but missed changing every function prototype. This is very bad when int != int32_t.
git-svn-id: https://svn.eduke32.com/eduke32@5979 1a8010ca-5511-0410-912e-c29ae57300e0
2017-01-01 13:23:29 +00:00
hendricks266 9627f24d54 CON: Remove bounds check on rotatesprite coordinates.
git-svn-id: https://svn.eduke32.com/eduke32@5973 1a8010ca-5511-0410-912e-c29ae57300e0
2016-12-26 06:02:56 +00:00
hendricks266 d8ce0f042d CON: Add an optional sixth parameter, a flags bitfield, to action definitions. Bump BYTEVERSION.
git-svn-id: https://svn.eduke32.com/eduke32@5849 1a8010ca-5511-0410-912e-c29ae57300e0
2016-09-06 02:15:28 +00:00
hendricks266 abd1523477 Enumify stuff having to do with action parameters.
git-svn-id: https://svn.eduke32.com/eduke32@5848 1a8010ca-5511-0410-912e-c29ae57300e0
2016-09-06 02:15:23 +00:00
terminx 638312e7f9 More cleanup. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@5833 1a8010ca-5511-0410-912e-c29ae57300e0
2016-08-27 01:41:46 +00:00
terminx aae66ccb11 Further cleanup. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@5828 1a8010ca-5511-0410-912e-c29ae57300e0
2016-08-27 01:41:04 +00:00
terminx 52f678a743 Massive readability cleanup of game code part 1. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@5825 1a8010ca-5511-0410-912e-c29ae57300e0
2016-08-27 01:40:35 +00:00
helixhorned edd7a82be8 Lunatic: fix map-text loading.
The file descriptor was closed from Lua code, causing the
subsequent kfilelength() to fail and attempt an allocation
of (size_t)-1 bytes.

git-svn-id: https://svn.eduke32.com/eduke32@5809 1a8010ca-5511-0410-912e-c29ae57300e0
2016-07-04 14:09:07 +00:00
terminx 5800cd588c tsectortype -> usectortype
twalltype -> uwalltype
tspritetype -> uspritetype

No other changes.

git-svn-id: https://svn.eduke32.com/eduke32@5796 1a8010ca-5511-0410-912e-c29ae57300e0
2016-06-21 00:33:58 +00:00
hendricks266 5ae7bd99f2 Lunatic: Fix build. BUILD_LUNATIC.
git-svn-id: https://svn.eduke32.com/eduke32@5755 1a8010ca-5511-0410-912e-c29ae57300e0
2016-05-23 04:47:22 +00:00
terminx ba54de3ab3 Further cleanup of A_InsertSprite().
git-svn-id: https://svn.eduke32.com/eduke32@5567 1a8010ca-5511-0410-912e-c29ae57300e0
2016-01-15 07:58:52 +00:00
hendricks266 043656688f Add test cases for previous commit: transhacktest.map and .m32
git-svn-id: https://svn.eduke32.com/eduke32@5466 1a8010ca-5511-0410-912e-c29ae57300e0
2015-12-04 11:53:02 +00:00
hendricks266 f69f1e73df CON: 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.
git-svn-id: https://svn.eduke32.com/eduke32@5353 1a8010ca-5511-0410-912e-c29ae57300e0
2015-09-24 06:31:44 +00:00
hendricks266 a557eedf7e Remove NULL checks before calling free(): they are unnecessary as per the C standard. Other cleanup includes factoring code into DO_FREE_AND_NULL() macros.
git-svn-id: https://svn.eduke32.com/eduke32@5352 1a8010ca-5511-0410-912e-c29ae57300e0
2015-09-23 17:55:31 +00:00
hendricks266 064461a06f Internally, work with 24-bit palettes instead of 18-bit.
git-svn-id: https://svn.eduke32.com/eduke32@5349 1a8010ca-5511-0410-912e-c29ae57300e0
2015-09-23 17:55:11 +00:00
hendricks266 c0e7dba4c1 Restructure the basepaltable subsystem to support up to 256 palettes and use dynamic allocation like palookup and blendtable.
git-svn-id: https://svn.eduke32.com/eduke32@5348 1a8010ca-5511-0410-912e-c29ae57300e0
2015-09-23 17:55:02 +00:00
helixhorned c1a54c60db CON: allow viewtype -8 for 'action', meaning to x-flip the shown sprite.
Similarly to how -5 and -7 and are accepted since r3859.

git-svn-id: https://svn.eduke32.com/eduke32@5335 1a8010ca-5511-0410-912e-c29ae57300e0
2015-08-29 10:21:52 +00:00
helixhorned ae56faf0ad Lunatic: in test/helixspawner.lua, make COLOR a global variable. DONT_BUILD.
To demonstrate and test that it can be modified from outside, and that
these changes are kept with savegame restores.

git-svn-id: https://svn.eduke32.com/eduke32@5322 1a8010ca-5511-0410-912e-c29ae57300e0
2015-08-09 09:58:41 +00:00
helixhorned 212343b390 Game: make BOUNCEMINE spawn FRAMEEFFECT only if moving horizontally.
Also add "zshoot -4096 BOUNCEMINE" to lunatic/test/weaponvars.con
to demonstrate that bouncemines can be shot.

git-svn-id: https://svn.eduke32.com/eduke32@5319 1a8010ca-5511-0410-912e-c29ae57300e0
2015-08-08 07:04:11 +00:00
hendricks266 25543b521b Add SFLAG_HURTSPAWNBLOOD, which allows actors (particularly useractor enemies) to spawn blood when hurt as hardcoded enemies do.
git-svn-id: https://svn.eduke32.com/eduke32@5250 1a8010ca-5511-0410-912e-c29ae57300e0
2015-05-27 08:45:59 +00:00
helixhorned fe4db15536 C-CON: fix 'resizearray' after r4735: copy over old values, zero-init new ones.
Make lunatic/test/gamearray.con run in C-CON, too.

git-svn-id: https://svn.eduke32.com/eduke32@5238 1a8010ca-5511-0410-912e-c29ae57300e0
2015-05-25 18:58:31 +00:00
helixhorned d27824ae3c LunaCON: fix negative alpha for 'rotatespritea'. BUILD_LUNATIC.
Conceptually, this amends r4428.

git-svn-id: https://svn.eduke32.com/eduke32@5237 1a8010ca-5511-0410-912e-c29ae57300e0
2015-05-25 12:57:52 +00:00
helixhorned 29dca07f0b CON: check EVENT_ENTERLEVEL for nonzero RETURN, run w/ other players then.
Background: AMC TC initializes per-player variables from this event.

git-svn-id: https://svn.eduke32.com/eduke32@5235 1a8010ca-5511-0410-912e-c29ae57300e0
2015-05-25 12:57:50 +00:00
helixhorned 9814e6a091 LunaCON: suffix gamearray file names with '.gar'.
git-svn-id: https://svn.eduke32.com/eduke32@5233 1a8010ca-5511-0410-912e-c29ae57300e0
2015-05-25 12:57:48 +00:00
helixhorned 40f177cafd LunaCON: expose g_tile[] members of 'tiledata'.
git-svn-id: https://svn.eduke32.com/eduke32@5232 1a8010ca-5511-0410-912e-c29ae57300e0
2015-05-25 12:57:47 +00:00
helixhorned fd94930f14 LunaCON: implement 'clearmapstate', fix 'resetplayerflags' parsing.
git-svn-id: https://svn.eduke32.com/eduke32@5231 1a8010ca-5511-0410-912e-c29ae57300e0
2015-05-25 12:57:44 +00:00
helixhorned ef25eb6329 LunaCON: implement NODEFAULT per-actor gamevars in the C-CON fashion.
For glocal gamevars, the LunaCON semantics (session gamevar) are kept.
For per-actor ones, this now prevents resetting a gamevar's value to
default on spawn or loadactor. BUILD_LUNATIC.

git-svn-id: https://svn.eduke32.com/eduke32@5194 1a8010ca-5511-0410-912e-c29ae57300e0
2015-05-16 14:27:03 +00:00
helixhorned dd2f06b869 LunaCON: allow writing -1 to player[].newowner.
For the other player members, where formerly negative values were allowed
to be written, only -1 is now.

git-svn-id: https://svn.eduke32.com/eduke32@5192 1a8010ca-5511-0410-912e-c29ae57300e0
2015-05-16 11:56:50 +00:00
helixhorned 04cb60c790 Lunatic: account for the projectile changes in r5080. BUILD_LUNATIC.
The (undocumented) Lua-side API stays almost the same.

git-svn-id: https://svn.eduke32.com/eduke32@5188 1a8010ca-5511-0410-912e-c29ae57300e0
2015-05-14 12:18:47 +00:00
helixhorned d30bb3835e LunaCON: allow ':' immediately after 'case' (legacy; warns), writing to ud.god.
Also, on one "gamevar `xxx' is not per-*" diagnostic, print the location of the
gamevar definition.

git-svn-id: https://svn.eduke32.com/eduke32@5187 1a8010ca-5511-0410-912e-c29ae57300e0
2015-05-14 12:18:46 +00:00
helixhorned 564e7d2332 Lunatic: fix build and user_defs definition mismatch.
Left: projectile changes.

git-svn-id: https://svn.eduke32.com/eduke32@5186 1a8010ca-5511-0410-912e-c29ae57300e0
2015-05-14 12:18:42 +00:00
hendricks266 d11bf55a82 LunaCON: Expose all structs to inline access. Tiledata and paldata are still to-do.
DONT_BUILD.

git-svn-id: https://svn.eduke32.com/eduke32@5166 1a8010ca-5511-0410-912e-c29ae57300e0
2015-04-26 00:08:14 +00:00
hendricks266 5979378c4e CON: 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.

git-svn-id: https://svn.eduke32.com/eduke32@5165 1a8010ca-5511-0410-912e-c29ae57300e0
2015-04-26 00:07:57 +00:00
helixhorned ab2d73ce3d LunaCON: update docs and comments in lunatic/test/event_chaining.con
git-svn-id: https://svn.eduke32.com/eduke32@5130 1a8010ca-5511-0410-912e-c29ae57300e0
2015-04-11 13:53:05 +00:00
hendricks266 c24e5f51cd 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

git-svn-id: https://svn.eduke32.com/eduke32@5118 1a8010ca-5511-0410-912e-c29ae57300e0
2015-03-30 05:57:30 +00:00
hendricks266 8a9fb41d5f CON: 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.
git-svn-id: https://svn.eduke32.com/eduke32@5098 1a8010ca-5511-0410-912e-c29ae57300e0
2015-03-27 12:29:05 +00:00
hendricks266 0805a0ed45 CON: 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.
git-svn-id: https://svn.eduke32.com/eduke32@5093 1a8010ca-5511-0410-912e-c29ae57300e0
2015-03-25 21:31:11 +00:00
terminx c9ce545ab8 A lot of CON rewrites/optimizations. Converts projectile system to dynamic allocation, saving a bunch of memory (something like sizeof(projectile_t) * MAXTILES * 2). This commit also contains changes that reduce overhead for CON commands that take a lot of parameters, by way of adding a Gv_GetManyVars() to replace long strings of subsequent calls to Gv_GetVarX().
Savegame version has been bumped due to the projectile changes. There is no way this commit doesn't cause at least one bug, so DONT_BUILD. ;)

git-svn-id: https://svn.eduke32.com/eduke32@5080 1a8010ca-5511-0410-912e-c29ae57300e0
2015-03-24 00:40:55 +00:00
hendricks266 f821434195 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.

git-svn-id: https://svn.eduke32.com/eduke32@5047 1a8010ca-5511-0410-912e-c29ae57300e0
2015-03-08 07:58:24 +00:00
hendricks266 ef28cac919 CON: 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.

git-svn-id: https://svn.eduke32.com/eduke32@5046 1a8010ca-5511-0410-912e-c29ae57300e0
2015-03-08 07:58:06 +00:00