53 Commits
Author SHA1 Message Date
Oliver Bell 99ef695094 fix level editor build 2026-05-17 19:53:18 +01:00
Oliver Bell d355f290fe more changes for sa1 sa2 merge
- Migrate specific game headers into their own folders
- Remove headers from sa1 codebase which can be referenced from sa2
2026-04-07 23:06:16 +01:00
Oliver Bell f3908cab65 sa2: restructure interactables, move entities into stage 2026-04-01 22:29:39 +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 59706b53c1 Create PSP and PS2 ports, switch to gpsp renderer, optimise audio (#235)
- Update software renderer to the gpsp renderer (fast enough to render on slow hardware)
- Convert audio emulation to fixed point (since float is slower on these systems)
- Add PSP as a target for SDL
- Add PS2 as its own target, though it's still using software rendering

Thanks to @kikugrave for adding the initial psp boilerplate and inspiring me to finally finish the ps2 port!
2026-03-04 02:10:03 +00:00
Oliver Bell 0383c80539 chao_garden: more code, split input(?) code 2025-12-23 19:28:20 +00:00
JaceCear 293787148b More SA1 alignment (#230)
* SA1 alignment

* Rename SpriteBase::spriteX -> meX

* Rename FLAGS_10 -> FLAGS_EXECUTE_VBLANK_CALLBACKS

* Align task.h with SA3

* Align core.c more with SA3

* Align core.c data with SA3

* Align task.h with SA1

* Align more with SA3

* Align task.h with SA1

* Align task.h with SA3

* Align task.c with SA1|SA3

* Align core.c with SA3

* Align EngineMainLoop with SA3

* Align core.c with SA3

* Some tools alignment with SA1

* Align Makefile with SA1

* Make BG_PLTT and OBJ_PLTT u16*

* Align with SA3

* Make BG_PLTT|OBJ_PLTT accessible as an array. Fix erroneous #if.

* Address USE_SA2_TASK_SYSTEM use from commit comments
2025-12-19 16:32:46 +01:00
Oliver Bell 1a02bc7aea arena_alloc: potential fix to gcc 15 errors 2025-06-01 18:48:54 +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
Oliver Bell 55a73a6e6d migrate to new scaninc, remove unused deps, fix make tidy 2025-01-30 01:11:49 +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
JaceCear 807c41f01e mapjson is not used anywhere, ever. Remove (#191) 2025-01-19 14:07:23 +01: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
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 2e94f8f446 fix to gbgafx compiler warnings on some gcc versions 2024-10-19 15:56:19 +01:00
Oliver Bell deedab5a88 fix issues with shared tools makefiles 2024-10-19 12:50:54 +01:00
Oliver Bell 18cd42721f README fixes, potential fix to GFX compilation, fix make tools with -j from main makefile 2024-10-18 17:32:31 +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
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
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 b3ba34ba21 clean up makefile weirdness 2024-05-08 16:27:21 +01:00
Oliver Bell a36348a5e4 fix dev container, update docs 2024-04-18 16:10:00 +01:00
JaceCear 2ba8c031be Add some error messages to csv_conv.c (#132) 2024-03-29 06:37:25 +00:00
JaceCear e7e689f809 Some documentation stuff to keep SA1 and SA2 as up to date with eachother as possible. (#127)
* Rename CommonThisPlatform -> PlatformThin

* Remove redundant #includes

* Add config.h

* Rename CommonThisPlatform -> PlatformThin

* Remove redundant #includes

* Add config.h

* sub_800BAAC -> CreateMagneticRing

* Minor adjustments to anim_commands.h and graphics.mk

* Enable 8bpp support for -split_into_oam_shapes option

* Remove outdated comment

* Move some sprite data into different while, to make core.h lighter
2024-01-29 20:45:28 +01:00
Oliver Bell 5223c9fee4 another fix for linux 2023-12-30 10:42:50 +00:00
Oliver Bell 1d0c7df6dd fix bribasa macos build 2023-12-30 10:35:33 +00: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 4894d4930e Documentation and decompile most of Zone 7's backgrounds (#110)
* Start StageBgUpdateZone7Acts12

* Rename stage BG related procedures

* Match CreateStageBg_Zone7

* Rename gUnknown_03001884 -> gComputedBgBuffer

* Rename gUnknown_03005590 -> gStageTime

* Progress on Zone7BgUpdate_Outside

* Almost match Zone7BgUpdate_Outside

* Move Zone7BgUpdate_Outside into nonmatch

* Progress on Zone7BgUpdate_Inside, added some to-be-removed debug code

* Add link of Zone7BgUpdate_Inside

* Move Zone7BgUpdate_Inside into nonmatching (logic is OK)

* Rename gComputedBgBuffer -> gBgOffsetsHBlank

* Merge stage/background/zone_7_0.c and zone_7_1.c

* Give palette proper var name
2023-09-08 00:53:22 +02:00
Oliver Bell 12fdd6457a fix entity positions tool for macos 2023-08-23 23:18:51 +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
JaceCear 346fcb0e8b More player callbacks (#69)
* Match PlayerCB_8025AB8

* Cleanup. Rename to player.rotation

* Match PlayerCB_8025D00

* Match PlayerCB_8025E18

* Add IS_BOSS_STAGE macro

* Match sub_8025F84

* Match PlayerCB_8026060

* Match PlayerCB_802611C

* Add ReadMe to gbagfx explaining the added parameters

* Match PlayerCB_80261D8

* Match PlayerCB_802631C

* Move some of game.s rodata

* Rename to GET_CHARACTER_ANIM

* Move PlayerCB_Spindash into non-matching
2023-03-20 14:29:52 +01:00
JaceCear 9d6a035110 Allow MacOS to build 2023-03-04 02:09:58 +01:00
JaceCear 63d0a7877c Merge branch 'main' into gbagfx_ex 2023-03-04 01:51:23 +01:00
JaceCear e4ad2ec224 Add script/gbagfx changes 2023-03-04 01:44:53 +01:00
JaceCear d0cbbf8799 Cleanup 2023-03-03 21:07:06 +01:00
JaceCear 924e32eb63 Add -split_into_oam_shapes parameter 2023-03-03 18:38:49 +01:00
JaceCear 358bbf0555 MSVC compatibility 2023-03-03 18:31:22 +01:00
JaceCear 3215bbbcbe Add -ignore_trailing to GBAGFX (#58)
* Add -ignore_trailing option to gbagfx

* Decrement numTiles if an empty trailing tile was found

* Use different var for output file size

* Add rule including -ignore_trailing for tilesets
2023-02-26 00:37:22 +00:00
JaceCear 29525baac0 Use different var for output file size 2023-02-26 01:04:53 +01:00
JaceCear ec87969246 Decrement numTiles if an empty trailing tile was found 2023-02-26 00:56:59 +01:00
JaceCear 58aaf3f595 Add -ignore_trailing option to gbagfx 2023-02-26 00:53:28 +01:00
Oliver Bell ff14b8111a fix builds on m1 2022-12-20 16:57:38 +00:00
Oliver Bell 624b75490d format: enable and enforce clang formatting 2022-11-11 19:45:49 +00:00
Oliver Bell 82ac4f75dd make tools automatically 2022-06-06 23:45:22 +00:00
Oliver Bell 66aba058c3 do initial work to enable preproc processing 2022-05-11 13:45:01 +01:00
Oliver Bell 5b3f98e56e undo original mid2agb workaround, provide better original midis, compile midis with original volumes 2022-05-01 02:27:21 +01:00
Oliver Bell 1fa0bbb2f6 create another work around for oddly ordererd data 2022-04-24 02:39:45 +01:00