1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-12 01:40:47 +00:00

[ntsc-1.2] Match ntsc-1.2 BSS and add to CI (#2187)

* Match ntsc-1.2

* Add ntsc-1.2 to CI

* Apply fixes from Jenkins

* Promote ntsc-1.2 to "supported" in Makefile

* Declare D_80858AD8 as a u64 array

* Tweak wording

* Hopefully make ntsc-1.2 bss more stable

* Restore segmented_address.h include
This commit is contained in:
cadmic 2024-09-12 11:10:43 -07:00 committed by GitHub
parent 09c1816e2d
commit f089adf20c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
32 changed files with 191 additions and 142 deletions

View file

@ -100,19 +100,21 @@ static ColliderCylinderInit sLightBallCylinderInit = {
static u8 D_808E4C58[] = { 0, 12, 10, 12, 14, 16, 12, 14, 16, 12, 14, 16, 12, 14, 16, 10, 16, 14 };
static Vec3f sZeroVec = { 0.0f, 0.0f, 0.0f };
#pragma increment_block_number "gc-eu:0 gc-eu-mq:0 gc-jp:0 gc-jp-ce:0 gc-jp-mq:0 gc-us:0 gc-us-mq:0"
#pragma increment_block_number "gc-eu:0 gc-eu-mq:0 gc-jp:0 gc-jp-ce:0 gc-jp-mq:0 gc-us:0 gc-us-mq:0 ntsc-1.2:0"
static EnGanonMant* sCape;
// TODO: There's probably a way to match BSS ordering with less padding by spreading the variables out and moving
// data around. It would be easier if we had more options for controlling BSS ordering in debug.
#pragma increment_block_number "gc-eu:192 gc-eu-mq:192 gc-jp:192 gc-jp-ce:192 gc-jp-mq:192 gc-us:192 gc-us-mq:192"
#pragma increment_block_number "gc-eu:192 gc-eu-mq:192 gc-jp:192 gc-jp-ce:192 gc-jp-mq:192 gc-us:192 gc-us-mq:192" \
"ntsc-1.2:128"
static s32 sSeed1;
static s32 sSeed2;
static s32 sSeed3;
#pragma increment_block_number "gc-eu:192 gc-eu-mq:192 gc-jp:192 gc-jp-ce:192 gc-jp-mq:192 gc-us:192 gc-us-mq:192"
#pragma increment_block_number "gc-eu:192 gc-eu-mq:192 gc-jp:192 gc-jp-ce:192 gc-jp-mq:192 gc-us:192 gc-us-mq:192" \
"ntsc-1.2:128"
static BossGanon* sGanondorf;

View file

@ -9,7 +9,7 @@
#include "overlays/actors/ovl_En_Boom/z_en_boom.h"
#include "assets/objects/gameplay_keep/gameplay_keep.h"
#pragma increment_block_number "gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128"
#pragma increment_block_number "gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128 ntsc-1.2:128"
#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_4 | ACTOR_FLAG_5)

View file

@ -14,7 +14,7 @@
#include "assets/scenes/dungeons/ice_doukutu/ice_doukutu_scene.h"
#include "terminal.h"
#pragma increment_block_number "gc-eu:0 gc-eu-mq:0 gc-jp:0 gc-jp-ce:0 gc-jp-mq:0 gc-us:0 gc-us-mq:0"
#pragma increment_block_number "gc-eu:0 gc-eu-mq:0 gc-jp:0 gc-jp-ce:0 gc-jp-mq:0 gc-us:0 gc-us-mq:0 ntsc-1.2:0"
#define FLAGS ACTOR_FLAG_4
@ -1395,7 +1395,8 @@ void func_80B3F3D8(void) {
Sfx_PlaySfxCentered2(NA_SE_PL_SKIP);
}
#pragma increment_block_number "gc-eu:64 gc-eu-mq:64 gc-jp:64 gc-jp-ce:64 gc-jp-mq:64 gc-us:64 gc-us-mq:64"
#pragma increment_block_number "gc-eu:64 gc-eu-mq:64 gc-jp:64 gc-jp-ce:64 gc-jp-mq:64 gc-us:64 gc-us-mq:64" \
"ntsc-1.2:128"
void EnXc_PlayDiveSFX(Vec3f* src, PlayState* play) {
static Vec3f D_80B42DA0;

View file

@ -354,19 +354,22 @@ void Player_Action_CsAction(Player* this, PlayState* play);
// .bss part 1
#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128"
#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \
"ntsc-1.2:128"
static s32 D_80858AA0;
// TODO: There's probably a way to match BSS ordering with less padding by spreading the variables out and moving
// data around. It would be easier if we had more options for controlling BSS ordering in debug.
#pragma increment_block_number "gc-eu:192 gc-eu-mq:192 gc-jp:192 gc-jp-ce:192 gc-jp-mq:192 gc-us:192 gc-us-mq:192"
#pragma increment_block_number "gc-eu:192 gc-eu-mq:192 gc-jp:192 gc-jp-ce:192 gc-jp-mq:192 gc-us:192 gc-us-mq:192" \
"ntsc-1.2:192"
static s32 D_80858AA4;
static Vec3f sInteractWallCheckResult;
static Input* sControlInput;
#pragma increment_block_number "gc-eu:224 gc-eu-mq:224 gc-jp:192 gc-jp-ce:192 gc-jp-mq:192 gc-us:192 gc-us-mq:192"
#pragma increment_block_number "gc-eu:192 gc-eu-mq:192 gc-jp:192 gc-jp-ce:192 gc-jp-mq:192 gc-us:192 gc-us-mq:192" \
"ntsc-1.2:128"
// .data
@ -4744,7 +4747,7 @@ s32 func_80838FB8(PlayState* play, Player* this) {
*
* Note: grottos and normal fairy fountains use `ENTR_RETURN_GROTTO`
*/
s16 sReturnEntranceGroupData[] = {
static s16 sReturnEntranceGroupData[] = {
// ENTR_RETURN_GREAT_FAIRYS_FOUNTAIN_MAGIC
/* 0 */ ENTR_DEATH_MOUNTAIN_TRAIL_4, // from Magic Fairy Fountain
/* 1 */ ENTR_DEATH_MOUNTAIN_CRATER_3, // from Double Magic Fairy Fountain
@ -4775,7 +4778,7 @@ s16 sReturnEntranceGroupData[] = {
/**
* The values are indices into `sReturnEntranceGroupData` marking the start of each group
*/
u8 sReturnEntranceGroupIndices[] = {
static u8 sReturnEntranceGroupIndices[] = {
11, // ENTR_RETURN_GREAT_FAIRYS_FOUNTAIN_SPELLS
9, // ENTR_RETURN_SHOOTING_GALLERY
3, // ENTR_RETURN_2
@ -14262,7 +14265,12 @@ void Player_Action_80850AEC(Player* this, PlayState* play) {
void Player_Action_80850C68(Player* this, PlayState* play) {
if ((this->av2.actionVar2 != 0) && ((this->unk_858 != 0.0f) || (this->unk_85C != 0.0f))) {
static Vec3s D_80858AD8[25];
// 144-byte buffer, declared as a u64 array for 8-byte alignment. LinkAnimation_BlendToMorph will round up
// the buffer address to the nearest 16-byte alignment before passing it to AnimTaskQueue_AddLoadPlayerFrame,
// and AnimTaskQueue_AddLoadPlayerFrame requires space for `sizeof(Vec3s) * limbCount + 2` bytes. Link's
// skeleton has 22 limbs (including the root limb) so we need 134 bytes of space, plus 8 bytes of margin for
// the 16-byte alignment operation.
static u64 D_80858AD8[18];
f32 updateScale = R_UPDATE_RATE * 0.5f;
this->skelAnime.curFrame += this->skelAnime.playSpeed * updateScale;
@ -14277,7 +14285,7 @@ void Player_Action_80850C68(Player* this, PlayState* play) {
LinkAnimation_BlendToMorph(play, &this->skelAnime, &gPlayerAnim_link_fishing_wait, this->skelAnime.curFrame,
(this->unk_85C < 0.0f) ? &gPlayerAnim_link_fishing_reel_up
: &gPlayerAnim_link_fishing_reel_down,
5.0f, fabsf(this->unk_85C), D_80858AD8);
5.0f, fabsf(this->unk_85C), (Vec3s*)D_80858AD8);
LinkAnimation_InterpJointMorph(play, &this->skelAnime, 0.5f);
} else if (LinkAnimation_Update(play, &this->skelAnime)) {
this->unk_860 = 2;

View file

@ -15,6 +15,8 @@
#include "assets/textures/icon_item_gameover_static/icon_item_gameover_static.h"
#include "terminal.h"
#pragma increment_block_number "ntsc-1.2:128"
#if !PLATFORM_GC
#define KALEIDO_PROMPT_CURSOR_R 100
#define KALEIDO_PROMPT_CURSOR_G 100