sotn-decomp/include
bismurphy 2467f973d6
Some checks are pending
Format code / format (push) Waiting to run
Build C code / extract-assets (push) Waiting to run
Build C code / build-linux (i686, Debug, clang, custom) (push) Blocked by required conditions
Build C code / build-linux (i686, Debug, clang, lle) (push) Blocked by required conditions
Build C code / build-linux (i686, Debug, gcc, custom) (push) Blocked by required conditions
Build C code / build-linux (i686, Debug, gcc, lle) (push) Blocked by required conditions
Build C code / build-linux (i686, RelWithDebInfo, clang, custom) (push) Blocked by required conditions
Build C code / build-linux (i686, RelWithDebInfo, clang, lle) (push) Blocked by required conditions
Build C code / build-linux (i686, RelWithDebInfo, gcc, custom) (push) Blocked by required conditions
Build C code / build-linux (i686, RelWithDebInfo, gcc, lle) (push) Blocked by required conditions
Build C code / build-linux (x86_64, Debug, clang, custom) (push) Blocked by required conditions
Build C code / build-linux (x86_64, Debug, clang, lle) (push) Blocked by required conditions
Build C code / build-linux (x86_64, Debug, gcc, custom) (push) Blocked by required conditions
Build C code / build-linux (x86_64, Debug, gcc, lle) (push) Blocked by required conditions
Build C code / build-linux (x86_64, RelWithDebInfo, clang, custom) (push) Blocked by required conditions
Build C code / build-linux (x86_64, RelWithDebInfo, clang, lle) (push) Blocked by required conditions
Build C code / build-linux (x86_64, RelWithDebInfo, gcc, custom) (push) Blocked by required conditions
Build C code / build-linux (x86_64, RelWithDebInfo, gcc, lle) (push) Blocked by required conditions
Build C code / build-macos (Debug, custom) (push) Blocked by required conditions
Build C code / build-macos (Debug, lle) (push) Blocked by required conditions
Build C code / build-macos (RelWithDebInfo, custom) (push) Blocked by required conditions
Build C code / build-macos (RelWithDebInfo, lle) (push) Blocked by required conditions
Build C code / build-windows (Debug, custom) (push) Blocked by required conditions
Build C code / build-windows (Debug, lle) (push) Blocked by required conditions
Build C code / build-windows (RelWithDebInfo, custom) (push) Blocked by required conditions
Build C code / build-windows (RelWithDebInfo, lle) (push) Blocked by required conditions
Build Saturn version / build-and-test-saturn (push) Waiting to run
Build Saturn version / function-finder-saturn (push) Waiting to run
Build Debug Module tool / build (push) Waiting to run
Build PSX and PSP version / build-and-test (pspeu, hd) (push) Waiting to run
Build PSX and PSP version / build-and-test (pspeu, pspeu) (push) Waiting to run
Build PSX and PSP version / build-and-test (us, us) (push) Waiting to run
Build PSX and PSP version / generate-progress-report (pspeu, hd) (push) Blocked by required conditions
Build PSX and PSP version / generate-progress-report (pspeu, pspeu) (push) Blocked by required conditions
Build PSX and PSP version / generate-progress-report (us, us) (push) Blocked by required conditions
Build PSX and PSP version / generate-duplicates-report (us, us) (push) Blocked by required conditions
Build PSX and PSP version / generate-duplicates-report-psp (pspeu, pspeu) (push) Blocked by required conditions
Various cleanup on a few things (#1858)
1. Give a name to the variable `g_PauseAllowed` - this is a bool which
gets tested when we're also testing for pressing START or SELECT to open
the menu or map, so to me it seems like it's flagging whether or not you
are allowed to pause. It is normally 1, but gets set to 0 at the start
of cutscenes, and then restored to 1 at the end of them.

2. Name LAYOUT_RECT_PARAMS_HIDEONMAP, which is relevant for item 3 on
this list. I already used the HideOnMap name when setting up this flag
in the assets handler in my previous PR.

3. Name `g_canRevealMap` - this is a variable that is normally set to
true, but for some particular rooms in the game, it's set to 0. Those
rooms will not appear on your map. Good examples include the forest area
left of the castle gate (the first moment we see Alucard), and the DRE
stage. This variable gets set to 0 if the LayerDef has the
LAYOUT_RECT_PARAMS_HIDEONMAP flag set.

4. Deduplicate a common structure in the code where entities have a
debug routine that lets the Player 2 controller control the behavior of
the entity. By pulling this out, the code can be more concise. Most
importantly, when searching the codebase for g_Pads[1] (which is an
interesting thing to do, since we're looking at uses of the Player 2
controller in a single-player game), you can focus on the interesting,
unique examples, rather than having a ton of copies of the same exact
code.

5. Change all instances of `g_Pads->` to `g_Pads[0].` A minor change,
but good to use a formatting which makes it clear that g_Pads is the
array of both pads, and not a pointer to one.

6. A couple functions I noticed with obvious fake stuff (including a
do{}while(0)) have been adjusted so that they will match on PSP.
Naturally, this also meant removing those fake things, which is always
nice.

Overall, this is several small changes combined into one PR; honestly I
just scrolled through the codebase for a while, finding things that made
me think "I know a way this could be better". Others may disagree with
some of these though, happy to take input, especially on the new names!
2024-10-31 23:44:05 +00:00
..
psxsdk Add Include Guards for All Headers (#1855) 2024-10-31 20:27:49 +00:00
saturn Decompile func_06010008 (#366) 2023-07-17 21:22:21 +01:00
bios.h Replace BIOS Trampolines (#1133) 2024-05-17 08:45:26 +01:00
common.h Replace g_HeartDropArray with PrizeDrops (#1787) 2024-10-14 01:06:52 +01:00
cutscene.h Add Include Guards for All Headers (#1855) 2024-10-31 20:27:49 +00:00
disk.h Decompile PrologueScroll (#1358) 2024-06-27 19:52:31 -07:00
entity.h Add Include Guards for All Headers (#1855) 2024-10-31 20:27:49 +00:00
game.h Various cleanup on a few things (#1858) 2024-10-31 23:44:05 +00:00
gte.inc Update splat (#247) 2023-06-12 06:04:25 +01:00
include_asm.h Add BOSS/MAR.BIN (#1608) 2024-09-15 21:49:56 +01:00
items.h WRP and CEN cohabitation (#1701) 2024-10-13 22:15:19 +01:00
lba.h Add Include Guards for All Headers (#1855) 2024-10-31 20:27:49 +00:00
log.h Update clang-format as self-contained binary (#1257) 2024-06-04 21:07:50 +01:00
macro.inc Use allegrex assembler for PSP (#1424) 2024-07-22 15:36:28 -04:00
main.inc Upload disassembly 2022-01-02 13:35:44 +00:00
memcard.h Add AGPL license (#1565) 2024-09-06 16:14:55 -04:00
objects.h Add Include Guards for All Headers (#1855) 2024-10-31 20:27:49 +00:00
player.h Update clang-format as self-contained binary (#1257) 2024-06-04 21:07:50 +01:00
primitive.h Decompile ST0 EntityCutscenePhotograph (#1833) 2024-10-27 20:02:05 +00:00
servant.h Decompile a couple of no0 funcs + minor cleanup (#1835) 2024-10-27 20:02:54 +00:00
settings.h Update clang-format as self-contained binary (#1257) 2024-06-04 21:07:50 +01:00
sfx.h decompiling func_us_801753E4 (#1856) 2024-10-31 20:34:48 +00:00
stage.h Eliminate MyLayer and MyRoomDef to use the normal structs (#1857) 2024-10-31 22:12:30 +00:00
types.h Enable spu init (#1344) 2024-06-19 09:37:07 -07:00
unkstruct.h Add Include Guards for All Headers (#1855) 2024-10-31 20:27:49 +00:00
weapon.h Import w_037 data and normalize weapon palette (#1777) 2024-10-11 18:36:59 +01:00