mirror of
https://github.com/pmret/papermario.git
synced 2024-11-09 12:32:38 +01:00
commit
1f54aaefa1
2
Makefile
2
Makefile
@ -9,7 +9,7 @@ BUILD_DIR = build
|
||||
|
||||
SRC_DIRS := src src/os src/os/nusys
|
||||
ASM_DIRS := asm asm/os
|
||||
INCLUDE_DIRS := include include/PR
|
||||
INCLUDE_DIRS := include include/PR src
|
||||
DATA_DIRS := bin
|
||||
|
||||
# Source code files
|
||||
|
@ -66,72 +66,3 @@ glabel boot_main
|
||||
.L80026054:
|
||||
/* 1454 80026054 08009815 */ j .L80026054
|
||||
/* 1458 80026058 00000000 */ nop
|
||||
/* 145C 8002605C 27BDFFE0 */ addiu $sp, $sp, -0x20
|
||||
/* 1460 80026060 AFB10014 */ sw $s1, 0x14($sp)
|
||||
/* 1464 80026064 3C118007 */ lui $s1, 0x8007
|
||||
/* 1468 80026068 26313E00 */ addiu $s1, $s1, 0x3e00
|
||||
/* 146C 8002606C AFBF0018 */ sw $ra, 0x18($sp)
|
||||
/* 1470 80026070 AFB00010 */ sw $s0, 0x10($sp)
|
||||
/* 1474 80026074 8E230000 */ lw $v1, ($s1)
|
||||
/* 1478 80026078 10600022 */ beqz $v1, .L80026104
|
||||
/* 147C 8002607C 0080802D */ daddu $s0, $a0, $zero
|
||||
/* 1480 80026080 24020001 */ addiu $v0, $zero, 1
|
||||
/* 1484 80026084 14620016 */ bne $v1, $v0, .L800260E0
|
||||
/* 1488 80026088 00000000 */ nop
|
||||
/* 148C 8002608C 0C017CB4 */ jal nuGfxTaskAllEndWait
|
||||
/* 1490 80026090 00000000 */ nop
|
||||
/* 1494 80026094 16000012 */ bnez $s0, .L800260E0
|
||||
/* 1498 80026098 00000000 */ nop
|
||||
/* 149C 8002609C 0C019A6C */ jal osViGetCurrentFramebuffer
|
||||
/* 14A0 800260A0 00000000 */ nop
|
||||
/* 14A4 800260A4 3C10800A */ lui $s0, 0x800a
|
||||
/* 14A8 800260A8 2610A680 */ addiu $s0, $s0, -0x5980
|
||||
/* 14AC 800260AC 0200202D */ daddu $a0, $s0, $zero
|
||||
/* 14B0 800260B0 AE020008 */ sw $v0, 8($s0)
|
||||
/* 14B4 800260B4 AE020004 */ sw $v0, 4($s0)
|
||||
/* 14B8 800260B8 AE020000 */ sw $v0, ($s0)
|
||||
/* 14BC 800260BC 3C018007 */ lui $at, 0x8007
|
||||
/* 14C0 800260C0 AC223E04 */ sw $v0, 0x3e04($at)
|
||||
/* 14C4 800260C4 0C017CBC */ jal nuGfxSetCfb
|
||||
/* 14C8 800260C8 24050003 */ addiu $a1, $zero, 3
|
||||
/* 14CC 800260CC 8E040000 */ lw $a0, ($s0)
|
||||
/* 14D0 800260D0 0C019C08 */ jal osViSwapBuffer
|
||||
/* 14D4 800260D4 00000000 */ nop
|
||||
/* 14D8 800260D8 24020002 */ addiu $v0, $zero, 2
|
||||
/* 14DC 800260DC AE220000 */ sw $v0, ($s1)
|
||||
.L800260E0:
|
||||
/* 14E0 800260E0 3C038007 */ lui $v1, 0x8007
|
||||
/* 14E4 800260E4 8C633E00 */ lw $v1, 0x3e00($v1)
|
||||
/* 14E8 800260E8 24020002 */ addiu $v0, $zero, 2
|
||||
/* 14EC 800260EC 14620018 */ bne $v1, $v0, .L80026150
|
||||
/* 14F0 800260F0 00000000 */ nop
|
||||
/* 14F4 800260F4 0C009859 */ jal func_80026164
|
||||
/* 14F8 800260F8 00000000 */ nop
|
||||
/* 14FC 800260FC 08009854 */ j .L80026150
|
||||
/* 1500 80026100 00000000 */ nop
|
||||
.L80026104:
|
||||
/* 1504 80026104 3C038007 */ lui $v1, 0x8007
|
||||
/* 1508 80026108 24633E0A */ addiu $v1, $v1, 0x3e0a
|
||||
/* 150C 8002610C 94620000 */ lhu $v0, ($v1)
|
||||
/* 1510 80026110 38420001 */ xori $v0, $v0, 1
|
||||
/* 1514 80026114 1440000E */ bnez $v0, .L80026150
|
||||
/* 1518 80026118 A4620000 */ sh $v0, ($v1)
|
||||
/* 151C 8002611C 0C0099D0 */ jal step_game_loop
|
||||
/* 1520 80026120 00000000 */ nop
|
||||
/* 1524 80026124 3C038007 */ lui $v1, 0x8007
|
||||
/* 1528 80026128 24633E08 */ addiu $v1, $v1, 0x3e08
|
||||
/* 152C 8002612C 24020001 */ addiu $v0, $zero, 1
|
||||
/* 1530 80026130 A4620000 */ sh $v0, ($v1)
|
||||
/* 1534 80026134 2A020003 */ slti $v0, $s0, 3
|
||||
/* 1538 80026138 10400005 */ beqz $v0, .L80026150
|
||||
/* 153C 8002613C 00000000 */ nop
|
||||
/* 1540 80026140 0C009A7B */ jal func_800269EC
|
||||
/* 1544 80026144 A4600000 */ sh $zero, ($v1)
|
||||
/* 1548 80026148 0C009AC2 */ jal gfx_draw_frame
|
||||
/* 154C 8002614C 00000000 */ nop
|
||||
.L80026150:
|
||||
/* 1550 80026150 8FBF0018 */ lw $ra, 0x18($sp)
|
||||
/* 1554 80026154 8FB10014 */ lw $s1, 0x14($sp)
|
||||
/* 1558 80026158 8FB00010 */ lw $s0, 0x10($sp)
|
||||
/* 155C 8002615C 03E00008 */ jr $ra
|
||||
/* 1560 80026160 27BD0020 */ addiu $sp, $sp, 0x20
|
||||
|
73
asm/nonmatchings/code_1370_len_7d0/gfxRetrace_Callback.s
Normal file
73
asm/nonmatchings/code_1370_len_7d0/gfxRetrace_Callback.s
Normal file
@ -0,0 +1,73 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel gfxRetrace_Callback
|
||||
/* 145C 8002605C 27BDFFE0 */ addiu $sp, $sp, -0x20
|
||||
/* 1460 80026060 AFB10014 */ sw $s1, 0x14($sp)
|
||||
/* 1464 80026064 3C118007 */ lui $s1, 0x8007
|
||||
/* 1468 80026068 26313E00 */ addiu $s1, $s1, 0x3e00
|
||||
/* 146C 8002606C AFBF0018 */ sw $ra, 0x18($sp)
|
||||
/* 1470 80026070 AFB00010 */ sw $s0, 0x10($sp)
|
||||
/* 1474 80026074 8E230000 */ lw $v1, ($s1)
|
||||
/* 1478 80026078 10600022 */ beqz $v1, .L80026104
|
||||
/* 147C 8002607C 0080802D */ daddu $s0, $a0, $zero
|
||||
/* 1480 80026080 24020001 */ addiu $v0, $zero, 1
|
||||
/* 1484 80026084 14620016 */ bne $v1, $v0, .L800260E0
|
||||
/* 1488 80026088 00000000 */ nop
|
||||
/* 148C 8002608C 0C017CB4 */ jal nuGfxTaskAllEndWait
|
||||
/* 1490 80026090 00000000 */ nop
|
||||
/* 1494 80026094 16000012 */ bnez $s0, .L800260E0
|
||||
/* 1498 80026098 00000000 */ nop
|
||||
/* 149C 8002609C 0C019A6C */ jal osViGetCurrentFramebuffer
|
||||
/* 14A0 800260A0 00000000 */ nop
|
||||
/* 14A4 800260A4 3C10800A */ lui $s0, 0x800a
|
||||
/* 14A8 800260A8 2610A680 */ addiu $s0, $s0, -0x5980
|
||||
/* 14AC 800260AC 0200202D */ daddu $a0, $s0, $zero
|
||||
/* 14B0 800260B0 AE020008 */ sw $v0, 8($s0)
|
||||
/* 14B4 800260B4 AE020004 */ sw $v0, 4($s0)
|
||||
/* 14B8 800260B8 AE020000 */ sw $v0, ($s0)
|
||||
/* 14BC 800260BC 3C018007 */ lui $at, 0x8007
|
||||
/* 14C0 800260C0 AC223E04 */ sw $v0, 0x3e04($at)
|
||||
/* 14C4 800260C4 0C017CBC */ jal nuGfxSetCfb
|
||||
/* 14C8 800260C8 24050003 */ addiu $a1, $zero, 3
|
||||
/* 14CC 800260CC 8E040000 */ lw $a0, ($s0)
|
||||
/* 14D0 800260D0 0C019C08 */ jal osViSwapBuffer
|
||||
/* 14D4 800260D4 00000000 */ nop
|
||||
/* 14D8 800260D8 24020002 */ addiu $v0, $zero, 2
|
||||
/* 14DC 800260DC AE220000 */ sw $v0, ($s1)
|
||||
.L800260E0:
|
||||
/* 14E0 800260E0 3C038007 */ lui $v1, 0x8007
|
||||
/* 14E4 800260E4 8C633E00 */ lw $v1, 0x3e00($v1)
|
||||
/* 14E8 800260E8 24020002 */ addiu $v0, $zero, 2
|
||||
/* 14EC 800260EC 14620018 */ bne $v1, $v0, .L80026150
|
||||
/* 14F0 800260F0 00000000 */ nop
|
||||
/* 14F4 800260F4 0C009859 */ jal func_80026164
|
||||
/* 14F8 800260F8 00000000 */ nop
|
||||
/* 14FC 800260FC 08009854 */ j .L80026150
|
||||
/* 1500 80026100 00000000 */ nop
|
||||
.L80026104:
|
||||
/* 1504 80026104 3C038007 */ lui $v1, 0x8007
|
||||
/* 1508 80026108 24633E0A */ addiu $v1, $v1, 0x3e0a
|
||||
/* 150C 8002610C 94620000 */ lhu $v0, ($v1)
|
||||
/* 1510 80026110 38420001 */ xori $v0, $v0, 1
|
||||
/* 1514 80026114 1440000E */ bnez $v0, .L80026150
|
||||
/* 1518 80026118 A4620000 */ sh $v0, ($v1)
|
||||
/* 151C 8002611C 0C0099D0 */ jal step_game_loop
|
||||
/* 1520 80026120 00000000 */ nop
|
||||
/* 1524 80026124 3C038007 */ lui $v1, 0x8007
|
||||
/* 1528 80026128 24633E08 */ addiu $v1, $v1, 0x3e08
|
||||
/* 152C 8002612C 24020001 */ addiu $v0, $zero, 1
|
||||
/* 1530 80026130 A4620000 */ sh $v0, ($v1)
|
||||
/* 1534 80026134 2A020003 */ slti $v0, $s0, 3
|
||||
/* 1538 80026138 10400005 */ beqz $v0, .L80026150
|
||||
/* 153C 8002613C 00000000 */ nop
|
||||
/* 1540 80026140 0C009A7B */ jal func_800269EC
|
||||
/* 1544 80026144 A4600000 */ sh $zero, ($v1)
|
||||
/* 1548 80026148 0C009AC2 */ jal gfx_draw_frame
|
||||
/* 154C 8002614C 00000000 */ nop
|
||||
.L80026150:
|
||||
/* 1550 80026150 8FBF0018 */ lw $ra, 0x18($sp)
|
||||
/* 1554 80026154 8FB10014 */ lw $s1, 0x14($sp)
|
||||
/* 1558 80026158 8FB00010 */ lw $s0, 0x10($sp)
|
||||
/* 155C 8002615C 03E00008 */ jr $ra
|
||||
/* 1560 80026160 27BD0020 */ addiu $sp, $sp, 0x20
|
@ -6,8 +6,8 @@ glabel render_curtains
|
||||
/* 6E84 8002BA84 C420BA94 */ lwc1 $f0, -0x456c($at)
|
||||
/* 6E88 8002BA88 27BDFF78 */ addiu $sp, $sp, -0x88
|
||||
/* 6E8C 8002BA8C AFB20068 */ sw $s2, 0x68($sp)
|
||||
/* 6E90 8002BA90 3C12800A */ lui $s2, %hi(D_8009BA90)
|
||||
/* 6E94 8002BA94 2652BA90 */ addiu $s2, $s2, %lo(D_8009BA90)
|
||||
/* 6E90 8002BA90 3C12800A */ lui $s2, %hi(gCurtainScale)
|
||||
/* 6E94 8002BA94 2652BA90 */ addiu $s2, $s2, %lo(gCurtainScale)
|
||||
/* 6E98 8002BA98 AFBF0078 */ sw $ra, 0x78($sp)
|
||||
/* 6E9C 8002BA9C AFB50074 */ sw $s5, 0x74($sp)
|
||||
/* 6EA0 8002BAA0 AFB40070 */ sw $s4, 0x70($sp)
|
||||
@ -31,8 +31,8 @@ glabel render_curtains
|
||||
/* 6EE8 8002BAE8 462010A0 */ cvt.s.d $f2, $f2
|
||||
/* 6EEC 8002BAEC E6420000 */ swc1 $f2, ($s2)
|
||||
.L8002BAF0:
|
||||
/* 6EF0 8002BAF0 3C13800A */ lui $s3, %hi(D_8009BA98)
|
||||
/* 6EF4 8002BAF4 2673BA98 */ addiu $s3, $s3, %lo(D_8009BA98)
|
||||
/* 6EF0 8002BAF0 3C13800A */ lui $s3, %hi(gCurtainFade)
|
||||
/* 6EF4 8002BAF4 2673BA98 */ addiu $s3, $s3, %lo(gCurtainFade)
|
||||
/* 6EF8 8002BAF8 3C01800A */ lui $at, 0x800a
|
||||
/* 6EFC 8002BAFC C420BA9C */ lwc1 $f0, -0x4564($at)
|
||||
/* 6F00 8002BB00 C6640000 */ lwc1 $f4, ($s3)
|
||||
@ -195,8 +195,8 @@ glabel render_curtains
|
||||
/* 716C 8002BD6C 346300FF */ ori $v1, $v1, 0xff
|
||||
/* 7170 8002BD70 ACA30004 */ sw $v1, 4($a1)
|
||||
.L8002BD74:
|
||||
/* 7174 8002BD74 3C02800A */ lui $v0, %hi(D_8009BAA0)
|
||||
/* 7178 8002BD78 8C42BAA0 */ lw $v0, %lo(D_8009BAA0)($v0)
|
||||
/* 7174 8002BD74 3C02800A */ lui $v0, %hi(gCurtainDrawCallback)
|
||||
/* 7178 8002BD78 8C42BAA0 */ lw $v0, %lo(gCurtainDrawCallback)($v0)
|
||||
/* 717C 8002BD7C 10400003 */ beqz $v0, .L8002BD8C
|
||||
/* 7180 8002BD80 00000000 */ nop
|
||||
/* 7184 8002BD84 0040F809 */ jalr $v0
|
||||
|
@ -89,10 +89,21 @@ extern Trigger* gTriggerList1[64];
|
||||
extern Trigger* gTriggerList2[64];
|
||||
extern Trigger** gCurrentTriggerListPtr[64];
|
||||
|
||||
// Map transition data. Should probably be a struct
|
||||
extern u16 gMapTransitionAlpha;
|
||||
extern u16 D_800A0942;
|
||||
extern s16 D_800A0942;
|
||||
extern s16 D_800A0944;
|
||||
|
||||
extern s16 D_800A0954;
|
||||
extern s16 D_800A0956;
|
||||
extern s16 D_800A0958;
|
||||
extern s16 D_800A095A;
|
||||
extern u8 D_800A095B;
|
||||
extern s16 D_800A095C;
|
||||
extern u8 D_800A095D;
|
||||
extern s16 D_800A095E;
|
||||
extern u8 D_800A095F;
|
||||
extern s32 D_800A0960;
|
||||
extern s32 D_800A0964;
|
||||
|
||||
extern s32 gGameState;
|
||||
extern s32 D_8009A650[1];
|
||||
@ -101,13 +112,6 @@ extern u16 D_8009A6A2;
|
||||
extern u16 D_8009A6A4;
|
||||
extern u16 D_8009A6A6;
|
||||
|
||||
// curtains
|
||||
extern f32 D_8009BA90;
|
||||
extern f32 D_8009BA94; // curtain scale goal
|
||||
extern f32 D_8009BA98;
|
||||
extern f32 D_8009BA9C; // curtain fade goal
|
||||
extern s32 D_8009BAA0; // curtain draw callback
|
||||
|
||||
extern s16 gCurrentDoorSoundsSet;
|
||||
|
||||
extern s32 D_800D9620;
|
||||
@ -138,6 +142,9 @@ extern u32 gBattleMapFlags[MAX_MAPFLAGS];
|
||||
|
||||
extern s32 D_8009A5D8;
|
||||
|
||||
extern u8 D_800779B0;
|
||||
extern u8 D_800A0963;
|
||||
|
||||
extern s32 mapScriptLibStart;
|
||||
extern s32 mapScriptLibEnd;
|
||||
extern s32 mapScriptLibVram;
|
||||
|
@ -1,6 +1,91 @@
|
||||
#include "common.h"
|
||||
#include "code_11a50_len_7a0.h"
|
||||
|
||||
#ifdef NON_MATCHING
|
||||
void begin_state_intro(void) {
|
||||
s8 unk_A8;
|
||||
|
||||
GAME_STATUS->loadMenuState = 0;
|
||||
|
||||
set_curtain_scale_goal(1.0f);
|
||||
set_curtain_fade_goal(0.3f);
|
||||
|
||||
unk_A8 = GAME_STATUS->unk_A8;
|
||||
switch (unk_A8) {
|
||||
case 0:
|
||||
intro_logos_set_fade_alpha(0);
|
||||
|
||||
D_800A0954 = 0xFF;
|
||||
D_800A0956 = 0x10;
|
||||
D_800A0958 = 4;
|
||||
D_800A0960 = 0;
|
||||
D_800A095A = 0xD0;
|
||||
D_800A095C = 0xD0;
|
||||
D_800A095E = 0xD0;
|
||||
D_800A0964 = 0;
|
||||
|
||||
do {
|
||||
GameStatus* gameStatus = GAME_STATUS;
|
||||
|
||||
// hos_05 (Star Sanctuary)
|
||||
gameStatus->areaID = 5;
|
||||
gameStatus->mapID = 5;
|
||||
gameStatus->entryID = 3;
|
||||
} while (0);
|
||||
|
||||
break;
|
||||
case 1:
|
||||
intro_logos_set_fade_alpha(0);
|
||||
|
||||
D_800A0954 = 0;
|
||||
D_800A0956 = 0xC;
|
||||
D_800A0958 = 4;
|
||||
D_800A0960 = unk_A8;
|
||||
D_800A095A = 0;
|
||||
D_800A095C = 0;
|
||||
D_800A095E = 0;
|
||||
D_800A0964 = 0;
|
||||
|
||||
// FIXME: regalloc issues
|
||||
do {
|
||||
GameStatus* gameStatus = GAME_STATUS;
|
||||
|
||||
// hos_04 (Outside the Sanctuary)
|
||||
gameStatus->areaID = 5;
|
||||
gameStatus->mapID = 4;
|
||||
gameStatus->entryID = 4;
|
||||
} while (0);
|
||||
|
||||
break;
|
||||
default:
|
||||
intro_logos_set_fade_alpha(0);
|
||||
intro_logos_set_fade_color(0xD0);
|
||||
|
||||
{
|
||||
GameStatus* gameStatus = GAME_STATUS;
|
||||
u8* mystery = &D_800779B0;
|
||||
|
||||
gameStatus->unk_A8 = -1;
|
||||
|
||||
D_800A0956 = 6;
|
||||
D_800A0958 = 6;
|
||||
|
||||
++*mystery;
|
||||
if (*mystery >= 4) {
|
||||
*mystery = 0;
|
||||
}
|
||||
|
||||
D_800A0964 = 3;
|
||||
}
|
||||
}
|
||||
|
||||
func_80137DA4(D_800A0963, (f32)D_800A0954);
|
||||
func_80137E10(1, D_800A095B, D_800A095D, D_800A095F);
|
||||
|
||||
intro_logos_update_fade();
|
||||
}
|
||||
#else
|
||||
INCLUDE_ASM(s32, "code_11a50_len_7a0", begin_state_intro);
|
||||
#endif
|
||||
|
||||
INCLUDE_ASM(s32, "code_11a50_len_7a0", step_intro);
|
||||
|
||||
|
8
src/code_11a50_len_7a0.h
Normal file
8
src/code_11a50_len_7a0.h
Normal file
@ -0,0 +1,8 @@
|
||||
#ifndef _CODE_11A50_LEN_7A0_H_
|
||||
#define _CODE_11A50_LEN_7A0_H_
|
||||
|
||||
#include "common.h"
|
||||
#include "code_ebd0_len_6a0.h"
|
||||
#include "code_6e40_len_500.h"
|
||||
|
||||
#endif
|
@ -1,7 +1,48 @@
|
||||
#include "common.h"
|
||||
#include "nu/nusys.h"
|
||||
|
||||
INCLUDE_ASM(s32, "code_1370_len_7d0", boot_main);
|
||||
void gfxRetrace_Callback(void);
|
||||
void gfxPreNMI_Callback(void);
|
||||
|
||||
#ifdef NON_MATCHING
|
||||
// Control flow issue w/ PANIC
|
||||
void boot_main(void) {
|
||||
OSViMode* viMode;
|
||||
if (osTvType == OS_TV_NTSC) {
|
||||
viMode = &osViModeTable[56];
|
||||
} else if (osTvType == OS_TV_MPAL) {
|
||||
viMode = &osViModeTable[57];
|
||||
} else {
|
||||
PANIC();
|
||||
}
|
||||
osViSetMode(viMode);
|
||||
|
||||
osViSetSpecialFeatures(OS_VI_GAMMA_OFF | OS_VI_GAMMA_DITHER_OFF | OS_VI_DIVOT_ON | OS_VI_DITHER_FILTER_ON);
|
||||
nuGfxDisplayOff();
|
||||
crash_create_monitor();
|
||||
func_80025C60();
|
||||
nuGfxInit();
|
||||
GAME_STATUS->contBitPattern = nuContInit();
|
||||
func_8002D160();
|
||||
func_802B2000();
|
||||
func_802B203C();
|
||||
nuGfxFuncSet(gfxRetrace_Callback);
|
||||
nuGfxPreNMIFuncSet(gfxPreNMI_Callback);
|
||||
{
|
||||
// Required to match
|
||||
s32* randSeed = &gRandSeed;
|
||||
(*randSeed) += osGetCount();
|
||||
}
|
||||
nuGfxDisplayOn();
|
||||
|
||||
while (TRUE) {}
|
||||
}
|
||||
#else
|
||||
INCLUDE_ASM(void, "code_1370_len_7d0", boot_main, void);
|
||||
#endif
|
||||
|
||||
INCLUDE_ASM(void, "code_1370_len_7d0", gfxRetrace_Callback, void);
|
||||
|
||||
INCLUDE_ASM(s32, "code_1370_len_7d0", func_80026164);
|
||||
|
||||
INCLUDE_ASM(s32, "code_1370_len_7d0", gfxPreNMI_Callback);
|
||||
INCLUDE_ASM(void, "code_1370_len_7d0", gfxPreNMI_Callback, void);
|
||||
|
@ -1,11 +1,11 @@
|
||||
#include "common.h"
|
||||
#include "code_6e40_len_500.h"
|
||||
|
||||
void initialize_curtains(void) {
|
||||
D_8009BAA0 = 0;
|
||||
D_8009BA90 = 2.0f;
|
||||
D_8009BA94 = 2.0f;
|
||||
D_8009BA98 = 0;
|
||||
D_8009BA9C = 0;
|
||||
gCurtainDrawCallback = NULL;
|
||||
gCurtainScale = 2.0f;
|
||||
gCurtainScaleGoal = 2.0f;
|
||||
gCurtainFade = 0.0f;
|
||||
gCurtainFadeGoal = 0.0f;
|
||||
}
|
||||
|
||||
void update_curtains(void) {
|
||||
@ -13,24 +13,24 @@ void update_curtains(void) {
|
||||
|
||||
INCLUDE_ASM(s32, "code_6e40_len_500", render_curtains);
|
||||
|
||||
void set_curtain_scale_goal(f32 arg0) {
|
||||
D_8009BA94 = arg0;
|
||||
void set_curtain_scale_goal(f32 scale) {
|
||||
gCurtainScaleGoal = scale;
|
||||
}
|
||||
|
||||
void set_curtain_scale(f32 arg0) {
|
||||
D_8009BA94 = arg0;
|
||||
D_8009BA90 = arg0;
|
||||
void set_curtain_scale(f32 scale) {
|
||||
gCurtainScaleGoal = scale;
|
||||
gCurtainScale = scale;
|
||||
}
|
||||
|
||||
void set_curtain_draw_callback(s32 arg0) {
|
||||
D_8009BAA0 = arg0;
|
||||
void set_curtain_draw_callback(UNK_FUN_PTR(callback)) {
|
||||
gCurtainDrawCallback = callback;
|
||||
}
|
||||
|
||||
void set_curtain_fade_goal(f32 arg0) {
|
||||
D_8009BA9C = arg0;
|
||||
void set_curtain_fade_goal(f32 fade) {
|
||||
gCurtainFadeGoal = fade;
|
||||
}
|
||||
|
||||
void set_curtain_fade(f32 arg0) {
|
||||
D_8009BA9C = arg0;
|
||||
D_8009BA98 = arg0;
|
||||
void set_curtain_fade(f32 fade) {
|
||||
gCurtainFadeGoal = fade;
|
||||
gCurtainFade = fade;
|
||||
}
|
||||
|
21
src/code_6e40_len_500.h
Normal file
21
src/code_6e40_len_500.h
Normal file
@ -0,0 +1,21 @@
|
||||
#ifndef _CODE_6E40_LEN_500_H_
|
||||
#define _CODE_6E40_LEN_500_H_
|
||||
|
||||
#include "common.h"
|
||||
|
||||
extern f32 gCurtainScale;
|
||||
extern f32 gCurtainScaleGoal;
|
||||
extern f32 gCurtainFade;
|
||||
extern f32 gCurtainFadeGoal;
|
||||
extern UNK_FUN_PTR(gCurtainDrawCallback);
|
||||
|
||||
void initialize_curtains(void);
|
||||
void update_curtains(void);
|
||||
// render_curtains
|
||||
void set_curtain_scale_goal(f32 scale);
|
||||
void set_curtain_scale(f32 scale);
|
||||
void set_curtain_draw_callback(UNK_FUN_PTR(callback));
|
||||
void set_curtain_fade_goal(f32 fade);
|
||||
void set_curtain_fade(f32 fade);
|
||||
|
||||
#endif
|
@ -1,24 +1,24 @@
|
||||
#include "common.h"
|
||||
#include "code_ebd0_len_6a0.h"
|
||||
|
||||
void intro_logos_set_fade_alpha(s16 new_alpha) {
|
||||
void intro_logos_set_fade_alpha(s16 alpha) {
|
||||
GameStatus* gameStatus = GAME_STATUS;
|
||||
|
||||
gameStatus->bootAlpha = new_alpha;
|
||||
gameStatus->bootAlpha = alpha;
|
||||
}
|
||||
|
||||
void intro_logos_set_fade_color(s16 arg0) {
|
||||
void intro_logos_set_fade_color(s16 color) {
|
||||
GameStatus* gameStatus = GAME_STATUS;
|
||||
|
||||
gameStatus->bootRed = arg0;
|
||||
gameStatus->bootGreen = arg0;
|
||||
gameStatus->bootBlue = arg0;
|
||||
gameStatus->bootRed = color;
|
||||
gameStatus->bootGreen = color;
|
||||
gameStatus->bootBlue = color;
|
||||
}
|
||||
|
||||
s16 intro_logos_fade_in(subtract_val) {
|
||||
s16 intro_logos_fade_in(s16 subtractAlpha) {
|
||||
GameStatus* gameStatus = GAME_STATUS;
|
||||
|
||||
if (gameStatus->bootAlpha != 0) {
|
||||
gameStatus->bootAlpha -= subtract_val;
|
||||
gameStatus->bootAlpha -= subtractAlpha;
|
||||
if (gameStatus->bootAlpha << 16 < 0) {
|
||||
gameStatus->bootAlpha = 0;
|
||||
}
|
||||
@ -28,11 +28,11 @@ s16 intro_logos_fade_in(subtract_val) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
s16 intro_logos_fade_out(add_val) {
|
||||
s16 intro_logos_fade_out(s16 addAlpha) {
|
||||
GameStatus* gameStatus = GAME_STATUS;
|
||||
|
||||
if (gameStatus->bootAlpha != 0xFF) {
|
||||
gameStatus->bootAlpha += add_val;
|
||||
gameStatus->bootAlpha += addAlpha;
|
||||
if ((gameStatus->bootAlpha > 0xFF)) {
|
||||
gameStatus->bootAlpha = 0xFF;
|
||||
}
|
||||
|
12
src/code_ebd0_len_6a0.h
Normal file
12
src/code_ebd0_len_6a0.h
Normal file
@ -0,0 +1,12 @@
|
||||
#ifndef _CODE_EBD0_LEN_6A0_H_
|
||||
#define _CODE_EBD0_LEN_6A0_H_
|
||||
|
||||
#include "common.h"
|
||||
|
||||
void intro_logos_set_fade_alpha(s16 alpha);
|
||||
void intro_logos_set_fade_color(s16 color);
|
||||
s16 intro_logos_fade_in(s16 subtractAlpha);
|
||||
s16 intro_logos_fade_out(s16 addAlpha);
|
||||
void intro_logos_update_fade(void);
|
||||
|
||||
#endif
|
@ -29,13 +29,27 @@ gWorldMapFlags = 0x802DBC70;
|
||||
gBattleMapFlags = 0x802DBD34;
|
||||
|
||||
gMapTransitionAlpha = 0x800A0940;
|
||||
D_800A0940 = 0x800A0940;
|
||||
D_800A0942 = 0x800A0942;
|
||||
D_800A0944 = 0x800A0944;
|
||||
D_800A0954 = 0x800A0954;
|
||||
D_800A0956 = 0x800A0956;
|
||||
D_800A0958 = 0x800A0958;
|
||||
D_800A095A = 0x800A095A;
|
||||
D_800A095B = 0x800A095B;
|
||||
D_800A095C = 0x800A095C;
|
||||
D_800A095D = 0x800A095D;
|
||||
D_800A095E = 0x800A095E;
|
||||
D_800A095F = 0x800A095D;
|
||||
D_800A0960 = 0x800A0960;
|
||||
D_800A0963 = 0x800A0963;
|
||||
D_800A0964 = 0x800A0964;
|
||||
|
||||
D_800E92D8 = 0x800E92D8;
|
||||
D_80147474 = 0x80147474;
|
||||
D_80109270 = 0x80109270;
|
||||
D_80108558 = 0x80108558;
|
||||
D_800A0940 = 0x800A0940;
|
||||
D_800A0942 = 0x800A0942;
|
||||
D_800A0944 = 0x800A0944;
|
||||
D_800779B0 = 0x800779B0;
|
||||
|
||||
D_8010CD10 = 0x8010CD10;
|
||||
D_8010CD12 = 0x8010CD12;
|
||||
@ -95,11 +109,11 @@ D_8009A6A2 = 0x8009A6A2;
|
||||
D_8009A6A4 = 0x8009A6A4;
|
||||
D_8009A6A6 = 0x8009A6A6;
|
||||
|
||||
D_8009BA90 = 0x8009BA90;
|
||||
D_8009BA94 = 0x8009BA94;
|
||||
D_8009BA98 = 0x8009BA98;
|
||||
D_8009BA9C = 0x8009BA9C;
|
||||
D_8009BAA0 = 0x8009BAA0;
|
||||
gCurtainScale = 0x8009BA90;
|
||||
gCurtainScaleGoal = 0x8009BA94;
|
||||
gCurtainFade = 0x8009BA98;
|
||||
gCurtainFadeGoal = 0x8009BA9C;
|
||||
gCurtainDrawCallback = 0x8009BAA0;
|
||||
|
||||
D_800A0900 = 0x800A0900;
|
||||
nuScStack = 0x800A65D0;
|
||||
|
Loading…
Reference in New Issue
Block a user