You've already forked SpaghettiKart
mirror of
https://github.com/izzy2lost/SpaghettiKart.git
synced 2026-03-26 16:57:37 -07:00
a1f0d32d66
* Update menus.c (#634) * Update common_data.yml (#635) * Renames for screenId and other changes (#636) * screenId renames * Rename surface map to collision mesh (#637) * Rename some stack vars (#638) * Fix syntax error (#639) * Rename some stack vars * Update collision.c * Collision Documentation (#640) * Collision related renames * update doxygen (#649) * change bool (#644) Co-authored-by: MegaMech <MegaMech@users.noreply.github.com> * Update (#642) * Delete trig_tables_bss.c (#650) * fix typo audio (#656) * fix typo src actor (#657) Co-authored-by: MegaMech <MegaMech@users.noreply.github.com> * fix typo include (#658) * fix course (#659) * fix typo debug (#660) * fix typo data (#661) * replace number with const (#665) * fix typo buffers (#655) * fix typo buffers * tweak ld file * rename to sMemoryPool * add a warning --------- * fix typo src (#654) * fix typo src * fix non matcing * Update code_80091750.c --------- * fix typo racing (#653) * fix typo racing * get it match * replace G_LINE3D to G_QUAD --------- * fix typo src (#652) * fix ending typo (#651) * Action more info when it doesn't match and fix first diff (#662) * Update linux-compile.yml * fix first-diff * Update first-diff.py --------- * document texture of kart (#663) * document texture of kart * change screenPlayerId to screenId * some documentation around object * Revert "some documentation around object" This reverts commit cbb39078e036bf2a417bed67359e910213acab28. * more rename --------- * Make evaluate_collision_players_palm_tree better (#667) This matches just the same as before, but using those two casts instead of shifts seems more likely to be accurate to the original source code Signed-off-by: Gabriel Ravier <gabravier@gmail.com> * add fedora instruciton (#666) * start documenting animation (#668) * start documenting animation * Update course_data.c * change comment * update libultra asm (#648) * update libultra asm * fix gcc __osThreadTail --------- * Document Vehicles (#641) * start doc collision * fix merge * finish rename fonction related to vehicle * document around waypoint of vehicle * make some modification * make some change and rename one * copy_ to oldPos * doc smoke ferry and train * some rename * fix some renaming * precise index * rename a funciton * simplify waypoint_vehicles * change some name * change some name * rename move_to_point_direction * fix some conflict * Update code_80005FD0.c * Update code_80005FD0.h --------- * Label a save info loop (#645) * save info * more gcc progress * fix a value and do a rename (#669) * update clang and add action (#664) * update clang and add action * try clang on course folder only * forget two file * Update course_displaylists.inc.c * forget few other file * Update course_vertices.inc.c * format all code while get it match * second pass * format other dir * disable clang format on bad ido code * fix some tabulation * revert format on tool dir * Update clang-format.yml * ignore gbi.h * add some read me instruction * fix error * format and fixing error * Update README.md --------- * Update linkonly_generator.py (#670) * format more file * update * fix compilation issue * remove course_metadata folder * re add course metadata folder * fix banshee bordwalk crash * fix windows eurk * Update CMakeLists.txt ---------
118 lines
4.3 KiB
C
118 lines
4.3 KiB
C
#ifndef SEGMENTS_H
|
|
#define SEGMENTS_H
|
|
|
|
#include <libultraship.h>
|
|
#include <macros.h>
|
|
|
|
extern u8 _memoryPoolSegmentNoloadStart[];
|
|
extern u8 _memoryPoolSegmentNoloadEnd[];
|
|
|
|
extern u8 _endingSegmentStart[];
|
|
extern u8 _endingSegmentRomStart[];
|
|
extern u8 _endingSegmentRomEnd[];
|
|
extern u8 _endingSegmentNoloadEnd[];
|
|
|
|
extern u8 _racingSegmentStart[];
|
|
extern u8 _racingSegmentNoloadEnd[];
|
|
extern u8 _racingSegmentRomStart[];
|
|
extern u8 _racingSegmentRomEnd[];
|
|
|
|
extern u8 _trigTablesSegmentStart[];
|
|
extern u8 _trigTablesSegmentSize[];
|
|
extern u8 _trigTablesSegmentRomStart[];
|
|
|
|
extern u8 _data_segment2SegmentRomStart[];
|
|
extern u8 _data_segment2SegmentRomEnd[];
|
|
|
|
extern u8 _common_texturesSegmentRomStart[];
|
|
extern u8 _common_texturesSegmentRomEnd[];
|
|
|
|
extern u8 _ceremonyDataSegmentRomStart[];
|
|
extern u8 _ceremonyDataSegmentRomEnd[];
|
|
|
|
extern u8 _startupLogoSegmentRomStart[];
|
|
extern u8 _startupLogoSegmentRomEnd[];
|
|
|
|
/**
|
|
* mk64 has three code segments:
|
|
* main 0x80000400
|
|
* ending 0x80280000 size 0xDF00
|
|
* race 0x8028DF00 size 0x2C470
|
|
**/
|
|
|
|
#define SEG_START 0x80000000
|
|
|
|
// Defines duplicated even if the same for both for easier readability
|
|
#ifdef AVOID_UB
|
|
#if 0
|
|
#define MEMORY_POOL_START (uintptr_t) & _memoryPoolSegmentNoloadStart[0]
|
|
#define MEMORY_POOL_END (uintptr_t) & _memoryPoolSegmentNoloadEnd[0]
|
|
|
|
#define SEG_ENDING (uintptr_t) & _endingSegmentStart[0]
|
|
#define SEG_ENDING_ROM_START (uintptr_t) & _endingSegmentRomStart[0]
|
|
/**
|
|
* Ending segment original size is 0xDF00 but much of that remains unused.
|
|
* This auto fits the segment to its proper size.
|
|
*/
|
|
#define SEG_ENDING_SIZE (size_t) ALIGN16((ptrdiff_t) (&_endingSegmentNoloadEnd[0] - &_endingSegmentStart[0]))
|
|
#define SEG_ENDING_ROM_SIZE (size_t) ALIGN16((ptrdiff_t) (&_endingSegmentRomEnd[0] - &_endingSegmentRomStart[0]))
|
|
|
|
#define SEG_RACING (uintptr_t) & _racingSegmentStart[0]
|
|
#define SEG_RACING_ROM_START (uintptr_t) & _racingSegmentRomStart[0]
|
|
#define SEG_RACING_SIZE (size_t) ALIGN16((ptrdiff_t) (&_racingSegmentNoloadEnd[0] - &_racingSegmentStart[0]))
|
|
#define SEG_RACING_ROM_SIZE (size_t) ALIGN16((ptrdiff_t) (&_racingSegmentRomEnd[0] - &_racingSegmentRomStart[0]))
|
|
|
|
#define TRIG_TABLES (uintptr_t) & _trigTablesSegmentStart[0]
|
|
#define TRIG_TABLES_ROM_START (uintptr_t) & _trigTablesSegmentRomStart[0]
|
|
#define TRIG_TABLES_SIZE (size_t) _trigTablesSegmentSize
|
|
|
|
#define SEG_DATA_START (uintptr_t) & _data_segment2SegmentRomStart[0]
|
|
#define SEG_DATA_END (uintptr_t) & _data_segment2SegmentRomEnd[0]
|
|
|
|
#define COMMON_TEXTURES_ROM_START (uintptr_t) & _common_texturesSegmentRomStart[0]
|
|
#define COMMON_TEXTURES_SIZE (ptrdiff_t)(&_common_texturesSegmentRomEnd[0] - &_common_texturesSegmentRomStart[0])
|
|
|
|
#define CEREMONY_DATA_ROM_START &_ceremonyDataSegmentRomStart[0]
|
|
#define CEREMONY_DATA_ROM_END &_ceremonyDataSegmentRomEnd[0]
|
|
|
|
#define STARTUP_LOGO_ROM_START &_startupLogoSegmentRomStart[0]
|
|
#define STARTUP_LOGO_ROM_END &_startupLogoSegmentRomEnd[0]
|
|
#endif
|
|
#else // Required for ok
|
|
|
|
#define MEMORY_POOL_START (uintptr_t) & _memoryPoolSegmentNoloadStart
|
|
#define MEMORY_POOL_END (uintptr_t) 0x80242F00
|
|
|
|
#define SEG_ENDING (uintptr_t) 0x80280000
|
|
#define SEG_ENDING_ROM_START (u8*) &_endingSegmentRomStart[0]
|
|
|
|
#define SEG_ENDING_SIZE (size_t) 0xDF00
|
|
#define SEG_ENDING_ROM_SIZE (size_t) ALIGN16((ptrdiff_t) (&_endingSegmentRomEnd[0] - &_endingSegmentRomStart[0]))
|
|
|
|
#define SEG_RACING (uintptr_t) 0x8028DF00
|
|
#define SEG_RACING_ROM_START (u8*) &_racingSegmentRomStart[0]
|
|
#define SEG_RACING_SIZE (size_t) 0x2C470
|
|
|
|
#define SEG_RACING_ROM_SIZE (size_t) ALIGN16((ptrdiff_t) (&_racingSegmentRomEnd[0] - &_racingSegmentRomStart[0]))
|
|
|
|
#define TRIG_TABLES (uintptr_t) 0x802BA370
|
|
#define TRIG_TABLES_ROM_START (uintptr_t) & _trigTablesSegmentRomStart[0]
|
|
#define TRIG_TABLES_SIZE (size_t) 0x5810
|
|
|
|
#define SEG_DATA_START (uintptr_t) & _data_segment2SegmentRomStart[0]
|
|
#define SEG_DATA_END (uintptr_t) & _data_segment2SegmentRomEnd[0]
|
|
|
|
#define COMMON_TEXTURES_ROM_START (uintptr_t) & _common_texturesSegmentRomStart[0]
|
|
#define COMMON_TEXTURES_SIZE \
|
|
(ptrdiff_t)((uintptr_t) & _common_texturesSegmentRomEnd - (uintptr_t) & _common_texturesSegmentRomStart)
|
|
|
|
#define CEREMONY_DATA_ROM_START &_ceremonyDataSegmentRomStart[0]
|
|
#define CEREMONY_DATA_ROM_END &_ceremonyDataSegmentRomEnd[0]
|
|
|
|
#define STARTUP_LOGO_ROM_START &_startupLogoSegmentRomStart[0]
|
|
#define STARTUP_LOGO_ROM_END &_startupLogoSegmentRomEnd[0]
|
|
|
|
#endif /* AVOID_UB */
|
|
|
|
#endif /* SEGMENTS_H */
|