Commit graph

925 commits

Author SHA1 Message Date
Mitchell Richters
32a1796728 - buildutils: Replace sintable[] use within Build with bsin()/bcos(), using bsinf()/bcosf() where appropriate.
* Includes a few header include shuffles to make it all come together.
2020-11-22 21:18:02 +01:00
Mitchell Richters
b2c42d5d03 - buildutils: Replace sintable[] use within Blood with bsin()/bcos().
* Further review of this should be considered as the use of sintable[] for nCos was actually sine and the use of sintable[] for nSin was actually cosine. Preserved math despite the variable names.
2020-11-22 21:18:02 +01:00
Christoph Oelckers
182b8023ca - Blood: ported BloodGDX's fix for the double shotgun graphics glitch.
Fixes #114
2020-11-22 20:09:09 +01:00
Christoph Oelckers
63d71c120a - Blood: save level stats as JSON. 2020-11-22 13:05:17 +01:00
Christoph Oelckers
751c295b62 - minor savegame optimizations.
Do not write out empty elements of arrays where these are by far the most common ones.
2020-11-22 12:48:43 +01:00
Christoph Oelckers
1a588c3cbf - merged two smaller savegame handlers into the main function. 2020-11-22 12:48:43 +01:00
Christoph Oelckers
2cb3d44384 - AI JSON serialization. 2020-11-22 12:48:43 +01:00
Christoph Oelckers
18352a760c - more renames. 2020-11-22 12:48:42 +01:00
Christoph Oelckers
2c6fa57090 - activeXSprites map. 2020-11-22 12:48:42 +01:00
Christoph Oelckers
d4873754f3 - even more renames 2020-11-22 12:48:42 +01:00
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