Merge branch 'HarbourMasters:develop' into develop
This commit is contained in:
commit
e55dcfa0a0
15
README.md
15
README.md
|
@ -7,14 +7,21 @@ The Ship does not include assets and as such requires a prior copy of the game t
|
||||||
## Quick Start
|
## Quick Start
|
||||||
|
|
||||||
1) Download The Ship of Harkinian from Discord.
|
1) Download The Ship of Harkinian from Discord.
|
||||||
2) Requires an `oot debug` rom (not Master Quest).
|
2) Requires a supported copy of the game (See supported games below).
|
||||||
|
3) Use the OTRGui to generate an `oot.otr` archive file.
|
||||||
|
4) Launch `soh.exe`
|
||||||
|
|
||||||
|
### Supported Games
|
||||||
|
Ocarina of Time Debug (not Master Quest)
|
||||||
```
|
```
|
||||||
Build team: `zelda@srd022j`
|
Build team: `zelda@srd022j`
|
||||||
Build date: `03-02-21 00:49:18` (year-month-day)
|
Build date: `03-02-21 00:49:18` (year-month-day)
|
||||||
sha1: cee6bc3c2a634b41728f2af8da54d9bf8cc14099
|
sha1: cee6bc3c2a634b41728f2af8da54d9bf8cc14099
|
||||||
```
|
```
|
||||||
3) Use the OTRGui to generate an `oot.otr` archive file.
|
Ocarina of Time Pal Gamecube
|
||||||
4) Launch `soh.exe`
|
```
|
||||||
|
sha1: d0c95b2cb3c6682a171db267932af7af8cf5fa82
|
||||||
|
```
|
||||||
|
|
||||||
Congratulations, you are now sailing with the Ship of Harkinian! Have fun!
|
Congratulations, you are now sailing with the Ship of Harkinian! Have fun!
|
||||||
|
|
||||||
|
@ -51,7 +58,7 @@ Official Discord: https://discord.com/invite/BtBmd55HVH
|
||||||
|
|
||||||
## Building The Ship of Harkinian
|
## Building The Ship of Harkinian
|
||||||
|
|
||||||
Refer to the [building instructions](https://github.com/HarbourMasters/Shipwright/BUILDING.md) to compile SoH.
|
Refer to the [building instructions](BUILDING.md) to compile SoH.
|
||||||
|
|
||||||
## Troubleshooting The Exporter
|
## Troubleshooting The Exporter
|
||||||
- Affirm that you have an `/assets` folder filled with XMLs in the same directory as OTRGui.exe
|
- Affirm that you have an `/assets` folder filled with XMLs in the same directory as OTRGui.exe
|
||||||
|
|
|
@ -32,7 +32,7 @@ namespace Game {
|
||||||
const std::string EnhancementSection = ENHANCEMENTS_SECTION;
|
const std::string EnhancementSection = ENHANCEMENTS_SECTION;
|
||||||
const std::string CosmeticsSection = COSMETICS_SECTION;
|
const std::string CosmeticsSection = COSMETICS_SECTION;
|
||||||
const std::string CheatSection = CHEATS_SECTION;
|
const std::string CheatSection = CHEATS_SECTION;
|
||||||
|
const std::string LanguagesSection = LANGUAGES_SECTION;
|
||||||
|
|
||||||
void UpdateAudio() {
|
void UpdateAudio() {
|
||||||
Audio_SetGameVolume(SEQ_BGM_MAIN, CVar_GetFloat("gMainMusicVolume", 1));
|
Audio_SetGameVolume(SEQ_BGM_MAIN, CVar_GetFloat("gMainMusicVolume", 1));
|
||||||
|
|
|
@ -28,6 +28,7 @@ enum SeqPlayers {
|
||||||
#define ENHANCEMENTS_SECTION "ENHANCEMENT SETTINGS"
|
#define ENHANCEMENTS_SECTION "ENHANCEMENT SETTINGS"
|
||||||
#define COSMETICS_SECTION "COSMETIC SETTINGS"
|
#define COSMETICS_SECTION "COSMETIC SETTINGS"
|
||||||
#define CHEATS_SECTION "CHEATS SETTINGS"
|
#define CHEATS_SECTION "CHEATS SETTINGS"
|
||||||
|
#define LANGUAGES_SECTION "LANGUAGES SETTINGS"
|
||||||
|
|
||||||
namespace Game {
|
namespace Game {
|
||||||
extern SoHConfigType Settings;
|
extern SoHConfigType Settings;
|
||||||
|
|
|
@ -4575,6 +4575,20 @@ _DW({ \
|
||||||
_g2->words.w1 = (_SHIFTL(dsdx, 16, 16) | _SHIFTL(dtdy, 0, 16)); \
|
_g2->words.w1 = (_SHIFTL(dsdx, 16, 16) | _SHIFTL(dtdy, 0, 16)); \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# define gsSPWideTextureRectangle(xl, yl, xh, yh, tile, s, t, dsdx, dtdy) \
|
||||||
|
{{ \
|
||||||
|
(_SHIFTL(G_TEXRECT_WIDE, 24, 8) | _SHIFTL((xh), 0, 24)), \
|
||||||
|
_SHIFTL((yh), 0, 24), \
|
||||||
|
}}, \
|
||||||
|
{{ \
|
||||||
|
(_SHIFTL((tile), 24, 3) | _SHIFTL((xl), 0, 24)), \
|
||||||
|
_SHIFTL((yl), 0, 24), \
|
||||||
|
}}, \
|
||||||
|
{{ \
|
||||||
|
_SHIFTL(s, 16, 16) | _SHIFTL(t, 0, 16), \
|
||||||
|
_SHIFTL(dsdx, 16, 16) | _SHIFTL(dtdy, 0, 16) \
|
||||||
|
}}
|
||||||
|
|
||||||
/* like gSPTextureRectangle but accepts negative position arguments */
|
/* like gSPTextureRectangle but accepts negative position arguments */
|
||||||
#define gSPScisTextureRectangle(pkt, xl, yl, xh, yh, tile, s, t, dsdx, dtdy) \
|
#define gSPScisTextureRectangle(pkt, xl, yl, xh, yh, tile, s, t, dsdx, dtdy) \
|
||||||
_DW({ \
|
_DW({ \
|
||||||
|
|
|
@ -56,6 +56,7 @@ namespace SohImGui {
|
||||||
Console* console = new Console;
|
Console* console = new Console;
|
||||||
bool p_open = false;
|
bool p_open = false;
|
||||||
bool needs_save = false;
|
bool needs_save = false;
|
||||||
|
int SelectedLanguage = CVar_GetS32("gLanguages", 0); //Default Language to 0=English 1=German 2=French
|
||||||
float kokiri_col[3] = { 0.118f, 0.41f, 0.106f };
|
float kokiri_col[3] = { 0.118f, 0.41f, 0.106f };
|
||||||
float goron_col[3] = { 0.392f, 0.078f, 0.0f };
|
float goron_col[3] = { 0.392f, 0.078f, 0.0f };
|
||||||
float zora_col[3] = { 0.0f, 0.235f, 0.392f };
|
float zora_col[3] = { 0.0f, 0.235f, 0.392f };
|
||||||
|
@ -346,6 +347,24 @@ namespace SohImGui {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void EnhancementRadioButton(std::string text, std::string cvarName, int id) {
|
||||||
|
/*Usage :
|
||||||
|
EnhancementRadioButton("My Visible Name","gMyCVarName", MyID);
|
||||||
|
First arg is the visible name of the Radio button
|
||||||
|
Second is the cvar name where MyID will be saved.
|
||||||
|
Note: the CVar name should be the same to each Buddies.
|
||||||
|
Example :
|
||||||
|
EnhancementRadioButton("English", "gLanguages", 0);
|
||||||
|
EnhancementRadioButton("German", "gLanguages", 1);
|
||||||
|
EnhancementRadioButton("French", "gLanguages", 2);
|
||||||
|
*/
|
||||||
|
int val = CVar_GetS32(cvarName.c_str(), 0);
|
||||||
|
if (ImGui::RadioButton(text.c_str(), id==val)) {
|
||||||
|
CVar_SetS32(cvarName.c_str(), (int)id);
|
||||||
|
needs_save = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void EnhancementCheckbox(std::string text, std::string cvarName)
|
void EnhancementCheckbox(std::string text, std::string cvarName)
|
||||||
{
|
{
|
||||||
bool val = (bool)CVar_GetS32(cvarName.c_str(), 0);
|
bool val = (bool)CVar_GetS32(cvarName.c_str(), 0);
|
||||||
|
@ -551,6 +570,7 @@ namespace SohImGui {
|
||||||
ImGui::Separator();
|
ImGui::Separator();
|
||||||
|
|
||||||
EnhancementSliderInt("Text Speed: %dx", "##TEXTSPEED", "gTextSpeed", 1, 5, "");
|
EnhancementSliderInt("Text Speed: %dx", "##TEXTSPEED", "gTextSpeed", 1, 5, "");
|
||||||
|
EnhancementSliderInt("King Zora Speed: %dx", "##WEEPSPEED", "gMweepSpeed", 1, 5, "");
|
||||||
|
|
||||||
EnhancementCheckbox("Skip Text", "gSkipText");
|
EnhancementCheckbox("Skip Text", "gSkipText");
|
||||||
EnhancementCheckbox("Minimal UI", "gMinimalUI");
|
EnhancementCheckbox("Minimal UI", "gMinimalUI");
|
||||||
|
@ -566,7 +586,13 @@ namespace SohImGui {
|
||||||
EnhancementCheckbox("Disable LOD", "gDisableLOD");
|
EnhancementCheckbox("Disable LOD", "gDisableLOD");
|
||||||
EnhancementCheckbox("Enable 3D Dropped items", "gNewDrops");
|
EnhancementCheckbox("Enable 3D Dropped items", "gNewDrops");
|
||||||
EnhancementCheckbox("Dynamic Wallet Icon", "gDynamicWalletIcon");
|
EnhancementCheckbox("Dynamic Wallet Icon", "gDynamicWalletIcon");
|
||||||
|
EnhancementCheckbox("Always show dungeon entrances", "gAlwaysShowDungeonMinimapIcon");
|
||||||
|
|
||||||
|
if (ImGui::BeginMenu("Fixes")) {
|
||||||
|
EnhancementCheckbox("Fix L&R Pause menu", "gUniformLR");
|
||||||
|
EnhancementCheckbox("Fix Dungeon entrances", "gFixDungeonMinimapIcon");
|
||||||
|
ImGui::EndMenu();
|
||||||
|
}
|
||||||
ImGui::EndMenu();
|
ImGui::EndMenu();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -610,6 +636,7 @@ namespace SohImGui {
|
||||||
EnhancementCheckbox("Freeze Time", "gFreezeTime");
|
EnhancementCheckbox("Freeze Time", "gFreezeTime");
|
||||||
|
|
||||||
ImGui::EndMenu();
|
ImGui::EndMenu();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ImGui::BeginMenu("Cosmetics"))
|
if (ImGui::BeginMenu("Cosmetics"))
|
||||||
|
@ -636,6 +663,20 @@ namespace SohImGui {
|
||||||
ImGui::EndMenu();
|
ImGui::EndMenu();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (CVar_GetS32("gLanguages", 0) == 0) {
|
||||||
|
SelectedLanguage = 0;
|
||||||
|
} else if (CVar_GetS32("gLanguages", 0) == 1) {
|
||||||
|
SelectedLanguage = 1;
|
||||||
|
} else if (CVar_GetS32("gLanguages", 0) == 2) {
|
||||||
|
SelectedLanguage = 2;
|
||||||
|
}
|
||||||
|
if (ImGui::BeginMenu("Languages")) {
|
||||||
|
EnhancementRadioButton("English", "gLanguages", 0);
|
||||||
|
EnhancementRadioButton("German", "gLanguages", 1);
|
||||||
|
EnhancementRadioButton("French", "gLanguages", 2);
|
||||||
|
ImGui::EndMenu();
|
||||||
|
}
|
||||||
|
|
||||||
for (const auto& category : windowCategories) {
|
for (const auto& category : windowCategories) {
|
||||||
if (ImGui::BeginMenu(category.first.c_str())) {
|
if (ImGui::BeginMenu(category.first.c_str())) {
|
||||||
for (const std::string& name : category.second) {
|
for (const std::string& name : category.second) {
|
||||||
|
|
|
@ -61,10 +61,11 @@ namespace SohImGui {
|
||||||
void Init(WindowImpl window_impl);
|
void Init(WindowImpl window_impl);
|
||||||
void Update(EventImpl event);
|
void Update(EventImpl event);
|
||||||
|
|
||||||
|
void EnhancementRadioButton(std::string text, std::string cvarName, int value);
|
||||||
void EnhancementCheckbox(std::string text, std::string cvarName);
|
void EnhancementCheckbox(std::string text, std::string cvarName);
|
||||||
void EnhancementSliderInt(std::string text, std::string id, std::string cvarName, int min, int max, std::string format);
|
void EnhancementSliderInt(std::string text, std::string id, std::string cvarName, int min, int max, std::string format);
|
||||||
void EnhancementSliderFloat(std::string text, std::string id, std::string cvarName, float min, float max, std::string format, float defaultValue);
|
void EnhancementSliderFloat(std::string text, std::string id, std::string cvarName, float min, float max, std::string format, float defaultValue);
|
||||||
|
|
||||||
void DrawMainMenuAndCalculateGameSize(void);
|
void DrawMainMenuAndCalculateGameSize(void);
|
||||||
|
|
||||||
void DrawFramebufferAndGameInput(void);
|
void DrawFramebufferAndGameInput(void);
|
||||||
|
|
|
@ -381,7 +381,7 @@ void Flags_UnsetTempClear(GlobalContext* globalCtx, s32 flag);
|
||||||
s32 Flags_GetCollectible(GlobalContext* globalCtx, s32 flag);
|
s32 Flags_GetCollectible(GlobalContext* globalCtx, s32 flag);
|
||||||
void Flags_SetCollectible(GlobalContext* globalCtx, s32 flag);
|
void Flags_SetCollectible(GlobalContext* globalCtx, s32 flag);
|
||||||
void TitleCard_InitBossName(GlobalContext* globalCtx, TitleCardContext* titleCtx, void* texture, s16 x, s16 y, u8 width,
|
void TitleCard_InitBossName(GlobalContext* globalCtx, TitleCardContext* titleCtx, void* texture, s16 x, s16 y, u8 width,
|
||||||
u8 height);
|
u8 height, s16 hastranslation);
|
||||||
void TitleCard_InitPlaceName(GlobalContext* globalCtx, TitleCardContext* titleCtx, void* texture, s32 x, s32 y,
|
void TitleCard_InitPlaceName(GlobalContext* globalCtx, TitleCardContext* titleCtx, void* texture, s32 x, s32 y,
|
||||||
s32 width, s32 height, s32 delay);
|
s32 width, s32 height, s32 delay);
|
||||||
s32 func_8002D53C(GlobalContext* globalCtx, TitleCardContext* titleCtx);
|
s32 func_8002D53C(GlobalContext* globalCtx, TitleCardContext* titleCtx);
|
||||||
|
|
|
@ -251,6 +251,8 @@ typedef struct {
|
||||||
/* 0x0B */ u8 delayTimer; // how long the title card waits to appear
|
/* 0x0B */ u8 delayTimer; // how long the title card waits to appear
|
||||||
/* 0x0C */ s16 alpha;
|
/* 0x0C */ s16 alpha;
|
||||||
/* 0x0E */ s16 intensity;
|
/* 0x0E */ s16 intensity;
|
||||||
|
/* ---- */ s16 isBossCard; //To detect if that a Boss name title card.
|
||||||
|
/* ---- */ s16 hasTranslation; // to detect if the current title card has translation (used for bosses only)
|
||||||
} TitleCardContext; // size = 0x10
|
} TitleCardContext; // size = 0x10
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
|
|
@ -29,6 +29,7 @@ void BootCommands_Init()
|
||||||
CVar_RegisterS32("gUniformLR", 1);
|
CVar_RegisterS32("gUniformLR", 1);
|
||||||
CVar_RegisterS32("gNewDrops", 0);
|
CVar_RegisterS32("gNewDrops", 0);
|
||||||
CVar_RegisterS32("gVisualAgony", 0);
|
CVar_RegisterS32("gVisualAgony", 0);
|
||||||
|
CVar_RegisterS32("gLanguages", 0); //0 = English / 1 = German / 2 = French
|
||||||
}
|
}
|
||||||
|
|
||||||
//void BootCommands_ParseBootArgs(char* str)
|
//void BootCommands_ParseBootArgs(char* str)
|
||||||
|
|
|
@ -289,6 +289,13 @@ extern "C" Gfx* ResourceMgr_LoadGfxByName(const char* path)
|
||||||
return (Gfx*)&res->instructions[0];
|
return (Gfx*)&res->instructions[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extern "C" Gfx* ResourceMgr_PatchGfxByName(const char* path, int size) {
|
||||||
|
auto res = std::static_pointer_cast<Ship::DisplayList>(
|
||||||
|
OTRGlobals::Instance->context->GetResourceManager()->LoadResource(path));
|
||||||
|
res->instructions.resize(res->instructions.size() + size);
|
||||||
|
return (Gfx*)&res->instructions[0];
|
||||||
|
}
|
||||||
|
|
||||||
extern "C" char* ResourceMgr_LoadArrayByName(const char* path)
|
extern "C" char* ResourceMgr_LoadArrayByName(const char* path)
|
||||||
{
|
{
|
||||||
auto res = std::static_pointer_cast<Ship::Array>(OTRGlobals::Instance->context->GetResourceManager()->LoadResource(path));
|
auto res = std::static_pointer_cast<Ship::Array>(OTRGlobals::Instance->context->GetResourceManager()->LoadResource(path));
|
||||||
|
|
|
@ -38,6 +38,7 @@ char* ResourceMgr_LoadPlayerAnimByName(const char* animPath);
|
||||||
char* ResourceMgr_GetNameByCRC(uint64_t crc, char* alloc);
|
char* ResourceMgr_GetNameByCRC(uint64_t crc, char* alloc);
|
||||||
Gfx* ResourceMgr_LoadGfxByCRC(uint64_t crc);
|
Gfx* ResourceMgr_LoadGfxByCRC(uint64_t crc);
|
||||||
Gfx* ResourceMgr_LoadGfxByName(const char* path);
|
Gfx* ResourceMgr_LoadGfxByName(const char* path);
|
||||||
|
Gfx* ResourceMgr_PatchGfxByName(const char* path, int size);
|
||||||
Vtx* ResourceMgr_LoadVtxByCRC(uint64_t crc);
|
Vtx* ResourceMgr_LoadVtxByCRC(uint64_t crc);
|
||||||
Vtx* ResourceMgr_LoadVtxByName(const char* path);
|
Vtx* ResourceMgr_LoadVtxByName(const char* path);
|
||||||
CollisionHeader* ResourceMgr_LoadColByName(const char* path);
|
CollisionHeader* ResourceMgr_LoadColByName(const char* path);
|
||||||
|
|
|
@ -421,8 +421,12 @@ void GameState_Update(GameState* gameState) {
|
||||||
|
|
||||||
int32_t prevTime = CVar_GetS32("gPrevTime", gSaveContext.dayTime);
|
int32_t prevTime = CVar_GetS32("gPrevTime", gSaveContext.dayTime);
|
||||||
gSaveContext.dayTime = prevTime;
|
gSaveContext.dayTime = prevTime;
|
||||||
|
} else {
|
||||||
|
CVar_SetS32("gPrevTime", -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//since our CVar is same value and properly default to 0 there is not problems doing this in single line.
|
||||||
|
gSaveContext.language = CVar_GetS32("gLanguages", 0);
|
||||||
|
|
||||||
gameState->frames++;
|
gameState->frames++;
|
||||||
}
|
}
|
||||||
|
|
|
@ -758,12 +758,14 @@ void func_8002CDE4(GlobalContext* globalCtx, TitleCardContext* titleCtx) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void TitleCard_InitBossName(GlobalContext* globalCtx, TitleCardContext* titleCtx, void* texture, s16 x, s16 y, u8 width,
|
void TitleCard_InitBossName(GlobalContext* globalCtx, TitleCardContext* titleCtx, void* texture, s16 x, s16 y, u8 width,
|
||||||
u8 height) {
|
u8 height, s16 hasTranslation) {
|
||||||
|
|
||||||
if (ResourceMgr_OTRSigCheck(texture))
|
if (ResourceMgr_OTRSigCheck(texture))
|
||||||
texture = ResourceMgr_LoadTexByName(texture);
|
texture = ResourceMgr_LoadTexByName(texture);
|
||||||
|
|
||||||
titleCtx->texture = texture;
|
titleCtx->texture = texture;
|
||||||
|
titleCtx->isBossCard = true;
|
||||||
|
titleCtx->hasTranslation = hasTranslation;
|
||||||
titleCtx->x = x;
|
titleCtx->x = x;
|
||||||
titleCtx->y = y;
|
titleCtx->y = y;
|
||||||
titleCtx->width = width;
|
titleCtx->width = width;
|
||||||
|
@ -981,6 +983,8 @@ void TitleCard_InitPlaceName(GlobalContext* globalCtx, TitleCardContext* titleCt
|
||||||
titleCtx->texture = ResourceMgr_LoadTexByName(texture);
|
titleCtx->texture = ResourceMgr_LoadTexByName(texture);
|
||||||
|
|
||||||
//titleCtx->texture = texture;
|
//titleCtx->texture = texture;
|
||||||
|
titleCtx->isBossCard = false;
|
||||||
|
titleCtx->hasTranslation = false;
|
||||||
titleCtx->x = x;
|
titleCtx->x = x;
|
||||||
titleCtx->y = y;
|
titleCtx->y = y;
|
||||||
titleCtx->width = width;
|
titleCtx->width = width;
|
||||||
|
@ -1009,6 +1013,9 @@ void TitleCard_Draw(GlobalContext* globalCtx, TitleCardContext* titleCtx) {
|
||||||
s32 doubleWidth;
|
s32 doubleWidth;
|
||||||
s32 titleY;
|
s32 titleY;
|
||||||
s32 titleSecondY;
|
s32 titleSecondY;
|
||||||
|
s32 textureLanguageOffset;
|
||||||
|
s32 shiftTopY;
|
||||||
|
s32 shiftBottomY;
|
||||||
|
|
||||||
if (titleCtx->alpha != 0) {
|
if (titleCtx->alpha != 0) {
|
||||||
width = titleCtx->width;
|
width = titleCtx->width;
|
||||||
|
@ -1022,31 +1029,47 @@ void TitleCard_Draw(GlobalContext* globalCtx, TitleCardContext* titleCtx) {
|
||||||
height = (width * height > 0x1000) ? 0x1000 / width : height;
|
height = (width * height > 0x1000) ? 0x1000 / width : height;
|
||||||
titleSecondY = titleY + (height * 4);
|
titleSecondY = titleY + (height * 4);
|
||||||
|
|
||||||
|
textureLanguageOffset = 0x0;
|
||||||
|
shiftTopY = 0x0;
|
||||||
|
shiftBottomY = 0x1000;
|
||||||
|
|
||||||
|
//if this card is bosses cards, has translation and that is not using English language.
|
||||||
|
if (titleCtx->isBossCard && titleCtx->hasTranslation && gSaveContext.language != LANGUAGE_ENG) {
|
||||||
|
textureLanguageOffset = (width * height * gSaveContext.language);
|
||||||
|
if (gSaveContext.language == LANGUAGE_GER) {
|
||||||
|
shiftTopY = 0x400;
|
||||||
|
shiftBottomY = 0x1400;
|
||||||
|
} else if (gSaveContext.language == LANGUAGE_FRA) {
|
||||||
|
shiftTopY = 0x800;
|
||||||
|
shiftBottomY = 0x1800;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// WORLD_OVERLAY_DISP Goes over POLY_XLU_DISP but under POLY_KAL_DISP
|
// WORLD_OVERLAY_DISP Goes over POLY_XLU_DISP but under POLY_KAL_DISP
|
||||||
WORLD_OVERLAY_DISP = func_80093808(WORLD_OVERLAY_DISP);
|
WORLD_OVERLAY_DISP = func_80093808(WORLD_OVERLAY_DISP);
|
||||||
|
|
||||||
gDPSetPrimColor(WORLD_OVERLAY_DISP++, 0, 0, (u8)titleCtx->intensity, (u8)titleCtx->intensity, (u8)titleCtx->intensity,
|
gDPSetPrimColor(WORLD_OVERLAY_DISP++, 0, 0, (u8)titleCtx->intensity, (u8)titleCtx->intensity, (u8)titleCtx->intensity,
|
||||||
(u8)titleCtx->alpha);
|
(u8)titleCtx->alpha);
|
||||||
|
|
||||||
gDPLoadTextureBlock(WORLD_OVERLAY_DISP++, (uintptr_t)titleCtx->texture, G_IM_FMT_IA,
|
gDPLoadTextureBlock(WORLD_OVERLAY_DISP++, (uintptr_t)titleCtx->texture + textureLanguageOffset + shiftTopY, G_IM_FMT_IA,
|
||||||
G_IM_SIZ_8b,
|
G_IM_SIZ_8b,
|
||||||
width, height, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK,
|
width, height, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK,
|
||||||
G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
|
G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
|
||||||
|
//Removing the -1 there remove the gap between top and bottom textures.
|
||||||
gSPTextureRectangle(WORLD_OVERLAY_DISP++, titleX, titleY, ((doubleWidth * 2) + titleX) - 4, titleY + (height * 4) - 1,
|
gSPTextureRectangle(WORLD_OVERLAY_DISP++, titleX, titleY, ((doubleWidth * 2) + titleX) - 4, titleY + (height * 4),
|
||||||
G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10);
|
G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10);
|
||||||
|
|
||||||
height = titleCtx->height - height;
|
height = titleCtx->height - height;
|
||||||
|
|
||||||
// If texture is bigger than 0x1000, display the rest
|
// If texture is bigger than 0x1000, display the rest
|
||||||
if (height > 0) {
|
if (height > 0) {
|
||||||
gDPLoadTextureBlock(WORLD_OVERLAY_DISP++, (uintptr_t)titleCtx->texture + 0x1000,
|
gDPLoadTextureBlock(WORLD_OVERLAY_DISP++, (uintptr_t)titleCtx->texture + textureLanguageOffset + shiftBottomY,
|
||||||
G_IM_FMT_IA,
|
G_IM_FMT_IA,
|
||||||
G_IM_SIZ_8b, width, height, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP,
|
G_IM_SIZ_8b, width, height, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP,
|
||||||
G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
|
G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
|
||||||
|
//Removing the -1 there remove the gap between top and bottom textures.
|
||||||
gSPTextureRectangle(WORLD_OVERLAY_DISP++, titleX, titleSecondY, ((doubleWidth * 2) + titleX) - 4,
|
gSPTextureRectangle(WORLD_OVERLAY_DISP++, titleX, titleSecondY, ((doubleWidth * 2) + titleX) - 4,
|
||||||
titleSecondY + (height * 4) - 1, G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10);
|
titleSecondY + (height * 4), G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 2880);
|
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 2880);
|
||||||
|
@ -2547,10 +2570,16 @@ void func_80030FA8(GraphicsContext* gfxCtx) {
|
||||||
gDPLoadTextureBlock(POLY_XLU_DISP++, gLensOfTruthMaskTex, G_IM_FMT_I, G_IM_SIZ_8b, 64, 64, 0,
|
gDPLoadTextureBlock(POLY_XLU_DISP++, gLensOfTruthMaskTex, G_IM_FMT_I, G_IM_SIZ_8b, 64, 64, 0,
|
||||||
G_TX_MIRROR | G_TX_CLAMP, G_TX_MIRROR | G_TX_CLAMP, 6, 6, G_TX_NOLOD, G_TX_NOLOD);
|
G_TX_MIRROR | G_TX_CLAMP, G_TX_MIRROR | G_TX_CLAMP, 6, 6, G_TX_NOLOD, G_TX_NOLOD);
|
||||||
|
|
||||||
gDPSetTileSize(POLY_XLU_DISP++, G_TX_RENDERTILE, 384, 224, 892, 732);
|
s32 x = OTRGetRectDimensionFromLeftEdge(0) << 2;
|
||||||
gSPTextureRectangle(POLY_XLU_DISP++, 0, 0, 1280, 960, G_TX_RENDERTILE, 2240, 1600, 576, 597);
|
s32 w = OTRGetRectDimensionFromRightEdge(SCREEN_WIDTH) << 2;
|
||||||
gDPPipeSync(POLY_XLU_DISP++);
|
|
||||||
|
|
||||||
|
float ratio = OTRGetAspectRatio();
|
||||||
|
|
||||||
|
gDPSetTileSize(POLY_XLU_DISP++, G_TX_RENDERTILE, 384, 224, 892, 732);
|
||||||
|
// TODO: Do correct math to fix it
|
||||||
|
gSPWideTextureRectangle(POLY_XLU_DISP++, x, 0, x + abs(x), 960, G_TX_RENDERTILE, 0, 0, 0, 0);
|
||||||
|
gSPWideTextureRectangle(POLY_XLU_DISP++, 0, 0, w, 960, G_TX_RENDERTILE, 2240, 1600, 576, 597);
|
||||||
|
gDPPipeSync(POLY_XLU_DISP++);
|
||||||
CLOSE_DISPS(gfxCtx, "../z_actor.c", 6183);
|
CLOSE_DISPS(gfxCtx, "../z_actor.c", 6183);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -145,8 +145,6 @@ void TransitionCircle_Draw(void* thisx, Gfx** gfxP) {
|
||||||
|
|
||||||
modelView = this->modelView[this->frame];
|
modelView = this->modelView[this->frame];
|
||||||
|
|
||||||
this->color.rgba = 0xFFFFFFFF;
|
|
||||||
|
|
||||||
this->frame ^= 1;
|
this->frame ^= 1;
|
||||||
gDPPipeSync(gfx++);
|
gDPPipeSync(gfx++);
|
||||||
texScroll = Gfx_BranchTexScroll(&gfx, this->texX, this->texY, 0x10, 0x40);
|
texScroll = Gfx_BranchTexScroll(&gfx, this->texX, this->texY, 0x10, 0x40);
|
||||||
|
|
|
@ -2275,6 +2275,29 @@ Color_RGB8 sSandstormEnvColors[] = {
|
||||||
{ 50, 40, 0 },
|
{ 50, 40, 0 },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Gfx* gFieldSandstormDL_Custom = NULL;
|
||||||
|
|
||||||
|
void Environment_PatchSandstorm(GlobalContext* globalCtx) {
|
||||||
|
if (gFieldSandstormDL_Custom) return;
|
||||||
|
|
||||||
|
gFieldSandstormDL_Custom = ResourceMgr_PatchGfxByName(gFieldSandstormDL, -3);
|
||||||
|
|
||||||
|
const Gfx gFSPatchDL[2] = { gsSPEndDisplayList() };
|
||||||
|
bool patched = false;
|
||||||
|
Gfx* cmd = gFieldSandstormDL_Custom;
|
||||||
|
int id = 0;
|
||||||
|
|
||||||
|
while (!patched) {
|
||||||
|
const uint32_t opcode = cmd->words.w0 >> 24;
|
||||||
|
if (opcode == G_TEXRECT) {
|
||||||
|
gFieldSandstormDL_Custom[id] = gFSPatchDL[0];
|
||||||
|
patched = true;
|
||||||
|
}
|
||||||
|
++cmd;
|
||||||
|
id++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void Environment_DrawSandstorm(GlobalContext* globalCtx, u8 sandstormState) {
|
void Environment_DrawSandstorm(GlobalContext* globalCtx, u8 sandstormState) {
|
||||||
s32 primA1;
|
s32 primA1;
|
||||||
s32 envA1;
|
s32 envA1;
|
||||||
|
@ -2288,6 +2311,8 @@ void Environment_DrawSandstorm(GlobalContext* globalCtx, u8 sandstormState) {
|
||||||
u16 sp94;
|
u16 sp94;
|
||||||
u16 sp92;
|
u16 sp92;
|
||||||
|
|
||||||
|
Environment_PatchSandstorm(globalCtx);
|
||||||
|
|
||||||
switch (sandstormState) {
|
switch (sandstormState) {
|
||||||
case 3:
|
case 3:
|
||||||
if ((globalCtx->sceneNum == SCENE_SPOT13) && (globalCtx->roomCtx.curRoom.num == 0)) {
|
if ((globalCtx->sceneNum == SCENE_SPOT13) && (globalCtx->roomCtx.curRoom.num == 0)) {
|
||||||
|
@ -2394,8 +2419,11 @@ void Environment_DrawSandstorm(GlobalContext* globalCtx, u8 sandstormState) {
|
||||||
Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, (u32)sp96 % 0x1000, 0, 0x200, 0x20, 1, (u32)sp94 % 0x1000,
|
Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, (u32)sp96 % 0x1000, 0, 0x200, 0x20, 1, (u32)sp94 % 0x1000,
|
||||||
0xFFF - ((u32)sp92 % 0x1000), 0x100, 0x40));
|
0xFFF - ((u32)sp92 % 0x1000), 0x100, 0x40));
|
||||||
gDPSetTextureLUT(POLY_XLU_DISP++, G_TT_NONE);
|
gDPSetTextureLUT(POLY_XLU_DISP++, G_TT_NONE);
|
||||||
gSPDisplayList(POLY_XLU_DISP++, gFieldSandstormDL);
|
|
||||||
|
|
||||||
|
gSPDisplayList(POLY_XLU_DISP++, gFieldSandstormDL_Custom);
|
||||||
|
gSPWideTextureRectangle(POLY_XLU_DISP++, OTRGetRectDimensionFromLeftEdge(0) << 2, 0,
|
||||||
|
OTRGetRectDimensionFromRightEdge(SCREEN_WIDTH) << 2, 0x03C0, G_TX_RENDERTILE, 0, 0, 0x008C,
|
||||||
|
-0x008C);
|
||||||
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_kankyo.c", 4068);
|
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_kankyo.c", 4068);
|
||||||
|
|
||||||
D_8015FDB0 += (s32)sp98;
|
D_8015FDB0 += (s32)sp98;
|
||||||
|
|
|
@ -737,20 +737,32 @@ void Minimap_Draw(GlobalContext* globalCtx) {
|
||||||
if (((globalCtx->sceneNum != SCENE_SPOT01) && (globalCtx->sceneNum != SCENE_SPOT04) &&
|
if (((globalCtx->sceneNum != SCENE_SPOT01) && (globalCtx->sceneNum != SCENE_SPOT04) &&
|
||||||
(globalCtx->sceneNum != SCENE_SPOT08)) ||
|
(globalCtx->sceneNum != SCENE_SPOT08)) ||
|
||||||
(LINK_AGE_IN_YEARS != YEARS_ADULT)) {
|
(LINK_AGE_IN_YEARS != YEARS_ADULT)) {
|
||||||
|
s16 IconSize = 8;
|
||||||
|
s16 PosX = gMapData->owEntranceIconPosX[sEntranceIconMapIndex];
|
||||||
|
s16 PosY = gMapData->owEntranceIconPosY[sEntranceIconMapIndex];
|
||||||
|
//gFixDungeonMinimapIcon fix both Y position of visible icon and hide these non needed.
|
||||||
|
if (CVar_GetS32("gFixDungeonMinimapIcon", 1) != 0){
|
||||||
|
//No idea why and how Original value work but this does actually fix them all.
|
||||||
|
PosY = PosY+1024;
|
||||||
|
}
|
||||||
|
s16 TopLeftX = OTRGetRectDimensionFromRightEdge(PosX) << 2;
|
||||||
|
s16 TopLeftY = PosY << 2;
|
||||||
|
s16 TopLeftW = OTRGetRectDimensionFromRightEdge(PosX + IconSize) << 2;
|
||||||
|
s16 TopLeftH = (PosY + IconSize) << 2;
|
||||||
if ((gMapData->owEntranceFlag[sEntranceIconMapIndex] == 0xFFFF) ||
|
if ((gMapData->owEntranceFlag[sEntranceIconMapIndex] == 0xFFFF) ||
|
||||||
((gMapData->owEntranceFlag[sEntranceIconMapIndex] != 0xFFFF) &&
|
((gMapData->owEntranceFlag[sEntranceIconMapIndex] != 0xFFFF) &&
|
||||||
(gSaveContext.infTable[26] & gBitFlags[gMapData->owEntranceFlag[mapIndex]]))) {
|
(gSaveContext.infTable[26] & gBitFlags[gMapData->owEntranceFlag[mapIndex]]))) {
|
||||||
|
if (gMapData->owEntranceIconPosY[sEntranceIconMapIndex] << 2 != 0 && CVar_GetS32("gFixDungeonMinimapIcon", 1) != 0){
|
||||||
gDPLoadTextureBlock(OVERLAY_DISP++, gMapDungeonEntranceIconTex, G_IM_FMT_RGBA, G_IM_SIZ_16b,
|
gDPLoadTextureBlock(OVERLAY_DISP++, gMapDungeonEntranceIconTex, G_IM_FMT_RGBA, G_IM_SIZ_16b,
|
||||||
8, 8, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP,
|
IconSize, IconSize, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP,
|
||||||
G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
|
G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
|
||||||
|
gSPWideTextureRectangle(OVERLAY_DISP++, TopLeftX, TopLeftY, TopLeftW, TopLeftH, G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10);
|
||||||
gSPWideTextureRectangle(OVERLAY_DISP++,
|
}
|
||||||
OTRGetRectDimensionFromLeftEdge(gMapData->owEntranceIconPosX[sEntranceIconMapIndex]) << 2,
|
} else if (CVar_GetS32("gAlwaysShowDungeonMinimapIcon", 0) != 0){ //Ability to show entrance Before beating the dungeon itself
|
||||||
gMapData->owEntranceIconPosY[sEntranceIconMapIndex] << 2,
|
gDPLoadTextureBlock(OVERLAY_DISP++, gMapDungeonEntranceIconTex, G_IM_FMT_RGBA, G_IM_SIZ_16b,
|
||||||
OTRGetRectDimensionFromLeftEdge(gMapData->owEntranceIconPosX[sEntranceIconMapIndex] + 8) << 2,
|
IconSize, IconSize, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP,
|
||||||
(gMapData->owEntranceIconPosY[sEntranceIconMapIndex] + 8) << 2,
|
G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
|
||||||
G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10);
|
gSPWideTextureRectangle(OVERLAY_DISP++, TopLeftX, TopLeftY, TopLeftW, TopLeftH, G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -295,13 +295,16 @@ void func_8009638C(Gfx** displayList, void* source, void* tlut, u16 width, u16 h
|
||||||
bg->b.frameH = height * 4;
|
bg->b.frameH = height * 4;
|
||||||
guS2DInitBg(bg);
|
guS2DInitBg(bg);
|
||||||
|
|
||||||
gDPSetOtherMode(displayListHead++, mode0 | G_TL_TILE | G_TD_CLAMP | G_TP_NONE | G_CYC_COPY | G_PM_NPRIMITIVE,
|
gDPSetOtherMode(displayListHead++, mode0 | G_TL_TILE | G_TD_CLAMP | G_TP_NONE | G_CYC_FILL | G_PM_NPRIMITIVE,
|
||||||
G_AC_THRESHOLD | G_ZS_PIXEL | G_RM_NOOP | G_RM_NOOP2);
|
G_AC_THRESHOLD | G_ZS_PIXEL | G_RM_NOOP | G_RM_NOOP2);
|
||||||
|
|
||||||
gDPSetFillColor(displayListHead++, GPACK_RGBA5551(0, 0, 0, 1) << 16 | GPACK_RGBA5551(0, 0, 0, 1));
|
gDPSetFillColor(displayListHead++, GPACK_RGBA5551(0, 0, 0, 1) << 16 | GPACK_RGBA5551(0, 0, 0, 1));
|
||||||
gDPFillWideRectangle(displayListHead++, OTRGetRectDimensionFromLeftEdge(0), 0,
|
gDPFillWideRectangle(displayListHead++, OTRGetRectDimensionFromLeftEdge(0), 0,
|
||||||
OTRGetRectDimensionFromRightEdge(SCREEN_WIDTH), SCREEN_HEIGHT);
|
OTRGetRectDimensionFromRightEdge(SCREEN_WIDTH), SCREEN_HEIGHT);
|
||||||
|
|
||||||
|
gDPSetOtherMode(displayListHead++, mode0 | G_TL_TILE | G_TD_CLAMP | G_TP_NONE | G_CYC_COPY | G_PM_NPRIMITIVE,
|
||||||
|
G_AC_THRESHOLD | G_ZS_PIXEL | G_RM_NOOP | G_RM_NOOP2);
|
||||||
|
|
||||||
gDPLoadMultiTile(displayListHead++, bg->b.imagePtr, 0,
|
gDPLoadMultiTile(displayListHead++, bg->b.imagePtr, 0,
|
||||||
G_TX_RENDERTILE, G_IM_FMT_RGBA, G_IM_SIZ_16b, 320, 0, 0, 0, 0 + 31,
|
G_TX_RENDERTILE, G_IM_FMT_RGBA, G_IM_SIZ_16b, 320, 0, 0, 0, 0 + 31,
|
||||||
0 + 31, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD,
|
0 + 31, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD,
|
||||||
|
|
|
@ -418,7 +418,7 @@ void BossDodongo_IntroCutscene(BossDodongo* this, GlobalContext* globalCtx) {
|
||||||
if (this->unk_198 == 0x5A) {
|
if (this->unk_198 == 0x5A) {
|
||||||
if (!(gSaveContext.eventChkInf[7] & 2)) {
|
if (!(gSaveContext.eventChkInf[7] & 2)) {
|
||||||
TitleCard_InitBossName(globalCtx, &globalCtx->actorCtx.titleCtx,
|
TitleCard_InitBossName(globalCtx, &globalCtx->actorCtx.titleCtx,
|
||||||
SEGMENTED_TO_VIRTUAL(gKingDodongoTitleCardTex), 0xA0, 0xB4, 0x80, 0x28);
|
SEGMENTED_TO_VIRTUAL(gKingDodongoTitleCardTex), 160, 180, 128, 40, true);
|
||||||
}
|
}
|
||||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_FIRE_BOSS);
|
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_FIRE_BOSS);
|
||||||
}
|
}
|
||||||
|
|
|
@ -493,7 +493,7 @@ void BossFd_Fly(BossFd* this, GlobalContext* globalCtx) {
|
||||||
}
|
}
|
||||||
if ((this->timers[3] == 130) && !(gSaveContext.eventChkInf[7] & 8)) {
|
if ((this->timers[3] == 130) && !(gSaveContext.eventChkInf[7] & 8)) {
|
||||||
TitleCard_InitBossName(globalCtx, &globalCtx->actorCtx.titleCtx,
|
TitleCard_InitBossName(globalCtx, &globalCtx->actorCtx.titleCtx,
|
||||||
SEGMENTED_TO_VIRTUAL(gVolvagiaBossTitleCardTex), 0xA0, 0xB4, 0x80, 0x28);
|
SEGMENTED_TO_VIRTUAL(gVolvagiaBossTitleCardTex), 160, 180, 128, 40, true);
|
||||||
}
|
}
|
||||||
if (this->timers[3] <= 100) {
|
if (this->timers[3] <= 100) {
|
||||||
this->camData.eyeVel.x = this->camData.eyeVel.y = this->camData.eyeVel.z = 2.0f;
|
this->camData.eyeVel.x = this->camData.eyeVel.y = this->camData.eyeVel.z = 2.0f;
|
||||||
|
|
|
@ -1088,7 +1088,7 @@ void BossGanon_IntroCutscene(BossGanon* this, GlobalContext* globalCtx) {
|
||||||
|
|
||||||
if (!(gSaveContext.eventChkInf[7] & 0x100)) {
|
if (!(gSaveContext.eventChkInf[7] & 0x100)) {
|
||||||
TitleCard_InitBossName(globalCtx, &globalCtx->actorCtx.titleCtx,
|
TitleCard_InitBossName(globalCtx, &globalCtx->actorCtx.titleCtx,
|
||||||
SEGMENTED_TO_VIRTUAL(gDorfTitleCardTex), 160, 180, 128, 40);
|
SEGMENTED_TO_VIRTUAL(gDorfTitleCardTex), 160, 180, 128, 40, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
gSaveContext.eventChkInf[7] |= 0x100;
|
gSaveContext.eventChkInf[7] |= 0x100;
|
||||||
|
|
|
@ -671,7 +671,8 @@ void func_808FD5F4(BossGanon2* this, GlobalContext* globalCtx) {
|
||||||
if (this->unk_398 == 80) {
|
if (this->unk_398 == 80) {
|
||||||
BossGanon2_SetObjectSegment(this, globalCtx, OBJECT_GANON2, false);
|
BossGanon2_SetObjectSegment(this, globalCtx, OBJECT_GANON2, false);
|
||||||
TitleCard_InitBossName(globalCtx, &globalCtx->actorCtx.titleCtx,
|
TitleCard_InitBossName(globalCtx, &globalCtx->actorCtx.titleCtx,
|
||||||
SEGMENTED_TO_VIRTUAL(object_ganon2_Tex_021A90), 160, 180, 128, 40);
|
SEGMENTED_TO_VIRTUAL(object_ganon2_Tex_021A90), 160, 180, 128, 40, true);
|
||||||
|
//It has translation but they are all the same. they all say "GANON" only
|
||||||
}
|
}
|
||||||
this->unk_3A4.x = ((this->actor.world.pos.x + 500.0f) - 350.0f) + 100.0f;
|
this->unk_3A4.x = ((this->actor.world.pos.x + 500.0f) - 350.0f) + 100.0f;
|
||||||
this->unk_3A4.y = this->actor.world.pos.y;
|
this->unk_3A4.y = this->actor.world.pos.y;
|
||||||
|
|
|
@ -926,7 +926,7 @@ void BossGoma_Encounter(BossGoma* this, GlobalContext* globalCtx) {
|
||||||
|
|
||||||
if (!(gSaveContext.eventChkInf[7] & 1)) {
|
if (!(gSaveContext.eventChkInf[7] & 1)) {
|
||||||
TitleCard_InitBossName(globalCtx, &globalCtx->actorCtx.titleCtx,
|
TitleCard_InitBossName(globalCtx, &globalCtx->actorCtx.titleCtx,
|
||||||
SEGMENTED_TO_VIRTUAL(gGohmaTitleCardTex), 0xA0, 0xB4, 0x80, 0x28);
|
SEGMENTED_TO_VIRTUAL(gGohmaTitleCardTex), 160, 180, 128, 40, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_BOSS);
|
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_BOSS);
|
||||||
|
|
|
@ -1423,7 +1423,7 @@ void BossMo_IntroCs(BossMo* this, GlobalContext* globalCtx) {
|
||||||
}
|
}
|
||||||
if (this->timers[2] == 130) {
|
if (this->timers[2] == 130) {
|
||||||
TitleCard_InitBossName(globalCtx, &globalCtx->actorCtx.titleCtx,
|
TitleCard_InitBossName(globalCtx, &globalCtx->actorCtx.titleCtx,
|
||||||
SEGMENTED_TO_VIRTUAL(gMorphaTitleCardTex), 0xA0, 0xB4, 0x80, 0x28);
|
SEGMENTED_TO_VIRTUAL(gMorphaTitleCardTex), 160, 180, 128, 40, true);
|
||||||
gSaveContext.eventChkInf[7] |= 0x10;
|
gSaveContext.eventChkInf[7] |= 0x10;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -598,7 +598,7 @@ void BossSst_HeadIntro(BossSst* this, GlobalContext* globalCtx) {
|
||||||
} else if (revealStateTimer == 85) {
|
} else if (revealStateTimer == 85) {
|
||||||
if (!(gSaveContext.eventChkInf[7] & 0x80)) {
|
if (!(gSaveContext.eventChkInf[7] & 0x80)) {
|
||||||
TitleCard_InitBossName(globalCtx, &globalCtx->actorCtx.titleCtx,
|
TitleCard_InitBossName(globalCtx, &globalCtx->actorCtx.titleCtx,
|
||||||
SEGMENTED_TO_VIRTUAL(gBongoTitleCardTex), 160, 180, 128, 40);
|
SEGMENTED_TO_VIRTUAL(gBongoTitleCardTex), 160, 180, 128, 40, true);
|
||||||
}
|
}
|
||||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_BOSS);
|
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_BOSS);
|
||||||
Animation_MorphToPlayOnce(&this->skelAnime, &gBongoHeadEyeCloseAnim, -5.0f);
|
Animation_MorphToPlayOnce(&this->skelAnime, &gBongoHeadEyeCloseAnim, -5.0f);
|
||||||
|
|
|
@ -2220,7 +2220,7 @@ void BossTw_TwinrovaIntroCS(BossTw* this, GlobalContext* globalCtx) {
|
||||||
globalCtx->envCtx.unk_BE = 1;
|
globalCtx->envCtx.unk_BE = 1;
|
||||||
globalCtx->envCtx.unk_BD = 1;
|
globalCtx->envCtx.unk_BD = 1;
|
||||||
globalCtx->envCtx.unk_D8 = 0.0f;
|
globalCtx->envCtx.unk_D8 = 0.0f;
|
||||||
TitleCard_InitBossName(globalCtx, &globalCtx->actorCtx.titleCtx, SEGMENTED_TO_VIRTUAL(gTwinrovaTitleCardTex), 160, 180, 128, 40); // OTRTODO
|
TitleCard_InitBossName(globalCtx, &globalCtx->actorCtx.titleCtx, SEGMENTED_TO_VIRTUAL(gTwinrovaTitleCardTex), 160, 180, 128, 40, true);
|
||||||
gSaveContext.eventChkInf[7] |= 0x20;
|
gSaveContext.eventChkInf[7] |= 0x20;
|
||||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_BOSS);
|
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_BOSS);
|
||||||
}
|
}
|
||||||
|
|
|
@ -979,7 +979,7 @@ void BossVa_BodyIntro(BossVa* this, GlobalContext* globalCtx) {
|
||||||
|
|
||||||
if (!(gSaveContext.eventChkInf[7] & 0x40)) {
|
if (!(gSaveContext.eventChkInf[7] & 0x40)) {
|
||||||
TitleCard_InitBossName(globalCtx, &globalCtx->actorCtx.titleCtx,
|
TitleCard_InitBossName(globalCtx, &globalCtx->actorCtx.titleCtx,
|
||||||
SEGMENTED_TO_VIRTUAL(gBarinadeTitleCardTex), 0xA0, 0xB4, 0x80, 0x28);
|
SEGMENTED_TO_VIRTUAL(gBarinadeTitleCardTex), 160, 180, 128, 40, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Rand_ZeroOne() < 0.1f) {
|
if (Rand_ZeroOne() < 0.1f) {
|
||||||
|
|
|
@ -287,7 +287,7 @@ s32 EnKz_FollowPath(EnKz* this, GlobalContext* globalCtx) {
|
||||||
pathDiffZ = pointPos->z - this->actor.world.pos.z;
|
pathDiffZ = pointPos->z - this->actor.world.pos.z;
|
||||||
Math_SmoothStepToS(&this->actor.world.rot.y, (Math_FAtan2F(pathDiffX, pathDiffZ) * (0x8000 / M_PI)), 0xA, 0x3E8, 1);
|
Math_SmoothStepToS(&this->actor.world.rot.y, (Math_FAtan2F(pathDiffX, pathDiffZ) * (0x8000 / M_PI)), 0xA, 0x3E8, 1);
|
||||||
|
|
||||||
if ((SQ(pathDiffX) + SQ(pathDiffZ)) < 10.0f) {
|
if ((SQ(pathDiffX) + SQ(pathDiffZ)) < 10.0f * CVar_GetS32("gMweepSpeed", 1)) {
|
||||||
this->waypoint++;
|
this->waypoint++;
|
||||||
if (this->waypoint >= path->count) {
|
if (this->waypoint >= path->count) {
|
||||||
this->waypoint = 0;
|
this->waypoint = 0;
|
||||||
|
@ -378,7 +378,7 @@ void EnKz_SetupMweep(EnKz* this, GlobalContext* globalCtx) {
|
||||||
initPos.z += 260.0f;
|
initPos.z += 260.0f;
|
||||||
Gameplay_CameraSetAtEye(globalCtx, this->cutsceneCamera, &pos, &initPos);
|
Gameplay_CameraSetAtEye(globalCtx, this->cutsceneCamera, &pos, &initPos);
|
||||||
func_8002DF54(globalCtx, &this->actor, 8);
|
func_8002DF54(globalCtx, &this->actor, 8);
|
||||||
this->actor.speedXZ = 0.1f;
|
this->actor.speedXZ = 0.1f * CVar_GetS32("gMweepSpeed", 1);
|
||||||
this->actionFunc = EnKz_Mweep;
|
this->actionFunc = EnKz_Mweep;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -332,7 +332,7 @@ void EnfHG_Intro(EnfHG* this, GlobalContext* globalCtx) {
|
||||||
Math_ApproachF(&this->cameraSpeedMod, 1.0f, 1.0f, 0.05f);
|
Math_ApproachF(&this->cameraSpeedMod, 1.0f, 1.0f, 0.05f);
|
||||||
if (this->timers[0] == 75) {
|
if (this->timers[0] == 75) {
|
||||||
TitleCard_InitBossName(globalCtx, &globalCtx->actorCtx.titleCtx,
|
TitleCard_InitBossName(globalCtx, &globalCtx->actorCtx.titleCtx,
|
||||||
SEGMENTED_TO_VIRTUAL(gPhantomGanonTitleCardTex), 160, 180, 128, 40);
|
SEGMENTED_TO_VIRTUAL(gPhantomGanonTitleCardTex), 160, 180, 128, 40, true);
|
||||||
}
|
}
|
||||||
if (this->timers[0] == 0) {
|
if (this->timers[0] == 0) {
|
||||||
this->cutsceneState = INTRO_RETREAT;
|
this->cutsceneState = INTRO_RETREAT;
|
||||||
|
|
Loading…
Reference in New Issue