181 Commits
Author SHA1 Message Date
JaceCear 393357f7c9 Move music_player_table.inc into shared folder (#273) 2026-07-21 11:23:11 +02:00
Oliver Bell 5efb59352f sa2: propeller_spring -> flying_spring, document flying spring and em level task 2026-05-27 00:59:34 +01:00
JaceCear 82dabc2f35 Extend INCPAL use in SA1. (#265)
* Align water_effects.h with SA3
2026-05-07 21:13:25 +01:00
Oliver Bell cc2110e85d Move SA1 to root
* name some engine globals (gSpriteTransform*)
* move the whole sa1 directory to the root
2026-05-02 23:39:11 +01:00
Oliver Bell 8d9c929ca5 sa2: re-include files removed after folder move 2026-04-03 09:56:39 +01:00
Oliver Bell c1de9a3a13 sa2: migrate data into sa2 sub directory 2026-04-03 09:47:08 +01:00
JaceCear 9da592bb8e Make palettes format-independent, and other improvments (#242)
* Remove unused RED|GREEN|BLUE_VALUE macros

* preproc: Add basic support for loading .pal files directly via INCPAL()

* Some potential boss_8 render fixes and misc. stuff

* Use INCPAL macro in src/data/sprite_animation.c (but that file's is unused rn?)

* Fix non-main-Makefiles not using preproc properly

* Remove all INCBIN(.gbapal) uses with INCPAL(.pal) in ./src

* Move gSpritePalettes to C

* Rename palette to time_display_singlepak.pal

* Remove obj_palettes.inc

* Use ColorRaw for known palettes

* Fix time_display match

* Rename palette to sound_test_bg.pal

* Add comment and scratch to sub_80236C8

* Use PALETTE_LEN_4BPP

* Document a vocal sample name. Thanks 'Asal (in Harmony)' for letting us know!

* Document palette names in /graphics

* Fix boss palette names

* Renmae to sBoss7Palettes

* Some Boss 7 documentation

* Add ShredWindowsGarbage to win32

* Make PLTT a Color[] in non-vanilla builds

* Make Tilemap use INCPAL
2026-03-17 23:00:00 +00:00
Oliver Bell 884c8c007e japan: match subgame loader 2025-09-12 20:55:32 +01:00
Oliver Bell 911ad8a808 bouncy chain -> chord 2025-03-20 23:00:15 +00:00
Oliver Bell 4120e4d998 document some music plant IAs
guitar string -> bouncy chain
document note block
fix bouncy block name
2025-03-16 19:23:21 +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
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 dbabbd41db Add ability to TAS test the game, fix bugs as a result of testing (#161) 2024-10-19 02:54:11 +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 8fdd433a2b Some matching improvements, documentation and make fixes (#151)
* Some cleanup for sub_802DF18, but still non-matching

* Almost match sub_802E278, down to one add instr

* Some grind variable documentation

* Fix some of the logic in sub_801EE64

* Some general documentation

* Document Bouncy Bar tasks and fix compilation

* Some documentation in rotating handle

* Fix standalone compile/link

* Add standalone build CI

* Fix copy-paste of Q_24_8

* Align whitespace

* Potential random crash fix

* Add some DMA doc to standalone

* Remove old nonmatch ASM and add SDL comment

* Cleanup and #ifdef fix in player.c
2024-07-28 23:25:50 +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
JaceCearandOliver Bell fcbaf7b7c1 Boss 9 (#146)
* Move Boss_9 data to C

* sRGB_080D8E20 hex -> dec

* First pass on CreateTrueArea53Boss

* Move CreateTrueArea53Boss into non-matching

* Rename remaining MoveBossPositionFuncs

* Move TrueArea53BossMove into non-match

* Match Task_EggmanKidnapsVanilla

* Match Task_TrueArea53BossMain

* Match sub_804D8E0

* Match Task_804D9DC

* Match Task_804DB34

* More Boss 9 progress

* Make upper bound in PseudoRandBetween() exclusive, since many calls suggest this being the original pattern

* Match sub_804E078

* Move sub_804E15C into non-matching

* Start sub_804E4CC

* Move sub_804E4CC into non-match

* Match sub_804E66C

* Match sub_804E74C

* Match sub_804E974

* Move sub_804F1EC into non-matching

* Match sub_804F47C

* Match sub_804F5BC

* More progress

* Move sub_804F850 into non-matching

* Match sub_804FD58

* Match sub_804FE24, sub_804FEFC and sub_804FF9C

* Move sub_8050030 and sub_8050104 into non-matching

* Temporarily move sub_8050104 and sub_80501D4 into non-matching

* Almost match sub_8050958

* Remove boss_9.s

* Remove old stubs

* Minor cleanup and fix crash in Zone 3's background

* Add missing pointer refs in CreateTrueArea53Boss

* Almost match sub_80505B8 (basically on-par with sub_80501D4

* Ollie matched sub_80501D4 and sub_80505B8

Co-authored-by: Oliver Bell <freshollie@gmail.com>

* Tilemap unknown_stars -> music_plant_moving_stars

* Add DEBUG macro

* Progress on CreateTrueArea53Boss

* Some fixes for CreateTrueArea53Boss

---------

Co-authored-by: Oliver Bell <freshollie@gmail.com>
2024-06-19 12:37:24 +02:00
Oliver Bell 900c31029a create sdl_win32 build, add platform builds to CI (#144)
* fixes for 64bit build
* create sdl_win32 target
2024-05-24 03:10:04 +01:00
JaceCear 1e5ed903e6 Non-vanilla cleanup and fixes (#141)
* Convert Pipe data pointers to C
* Move Special Stage data to C
* Add C_DECL macro
* Use `#if` instead of `#ifdef` for some macros
* Add more stubs
* Rename RGB( ) macro to RGB16( ) to avoid naming conflicts
2024-05-17 02:15:23 +02:00
JaceCear 878cd1c504 Credits for this project (#140)
* Add defsym NON_MATCHING to ASFLAGS

* Use FLAGS_ macros instead of numbers

* Move debug_text_printer.h

* Add DCCredits

* Some formatting, some minor fixes

* Introduce ENABLE_DECOMP_CREDITS symbol

* More adjustments to the credits. Edit the Q_MUL macro

* Slight position adjustment for Sonic

* Minor fixes. Add note for weird Mod() compiler error

* Minor spelling mistake
2024-05-12 20:21:43 +02:00
Oliver Bell 14464c4084 asm sources to src, fix build on macos 2024-05-10 18:30:37 +01:00
JaceCearandOliver Bell 3eed7359bf Make and LD stuff (#138)
* Remove build path from ldscript
* Fix issues with ldscript in chaogarden
* Update Makefile to handle building with other compilers

---------

Co-authored-by: Oliver Bell <freshollie@gmail.com>
2024-05-10 00:30:38 +02:00
Oliver Bell ef9bcf8006 ground work to match chao garden for japan 2024-04-21 12:43:21 +01:00
Oliver Bell 68470e2920 extract collect rings assets 2024-04-19 17:00:33 +01:00
Oliver Bell 86d632cf01 improve data file names, move sprite tables definition into C, improve sprite table type 2024-04-19 13:19:33 +01:00
Oliver Bell c0966bc4f5 improve readme, improve collect rings documentation, start extracting some collect rings data 2024-04-19 01:35:03 +01:00
JaceCearandOliver Bell 9006af7dcd Stage collision and some player_1.s (#130)
* Match sub_801F15C

* Fix faulty context generation

* Fake-match sub_801F07C

* Kind of match sub_801F044

* Properly match sub_801F044

* Ollie matched sub_801F07C

* Change proc prototype

* Refine Collision macro

* Document min/max fields in struct Camera

* Minor doc in camera.c

* Progress on sub_801EF94

* Get sub_801EF94 to match more closely

* Move sub_801EF94 into nonmatch

* Collision:🎏 u8 -> u16

* Fake-match sub_801EE64

* Fake-match sub_801EF94

* Fake-match sub_801ED24

* Progress on sub_801EC3C

* Match sub_801EC3C. Introduce CLAMP_32

* Reorganize new CLAMP macro

* Match sub_801ED24 properly

* Some documentation of stage_collision

* Match sub_801EB44

* Start sub_801E6D4

* Progress on sub_801E6D4

* Match sub_801E6D4

* Match sub_801E6D4

* Match sub_801E4E4

* Try making more sense of the strongly nested functions through macros

* Use the macros in more places

* Remove stage_collision.s

* Start SetupEggmanKidnapsVanillaTask

* Match SetupEggmanKidnapsVanillaTask

* Start on sub_8023708

* Match sub_80236C8 and sub_8023610

* Fake-match sub_8022F58

* Move sub_802302C into non-match

* Match sub_8023128

* Match sub_80231C0

* Match sub_8023260

* Start sub_80232D0

* Minor progress on sub_80232D0

* Progress on sub_80232D0

* Progress on sub_80232D0

* Progress on sub_80232D0

* Ollie matched sub_80232D0

Co-authored-by: Oliver Bell <freshollie@gmail.com>

* Remove player_1.s

* Remove redundant comment

* One PLAYERFN_CHANGE_SHIFT_OFFSETS macro
2024-02-27 20:15:15 +01:00
JaceCearandOliver Bell c65d0f9285 bg_triangles and player_super_sonic (#124)
* Progress on sprite_4

* Ollie matched sub_8007858

Co-authored-by: Oliver Bell <freshollie@gmail.com>

* Rename sprite_4

* Move sub_800724C into non-match

* Progress on sub_8006228 (99%)

* Move sub_8006228 into nonmatch

* Move sub_80064A into nonmatch

* Remove bg_triangles_o.s

* Minor progress(?) on sub_8004860

* Some documentation in title_screen

* Some matching progress in GrindRail(+10%). Rename platform nonmatch file

* Some documentation in demo_manager

* Add rodata of some modules to make future extension of them nicer

* se_149 -> se_time_up

* More game_over documentation

* Start player_super_sonic

* Move sub_802BCCC into nonmatch

* Progress on player_super_sonic

* Move sub_802C92C into nonmatch. Match sub_802C8EC and sub_802C8A0

* Introduce SUPER_SWITCH_ANIM

* Merge player_super_sonic modules into one

* InitBackGround -> DrawBackground

* Some Camera struct doc

* gUnknown_03002260 -> gTilemapsRef

* gUnknown_03001B60 -> gBgOffsetsBuffer

* More var documentation

* Add some description for the two stage timers

* Move Task_801951C into nonmatch

---------

Co-authored-by: Oliver Bell <freshollie@gmail.com>
2024-01-09 02:03:35 +01:00
JaceCearandOliver Bell 5b55841b18 BriBaSA_ex - Initial Commit (#123)
* c_header_parser: Add EQUALS and some compatibility fixes.

* Add stage_info.txt files to all maps

* Filter BriBaSA_ex as long as it doesn't have a Makefile

* Add fixes for the tokenizer

* Initial commit for BriBaSA_ex

* Update stage info

* Add spawn pos being shown as player character, add 'Go to spawn pos' keyboard shortcut, add ability to display item boxes.

* Renamed stage_info.txt -> metadata.txt, because regular tilemaps will make use of them

* BriBaSA_ex: Set camera to spawn pos when loading a map. Load all map paths on init. Cleanup.

* Implement drawing of most interactables

* Fix main not compiling when Raylib wasn't compiled before

* Add keyboard button controls and some cleanup

* Rename a few IA and anim constants

* Rename a few constants

* Add error output for unknown names when converting CSV->Bin using epos

* Add TILE_DIM and TILES_PER_METATILE, and some cleanup

* Move some procedures out of epos.c

* Minor cleanup

* Minor cleanup in csv_conv.c

* More cleanup and documentation

* More cleanup

* Move shared libraries inside tools to their own directories

* Remove redundant versions of shared libraries

* Fix warnings

* Add library binaries to .gitignore

* Add BriBaSA_ex Makefile

* Fix compilation

* Load entity data from CSV files and display them

* Fix some var and const names

* Fix includes

* Re-add Makefile for csv_conv

* Generalize drawing of IA textures and bounding boxes

* Split the code into multiple modules

* Rename a few IAs

* Rename Giant Propeller -> Propeller

* More adjustments for Propeller renaming

* BriBaSA_ex: Some restructuring

* Fix warning

* Add texture.c to build.bat

* Fix build errors from renaming IAs

* More restructuring

* Move constants to header file

* Cleanup

* Open buttons through 'UiElement()'

* Uncomment redundant call to FileExists

* Fix build

* BriBaSA: Fix crash

* Streamline entity data layout

* Split ring graphics into individual frames

* Make entities clickable

* Display metadata of highlit entity

* Print entity type if an Entity has one

* Fix IA bounding boxes

* Implement saving entities when clicking on 'Save Map'

* Add EntityData* to EntityDataPointer union

* Allow entity data to be edited

* Add IS_USER_KEY_PRESSED_ macros. Use them for the spawn position

* Fix gcc warnings

* Update readme

* Fix GCC warnings

* Fix Makefile compilation for Linux

* Update epos to use CsvEntityType

* Exclude tools dir when formatting

* Format...

* fix linux build and some makefile improvements

Co-authored-by: Oliver Bell <freshollie@gmail.com>

* fix formatter, undo some debug stuff

Co-authored-by: Oliver Bell <freshollie@gmail.com>

* fix CI

Co-authored-by: Oliver Bell <freshollie@gmail.com>

* try this

Co-authored-by: Oliver Bell <freshollie@gmail.com>

* this is better

Co-authored-by: Oliver Bell <freshollie@gmail.com>

* Replace MSVC-exclusive file functions

* remove comment

Co-authored-by: Oliver Bell <freshollie@gmail.com>
---------

Co-authored-by: Oliver Bell <freshollie@gmail.com>
2023-12-10 12:49:22 +01:00
JaceCear 732bec606b Document a few function calls and the boost_effect module (#117)
* Match sub_802DBC0

* Match sub_802E044

* Match sub_802E0D4

* Match sub_802E164 and sub_802E1EC

* Progress on sub_802E278 and sub_802E384

* Move sub_802E278 and sub_802E384 into nonmatch

* Split stage_intro.s

* Start SetupStageIntro

* Fix SITaskD's size being too small, resulting in an endless loop

* Move SetupStageIntro into nonmatch

* Update percentage

* Match Task_802F75C

* Move Task_802F9F8 into nonmatch

* Match Task_IntroColorAnimation

* Document some of Task_IntroColorAnimation

* Match StageIntroUpdateIcons

* Progress on Task_IntroZoneNameAndIconAnimations

* Move Task_IntroZoneNameAndIconAnimations into nonmatch

* Formatter........

* Move Task_IntroActLettersAnimations into nonmatch

* Match remaining procedures of intro module

* Make most procedures static

* Remove old asm file

* Fix function header types

* Progress on sub_8031138

* Move sub_8031138 into nonmatching

* Match sub_80310F0

* Some documentation of outro vars

* Almost match Task_UpdateGotThroughScreen

* Almost match Task_UpdateGotThroughScreen

* Move Task_UpdateGotThroughScreen into non-matching

* Remove Task_UpdateGotThroughScreen's asm

* Fix typo

* Start sub_80304DC and fix type of StageOutro.unk170

* Introduce SPECIAL_STAGE_REQUIRED_SP_RING_COUNT

* Progress on sub_80304DC

* Finish stage_outro.s

* Rename stage/outro.c -> stage/results.c

* Rename task creation to CreateStageResults

* Use ZONE_TIME_TO_INT in results.c

* Final cleanup

* Minor cleanup

* Delete stage_outro.s, again

* Start sub_8019CCC

* Address review issues

* Match sub_8019CCC

* Simplify sub_8019CCC

* Finish remaining procedures of player_mp_finish_1

* Start StageBgUpdate_Zone6Acts12

* Start matching StageBgUpdate_Zone6Acts12

* Move StageBgUpdate_Zone6Acts12 into nonmatch

* Fix endless loop in StageBgUpdate_Zone6Acts12

* Call params x/y

* Start player_actions.s. Match sub_801561C

* Match sub_80156D0

* Match more procs of player_actions.c

* Match sub_801583C

* Match Task_80159C8

* Match CreateAmyAttackHeartEffect

* Fake-match Task_8015CE4

* Match amy_attack_heart_effect.c

* Make a few variables local to boost_effect.c
2023-10-21 00:19:03 +02:00
Oliver Bell 73f97a74e4 add missing map data after move, fix tilemap casts 2023-09-03 01:33:10 +01:00
Oliver Bell f15cccbe8d restructure level tilemaps into maps 2023-09-02 23:27:33 +01:00
Oliver Bell ab0b6afffb split boss data 2023-08-24 22:55:39 +01:00
Oliver Bell 9458841e48 finish boss5, document some attributes, extract data 2023-08-24 22:12:14 +01:00
JaceCear cb4cf31eed Introduce MapEntity positioning-tool, name almost all Interactables (#106)
* Rename IA019

* Rename IA094 -> Pole

* Rename IA080 -> light_globe

* Rename some IAs, rename dir tec_base -> techno_base for consistency

* Fix include paths to techno_base

* Rename sprite -> ia105 (change once IA105 is named!)

* Rename IAs to avoid their names starting with digits

* Edit CSV format to include map-width/-height and seperated regions instead of world positions

* Add item indices

* Update example format

* First draft for CSV->Bin conversion done

* Implement binary file export in epos

* Revert changes to propeller_spring.c

* Add CSV files

* Fix data-less CSV lines leading to exit

* Add rules for map entity data. Add rule to remove <entity>.bin files

* Remove <entity>.bin files
2023-08-23 11:07:27 +02:00
Oliver Bell 3c4e0272fc document that rom is shiftable, extract another pointer array 2023-08-13 21:20:05 +01:00
JaceCear 7fc087b2fd Eggmobile Escape Sequence and shared Boss functions (#102)
* Match Eggmobile Escape Sequence

* Match bosses_common.s
2023-08-04 23:27:56 +02:00
JaceCear c4fc88f2d2 Extract tilemap of unused Japanese logo of SA1 (#95)
* Remove data5.s. Replace it with exported tilemap

* Add Collision credits
2023-07-09 11:54:15 +02:00
JaceCear 4028c85484 Export all Tilemaps of the game (#94)
* Introduce Tilemap, replace MapHeader_Full.

* Add Background members metatileMap, mapWidth, mapHeight

* Export all raw, non-level tilemaps. Also find 3 unused ones

* Consistent naming for TM_CHARACTER_SELECT_ defines

* Add more info for matching, document TM_371 and format

* Add palettes which use transparency raw, fix pointer in pause_menu

* Remove redundant copies
2023-07-09 01:07:11 +02:00
JaceCear ff91f4bb57 Tilemap ID documentation (#92)
* Document tilemap indices
2023-07-03 13:26:34 +02:00
JaceCearandOliver Bell 4f86f5872b Convert SpriteDimensions data and SpriteOAM data to C (#91)
* Convert gSpriteDimensions to C data

* Formatter of doom destroying formatting

* Move OamData into C

* Introduce NUM_SPRITE_ANIMATIONS

* Remove redundant copy

* Unwrap OAM sprite data into PACKED struct

* Remove outdated comment

* Fix formatter's formatting

* convert to typedef

Co-authored-by: Oliver Bell <freshollie@gmail.com>
---------

Co-authored-by: Oliver Bell <freshollie@gmail.com>
2023-06-22 12:57:01 +02:00
JaceCear 2e1a1f89d3 Stage stuff (#85)
* Match stage_palette_loader

* Match stage_language_task_1

* Match stage_language_task_2

* Pop-Effect -> Dust-Cloud. Match stage/dust_cloud

* stage_debug_ui -> debug_text_printer. Match Debug Text Printer

* Match Task_StageMusicManager

* Match stage_music_manager

* (Sort of) match CreateStageRingsManager

* Move Task_RingsMgrMain into non-match. Match rest of Rings Manager
2023-06-01 17:43:22 +02:00
Oliver Bell 45d72635a5 extract pipe horn data 2023-05-27 13:16:25 +01:00
Oliver Bell fd3470a72b restructure entities in maps folder, move compressed data into source 2023-05-25 01:43:31 +01:00
JaceCear 251a79603a Split true_area_53.s (#80)
* Split true_area_53.s
2023-05-23 13:39:39 +02:00
Oliver Bell 1c00dafce1 more multiboot documenting 2023-05-14 04:10:22 +01:00
Oliver Bell 05c349d399 refactor multiboot folder 2023-05-14 02:50:38 +01:00
Oliver Bell b4bf19caca dissasemble subgame loader 2 2023-05-13 23:13:34 +01:00
Oliver Bell 07e01bb854 finish dissasembling collect rings 2023-05-13 21:45:12 +01:00