838 Commits
Author SHA1 Message Date
Oliver Bell a342d22031 somewhat document bg palette effects 2025-01-29 10:53:23 +00:00
Oliver Bell 45f305625e combine player touching ring macros 2025-01-28 00:51:34 +00:00
JaceCear 1d0f985d28 Add q prefix to Player speed values (#198) 2025-01-24 13:35:25 +01:00
Oliver Bell c2954e3b52 fake match sub_804AE40 2025-01-24 00:43:47 +00:00
JaceCear eecc810e6c Fix typo Recieve -> Receive (#197) 2025-01-23 18:38:32 +00:00
Joseph Judge de3a0d7887 Document Player functions and Interactable 044 (#196)
* Document Player_DefaultTrick
* Document MOVESTATE_IA_OVERRIDE
* Document MOVESTATE_SOME_ATTACK
* Document Player_AirInputControls
* Document CeilingSlope
2025-01-22 21:54:58 +00:00
Oliver Bell 9de1b17037 minor int->s32 fixes, and extended unk99 member on player 2025-01-21 18:15:04 +00:00
Fractal c4b50f9bb1 Research & Document various commonly used objects & systems (#194)
* document ItemBox object

* research & document Spring object

* research & document Platform objects

* research & document misc shared objects

* research & document a ton of player related vars & funcs

* research & document spikes object

* research & document Checkpoint

* research & document StageGoal & RoomEvent

* add RoomEvent type parameters

* add comment(s) for future research
2025-01-21 13:08:31 +00:00
JaceCear 2508a8d1a2 Document Spotlight Beam func names (#193)
* Document Spotlight Beam func names

* Rename spot_light_subtask.c -> spot_light_beam_task.c
2025-01-19 22:00:46 +01:00
Oliver Bell fbe407a074 fix the rest of special stage, improvements to sdl rendering 2025-01-19 20:08:45 +00:00
Oliver Bell 804ced4e10 more fixes to special stage, bind special stage to unused level select 2025-01-19 13:26:32 +00:00
Oliver Bell 28f5f0f507 fix most of special stage in widescreen 2025-01-18 17:37:04 +00:00
Oliver Bell cec845d8de clean up increment rings and increment score, start fixing special stage for widescreen 2025-01-17 04:08:58 +00:00
Oliver Bell 7d78e2dd39 document some of music manager state 2025-01-15 22:25:02 +00:00
SilviaFox 5010dd1d42 Documentation of a few player functions (#180) 2025-01-12 11:45:17 +00:00
JaceCear 2a0cb85533 (WIP) First initial groundwork implementation of OpenGL backend (#183)
* Fix nullpointer crash in stage intro, when starting the Extra Boss stage

* Add first NOT-WORKING (WIP) pass on OpenGL renderer in win32

* Address #ifdef comment

* Fix capitalization
2025-01-12 00:44:30 +01:00
Oliver Bell 9944eacfde more matches, some matching improvements 2025-01-09 00:26:42 +00:00
JaceCear 7450429777 Rename TaskStrc_801F15C -> MultiplayerSpriteTask (#178)
* Align grind_effect_2.c with SA1

* Rename TaskStrc_801F15C -> MultiplayerSpriteTask

* Rename grind_effect_2.c -> mp_sprite_task.c

* Rename grind_effect_2.h -> mp_sprite_task.h

* Remove redundant #include from SA1
2025-01-08 01:01:48 +01:00
Oliver Bell db841c44cd decompile sub_802E784, fix some macos compiler issues 2025-01-05 23:34:28 +00:00
JaceCear ac3c4ebca6 Rename Player.x|y -> .qWorldX|qWorldY and SpecialStagePlayer.x -> .q1… (#177)
* Rename Player.x|y -> .qWorldX|qWorldY and SpecialStagePlayer.x -> .q16WorldX|.q16WorldY

* Align Music Manager with SA1

* stage/game_2 -> grind_effect_2

* SpriteTransform.x|y -> .qScaleX|Y

* Auto-insert platform #define for convenience
2025-01-05 23:41:36 +01:00
JaceCear 4aa35ee10b Some more documentation and cleanup (#176)
* Some cleanup in title_screen.c

* Some documentation in unused_level_select.c

* Unify sa1_sa2_shared/collision.c and collision_1.c

* Remove sub_800D0A0 from stub.c

* Small pieces of documentation

* Document some globals and align characters.h with SA1

* Mostly align amy_attack_heart_effect.c with SA1

* Rename file of Ring -> Magnetic Ring

* Align save.h with SA1

* Rename Player.unk90|unk94 -> Player.spriteInfoBody|Limbs

* Add some comments

* Rename Spark Effect -> Grind Effect, document SA1's and SA2's versions a bit
2025-01-05 00:50:31 +01:00
JaceCear 57376092f0 Various RAM map documentation and alignment with SA3 (#175)
* Various documentation and alignment with SA3

* Extract input_recorder.c .data section from core.c, as in SA3

* Align multi_sio.c with SA3

* Document parameters of DisplaySprites

* Document centerOffsetX/Y in DisplaySprites

* Only display copyright note

* Split GAME_ and ENGINE_ macros

* Use ENGINE macros in core.c

* Rename game<->engine interface procedures

* Remove searching in /src for header files in genctx.py

* Fix global.h<->config.h dependency in genctx.py

* Only enable Task logging in debug versions

* Fix uses of DEBUG, remove TEST_GFX_POINTERS because current gfx copy implementation already makes it redundant

* Use 64bit as default target in Win SDL

* Align some files with sa1 and sa3

* Align sprite.c and other files closer with sa1 and sa3

* Various documentation

* Some dodumentation and cleanup from SA1 core.c integration

* Rename sa1_leftovers/ -> sa1_sa2_shared/

* Put gEwramHeap into ewram_data section
2024-12-28 21:12:56 +01:00
Oliver Bell 4508686f71 some fixes for widescreen support in intro 2024-11-25 00:07:31 +00:00
JaceCear 3aca6222d9 Add bit macros from SA3 (#172)
* Fix BriBaSA_ex not showing the correct animation for many entities
2024-11-24 23:40:22 +00:00
Oliver Bell 3ccdaf4f53 name boost mode setup func, figure out which line bugs the intro on sdl 2024-11-12 00:57:07 +00:00
JaceCear aabbf861da Document Backgrounds queue (#170) 2024-11-08 18:55:48 +01:00
JaceCear 4fa329c49f Add SetBit and ClearBit macros (#169) 2024-11-08 18:55:25 +01:00
Oliver Bell 51199b0dd8 fixes to winregs on widescreen, support wide titlescreen 2024-11-06 00:04:36 +00:00
Oliver Bell df14416be0 fixes for sprite transform and Div 2024-11-01 01:39:59 +00:00
Oliver Bell e4e58af16c finish decompiling water effects 2024-10-30 01:46:43 +00:00
Oliver Bell 6ce0e6d058 64bit memcpy fixes 2024-10-28 23:25:45 +00:00
JaceCearandOliver Bell 1f8bee518d Implement m4a for PC (#166)
* Refactor m4a for better names
* Bring in m4a PC backend code
* Update songs data to work on 64bit
* Move m4a to it's own folder
* Add linker map to sdl build

---------

Co-authored-by: Oliver Bell <freshollie@gmail.com>
2024-10-28 11:07:36 +00:00
Oliver Bell 9016c0e28b fix TAS for zone 5 boss, zone 6, and start fixes for zone 7 2024-10-24 01:21:28 +01:00
Oliver Bell 8cd55076ff fix some memory errors found using AddressSanitizer
* Remove padding from RLUnCompWram since we don't need this
* Add a graphics queue copy buffer for prevening a race condition in the dimps engine design
* Fix a DMA copy bug on init
2024-10-21 00:35:16 +01:00
Oliver Bell 207d4f6978 more results screen fixes for widescreen, refactor results screens to share struct 2024-10-20 18:53:22 +01:00
Oliver Bell 75bb45bacd fix broken zone 3 spring in widescreen 2024-10-20 16:37:03 +01:00
Oliver Bell 45c4e28234 more hacks for widescreen TAS, document some bugs in collision 2024-10-20 02:58:01 +01:00
Oliver Bell b026f7dc1a fix bosses on widescreen 2024-10-19 15:46:07 +01:00
Oliver Bell dbabbd41db Add ability to TAS test the game, fix bugs as a result of testing (#161) 2024-10-19 02:54:11 +01:00
Oliver Bell 8030158fef clean up input buffer unused struct and add scratch link 2024-10-14 19:03:42 +01:00
Oliver Bell 5cf9750cfe fix sprite transform logic 2024-10-14 01:53:36 +01:00
JaceCear b532dfc097 Cleanups and fixes for platform quirks (#160)
* Fix backgrounds in high resolutions

* Fix boost after-image palette being off by 1.

* Fix wave gradient in higher resolutions

* Add TEMP_FIX #define. Remove call creating the spotlights in Zone 4's background to circumvent crash. General cleanup

* Document and fix some of Zone 5's background functions

* Minor cleanup

* Simplify Enemy Yado collision code

* Fix Small Windmill IA despawn condition

* Use -1 instead of 0xFF for prevVariant

* Use HB_COLLISION macro for enemy Spinner

* Use HB_COLLISION macro for enemy Madillo

* Some documentation and bug fixes

* Remove redundant #include and some cleanup
2024-10-13 17:16:22 +01:00
JaceCearandOliver Bell db858862eb 64bit compilation fixes, macos fixes(#158)
* Order DMA register types in the same way

* Fix compilation error in zone_6 BG

* More zone_6 palette fixes

* Some DMA 64 fixes

* fix macos build

---------

Co-authored-by: Oliver Bell <freshollie@gmail.com>
2024-10-10 18:42:52 +01:00
1bc34d0ac8 Move Animation data to C, fix native sdl build (#157)
* Remove and move comments to the correct procedures

* Fix regular SDL compilation

* Move animation data from Asm to C

* Layout the anim macros in a common way. Add Big Endian support to them (I think?)

* add CI for sdl objs, fix some of the build on linux

* make native macos work

---------

Co-authored-by: bitten2up <bitten2up@courvix.com>
Co-authored-by: Oliver Bell <freshollie@gmail.com>
2024-10-10 01:07:04 +01:00
JaceCear 55a59adbf9 Add color index array for VRAM viewer. Various documentation and bug fixes. (#156)
* Add a color buffer for VRAM view

* Fix graphics not being processes in-time

* Progress on sub_8002B20

* Some more sub_8002B20 matching

* Remove constants in on-screen checks

* Some documentation and cleanup

* Win-Range and screen range documentation

* Fix nullpointer dereference in water_effects.c

* Rename STAGE_FLAG__4 -> STAGE_FLAG__TIMER_REVERSED

* Rename MapHeader.h -> MapHeader.tileset. Use Tilemap* for gTilemaps and gTilemapsRef

* Rename some camera background flags for accuracy

* BACKGROUND_DONT_UPDATE_TILESET and BACKGROUND_DONT_UPDATE_PALETTE -> BACKGROUND_DISABLE_TILESET_UPDATE and BACKGROUND_DISABLE_PALETTE_UPDATE

* Fix Note Blocks not spawning

* Use (DISPLAY_HEIGHT - 1) in Hot Crater's BG code

* Temp hack for Magnet Shield softlocking

* Some bgmap cleanup, fixes and documentation

* Remove invalid scratch link

* Rename Sprite.timeUntilNextFrame -> .qAnimDelay
2024-10-01 11:11:19 +02:00
JaceCear 8d3dc36b97 Documentation and 'sakit' rename to 'sa1_leftovers'. (#155)
* Rename SpriteBase.spriteY -> SpriteBase.id

* Add explicit returns after TaskDestroy calls

* Rename 'sakit' -> 'sa1_leftovers' and put it into ./src/game/

* Some documentation

* Document more Player Transition values

* Rename to Player_Debug_TestRingScatter

* Use cast to make this code path compile in regular debug builds
2024-09-08 15:35:17 +02:00
JaceCear 7687ec7fe7 Introduce and document CHARSTATE values and general Player documentation (#154)
* Document some Player callbacks

* Add SE_WATERFALL_SURFACE_HIT and add TRUE/FALSE to Player.isBoosting definitions

* Add constants/char_states.h, add those to sCharStateAnimInfo

* Document many uses of CHARSTATE_xyz

* Remove magic nums when comparing/setting Player.prevCharState

* Document PlayerTransitions and some Spring data

* Document various PlayerTransitions, charStates and player callback functions

* Document a bunch of Player function names

* Fix NONMATCH path typo and more Player funcs

* Document MOVESTATE_GOAL_REACHED

* Document Player Taunt procedure names

* Remove gotos in sub_8023610

* More Player documentation

* More character documentation

* Add DISABLE_TRICK_AIR_WAIT to player.h
2024-08-26 22:47:54 +02:00
JaceCear 1807071aab Add Frame Skip and player documentation (#153)
* Add single frame skip

* Adjust key mappings, improving it for non-US boards

* Disable VRAM view by default

* Rename to Player.spriteOffsetX/Y

* Rename Player.unk5A -> Player.isBoosting

* Rename PLAYER_ITEM_EFFECT__40/__80 -> PLAYER_ITEM_EFFECT__CONFUSION/__TELEPORT

* Some mp_player.c documentation

* Document some Special Stage UI anims

* Rename #defines to PLAYER_LAYER__FRONT/BACK/MASK/80

* Rename Player.unk5C/unk5E -> Player.heldInput/.frameInput 

* Make Player.unk6C a bool8

* Rename Player.unk64/.unk66 -> Player.charState/.prevCharState

* Make Player.unk70 a bool8

* Remove old comment
2024-08-22 21:15:43 +02:00
JaceCear 592fe7d8a6 General cleanup and documentation (#152)
* Some Boss 2 documentation

* Some Sprite and BG documentation

* More minimal Boss 2 doc

* Move non-vanilla DmaWait impl.

* Add null-check to debug_text_printer

* Add CLEAR_TASK_MEMORY_ON_DESTROY toggle to Task system, to find and prevent use-after-free bugs

* Fix multiple use-after-free bugs

* Remove old address comments

* Add null-check to TasksExec (might be temporary)

* Fix use-after-free bug in sound test

* Use DISPLAY_HEIGHT instead of a magic number

* Add toggle for new DMA layout

* Some Sound Test doc

* Document gUnknown_080D6736

* Fix Sonic air-dashing instead of jumping in non-matching builds

* Some player func documentation

* Rename TogglePlayerLayer structs to reflect current naming convention
2024-08-13 21:37:34 +02:00
JaceCear 6395af6038 Change Clang Format's Line Width (ColumnLimit) to 140 (#150)
* Change Clang Format's Line Width (ColumnLimit) to 140

* Fix flash line breaks
2024-07-12 21:44:43 +02:00