Skip to content

Commit

Permalink
fix a lot of warning in code (#598)
Browse files Browse the repository at this point in the history
* Fix warnings
* Fix building
  • Loading branch information
coco875 authored Apr 16, 2024
1 parent d9c1ebb commit 9ac20c8
Show file tree
Hide file tree
Showing 58 changed files with 893 additions and 901 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,7 @@ $(BUILD_DIR)/%.o: %.c

$(BUILD_DIR)/%.o: $(BUILD_DIR)/%.c
$(call print,Compiling:,$<,$@)
@$(CC_CHECK) $(CC_CHECK_CFLAGS) -MMD -MP -MT $@ -MF $(BUILD_DIR)/$*.d $<
$(V)$(CC_CHECK) $(CC_CHECK_CFLAGS) -MMD -MP -MT $@ -MF $(BUILD_DIR)/$*.d $<
$(V)$(CC) -c $(CFLAGS) -o $@ $<

$(BUILD_DIR)/%.o: %.s $(MIO0_FILES) $(RAW_TEXTURE_FILES)
Expand Down
1 change: 1 addition & 0 deletions courses/banshee_boardwalk/course_offsets.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include "PR/gbi.h"
#include "course_offsets.h"
#include "courses/banshee_boardwalk/course_data.h"
#include <PR/gbi.h>

extern u8 gTexture6447C4[];
extern u8 gTexture676FB0[];
Expand Down
2 changes: 1 addition & 1 deletion courses/big_donut/course_displaylists.inc.c
Original file line number Diff line number Diff line change
Expand Up @@ -614,4 +614,4 @@ Gfx d_course_big_donut_packed_dl_1070[] =
{
gsSPDisplayList(d_course_big_donut_packed_dl_1040),
gsSPEndDisplayList(),
};
};
2 changes: 1 addition & 1 deletion courses/bowsers_castle/course_offsets.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const course_texture bowsers_castle_textures[] = {
{0x00000000, 0x0000, 0x0000, 0x0},
};

