Refresh 3

This commit is contained in:
n64 committed 2019-11-03 14:36:27 -05:00
1 parent 6b8bc9b9ec
commit a7c423cb43
4603 files changed
+475500 -437701

No files matched your search

+17
View File
@@ -0,0 +1,17 @@
#ifndef DEBUG_LEVEL_SELECT_H
#define DEBUG_LEVEL_SELECT_H
#include "types.h"
extern const Gfx debug_level_select_dl_07000858[];
extern const Gfx debug_level_select_dl_07001100[];
extern const Gfx debug_level_select_dl_07001BA0[];
extern const Gfx debug_level_select_dl_070025F0[];
extern const Gfx debug_level_select_dl_07003258[];
extern const Gfx debug_level_select_dl_07003DB8[];
extern const Gfx debug_level_select_dl_070048C8[];
extern const Gfx debug_level_select_dl_07005558[];
extern const Gfx debug_level_select_dl_070059F8[];
extern const Gfx debug_level_select_dl_070063B0[];
#endif
+14 -14
View File
@@ -1383,10 +1383,10 @@ static void print_hud_lut_string_fade(s8 hudLUT, s16 x, s16 y, const unsigned ch
* Prints a generic white string with text fade properties.
*/
static void print_generic_string_fade(s16 x, s16 y, const unsigned char *text) {
gSPDisplayList(gDisplayListHead++, dl_ia8_text_begin);
gSPDisplayList(gDisplayListHead++, dl_ia_text_begin);
gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, sTextBaseAlpha - sTextFadeAlpha);
print_generic_string(x, y, text);
gSPDisplayList(gDisplayListHead++, dl_ia8_text_end);
gSPDisplayList(gDisplayListHead++, dl_ia_text_end);
}
/**
@@ -1464,7 +1464,7 @@ static void print_main_menu_strings(void) {
print_save_file_star_count(SAVE_FILE_D, 209, 118);
gSPDisplayList(gDisplayListHead++, dl_rgba16_text_end);
// Print menu names
gSPDisplayList(gDisplayListHead++, dl_ia8_text_begin);
gSPDisplayList(gDisplayListHead++, dl_ia_text_begin);
gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, sTextBaseAlpha);
print_generic_string(SCORE_X, 39, textScore);
print_generic_string(COPY_X, 39, textCopy);
@@ -1473,7 +1473,7 @@ static void print_main_menu_strings(void) {
sSoundTextX = get_str_x_pos_from_center(254, textSoundModes[sSoundMode], 10.0f);
#endif
print_generic_string(SOUNDMODE_X1, 39, textSoundModes[sSoundMode]);
gSPDisplayList(gDisplayListHead++, dl_ia8_text_end);
gSPDisplayList(gDisplayListHead++, dl_ia_text_end);
// Print file names
gSPDisplayList(gDisplayListHead++, dl_menu_ia8_text_begin);
gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, sTextBaseAlpha);
@@ -1542,12 +1542,12 @@ static void print_score_menu_strings(void) {
print_save_file_star_count(SAVE_FILE_D, 211, 119);
gSPDisplayList(gDisplayListHead++, dl_rgba16_text_end);
// Print menu names
gSPDisplayList(gDisplayListHead++, dl_ia8_text_begin);
gSPDisplayList(gDisplayListHead++, dl_ia_text_begin);
gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, sTextBaseAlpha);
print_generic_string(RETURN_X, 35, textReturn);
print_generic_string(COPYFILE_X1, 35, textCopyFileButton);
print_generic_string(ERASEFILE_X1, 35, textEraseFileButton);
gSPDisplayList(gDisplayListHead++, dl_ia8_text_end);
gSPDisplayList(gDisplayListHead++, dl_ia_text_end);
// Print file names
gSPDisplayList(gDisplayListHead++, dl_menu_ia8_text_begin);
gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, sTextBaseAlpha);
@@ -1670,12 +1670,12 @@ static void print_copy_menu_strings(void) {
print_save_file_star_count(SAVE_FILE_D, 211, 119);
gSPDisplayList(gDisplayListHead++, dl_rgba16_text_end);
// Print menu names
gSPDisplayList(gDisplayListHead++, dl_ia8_text_begin);
gSPDisplayList(gDisplayListHead++, dl_ia_text_begin);
gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, sTextBaseAlpha);
print_generic_string(RETURN_X, 35, textReturn);
print_generic_string(VIEWSCORE_X1, 35, textViewScore);
print_generic_string(ERASEFILE_X2, 35, textEraseFileButton);
gSPDisplayList(gDisplayListHead++, dl_ia8_text_end);
gSPDisplayList(gDisplayListHead++, dl_ia_text_end);
// Print file names
gSPDisplayList(gDisplayListHead++, dl_menu_ia8_text_begin);
gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, sTextBaseAlpha);
@@ -1754,12 +1754,12 @@ static void print_erase_menu_prompt(s16 x, s16 y) {
}
}
// Print "YES NO" strings
gSPDisplayList(gDisplayListHead++, dl_ia8_text_begin);
gSPDisplayList(gDisplayListHead++, dl_ia_text_begin);
gDPSetEnvColor(gDisplayListHead++, sYesNoColor[0], sYesNoColor[0], sYesNoColor[0], sTextBaseAlpha);
print_generic_string(x + 56, y, textYes);
gDPSetEnvColor(gDisplayListHead++, sYesNoColor[1], sYesNoColor[1], sYesNoColor[1], sTextBaseAlpha);
print_generic_string(x + 98, y, textNo);
gSPDisplayList(gDisplayListHead++, dl_ia8_text_end);
gSPDisplayList(gDisplayListHead++, dl_ia_text_end);
}
#ifdef VERSION_JP
@@ -1873,12 +1873,12 @@ static void print_erase_menu_strings(void) {
print_save_file_star_count(SAVE_FILE_D, 211, 119);
gSPDisplayList(gDisplayListHead++, dl_rgba16_text_end);
// Print menu names
gSPDisplayList(gDisplayListHead++, dl_ia8_text_begin);
gSPDisplayList(gDisplayListHead++, dl_ia_text_begin);
gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, sTextBaseAlpha);
print_generic_string(RETURN_X, 35, textReturn);
print_generic_string(VIEWSCORE_X2, 35, textViewScore);
print_generic_string(COPYFILE_X2, 35, textCopyFileButton);
gSPDisplayList(gDisplayListHead++, dl_ia8_text_end);
gSPDisplayList(gDisplayListHead++, dl_ia_text_end);
// Print file names
gSPDisplayList(gDisplayListHead++, dl_menu_ia8_text_begin);
gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, sTextBaseAlpha);
@@ -1912,7 +1912,7 @@ static void print_sound_mode_menu_strings(void) {
print_hud_lut_string(HUD_LUT_DIFF, SOUND_SELECT_X, 35, textSoundSelect);
gSPDisplayList(gDisplayListHead++, dl_rgba16_text_end);
// Print mode names
gSPDisplayList(gDisplayListHead++, dl_ia8_text_begin);
gSPDisplayList(gDisplayListHead++, dl_ia_text_begin);
for (mode = 0; mode < 3; mode++) {
if (mode == sSoundMode) {
gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, sTextBaseAlpha);
@@ -1925,7 +1925,7 @@ static void print_sound_mode_menu_strings(void) {
#endif
print_generic_string(SOUNDMODE_X2, 87, textSoundModes[mode]);
}
gSPDisplayList(gDisplayListHead++, dl_ia8_text_end);
gSPDisplayList(gDisplayListHead++, dl_ia_text_end);
}
static unsigned char textStarX[] = { TEXT_STAR_X };
+4 -3
View File
@@ -121,8 +121,9 @@ extern void bhv_menu_button_init(void);
extern void bhv_menu_button_loop(void);
extern void bhv_menu_button_manager_init(void);
extern void bhv_menu_button_manager_loop(void);
extern Gfx *geo_menu_strings_and_cursor(s32 run, UNUSED struct GraphNode *node, UNUSED f32 mtx[4][4]);
extern void lvl_init_menu_values_and_cursor_pos(UNUSED s32 arg, UNUSED s32 unused);
extern s32 lvl_update_menu_obj_and_load_file_selected(UNUSED s32 arg, UNUSED s32 unused);
extern Gfx *geo_file_select_strings_and_menu_cursor(s32 callContext, struct GraphNode *node,
f32 mtx[4][4]);
extern void lvl_init_menu_values_and_cursor_pos(s32 arg, s32 unused);
extern int lvl_update_obj_and_load_file_selected(s32 arg, s32 unused);
#endif /* FILE_SELECT_H */
+13 -17
View File
@@ -1,5 +1,6 @@
#include "ultra64.h"
#include "sm64.h"
#include "prevent_bss_reordering.h"
#include "types.h"
#include "game/memory.h"
#include "game/segment2.h"
@@ -29,8 +30,8 @@ extern Gfx title_screen_bg_dl_0A000148[];
extern Gfx title_screen_bg_dl_0A000160[];
extern Gfx title_screen_bg_dl_0A000178[];
extern Gfx title_screen_bg_dl_0A000190[];
extern Gfx mario_title_texture_table[];
extern Gfx game_over_texture_table[];
extern const u8 *const mario_title_texture_table[];
extern const u8 *const game_over_texture_table[];
// intro geo bss
int gGameOverFrameCounter;
@@ -53,7 +54,7 @@ float introBackgroundOffsetY[] = {
};
// table that points to either the "Super Mario 64" or "Game Over" tables
Gfx *introBackgroundTextureType[] = { mario_title_texture_table, game_over_texture_table };
const u8 *const *introBackgroundTextureType[] = { mario_title_texture_table, game_over_texture_table };
s8 introBackgroundIndexTable[] = {
INTRO_BACKGROUND_SUPER_MARIO, INTRO_BACKGROUND_SUPER_MARIO, INTRO_BACKGROUND_SUPER_MARIO,
@@ -117,7 +118,7 @@ Gfx *geo18_title_screen(u32 sp50, struct GraphNode *sp54, UNUSED u32 sp58) {
scaleZ = 0.0f;
}
guScale(scaleMat, scaleX, scaleY, scaleZ);
gSPMatrix(displayListIter++, scaleMat, G_MTX_PUSH);
gSPMatrix(displayListIter++, scaleMat, G_MTX_MODELVIEW | G_MTX_MUL | G_MTX_PUSH);
gSPDisplayList(displayListIter++, &intro_seg7_dl_0700B3A0);
gSPPopMatrix(displayListIter++, G_MTX_MODELVIEW);
gSPEndDisplayList(displayListIter);
@@ -161,26 +162,21 @@ Gfx *geo18_fade_transition(u32 sp40, struct GraphNode *sp44, UNUSED u32 sp48) {
}
Gfx *intro_backdrop_one_image(u32 index, s8 *backgroundTable) {
Mtx *mtx; // sp5c
Gfx *displayList; // sp58
Gfx *displayListIter; // sp54
u32 *vIntroBgTable; // sp50
s32 i; // sp4c
Mtx *mtx; // sp5c
Gfx *displayList; // sp58
Gfx *displayListIter; // sp54
const u8 *const *vIntroBgTable; // sp50
s32 i; // sp4c
mtx = alloc_display_list(sizeof(*mtx));
displayList = alloc_display_list(36 * sizeof(*displayList));
displayListIter = displayList;
vIntroBgTable = segmented_to_virtual(introBackgroundTextureType[backgroundTable[index]]);
guTranslate(mtx, introBackgroundOffsetX[index], introBackgroundOffsetY[index], 0.0f);
gSPMatrix(displayListIter++, mtx, G_MTX_LOAD | G_MTX_PUSH);
gSPMatrix(displayListIter++, mtx, G_MTX_MODELVIEW | G_MTX_LOAD | G_MTX_PUSH);
gSPDisplayList(displayListIter++, &title_screen_bg_dl_0A000118);
for (i = 0; i < 4; ++i) {
gDPSetTextureImage(displayListIter++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, vIntroBgTable[i]);
gDPSetTile(displayListIter++, 0, 2, 0, 0, 7, 0, 2, 6, 0, 2, 7, 0);
gDPLoadSync(displayListIter++);
gDPLoadBlock(displayListIter++, 7, 0, 0, 1599, 103);
gDPPipeSync(displayListIter++);
gDPSetTile(displayListIter++, 0, 2, 0x14, 0, 0, 0, 2, 6, 0, 2, 7, 0);
gDPSetTileSize(displayListIter++, 0, 0, 0, 316, 76);
gDPLoadTextureBlock(displayListIter++, vIntroBgTable[i], G_IM_FMT_RGBA, G_IM_SIZ_16b, 80, 20, 0,
G_TX_CLAMP, G_TX_CLAMP, 7, 6, G_TX_NOLOD, G_TX_NOLOD)
gSPDisplayList(displayListIter++, introBackgroundDlRows[i]);
}
gSPPopMatrix(displayListIter++, G_MTX_MODELVIEW);
+1 -1
View File
@@ -3,6 +3,6 @@
#include "types.h"
// extern ? LevelProc_8016F508(?);
extern s32 LevelProc_8016F508(s16 arg1, s32 arg2);
#endif /* _LEVEL_SELECT_MENU_H */
+2 -2
View File
@@ -252,7 +252,7 @@ static void print_act_selector_strings(void) {
print_hud_my_score_coins(1, gCurrSaveFileNum - 1, gCurrCourseNum - 1, 155, 106);
gSPDisplayList(gDisplayListHead++, dl_rgba16_text_end);
gSPDisplayList(gDisplayListHead++, dl_ia8_text_begin);
gSPDisplayList(gDisplayListHead++, dl_ia_text_begin);
gDPSetEnvColor(gDisplayListHead++, 0, 0, 0, 255);
// Print the "MY SCORE" text if the coin score is more than 0
if (save_file_get_course_coin_score(gCurrSaveFileNum - 1, gCurrCourseNum - 1) != 0) {
@@ -261,7 +261,7 @@ static void print_act_selector_strings(void) {
// Print the level name; add 3 to skip the number and spacing to get to the actual string to center.
lvlNameX = get_str_x_pos_from_center(160, currLevelName + 3, 10.0f);
print_generic_string(lvlNameX, 33, currLevelName + 3);
gSPDisplayList(gDisplayListHead++, dl_ia8_text_end);
gSPDisplayList(gDisplayListHead++, dl_ia_text_end);
print_course_number();
+4
View File
@@ -8,4 +8,8 @@ enum StarSelectorTypes
STAR_SELECTOR_100_COINS
};
extern Gfx *geo_act_selector_strings(s16 callContext, struct GraphNode *node);
extern void lvl_init_act_selector_values_and_stars(s32 arg, s32 unused);
extern int lvl_update_obj_and_load_act_button_actions(s32 arg, s32 unused);
#endif /* STAR_SELECT_H */