Commit graph

1440 commits

Author SHA1 Message Date
rr-
2981c35358 3dsystem: pull VIEW_NEAR, VIEW_FAR, DEPTH_Q_START, DEPTH_Q_END 2021-11-12 20:07:23 +01:00
rr-
b232d69dd8 vars: pull PhdNearZ, PhdFarZ and PhdViewDist 2021-11-12 20:07:23 +01:00
rr-
fd9bb5fac0 input, lara: improve tr3 sidesteps
Closes #190
2021-11-12 16:33:09 +01:00
rr-
1fdc2eb363
game/option: fix after bad merge 2021-11-12 16:09:52 +01:00
rr-
47395ac2f6 game/option: fix dummy option
Closes #217
2021-11-12 10:31:36 +01:00
rr-
9bcf8f6ae8 game/option: use bool 2021-11-12 10:31:36 +01:00
rr-
982a2b4675 option: add adjustable ingame brightness 2021-11-12 00:20:05 +01:00
rr-
1e6d4aee25 game/overlay: replace static struct idiom with m_ 2021-11-11 18:00:27 +01:00
rr-
24794853ef text: drop static struct S idiom in favor of m_
We employ Hungarian notation that stands for module-specific global
variable.
2021-11-11 18:00:27 +01:00
rr-
2d373902f5 text: fix cleaning old text handles 2021-11-11 18:00:27 +01:00
rr-
68bd19cc86 vars: pull AmmoText, FPSText and VersionText 2021-11-11 18:00:27 +01:00
rr-
92959a4582 inv: remove text manipulation
These assignments might be an attempt to remove any overlay text before
HWR_CopyPicture(), but they do not work – when the player opens the
inventory, the text is captured on the bitmap. If we decide to tackle
this, it needs to happen another way.
2021-11-11 18:00:27 +01:00
rr-
ef6d87fb05 text: add simple destructors
Whenever someone calls Text_RemoveAll(), all of the pointers remembered
by the users of Text_Create() need to be invalidated. To make this
possible, currently every caller of Text_RemoveAll() needs to know of
all possible "dangling" pointers to invalidate. This is bad design.
Every Text_Create user should be responsible for its own cleanup. To
achieve a bit better design, we add a simple destructor – "on_remove" –
that the callers of Text_Create can hook into to invalidate their
pointers.
2021-11-11 18:00:27 +01:00
rr-
c5140f3637 text: simplify text allocation 2021-11-11 18:00:27 +01:00
rr-
a4c4cac149 text: refactor consts 2021-11-11 18:00:27 +01:00
rr-
701994e8e1 text: allocate strings on the stack 2021-11-11 18:00:27 +01:00
rr-
4e3cf53cd0 text: apply private state idiom 2021-11-11 18:00:27 +01:00
rr-
2fb0135a95 text: convert flags to a bitfield 2021-11-11 18:00:27 +01:00
rr-
1adc622826 text: make possible functions static 2021-11-11 18:00:27 +01:00
rr-
3568d8aabc text: rename functions 2021-11-11 18:00:27 +01:00
rr-
f75626fc12 text: use bool 2021-11-11 18:00:27 +01:00
rr-
adbf5378aa vars: drop padding information
We no longer have need for it. OG types are documented in docs/ida_types.h.
2021-11-11 18:00:27 +01:00
rr-
35afe7cdd6 game/draw: simplify 3d pickup lighting 2021-11-11 01:52:26 +01:00
rr-
8df7be07f0
game/draw: fix typos 2021-11-10 14:57:48 +01:00
rr-
722fc4abef lib: don't hardcode fmv player routine addresses 2021-11-10 12:22:17 +01:00
rr-
4c805292c0 hwr: fix stack corruption in lightning renderer
Closes #205
2021-11-10 12:04:52 +01:00
rr-
dabfb885c6 hwr: remove magic numbers from alpha operations 2021-11-10 12:04:52 +01:00
rr-
b431c248d0 hwr: draw lightning segments immediately 2021-11-10 12:04:52 +01:00
oziphantom
0f3df2ac94
s/init: clear GameMemory
Explicitly clear the memory to 0. GCC does this by default, other
compilers don't. MSVC sets it to 0xcdcdcdcd for debugging purposes.
Sadly the trigger data in Folly has an invalid item number which is
usually fine because it gets an all null, the floor is null and so
nothing is called.
2021-11-09 09:49:38 +01:00
oziphantom
da1a2d1684
input: fix enum type mismatch 2021-11-09 09:46:13 +01:00
rr-
e1747aa22e inv: add T1M version in the corner
Closes #155
2021-11-06 18:42:10 +01:00
rr-
90146b229e health: refactor into overlay 2021-11-05 12:59:30 +01:00
rr-
64c2264b8f health: move drawing bars to health.c 2021-11-05 12:59:30 +01:00
rr-
3f22956e06 vars: refactor more variables 2021-11-05 12:59:30 +01:00
rr-
e8a5a118bf vars: refactor DemoPtr and DemoCount 2021-11-05 12:59:30 +01:00
rr-
0cf625a7a5 demo: fix infinite loop if there are no demos 2021-11-05 12:59:30 +01:00
rr-
e39bf22073 vars: reduce access scope of globals 2021-11-05 12:59:30 +01:00
rr-
abbc03ee59 vars: remove WaterPalette 2021-11-05 12:59:30 +01:00
rr-
f4ffa7522d vars: initialize all variables 2021-11-05 12:59:30 +01:00
rr-
7542e95a31 vars: remove TitleLoaded 2021-11-05 12:59:30 +01:00
rr-
fe31a13969 vars: fix PhdSpriteInfo size 2021-11-05 12:59:30 +01:00
rr-
10066506aa file: fix ub for unknown opening modes 2021-11-05 12:59:30 +01:00
rr-
6fd0fdef60 option: fix render settings
Also allow changing resolution from within the inventory menu, which
simplifies the menu logic. Requires the player to close the inventory
for effect.
2021-11-05 12:59:30 +01:00
rr-
a5d5319892 hwr: initialize HWR_SelectedTexture to -1 2021-11-05 12:59:30 +01:00
rr-
771f3f9541 vars: specify array sizes 2021-11-05 12:59:30 +01:00
rr-
6edcd76f74 specific/init: reset memory allocator vars 2021-11-05 12:59:30 +01:00
rr-
e6f447865a option: fix invalid name for backslash 2021-11-05 12:59:30 +01:00
rr-
03b5eebe48 vars: change RoomsToDraw back to static array 2021-11-05 12:59:30 +01:00
rr-
6016577a7d log: add missing va_end calls 2021-11-05 12:59:30 +01:00
rr-
29a46104f2 misc: raise texture limits
Closes #174
2021-11-05 12:59:30 +01:00