Commit graph

915 commits

Author SHA1 Message Date
Christoph Oelckers
dced173cda - JSON serializer for actor.
Also cleaned up use of gAffectedSectors and gAffectedXWalls. These are merely needed as local worker variables, not as global persistent status.
2020-11-22 12:48:42 +01:00
Christoph Oelckers
b2a7a0635b - Blood: JSON serializer for triggers
Also renaming members of struct BUSY.
2020-11-21 20:25:06 +01:00
Christoph Oelckers
f73ca55c79 - renamed more disasm stuff. 2020-11-21 20:10:45 +01:00
Christoph Oelckers
27dfefef6c - JSON serializer for warp.cpp 2020-11-21 19:39:24 +01:00
Christoph Oelckers
678dedf224 - more renaming. 2020-11-21 19:30:00 +01:00
Christoph Oelckers
c13dd52e34 - renamed a few functions with disasm names. 2020-11-21 19:19:02 +01:00
Christoph Oelckers
a319687373 - use static init for QAV callbacks.
runtime init order is undefined, so this is not safe.
2020-11-21 18:28:29 +01:00
Christoph Oelckers
9bd02634d9 - renamed a few things with disasm names. 2020-11-21 18:18:58 +01:00
Christoph Oelckers
7945242fa8 - removed some redundant utility functions. 2020-11-21 18:13:10 +01:00
Christoph Oelckers
8bfc6d98d4 - Blood: cleanup and simplification of SEQ code.
* removed all the large instance arrays. None of this is really necessary, all we need is a single dynamic array with only the active sequences that can expand as needed.
* added JSON serialization. With the above change this part now becomes trivial.
* renamed all 'atxx' variables in this code.
2020-11-21 18:12:51 +01:00
Christoph Oelckers
4aa06ff702 - use a static table for SEQ callbacks.
This ensures that callback indices are consistent. Runtime registration as performed by NBlood has undefined order and will make savegames non-transferrable.
2020-11-21 16:34:32 +01:00
Christoph Oelckers
fe845d7e12 - renamed some of those annoying 'atxx' variables. 2020-11-21 15:45:37 +01:00
Christoph Oelckers
1535182577 - simplified the event management further and added a JSON serializer for it. 2020-11-21 15:09:38 +01:00
Christoph Oelckers
5f54eac297 - made palette loader part of the game interface.
This gets rid of the Blood 'replace' hook for thus.
2020-11-21 12:54:09 +01:00
Christoph Oelckers
71e70f8d15 - simplified the event code by removing the priority queue layer.
We do not need that compatibility handling so the high level code can use the multiset directly.
2020-11-21 12:49:24 +01:00
Christoph Oelckers
d089aa8d2e - moved Blood's and Exhumed's d_menu.cpp back into the gameprojects
With the new autoseg code this separation is not needed anymore.
2020-11-13 11:25:43 +01:00
Christoph Oelckers
4bded16b09 - removed leftover Polymer checks. 2020-11-11 13:03:47 +01:00
Christoph Oelckers
51115e75df - avoid using widthBits and heightBits outside of engine code. 2020-11-09 20:51:30 +01:00
Mitchell Richters
ade1a80515 - gameinput.cpp: Remove crouch bool from applylook() since we can now just rely in the actions bitfield that's already incoming as required and default scaleAdjust in the prototype to 1. 2020-11-07 18:25:06 +11:00
Mitchell Richters
6e3d414b3c - inputstate.cpp: Move checkCrouchToggle() from gameinput.ccp into ApplyGlobalInput() and use static bool for crouch toggling vs. game-side bool. 2020-11-07 18:16:16 +11:00
Mitchell Richters
01c494e29d - Blood: Don't let Caleb's voice overlap if spamming the use key on a locked door.
* Fixes #113.
2020-11-07 15:13:45 +11:00
Mitchell Richters
4ef0d20e0e - gameinput.cpp: Consolidate checkCrouchToggle() from Duke with discrete implementations from Blood in 7c8efde38c and Exhumed in 032db82f82 to unify the functionality. 2020-11-07 13:44:25 +11:00
Mitchell Richters
7c8efde38c - Blood: Add crouch toggle mechanism.
* Fixes #151.
2020-11-07 13:23:16 +11:00
Christoph Oelckers
7a482c6284 - make DHUDFont an object. 2020-10-31 13:20:54 +01:00
Christoph Oelckers
7de6528a1f - the status bars work as objects.
# Conflicts:
#	source/common/menu/menudef.cpp
2020-10-31 13:20:54 +01:00
Christoph Oelckers
3b7ce26c86 - final function moves and renamed hud_scale to hud_scalefactor. 2020-10-31 13:20:00 +01:00
Christoph Oelckers
3a0c84d3ca - split statusbar.cpp in two.
To keep Raze-exclusive content out of the main file that's about to be edited.
2020-10-31 13:19:59 +01:00
Christoph Oelckers
668c34d4c1 - ensure for all games that deleting a sprite unlinks all sounds from it.
This was only present in Duke but is needed for all games.
2020-10-29 00:08:06 +01:00
Christoph Oelckers
7dda316391 - define console background for Blood. 2020-10-25 15:31:20 +01:00
Christoph Oelckers
28a926eb9a - Blood: Copy the 'shade' member for sprites.
This got lost when the loader was transitioned to using a local buffer to read the map data.
Fixes #140
2020-10-24 19:11:58 +02:00
Christoph Oelckers
c2828fe2e3 fixed undefined end of list behavior of iterators
Also fixed a few warnings
2020-10-18 12:14:05 +02:00
Christoph Oelckers
eb78b88598 - all Blood stat iterators ported. 2020-10-15 20:22:39 +02:00
Christoph Oelckers
33164694b9 - use iterator class for all stat loops in Blood's actor.cpp. 2020-10-15 20:22:38 +02:00
Christoph Oelckers
0a0a995cbd - some cleanup of build.h 2020-10-15 20:22:38 +02:00
Christoph Oelckers
be3292d29b - removed the mostly unused macros for sprite iteration. 2020-10-15 20:22:38 +02:00
Christoph Oelckers
aa5c7c3e34 - replaced all sector sprite iterators in Blood. 2020-10-15 20:22:38 +02:00
Christoph Oelckers
ec5762f024 - do not use index 0 of Blood's X arrays.
This can be written to through uninitialized data and break things quite badly.
2020-10-14 13:51:59 +02:00
Christoph Oelckers
bca29ed402 - no bit fields, please!
The memory savings are not worth the negative side effects.
2020-10-13 23:56:30 +02:00
Christoph Oelckers
1637157f46 - removed some unused variables. 2020-10-13 21:45:21 +02:00
Christoph Oelckers
53481fb9a3 - Blood: simplified management of XSectors and XWalls.
This does not need a free list - they get statically allocated per level, so a simple counter is enough.
2020-10-13 20:36:57 +02:00
Christoph Oelckers
2b1284e8fa - reorganized Blood's level structures to not use bitfields.
Only the single bits are still a bitfield,  combined with an int in a union - all other fields are 8, 16 or 32 bit now.
For serialization this is necessary - I have to wonder anyway if the added code to process the bit fields wasn’t even more than the data savings…
2020-10-13 20:23:51 +02:00
Christoph Oelckers
817fa8aba3 - save the entire engine state as JSON.
The sprite lists may still need optimization. Due to different handling between Blood and the core engine they need to be written out completely which is quite wasteful.
2020-10-13 20:18:08 +02:00
Christoph Oelckers
20248d8e08 - fixed a few CCMDs which were blocked in the console. 2020-10-12 19:48:47 +02:00
Mitchell Richters
c08851e4c0 - Blood/Duke/RR/SW: Drop resetinputhelpers(). 2020-10-12 14:42:43 +11:00
Christoph Oelckers
b4a011300a - implemented proper delta serialization for sectors and walls. 2020-10-11 21:11:38 +02:00
Christoph Oelckers
e6bd5989c2 - removed some unused parts from Blood's map loader. 2020-10-11 18:34:58 +02:00
Christoph Oelckers
1757ef2aa6 - split the game input code off gamecontrol.cpp into its own file. 2020-10-11 16:33:43 +02:00
Christoph Oelckers
8e1c71b867 Merge branch 'InputContinuation' 2020-10-11 15:24:51 +02:00
Christoph Oelckers
6acc9db540 - cleanup of the remaining homegrown Blood wrappers.
consoleSysMsg and dassert are gone now, all places now call the system implementation directly.
2020-10-11 14:30:44 +02:00
Christoph Oelckers
1579bec714 - Blood: got rid of ThrowError.
Use I_Error directly.
2020-10-11 14:30:44 +02:00