const u8 *bowsers_castle_dls[] = {
const Gfx *bowsers_castle_dls[] = {
d_course_bowsers_castle_dl_0,
d_course_bowsers_castle_dl_230,
d_course_bowsers_castle_dl_110,
Expand Down
40 changes: 20 additions & 20 deletions courses/courseTable.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,140 +10,140 @@ struct CourseTable gCourseTable[] = {{
_mario_raceway_vertexSegmentRomStart, _mario_raceway_vertexSegmentRomEnd,
_course_mario_raceway_offsetsSegmentRomStart, _course_mario_raceway_offsetsSegmentRomEnd,
d_course_mario_raceway_vertex, d_course_mario_raceway_vertex_count,
d_course_mario_raceway_packed, d_course_mario_raceway_packed_end,
d_course_mario_raceway_packed, (Gfx*) d_course_mario_raceway_packed_end,
mario_raceway_textures, 0, 0x0000,
}, {
_course_choco_mountain_dl_mio0SegmentRomStart, _course_choco_mountain_dl_mio0SegmentRomEnd,
_choco_mountain_vertexSegmentRomStart, _choco_mountain_vertexSegmentRomEnd,
_course_choco_mountain_offsetsSegmentRomStart, _course_choco_mountain_offsetsSegmentRomEnd,
d_course_choco_mountain_vertex, d_course_choco_mountain_vertex_count,
d_course_choco_mountain_packed, d_course_choco_mountain_packed_end,
d_course_choco_mountain_packed, (Gfx*) d_course_choco_mountain_packed_end,
choco_mountain_textures, 1, 0x0000,
}, {
_course_bowsers_castle_dl_mio0SegmentRomStart, _course_bowsers_castle_dl_mio0SegmentRomEnd,
_bowsers_castle_vertexSegmentRomStart, _bowsers_castle_vertexSegmentRomEnd,
_course_bowsers_castle_offsetsSegmentRomStart, _course_bowsers_castle_offsetsSegmentRomEnd,
d_course_bowsers_castle_vertex, d_course_bowsers_castle_vertex_count,
d_course_bowsers_castle_packed, d_course_bowsers_castle_packed_end,
d_course_bowsers_castle_packed, (Gfx*) d_course_bowsers_castle_packed_end,
bowsers_castle_textures, 0, 0x0000,
}, {
_course_banshee_boardwalk_dl_mio0SegmentRomStart, _course_banshee_boardwalk_dl_mio0SegmentRomEnd,
_banshee_boardwalk_vertexSegmentRomStart, _banshee_boardwalk_vertexSegmentRomEnd,
_course_banshee_boardwalk_offsetsSegmentRomStart, _course_banshee_boardwalk_offsetsSegmentRomEnd,
d_course_banshee_boardwalk_vertex, d_course_banshee_boardwalk_vertex_count,
d_course_banshee_boardwalk_packed, d_course_banshee_boardwalk_packed_end,
d_course_banshee_boardwalk_packed, (Gfx*) d_course_banshee_boardwalk_packed_end,
banshee_boardwalk_textures, 1, 0x0000,
}, {
_course_yoshi_valley_dl_mio0SegmentRomStart, _course_yoshi_valley_dl_mio0SegmentRomEnd,
_yoshi_valley_vertexSegmentRomStart, _yoshi_valley_vertexSegmentRomEnd,
_course_yoshi_valley_offsetsSegmentRomStart, _course_yoshi_valley_offsetsSegmentRomEnd,
d_course_yoshi_valley_vertex, d_course_yoshi_valley_vertex_count,
d_course_yoshi_valley_packed, d_course_yoshi_valley_packed_end,
d_course_yoshi_valley_packed, (Gfx*) d_course_yoshi_valley_packed_end,
yoshi_valley_textures, 0, 0x0000,
}, {
_course_frappe_snowland_dl_mio0SegmentRomStart, _course_frappe_snowland_dl_mio0SegmentRomEnd,
_frappe_snowland_vertexSegmentRomStart, _frappe_snowland_vertexSegmentRomEnd,
_course_frappe_snowland_offsetsSegmentRomStart, _course_frappe_snowland_offsetsSegmentRomEnd,
d_course_frappe_snowland_vertex, d_course_frappe_snowland_vertex_count,
d_course_frappe_snowland_packed, d_course_frappe_snowland_packed_end,
d_course_frappe_snowland_packed, (Gfx*) d_course_frappe_snowland_packed_end,
frappe_snowland_textures, 0, 0x0000,
}, {
_course_koopa_troopa_beach_dl_mio0SegmentRomStart, _course_koopa_troopa_beach_dl_mio0SegmentRomEnd,
_koopa_troopa_beach_vertexSegmentRomStart, _koopa_troopa_beach_vertexSegmentRomEnd,
_course_koopa_troopa_beach_offsetsSegmentRomStart, _course_koopa_troopa_beach_offsetsSegmentRomEnd,
d_course_koopa_troopa_beach_vertex, d_course_koopa_troopa_beach_vertex_count,
d_course_koopa_troopa_beach_packed, d_course_koopa_troopa_beach_packed_end,
d_course_koopa_troopa_beach_packed, (Gfx*) d_course_koopa_troopa_beach_packed_end,
koopa_troopa_beach_textures, 0, 0x0000,
}, {
_course_royal_raceway_dl_mio0SegmentRomStart, _course_royal_raceway_dl_mio0SegmentRomEnd,
_royal_raceway_vertexSegmentRomStart, _royal_raceway_vertexSegmentRomEnd,
_course_royal_raceway_offsetsSegmentRomStart, _course_royal_raceway_offsetsSegmentRomEnd,
d_course_royal_raceway_vertex, d_course_royal_raceway_vertex_count,
d_course_royal_raceway_packed, d_course_royal_raceway_packed_end,
d_course_royal_raceway_packed, (Gfx*) d_course_royal_raceway_packed_end,
royal_raceway_textures, 0, 0x0000,
}, {
_course_luigi_raceway_dl_mio0SegmentRomStart, _course_luigi_raceway_dl_mio0SegmentRomEnd,
_luigi_raceway_vertexSegmentRomStart, _luigi_raceway_vertexSegmentRomEnd,
_course_luigi_raceway_offsetsSegmentRomStart, _course_luigi_raceway_offsetsSegmentRomEnd,
d_course_luigi_raceway_vertex, d_course_luigi_raceway_vertex_count,
d_course_luigi_raceway_packed, d_course_luigi_raceway_packed_end,
d_course_luigi_raceway_packed, (Gfx*) d_course_luigi_raceway_packed_end,
luigi_raceway_textures, 0, 0x0000,
}, {
_course_moo_moo_farm_dl_mio0SegmentRomStart, _course_moo_moo_farm_dl_mio0SegmentRomEnd,
_moo_moo_farm_vertexSegmentRomStart, _moo_moo_farm_vertexSegmentRomEnd,
_course_moo_moo_farm_offsetsSegmentRomStart, _course_moo_moo_farm_offsetsSegmentRomEnd,
d_course_moo_moo_farm_vertex, d_course_moo_moo_farm_vertex_count,
d_course_moo_moo_farm_packed, d_course_moo_moo_farm_packed_end,
d_course_moo_moo_farm_packed, (Gfx*) d_course_moo_moo_farm_packed_end,
moo_moo_farm_textures, 0, 0x0000,
}, {
_course_toads_turnpike_dl_mio0SegmentRomStart, _course_toads_turnpike_dl_mio0SegmentRomEnd,
_toads_turnpike_vertexSegmentRomStart, _toads_turnpike_vertexSegmentRomEnd,
_course_toads_turnpike_offsetsSegmentRomStart, _course_toads_turnpike_offsetsSegmentRomEnd,
d_course_toads_turnpike_vertex, d_course_toads_turnpike_vertex_count,
d_course_toads_turnpike_packed, d_course_toads_turnpike_packed_end,
d_course_toads_turnpike_packed, (Gfx*) d_course_toads_turnpike_packed_end,
toads_turnpike_textures, 0, 0x0000,
}, {
_course_kalimari_desert_dl_mio0SegmentRomStart, _course_kalimari_desert_dl_mio0SegmentRomEnd,
_kalimari_desert_vertexSegmentRomStart, _kalimari_desert_vertexSegmentRomEnd,
_course_kalimari_desert_offsetsSegmentRomStart, _course_kalimari_desert_offsetsSegmentRomEnd,
d_course_kalimari_desert_vertex, d_course_kalimari_desert_vertex_count,
d_course_kalimari_desert_packed, d_course_kalimari_desert_packed_end,
d_course_kalimari_desert_packed, (Gfx*) d_course_kalimari_desert_packed_end,
kalimari_desert_textures, 0, 0x0000,
}, {
_course_sherbet_land_dl_mio0SegmentRomStart, _course_sherbet_land_dl_mio0SegmentRomEnd,
_sherbet_land_vertexSegmentRomStart, _sherbet_land_vertexSegmentRomEnd,
_course_sherbet_land_offsetsSegmentRomStart, _course_sherbet_land_offsetsSegmentRomEnd,
d_course_sherbet_land_vertex, d_course_sherbet_land_vertex_count,
d_course_sherbet_land_packed, d_course_sherbet_land_packed_end,
d_course_sherbet_land_packed, (Gfx*) d_course_sherbet_land_packed_end,
sherbet_land_textures, 0, 0x0000,
}, {
_course_rainbow_road_dl_mio0SegmentRomStart, _course_rainbow_road_dl_mio0SegmentRomEnd,
_rainbow_road_vertexSegmentRomStart, _rainbow_road_vertexSegmentRomEnd,
_course_rainbow_road_offsetsSegmentRomStart, _course_rainbow_road_offsetsSegmentRomEnd,
d_course_rainbow_road_vertex, d_course_rainbow_road_vertex_count,
d_course_rainbow_road_packed, d_course_rainbow_road_packed_end,
d_course_rainbow_road_packed, (Gfx*) d_course_rainbow_road_packed_end,
rainbow_road_textures, 0, 0x0000,
}, {
_course_wario_stadium_dl_mio0SegmentRomStart, _course_wario_stadium_dl_mio0SegmentRomEnd,
_wario_stadium_vertexSegmentRomStart, _wario_stadium_vertexSegmentRomEnd,
_course_wario_stadium_offsetsSegmentRomStart, _course_wario_stadium_offsetsSegmentRomEnd,
d_course_wario_stadium_vertex, d_course_wario_stadium_vertex_count,
d_course_wario_stadium_packed, d_course_wario_stadium_packed_end,
d_course_wario_stadium_packed, (Gfx*) d_course_wario_stadium_packed_end,
wario_stadium_textures, 0, 0x0000,
}, {
_course_block_fort_dl_mio0SegmentRomStart, _course_block_fort_dl_mio0SegmentRomEnd,
_block_fort_vertexSegmentRomStart, _block_fort_vertexSegmentRomEnd,
_course_block_fort_offsetsSegmentRomStart, _course_block_fort_offsetsSegmentRomEnd,
d_course_block_fort_vertex, d_course_block_fort_vertex_count,
d_course_block_fort_packed, d_course_block_fort_packed_end,
d_course_block_fort_packed, (Gfx*) d_course_block_fort_packed_end,
block_fort_textures, 0, 0x0000,
}, {
_course_skyscraper_dl_mio0SegmentRomStart, _course_skyscraper_dl_mio0SegmentRomEnd,
_skyscraper_vertexSegmentRomStart, _skyscraper_vertexSegmentRomEnd,
_course_skyscraper_offsetsSegmentRomStart, _course_skyscraper_offsetsSegmentRomEnd,
d_course_skyscraper_vertex, d_course_skyscraper_vertex_count,
d_course_skyscraper_packed, d_course_skyscraper_packed_end,
d_course_skyscraper_packed, (Gfx*) d_course_skyscraper_packed_end,
skyscraper_textures, 0, 0x0000,
}, {
_course_double_deck_dl_mio0SegmentRomStart, _course_double_deck_dl_mio0SegmentRomEnd,
_double_deck_vertexSegmentRomStart, _double_deck_vertexSegmentRomEnd,
_course_double_deck_offsetsSegmentRomStart, _course_double_deck_offsetsSegmentRomEnd,
d_course_double_deck_vertex, d_course_double_deck_vertex_count,
d_course_double_deck_packed, d_course_double_deck_packed_end,
d_course_double_deck_packed, (Gfx*) d_course_double_deck_packed_end,
double_deck_textures, 0, 0x0000,
}, {
_course_dks_jungle_parkway_dl_mio0SegmentRomStart, _course_dks_jungle_parkway_dl_mio0SegmentRomEnd,
_dks_jungle_parkway_vertexSegmentRomStart, _dks_jungle_parkway_vertexSegmentRomEnd,
_course_dks_jungle_parkway_offsetsSegmentRomStart, _course_dks_jungle_parkway_offsetsSegmentRomEnd,
d_course_dks_jungle_parkway_vertex, d_course_dks_jungle_parkway_vertex_count,
d_course_dks_jungle_parkway_packed, d_course_dks_jungle_parkway_packed_end,
d_course_dks_jungle_parkway_packed, (Gfx*) d_course_dks_jungle_parkway_packed_end,
dks_jungle_parkway_textures, 0, 0x0000,
}, {
_course_big_donut_dl_mio0SegmentRomStart, _course_big_donut_dl_mio0SegmentRomEnd,
_big_donut_vertexSegmentRomStart, _big_donut_vertexSegmentRomEnd,
_course_big_donut_offsetsSegmentRomStart, _course_big_donut_offsetsSegmentRomEnd,
d_course_big_donut_vertex, d_course_big_donut_vertex_count,
d_course_big_donut_packed, d_course_big_donut_packed_end,
d_course_big_donut_packed, (Gfx*) d_course_big_donut_packed_end,
big_donut_textures, 0, 0x0000,
}};

2 changes: 1 addition & 1 deletion courses/courseTable.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ struct CourseTable {
CourseVtx *vertexStart; // 0x18 segmented address of vertex data
u32 vertexCount; // 0x1C number of vertices in vertex data
u8 *packedStart; // 0x20 packed display list start address
uintptr_t finalDisplaylistOffset; // 0x24
Gfx *finalDisplaylistOffset; // 0x24
u32 *textures; // 0x20 segmented address of textures table
u16 unknown1; // 0x2C
u16 padding; // 0x2E
Expand Down
2 changes: 1 addition & 1 deletion courses/kalimari_desert/course_offsets.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const course_texture kalimari_desert_textures[] = {
{0x00000000, 0x0000, 0x0000, 0x0},
};

const u8 *kalimari_desert_dls[] = {
const Gfx *kalimari_desert_dls[] = {
d_course_kalimari_desert_dl_0,
d_course_kalimari_desert_dl_258,
d_course_kalimari_desert_dl_100,
Expand Down
14 changes: 7 additions & 7 deletions courses/koopa_troopa_beach/course_data.c
Original file line number Diff line number Diff line change
Expand Up @@ -8557,7 +8557,7 @@ u32 d_course_koopa_troopa_beach_unk4[] = {
0x00000000,
0x00000007,
0x00000000,
d_course_koopa_troopa_beach_dl_16630,
(u32) d_course_koopa_troopa_beach_dl_16630,
0x00000000,
0x00000000,
0x00000000,
Expand All @@ -8579,7 +8579,7 @@ u32 d_course_koopa_troopa_beach_unk4[] = {
0x00000000,
0x00000007,
0x00000000,
d_course_koopa_troopa_beach_dl_16850,
(u32) d_course_koopa_troopa_beach_dl_16850,
0x00000000,
0x00000000,
0x00000000,
Expand All @@ -8590,7 +8590,7 @@ u32 d_course_koopa_troopa_beach_unk4[] = {
0x00000000,
0x00000007,
0x00000000,
d_course_koopa_troopa_beach_dl_168F0,
(u32) d_course_koopa_troopa_beach_dl_168F0,
0x00000024,
0x00000000,
0x00000000,
Expand All @@ -8601,7 +8601,7 @@ u32 d_course_koopa_troopa_beach_unk4[] = {
0x00000000,
0x00000007,
0x00000000,
d_course_koopa_troopa_beach_dl_16990,
(u32) d_course_koopa_troopa_beach_dl_16990,
0x00000019,
0x00000000,
0x00000000,
Expand Down Expand Up @@ -8629,7 +8629,7 @@ u32 d_course_koopa_troopa_beach_unk4[] = {
0x00000000,
0x00000007,
0x00000000,
d_course_koopa_troopa_beach_dl_16850,
(u32) d_course_koopa_troopa_beach_dl_16850,
0x00000000,
0x00000000,
0x00000000,
Expand All @@ -8640,7 +8640,7 @@ u32 d_course_koopa_troopa_beach_unk4[] = {
0x00000000,
0x00000007,
0x00000000,
d_course_koopa_troopa_beach_dl_168F0,
(u32) d_course_koopa_troopa_beach_dl_168F0,
0x00000024,
0x00000000,
0x00000000,
Expand All @@ -8651,7 +8651,7 @@ u32 d_course_koopa_troopa_beach_unk4[] = {
0x00000000,
0x00000007,
0x00000000,
d_course_koopa_troopa_beach_dl_16990,
(u32) d_course_koopa_troopa_beach_dl_16990,
0x00000019,
0x00000000,
0x00000000,
Expand Down
2 changes: 1 addition & 1 deletion courses/luigi_raceway/course_offsets.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ const course_texture luigi_raceway_textures[] = {
{0x00000000, 0x0000, 0x0000, 0x0},
};

const u8 *luigi_raceway_dls[] = {
const Gfx *luigi_raceway_dls[] = {
d_course_luigi_raceway_dl_0,
d_course_luigi_raceway_dl_328,
d_course_luigi_raceway_dl_1A8,
Expand Down
2 changes: 1 addition & 1 deletion courses/mario_raceway/course_offsets.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ const course_texture mario_raceway_textures[] = {
{0x00000000, 0x0000, 0x0000, 0x0},
};

const u8 *mario_raceway_dls[] = {
const Gfx *mario_raceway_dls[] = {
d_course_mario_raceway_dl_0,
d_course_mario_raceway_dl_1D0,
d_course_mario_raceway_dl_E8,
Expand Down
2 changes: 1 addition & 1 deletion courses/moo_moo_farm/course_offsets.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const course_texture moo_moo_farm_textures[] = {
{0x00000000, 0x0000, 0x0000, 0x0},
};

const u8 *moo_moo_farm_dls[] = {
const Gfx *moo_moo_farm_dls[] = {
d_course_moo_moo_farm_dl_88,
d_course_moo_moo_farm_dl_598,
d_course_moo_moo_farm_dl_338,
Expand Down
10 changes: 5 additions & 5 deletions courses/rainbow_road/course_data.c
Original file line number Diff line number Diff line change
Expand Up @@ -3547,15 +3547,15 @@ u32 d_rainbow_road_unk4[] = {
0x00000000,
0x00000007,
0x00000000,
d_course_rainbow_road_dl_15550,
(u32) d_course_rainbow_road_dl_15550,
0x00000000,
0x00000000,
0x00000000,

0x00000000,
0x00000007,
0x00000000,
d_course_rainbow_road_dl_151A8,
(u32) d_course_rainbow_road_dl_151A8,
0x00000000,
0x00000000,
0x00000000,
Expand All @@ -3577,23 +3577,23 @@ u32 d_rainbow_road_unk4[] = {
0x00000000,
0x00000007,
0x00000000,
d_course_rainbow_road_dl_15C68,
(u32) d_course_rainbow_road_dl_15C68,
0x00000000,
0x00000000,
0x00000000,

0x00000000,
0x00000007,
0x00000000,
d_course_rainbow_road_dl_158C0,
(u32) d_course_rainbow_road_dl_158C0,
0x00000000,
0x00000000,
0x00000000,

0x00000000,
0x00000007,
0x00000000,
d_course_rainbow_road_dl_15F18,
(u32) d_course_rainbow_road_dl_15F18,
0x00000000,
0x00000000,
0x00000000,
Expand Down
Loading

0 comments on commit 9ac20c8

Please sign in to comment.