Add new utility to calculate packed dl end and vertex count (#411)

* Add new utility to calculate packed dl end and vertex count

Requires changing a bunch of actual references to packed dl lists
 with raw numbers. Which feels extremely bad but it doesn't match
 otherwise.

Signed-off-by: Taggerung <tyler.taggerung@email.com>

* Hard code array lenghts in appropriate headers

Use macros to generate the vertex counts and packed dl end points

Heavily dependent on the array lengths being accurate. If they
 aren't stuff will break.

Signed-off-by: Taggerung <tyler.taggerung@email.com>
This commit is contained in:
Tyler McGavran
2023-09-10 16:21:16 -04:00
committed by GitHub
parent ccfe604719
commit c85a333a3f
32 changed files with 453 additions and 3769 deletions
+8
View File
@@ -64,4 +64,12 @@
// aligns an address to the next 16 bytes
#define ALIGN16(val) (((val) + 0xF) & ~0xF)
/**
* (u8*) dl : Cast array down to u8's
* + sizeof(dl) : go to the end of the array
* - sizeof(dl[0]) : walk back 1 Gfx macro
* - 0x07000000 : get just the offset
**/
#define GET_PACKED_END(dl) (((u8*) dl) + sizeof(dl) - sizeof(dl[0]) - 0x07000000)
#endif
File diff suppressed because it is too large Load Diff
-44
View File
@@ -1,44 +0,0 @@
// Generated by tools/generate_vertice_count.py
#include <macros.h>
#define d_course_rainbow_road_vertex_count 0x00000C27
#define d_course_yoshi_valley_vertex_count 0x00000E88
#define d_course_banshee_boardwalk_vertex_count 0x00001351
#define d_course_dks_jungle_parkway_vertex_count 0x0000162F
#define d_course_skyscraper_vertex_count 0x0000043E
#define d_course_block_fort_vertex_count 0x00000440
#define d_course_double_deck_vertex_count 0x0000022B
#define d_course_big_donut_vertex_count 0x0000048D
#define d_course_mario_raceway_vertex_count 0x0000167D
#define d_course_toads_turnpike_vertex_count 0x000018D7
#define d_course_choco_mountain_vertex_count 0x000015B8
#define d_course_frappe_snowland_vertex_count 0x00001599
#define d_course_kalimari_desert_vertex_count 0x000018F9
#define d_course_luigi_raceway_vertex_count 0x00001730
#define d_course_moo_moo_farm_vertex_count 0x00001F24
#define d_course_koopa_troopa_beach_vertex_count 0x000024A0
#define d_course_sherbet_land_vertex_count 0x00000A76
#define d_course_wario_stadium_vertex_count 0x000017B3
#define d_course_royal_raceway_vertex_count 0x00002072
#define d_course_bowsers_castle_vertex_count 0x00002537