cn -> ique (#969)

This commit is contained in:
Ethan Roseman 2023-03-09 00:40:22 +09:00 committed by GitHub
parent 30cc2aa6d0
commit c5dde1054f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
211 changed files with 76 additions and 76 deletions

8
Jenkinsfile vendored
View File

@ -8,7 +8,7 @@ pipeline {
steps {
sh 'cp /usr/local/etc/roms/papermario.us.z64 ver/us/baserom.z64'
sh 'cp /usr/local/etc/roms/papermario.jp.z64 ver/jp/baserom.z64'
sh 'cp /usr/local/etc/roms/papermario.cn.z64 ver/cn/baserom.z64'
sh 'cp /usr/local/etc/roms/papermario.ique.z64 ver/ique/baserom.z64'
sh 'curl -L "https://github.com/pmret/gcc-papermario/releases/download/master/linux.tar.gz" | tar zx -C tools/build/cc/gcc'
sh 'curl -L "https://github.com/pmret/binutils-papermario/releases/download/master/linux.tar.gz" | tar zx -C tools/build/cc/gcc'
sh 'curl -L "https://github.com/decompals/ido-static-recomp/releases/download/v0.2/ido-5.3-recomp-ubuntu-latest.tar.gz" | tar zx -C tools/build/cc/ido5.3'
@ -34,7 +34,7 @@ pipeline {
if (env.CHANGE_ID) {
def us_progress = sh(returnStdout: true, script: "python3 progress.py us --pr-comment").trim()
def jp_progress = sh(returnStdout: true, script: "python3 progress.py jp --pr-comment").trim()
def cn_progress = sh(returnStdout: true, script: "python3 progress.py cn --pr-comment").trim()
def cn_progress = sh(returnStdout: true, script: "python3 progress.py ique --pr-comment").trim()
def warnings = sh(returnStdout: true, script: "./tools/warnings_count/check_new_warnings.sh --jenkins").trim()
def comment_id = -1
@ -71,8 +71,8 @@ pipeline {
sh 'python3 progress.py jp --csv >> reports/progress_jp.csv'
sh 'python3 progress.py jp --shield-json > reports/progress_jp_shield.json'
sh 'python3 progress.py cn --csv >> reports/progress_cn.csv'
sh 'python3 progress.py cn --shield-json > reports/progress_cn_shield.json'
sh 'python3 progress.py ique --csv >> reports/progress_cn.csv'
sh 'python3 progress.py ique --shield-json > reports/progress_cn_shield.json'
sh 'cat build_log.txt | grep warning | sort > tools/warnings_count/warnings.txt'
sh 'cp tools/warnings_count/warnings.txt reports/warnings.txt'

View File

@ -78,4 +78,4 @@ def stuff(version):
stuff("us")
stuff("jp")
stuff("cn")
stuff("ique")

View File

@ -2217,7 +2217,7 @@ typedef struct {
#if VERSION_JP
#define DISPLAYCONTEXT_GFX_COUNT 0x2000
#elif VERSION_CN
#elif VERSION_IQUE
#define DISPLAYCONTEXT_GFX_COUNT 0x2200
#else
#define DISPLAYCONTEXT_GFX_COUNT 0x2080

View File

@ -6382,7 +6382,7 @@ enum MsgChars {
MSG_CHAR_SINGLE_QUOTE_CLOSE = 0xA5,
// 0xA6 to 0xEF are unused
#if VERSION_CN
#if VERSION_IQUE
// All US characters are in the rom, but their range is used for multibyte characters
MSG_CHAR_MULTIBYTE_FIRST = 0x5F,
MSG_CHAR_MULTIBYTE_LAST = 0x8F,

View File

@ -816,7 +816,7 @@ s32 is_actor_hp_bar_visible(Actor*);
void sin_cos_rad(f32 rad, f32* outSinTheta, f32* outCosTheta);
void load_font(s32 font);
#if VERSION_CN
#if VERSION_IQUE
void load_font_data(Addr offset, u32 size, void* dest);
#else
void load_font_data(Addr offset, u16 size, void* dest);

View File

@ -9,7 +9,7 @@
#include "nu/nusys.h"
#include "ld_addrs.h"
#if VERSION_CN
#if VERSION_IQUE
// TODO: remove if section is split in iQue release
extern Addr icon_present_ROM_START;
#endif

View File

@ -8,7 +8,7 @@
#include "nu/nusys.h"
#include "model_clear_render_tasks.h"
#if VERSION_CN
#if VERSION_IQUE
// TODO: remove if sections are split in iQue release
extern Addr entity_jan_iwa_ROM_START;
extern Addr entity_jan_iwa_ROM_END;

View File

@ -57,7 +57,7 @@ void create_audio_system(void) {
nuAuTasks[i].next = NULL;
nuAuTasks[i].msg = 0;
nuAuTasks[i].list.t.type = M_AUDTASK;
#if VERSION_CN
#if VERSION_IQUE
nuAuTasks[i].list.t.ucode_boot = (u64*) rspbootTextStart;
nuAuTasks[i].list.t.ucode_boot_size = (u32) rspbootTextEnd - (u32) rspbootTextStart;
#else

View File

@ -2,7 +2,7 @@
#include "ld_addrs.h"
#include "sprite.h"
#if VERSION_CN
#if VERSION_IQUE
// TODO: remove if section is split in iQue release
extern Addr fold_gfx_data_ROM_START;
#endif

View File

@ -8,7 +8,7 @@
#include "sprite.h"
#include "model.h"
#if !VERSION_JP && !VERSION_CN
#if !VERSION_JP && !VERSION_IQUE
// TODO: remove this conditional when more of the JP rom has been processed
#include "sprite/npc/BattleMerlee.h"
#else

View File

@ -116,7 +116,7 @@ BSS s32 filemenu_8024C0A4[3];
BSS s32 filemenu_hudElemIDs[20];
BSS s32 filemenu_createfile_hudElems[4];
#if VERSION_CN
#if VERSION_IQUE
BSS u8 filemenu_glyphBuffer[20][0x80];
#endif

View File

@ -2,7 +2,7 @@
#include "filemenu.h"
#include "hud_element.h"
#if VERSION_CN
#if VERSION_IQUE
#define CREATE_SUCCESS_NUMBER_X 49
#define NUMBER_OFFSET_Y 1
#else
@ -60,7 +60,7 @@ void filemenu_info_draw_message_contents(
filemenu_draw_message(filemenu_get_menu_message(FILE_MESSAGE_HAS_BEEN_DELETED), baseX + 49, baseY + 4, 255, 0, 0);
break;
case 2:
#if VERSION_CN
#if VERSION_IQUE
filemenu_draw_message(filemenu_get_menu_message(FILE_MESSAGE_COPY_FROM), baseX + 10, baseY + 7, 255, 0, 0);
filemenu_draw_message(filemenu_get_menu_message(FILE_MESSAGE_FILE_26), baseX + 42, baseY + 7, 255, 0, 0);
draw_number(filemenu_loadedFileIdx + 1, baseX + 84, baseY + 10, DRAW_NUMBER_CHARSET_NORMAL, MSG_PAL_WHITE, 255, DRAW_NUMBER_STYLE_MONOSPACE | DRAW_NUMBER_STYLE_ALIGN_RIGHT);

View File

@ -27,7 +27,7 @@ extern HudScript HES_OptionStereoOff;
BSS u8 filemenu_filename[8];
#if VERSION_CN
#if VERSION_IQUE
#define OFFSET_WIDTH 5
#define DELETE_OFFSET_X 9
#define CENTER_CANCEL_X 30

View File

@ -2,7 +2,7 @@
#include "filemenu.h"
#include "ld_addrs.h"
#if VERSION_CN
#if VERSION_IQUE
// TODO: remove when charset segment is split for iQue
extern Addr charset_standard_OFFSET;
#endif
@ -11,7 +11,7 @@ extern MessageCharset* gMsgCharsets[5];
extern PAL_BIN D_802F4560[80][8];
extern u8 filemenu_glyphBuffer[20][0x80];
#if VERSION_CN
#if VERSION_IQUE
u8 filemenu_msg_C6[] = { 0xF7, 0xF7, 0x84, 0x05, 0x62, 0x14, 0xFD };
u8 filemenu_msg_C7[] = { 0xFD };
u8 filemenu_msg_C8[] = { 0xFD };
@ -48,12 +48,12 @@ s32 filemenu_charset = 0;
s32 filemenu_charset_raster_id = 0;
s32 filemenu_char_color = -1;
#if VERSION_CN
#if VERSION_IQUE
u32 filemenu_glyphBufferIndex = 0;
#endif
#if VERSION_CN
#if VERSION_IQUE
u8 filemenu_msg_01[] = { 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0x7A, 0x14, 0x7B, 0x14, 0x79, 0x19, 0x7F, 0x06, 0x79, 0x04, 0x7A, 0x04, 0xFD };
u8 filemenu_msg_02[] = { 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0x7A, 0x14, 0x7B, 0x14, 0x79, 0x19, 0x7F, 0x06, 0x8C, 0x30, 0x6C, 0x12, 0xFD };
u8 filemenu_msg_03[] = { 0x7A, 0x14, 0x7B, 0x14, 0x79, 0x19, 0x7F, 0x06, 0x89, 0x0D, 0x71, 0x15, 0xFD };
@ -220,7 +220,7 @@ s32 filemenu_draw_char(s32 c, s32 x, s32 y, s32 flag1, s32 color, s32 flag2) {
return charWidth;
}
#if VERSION_CN
#if VERSION_IQUE
if (c >= 0x100) {
int offset;
s32 character;
@ -306,7 +306,7 @@ void filemenu_draw_message(u8* message, s32 x, s32 y, s32 alpha, s32 color, u32
filemenu_draw_char(0xF3, x, y, flag1, color, flag2);
tmp = message;
while (*tmp != 0xFD) {
#if VERSION_CN
#if VERSION_IQUE
int ord = *tmp;
if (ord >= MSG_CHAR_MULTIBYTE_FIRST && ord <= MSG_CHAR_MULTIBYTE_LAST) {
tmp++;
@ -336,7 +336,7 @@ void filemenu_draw_file_name(u8* filename, s32 length, s32 x, s32 y, s32 alpha,
u32 c = filename[i];
if (c != 0xF7) {
#if VERSION_CN
#if VERSION_IQUE
// Numerals get drawn one pixel lower than other characters
if (c >= MSG_CHAR_DIGIT_0 && c <= MSG_CHAR_DIGIT_9) {
filemenu_draw_message((u8*)c, x + (i * charWidth), y + 1, alpha, arg5, arg6);

View File

@ -2,7 +2,7 @@
#include "filemenu.h"
#include "fio.h"
#if VERSION_CN
#if VERSION_IQUE
#define DELETE_FILE_DELETE_X 20
#define DELETE_FILE_FILE_X 50
#define DELETE_FILE_NUMBER_X 93

View File

@ -3,7 +3,7 @@
#include "nu/nusys.h"
#include "ld_addrs.h"
#if VERSION_CN
#if VERSION_IQUE
// TODO: remove if section is split in iQue release
extern Addr icon_present_ROM_START;
#endif

View File

@ -52,13 +52,13 @@ void boot_main(void* data) {
crash_screen_init();
#endif
#if !VERSION_CN
#if !VERSION_IQUE
is_debug_init();
#endif
nuGfxInit();
gGameStatusPtr->contBitPattern = nuContInit();
#if VERSION_CN
#if VERSION_IQUE
create_audio_system();
load_engine_data();
#else
@ -181,7 +181,7 @@ void gfx_task_main(void) {
gCurrentDisplayContextIndex ^= 1;
}
#if VERSION_CN
#if VERSION_IQUE
NOP_FIX
#endif

View File

@ -358,6 +358,6 @@ s32 get_time_freeze_mode(void) {
return timeFreezeMode;
}
#if VERSION_CN
#if VERSION_IQUE
static const f32 rodata_padding[] = {0.0f, 0.0f};
#endif

View File

@ -3,13 +3,13 @@
#include "message_ids.h"
#include "sprite.h"
#if !VERSION_CN
#if !VERSION_IQUE
// TODO: remove if assets are dumped in iQue release
#include "charset/postcard.png.h"
#include "charset/letter_content_1.png.h"
#endif
#if VERSION_CN
#if VERSION_IQUE
// TODO: remove if section is split in iQue release
extern Addr charset_ROM_START;
extern Addr charset_standard_OFFSET;
@ -212,7 +212,7 @@ Gfx D_8014C500[] = {
u8 D_8014C580[] = { 50, 80, 100, 105, 100, 0, 0, 0 };
u8 D_8014C588[] = { 105, 100, 77, 57, 40, 27, 16, 8, 3, 0, 0, 0};
#if VERSION_CN
#if VERSION_IQUE
u32 D_8014AD24 = 2;
#else
u8 D_8014C594[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
@ -263,7 +263,7 @@ void clear_printers(void) {
load_font(0);
}
#if VERSION_CN
#if VERSION_IQUE
void load_font_data(Addr offset, u32 size, void* dest) {
#else
void load_font_data(Addr offset, u16 size, void* dest) {
@ -678,7 +678,7 @@ extern s32 D_802EB5C0[];
extern s32 D_802EB5F0[];
extern struct_D_802EB620 D_802EB620[];
#if VERSION_CN
#if VERSION_IQUE
INCLUDE_ASM(s32, "msg", msg_copy_to_print_buffer);
#else
void msg_copy_to_print_buffer(MessagePrintState* printer, s32 arg1, s32 arg2) {
@ -1577,7 +1577,7 @@ s32 msg_get_print_char_width(s32 character, s32 charset, s32 variation, f32 msgS
return 0;
}
#if VERSION_CN
#if VERSION_IQUE
if (character >= 0x5F && character<=0x8F) {
charWidth = 16.0;
return charWidth * msgScale;
@ -1905,7 +1905,7 @@ void get_msg_properties(s32 msgID, s32* height, s32* width, s32* maxLineChars, s
endl = FALSE;
}
#if VERSION_CN
#if VERSION_IQUE
if (prevChar >= 0x5f && prevChar <= 0x8F) {
break;
}
@ -2340,7 +2340,7 @@ void draw_message_window(MessagePrintState* printer) {
}
}
#if VERSION_CN
#if VERSION_IQUE
INCLUDE_ASM(s32, "msg", appendGfx_message);
#else
void appendGfx_message(MessagePrintState* printer, s16 posX, s16 posY, u16 additionalOffsetX, u16 additionalOffsetY,
@ -3670,7 +3670,7 @@ void msg_reset_gfx_state(void) {
gSPDisplayList(gMasterGfxPos++, D_8014C500);
}
#if VERSION_CN
#if VERSION_IQUE
INCLUDE_ASM(s32, "msg", msg_draw_char);
#else
void msg_draw_char(MessagePrintState* printer, MessageDrawState* drawState, s32 charIndex, s32 palette, s32 posX, s32 posY) {

View File

@ -69,7 +69,7 @@ void nuGfxTaskMgrInit(void) {
nuGfxTask[i].msgQ = &D_800DAC90;
nuGfxTask[i].list.t.type = M_GFXTASK;
nuGfxTask[i].list.t.flags = 0;
#if VERSION_CN
#if VERSION_IQUE
nuGfxTask[i].list.t.ucode_boot = (u64*) rspbootTextStart;
nuGfxTask[i].list.t.ucode_boot_size = (u32) rspbootTextEnd - (u32) rspbootTextStart;
#else

View File

@ -11,7 +11,7 @@ static void nuSiMgrThread(void* arg);
extern u64 siMgrStack[NU_SI_STACK_SIZE/sizeof(u64)];
#if !VERSION_JP && !VERSION_CN
#if !VERSION_JP && !VERSION_IQUE
u8 nuSiMgrInit(void) {
u8 pattern;
OSContStatus status[NU_CONT_MAXCONTROLLERS];
@ -114,7 +114,7 @@ void nuSiMgrThread(void* arg) {
}
}
#if VERSION_JP || VERSION_CN
#if VERSION_JP || VERSION_IQUE
u8 nuSiMgrInit(void) {
u8 pattern;
OSContStatus status[NU_CONT_MAXCONTROLLERS];

View File

@ -10,7 +10,7 @@ void pause_badges_cleanup(MenuPanel* panel);
static s16 gPauseBadgesItemIds[128];
static s32 gPauseBadgesCurrentPage;
#if !VERSION_CN
#if !VERSION_IQUE
static s32 D_80270284;
#endif
static PauseItemPage gPauseBadgesPages[20];
@ -25,7 +25,7 @@ static s32 gPauseBadgesTargetScrollIndex;
static s32 gPauseBadgesLevel;
static s32 gPauseBadgesCurrentTab;
static s32 gPauseBadgesShowNotEnoughBP;
#if !VERSION_CN
#if !VERSION_IQUE
static s32 D_802703A4;
#endif
static s32 gPauseBadgesIconIDs[22];
@ -35,7 +35,7 @@ static s32 gPauseBadgesIconIDs[22];
// Invalid badge ID filled in unused slots of gPauseBadgesItemIds
#define BADGE_INVALID 0x7FFF
#if VERSION_CN
#if VERSION_IQUE
#define OFFSET_1_X 47
#define OFFSET_1_Y 82
#define OFFSET_2_X 10

View File

@ -276,7 +276,7 @@ Gfx gPauseDLAvailable[] = {
gsSPEndDisplayList(),
};
#if VERSION_CN
#if VERSION_IQUE
#undef pause_prompt_check_abilities_png_height
#define pause_prompt_check_abilities_png_height 16
#endif
@ -318,7 +318,7 @@ Gfx gPauseDLSpiritsBg[] = {
gsSPEndDisplayList(),
};
#if VERSION_CN
#if VERSION_IQUE
s8 gPauseMsg_17[] = { 0x8F, 0x0C, 0x75, 0x12, 0xFD };
s8 gPauseMsg_18[] = { 0x7B, 0x0E, 0x7C, 0x0E, 0xFD };
s8 gPauseMsg_19[] = { 0x77, 0x10, 0x74, 0x0D, 0xFD };

View File

@ -28,7 +28,7 @@ BSS s8 gPauseMenuCurrentTab;
BSS s8 D_802700D[7]; //padding
static s32 gPauseTutorialFrameCounter;
#if !VERSION_CN
#if !VERSION_IQUE
static s32 D_802700E4;
#endif
static s32 gPauseCommonIconIDs[8];

View File

@ -7,7 +7,7 @@ void pause_stats_cleanup(MenuPanel* panel);
static s32 gPauseStatsIconIDs[12];
#if VERSION_CN
#if VERSION_IQUE
#define NUMBER_OFFSET_Y 2
#define ROW_1_Y 48
#define ROW_2_Y 49
@ -190,7 +190,7 @@ void pause_stats_draw_contents(MenuPanel* menu, s32 baseX, s32 baseY, s32 width,
level = gPlayerData.level;
draw_box(4, &gPauseWS_10, baseX + 7, baseY + 12, 0, level >= 10 ? 0x79 : 0x71, 17, 255, 0, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, NULL, NULL, NULL, SCREEN_WIDTH, SCREEN_HEIGHT, NULL);
#if !VERSION_CN
#if !VERSION_IQUE
hud_element_set_render_pos(gPauseStatsIconIDs[0], baseX + 61, baseY + 21);
hud_element_draw_without_clipping(gPauseStatsIconIDs[0]);
#endif

View File

@ -57,7 +57,7 @@ void state_step_battle(void) {
gGameStatusPtr->isBattle = TRUE;
backup_map_collision_data();
#if VERSION_CN
#if VERSION_IQUE
battle_heap_create();
#else
load_obfuscation_shims();

View File

@ -144,7 +144,7 @@ DemoSceneData DemoScenes[] = {
char versionString[] = "Prg Ver.00/07/06 22:22";
#elif VERSION_US
char versionString[] = "Prg Ver.00/12/05 16:54";
#elif VERSION_CN
#elif VERSION_IQUE
char versionString[] = "Prg Ver.04/05/18 10:52";
#else
char versionString[] = "Prg Ver.??/??/?? ??:??";

View File

@ -409,7 +409,7 @@ void title_screen_draw_logo(f32 arg0) {
gDPPipeSync(gMasterGfxPos++);
}
#if VERSION_CN
#if VERSION_IQUE
#define VAR_1 20
#define VAR_2 628
#else
@ -454,7 +454,7 @@ void title_screen_draw_press_start(void) {
gDPPipeSync(gMasterGfxPos++);
}
#if VERSION_CN
#if VERSION_IQUE
INCLUDE_ASM(void, "state_title_screen", title_screen_draw_copyright);
#else
void title_screen_draw_copyright(f32 arg0) {

View File

@ -7,7 +7,7 @@ void dma_load_msg(u32 msgID, void* dest);
BSS CreditsData N(CreditsData);
BSS CreditsData* N(CreditsDataPtr);
#if !VERSION_CN
#if !VERSION_IQUE
BSS s32 N(BSS_PAD_1)[2];
#endif
BSS u8 N(CreditsMessageBuffers)[23][256];

View File

@ -103,7 +103,7 @@ CreditsEntry N(Credits_Jobs)[] = {
.perCharDelayIn = 0,
.next = 60,
},
#if VERSION_CN
#if VERSION_IQUE
// *©2000-2004* NINTENDO
// *©2004* IQUE
{
@ -209,7 +209,7 @@ CreditsEntry N(Credits_Jobs)[] = {
.perCharDelayIn = 0,
.next = 30,
},
#if VERSION_CN
#if VERSION_IQUE
// *GAME BY*
// INTELLIGENT SYSTEMS
// IQUE ENGINEERING

View File

@ -90,7 +90,7 @@ EvtScript N(EVS_Main) = {
EVT_CALL(TranslateGroup, MODEL_e2, 0, 200, 0)
EVT_CALL(TranslateGroup, MODEL_r, 0, 200, 0)
EVT_THREAD
#if VERSION_CN
#if VERSION_IQUE
EVT_WAIT(6)
EVT_SET(LVar0, MODEL_g)
EVT_EXEC(N(EVS_DropLetter))

View File

@ -80,7 +80,7 @@ void load_map_by_IDs(s16 areaID, s16 mapID, s16 loadType) {
gGameStatusPtr->playerSpriteSet = PLAYER_SPRITES_MARIO_WORLD;
#if VERSION_CN
#if VERSION_IQUE
general_heap_create();
#else
load_obfuscation_shims();
@ -152,7 +152,7 @@ void load_map_by_IDs(s16 areaID, s16 mapID, s16 loadType) {
load_map_bg(wMapBgName);
}
#if VERSION_CN
#if VERSION_IQUE
general_heap_create();
#else
load_obfuscation_shims();

View File

@ -10,7 +10,7 @@ import ninja_syntax
from glob import glob
# Configuration:
VERSIONS = ["us", "jp", "cn"]
VERSIONS = ["us", "jp", "ique"]
DO_SHA1_CHECK = True
# Paths:
@ -418,7 +418,7 @@ class Configure:
cflags = cflags.replace("gcc_272", "")
encoding = "SHIFT-JIS"
if version == "cn":
if version == "ique":
encoding = "EUC-JP"
# Dead cod
@ -715,7 +715,7 @@ class Configure:
variables={ "version": self.version, "mapfile": str(self.map_path()) },
)
if self.version == "cn":
if self.version == "ique":
ninja.build(
str(self.rom_path()),
"z64_ique",

View File

@ -1 +0,0 @@
5c724685085eba796537573dd6f84aaddedc8582 ver/cn/build/papermario.z64

Some files were not shown because too many files have changed in this diff Show More