1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2024-11-29 03:34:07 +00:00

Improve and fix some non matchings (#148)

This commit is contained in:
Roman971 2020-05-19 21:55:49 +02:00 committed by GitHub
parent e29b77919b
commit c599318a17
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 49 additions and 275 deletions

View file

@ -1,116 +0,0 @@
glabel func_800E7744
# if (bankId == 0xFF)
# return -1;
/* B5E8E4 800E7744 27BDFFE8 */ addiu $sp, $sp, -0x18
/* B5E8E8 800E7748 240100FF */ li $at, 255
/* B5E8EC 800E774C AFBF0014 */ sw $ra, 0x14($sp)
/* B5E8F0 800E7750 14A10003 */ bne $a1, $at, .BANKCHECK
/* B5E8F4 800E7754 AFA40018 */ sw $a0, 0x18($sp)
/* B5E8F8 800E7758 10000047 */ b .RETURN
/* B5E8FC 800E775C 2402FFFF */ li $v0, -1
.BANKCHECK:
# if (func_800E18B0(bankId) == 0) {
# return -2;
# }
/* B5E900 800E7760 00A02025 */ move $a0, $a1
/* B5E904 800E7764 AFA5001C */ sw $a1, 0x1c($sp)
/* B5E908 800E7768 AFA60020 */ sw $a2, 0x20($sp)
/* B5E90C 800E776C 0C03862C */ jal func_800E18B0
/* B5E910 800E7770 AFA70024 */ sw $a3, 0x24($sp)
/* B5E914 800E7774 8FA30018 */ lw $v1, 0x18($sp)
/* B5E918 800E7778 8FA5001C */ lw $a1, 0x1c($sp)
/* B5E91C 800E777C 8FA60020 */ lw $a2, 0x20($sp)
/* B5E920 800E7780 14400003 */ bnez $v0, .MAINCHECK
/* B5E924 800E7784 8FA70024 */ lw $a3, 0x24($sp)
/* B5E928 800E7788 1000003B */ b .RETURN
/* B5E92C 800E778C 2402FFFE */ li $v0, -2
.MAINCHECK:
# if (arg0 != 0) {
/* B5E930 800E7790 10600006 */ beqz $v1, .SWITCH0
/* B5E934 800E7794 3C0E8017 */ lui $t6, %hi(D_801719C4) # $t6, 0x8017
# if (arg0 != 1) {
/* B5E938 800E7798 24010001 */ li $at, 1
/* B5E93C 800E779C 10610013 */ beq $v1, $at, .SWITCH1
/* B5E940 800E77A0 3C0A8017 */ lui $t2, %hi(D_801719C4) # $t2, 0x8017
/* B5E944 800E77A4 10000024 */ b .SWITCH2
/* B5E948 800E77A8 3C088017 */ lui $t0, %hi(D_801719C4) # $t0, 0x8017
.SWITCH0:
# if (instId >= gAudioContext.gCtlEntries[bankId].numDrums) {
# return -3;
# }
/* B5E94C 800E77AC 8DCE19C4 */ lw $t6, %lo(D_801719C4)($t6)
/* B5E950 800E77B0 00057880 */ sll $t7, $a1, 2
/* B5E954 800E77B4 01E57821 */ addu $t7, $t7, $a1
/* B5E958 800E77B8 000F7880 */ sll $t7, $t7, 2
/* B5E95C 800E77BC 01CF1021 */ addu $v0, $t6, $t7
/* B5E960 800E77C0 90580001 */ lbu $t8, 1($v0)
/* B5E964 800E77C4 00D8082A */ slt $at, $a2, $t8
/* B5E968 800E77C8 54200004 */ bnezl $at, .MAINELSERET0
/* B5E96C 800E77CC 8C59000C */ lw $t9, 0xc($v0)
/* B5E970 800E77D0 10000029 */ b .RETURN
/* B5E974 800E77D4 2402FFFD */ li $v0, -3
/* B5E978 800E77D8 8C59000C */ lw $t9, 0xc($v0)
.MAINELSERET0:
/* B5E97C 800E77DC 00064080 */ sll $t0, $a2, 2
/* B5E980 800E77E0 03284821 */ addu $t1, $t9, $t0
/* B5E984 800E77E4 10000023 */ b .RETURN0
/* B5E988 800E77E8 AD270000 */ sw $a3, ($t1)
.SWITCH1:
# if (instId >= gAudioContext.gCtlEntries[bankId].numUnkInstruments) {
# return -3;
# }
/* B5E98C 800E77EC 8D4A19C4 */ lw $t2, %lo(D_801719C4)($t2)
/* B5E990 800E77F0 00055880 */ sll $t3, $a1, 2
/* B5E994 800E77F4 01655821 */ addu $t3, $t3, $a1
/* B5E998 800E77F8 000B5880 */ sll $t3, $t3, 2
/* B5E99C 800E77FC 014B1021 */ addu $v0, $t2, $t3
/* B5E9A0 800E7800 944C0004 */ lhu $t4, 4($v0)
/* B5E9A4 800E7804 00CC082A */ slt $at, $a2, $t4
/* B5E9A8 800E7808 54200004 */ bnezl $at, .TEMPS
/* B5E9AC 800E780C 8C4D0010 */ lw $t5, 0x10($v0)
/* B5E9B0 800E7810 10000019 */ b .RETURN
/* B5E9B4 800E7814 2402FFFD */ li $v0, -3
/* B5E9B8 800E7818 8C4D0010 */ lw $t5, 0x10($v0)
.TEMPS:
/* B5E9BC 800E781C 8CF90000 */ lw $t9, ($a3)
/* B5E9C0 800E7820 000670C0 */ sll $t6, $a2, 3
/* B5E9C4 800E7824 01AE7821 */ addu $t7, $t5, $t6
/* B5E9C8 800E7828 ADF90000 */ sw $t9, ($t7)
/* B5E9CC 800E782C 8CF80004 */ lw $t8, 4($a3)
/* B5E9D0 800E7830 10000010 */ b .RETURN0
/* B5E9D4 800E7834 ADF80004 */ sw $t8, 4($t7)
.SWITCH2:
/* B5E9D8 800E7838 8D0819C4 */ lw $t0, %lo(D_801719C4)($t0)
/* B5E9DC 800E783C 00054880 */ sll $t1, $a1, 2
/* B5E9E0 800E7840 01254821 */ addu $t1, $t1, $a1
/* B5E9E4 800E7844 00094880 */ sll $t1, $t1, 2
/* B5E9E8 800E7848 01091021 */ addu $v0, $t0, $t1
/* B5E9EC 800E784C 904A0000 */ lbu $t2, ($v0)
/* B5E9F0 800E7850 00CA082A */ slt $at, $a2, $t2
/* B5E9F4 800E7854 54200004 */ bnezl $at, .L800E7868
/* B5E9F8 800E7858 8C4B0008 */ lw $t3, 8($v0)
/* B5E9FC 800E785C 10000006 */ b .RETURN
/* B5EA00 800E7860 2402FFFD */ li $v0, -3
/* B5EA04 800E7864 8C4B0008 */ lw $t3, 8($v0)
.L800E7868:
/* B5EA08 800E7868 00066080 */ sll $t4, $a2, 2
/* B5EA0C 800E786C 016C6821 */ addu $t5, $t3, $t4
/* B5EA10 800E7870 ADA70000 */ sw $a3, ($t5)
.RETURN0:
/* B5EA14 800E7874 00001025 */ move $v0, $zero
.RETURN:
/* B5EA18 800E7878 8FBF0014 */ lw $ra, 0x14($sp)
/* B5EA1C 800E787C 27BD0018 */ addiu $sp, $sp, 0x18
/* B5EA20 800E7880 03E00008 */ jr $ra
/* B5EA24 800E7884 00000000 */ nop

View file

@ -1,100 +0,0 @@
glabel osSpTaskLoad
/* B7776C 801005CC 27BDFFD8 */ addiu $sp, $sp, -0x28
/* B77770 801005D0 AFBF0024 */ sw $ra, 0x24($sp)
/* B77774 801005D4 AFB00014 */ sw $s0, 0x14($sp)
/* B77778 801005D8 00808025 */ move $s0, $a0
/* B7777C 801005DC AFB30020 */ sw $s3, 0x20($sp)
/* B77780 801005E0 AFB2001C */ sw $s2, 0x1c($sp)
/* B77784 801005E4 0C040130 */ jal _VirtualToPhysicalTask
/* B77788 801005E8 AFB10018 */ sw $s1, 0x18($sp)
/* B7778C 801005EC 8C4E0004 */ lw $t6, 4($v0)
/* B77790 801005F0 00409025 */ move $s2, $v0
/* B77794 801005F4 02402025 */ move $a0, $s2
/* B77798 801005F8 31CF0001 */ andi $t7, $t6, 1
/* B7779C 801005FC 11E00013 */ beqz $t7, .L8010064C
/* B777A0 80100600 00000000 */ nop
/* B777A4 80100604 8C580038 */ lw $t8, 0x38($v0)
/* B777A8 80100608 8C59003C */ lw $t9, 0x3c($v0)
/* B777AC 8010060C 2401FFFE */ li $at, -2
/* B777B0 80100610 AC580018 */ sw $t8, 0x18($v0)
/* B777B4 80100614 AC59001C */ sw $t9, 0x1c($v0)
/* B777B8 80100618 8E080004 */ lw $t0, 4($s0)
/* B777BC 8010061C 01014824 */ and $t1, $t0, $at
/* B777C0 80100620 AE090004 */ sw $t1, 4($s0)
/* B777C4 80100624 8C4A0004 */ lw $t2, 4($v0)
/* B777C8 80100628 314B0004 */ andi $t3, $t2, 4
/* B777CC 8010062C 11600007 */ beqz $t3, .L8010064C
/* B777D0 80100630 00000000 */ nop
/* B777D4 80100634 8E0C0038 */ lw $t4, 0x38($s0)
/* B777D8 80100638 3C01A000 */ lui $at, 0xa000
/* B777DC 8010063C 258D0BFC */ addiu $t5, $t4, 0xbfc
/* B777E0 80100640 01A17025 */ or $t6, $t5, $at
/* B777E4 80100644 8DCF0000 */ lw $t7, ($t6)
/* B777E8 80100648 AC4F0010 */ sw $t7, 0x10($v0)
.L8010064C:
/* B777EC 8010064C 0C0011B0 */ jal osWritebackDCache
/* B777F0 80100650 24050040 */ li $a1, 64
/* B777F4 80100654 0C041920 */ jal __osSpSetStatus
/* B777F8 80100658 24042B00 */ li $a0, 11008
/* B777FC 8010065C 3C130400 */ lui $s3, (0x04001000 >> 16) # lui $s3, 0x400
/* B77800 80100660 36731000 */ ori $s3, (0x04001000 & 0xFFFF) # ori $s3, $s3, 0x1000
/* B77804 80100664 0C0419E8 */ jal __osSpSetPc
/* B77808 80100668 02602025 */ move $a0, $s3
/* B7780C 8010066C 2411FFFF */ li $s1, -1
/* B77810 80100670 54510006 */ bnel $v0, $s1, .L8010068C
/* B77814 80100674 3C100400 */ lui $s0, 0x400
.L80100678:
/* B77818 80100678 0C0419E8 */ jal __osSpSetPc
/* B7781C 8010067C 02602025 */ move $a0, $s3
/* B77820 80100680 1051FFFD */ beq $v0, $s1, .L80100678
/* B77824 80100684 00000000 */ nop
/* B77828 80100688 3C100400 */ lui $s0, (0x04000FC0 >> 16) # lui $s0, 0x400
.L8010068C:
/* B7782C 8010068C 36100FC0 */ ori $s0, (0x04000FC0 & 0xFFFF) # ori $s0, $s0, 0xfc0
/* B77830 80100690 02002825 */ move $a1, $s0
/* B77834 80100694 24040001 */ li $a0, 1
/* B77838 80100698 02403025 */ move $a2, $s2
/* B7783C 8010069C 0C0404D8 */ jal __osSpRawStartDma
/* B77840 801006A0 24070040 */ li $a3, 64
/* B77844 801006A4 14510007 */ bne $v0, $s1, .L801006C4
/* B77848 801006A8 24040001 */ li $a0, 1
.L801006AC:
/* B7784C 801006AC 02002825 */ move $a1, $s0
/* B77850 801006B0 02403025 */ move $a2, $s2
/* B77854 801006B4 0C0404D8 */ jal __osSpRawStartDma
/* B77858 801006B8 24070040 */ li $a3, 64
/* B7785C 801006BC 5051FFFB */ beql $v0, $s1, .L801006AC
/* B77860 801006C0 24040001 */ li $a0, 1
.L801006C4:
/* B77864 801006C4 0C040ECC */ jal __osSpDeviceBusy
/* B77868 801006C8 00000000 */ nop
/* B7786C 801006CC 50400006 */ beql $v0, $zero, .L801006E8
/* B77870 801006D0 24040001 */ li $a0, 1
.L801006D4:
/* B77874 801006D4 0C040ECC */ jal __osSpDeviceBusy
/* B77878 801006D8 00000000 */ nop
/* B7787C 801006DC 1440FFFD */ bnez $v0, .L801006D4
/* B77880 801006E0 00000000 */ nop
/* B77884 801006E4 24040001 */ li $a0, 1
.L801006E8:
/* B77888 801006E8 02602825 */ move $a1, $s3
/* B7788C 801006EC 8E460008 */ lw $a2, 8($s2)
/* B77890 801006F0 0C0404D8 */ jal __osSpRawStartDma
/* B77894 801006F4 8E47000C */ lw $a3, 0xc($s2)
/* B77898 801006F8 14510007 */ bne $v0, $s1, .L80100718
/* B7789C 801006FC 24040001 */ li $a0, 1
.L80100700:
/* B778A0 80100700 02602825 */ move $a1, $s3
/* B778A4 80100704 8E460008 */ lw $a2, 8($s2)
/* B778A8 80100708 0C0404D8 */ jal __osSpRawStartDma
/* B778AC 8010070C 8E47000C */ lw $a3, 0xc($s2)
/* B778B0 80100710 5051FFFB */ beql $v0, $s1, .L80100700
/* B778B4 80100714 24040001 */ li $a0, 1
.L80100718:
/* B778B8 80100718 8FBF0024 */ lw $ra, 0x24($sp)
/* B778BC 8010071C 8FB00014 */ lw $s0, 0x14($sp)
/* B778C0 80100720 8FB10018 */ lw $s1, 0x18($sp)
/* B778C4 80100724 8FB2001C */ lw $s2, 0x1c($sp)
/* B778C8 80100728 8FB30020 */ lw $s3, 0x20($sp)
/* B778CC 8010072C 03E00008 */ jr $ra
/* B778D0 80100730 27BD0028 */ addiu $sp, $sp, 0x28

View file

@ -114,8 +114,8 @@ typedef struct {
/* 0x02 */ char unk_02[0x02];
/* 0x04 */ u16 numUnkInstruments;
/* 0x08 */ Instrument** instruments;
/* 0x10 */ Drum** drums;
/* 0x1C */ UnkInstrument* unkInstruments;
/* 0x0C */ Drum** drums;
/* 0x10 */ UnkInstrument* unkInstruments;
} CtlEntry; // size = 0x14
typedef struct {

View file

@ -255,8 +255,6 @@ UnkInstrument* Audio_GetUnkInstrument(s32 bankId, s32 unkInstrumentId) {
return unkInstrument;
}
#ifdef NON_MATCHING
// Regalloc in case 1.
s32 func_800E7744(s32 instrument, s32 bankId, s32 instId, UnkInstrument* arg3) {
UnkInstrument* temp_t7;
@ -280,9 +278,7 @@ s32 func_800E7744(s32 instrument, s32 bankId, s32 instId, UnkInstrument* arg3) {
if (instId >= (gAudioContext.gCtlEntries[bankId].numUnkInstruments)) {
return -3;
}
temp_t7 = &gAudioContext.gCtlEntries[bankId].unkInstruments[instId];
temp_t7->unk_0 = arg3->unk_0;
temp_t7->unk_4 = arg3->unk_4;
gAudioContext.gCtlEntries[bankId].unkInstruments[instId] = *arg3;
break;
default:
@ -295,9 +291,6 @@ s32 func_800E7744(s32 instrument, s32 bankId, s32 instId, UnkInstrument* arg3) {
return 0;
}
#else
#pragma GLOBAL_ASM("asm/non_matchings/code/audio_playback/func_800E7744.s")
#endif
#if 0
// This code is SM64 PAL's version with changes made to build here (and a couple legitimate changes made in the function).

View file

@ -249,10 +249,11 @@ void GameState_ReqPadData(GameState* gameState) {
}
#ifdef NON_MATCHING
// Minor reodering and regalloc
// regalloc differences and additional redundant instructions
void GameState_Update(GameState* gameState) {
GraphicsContext* gfxCtx = gameState->gfxCtx;
GameState_SetFrameBuffer(gameState->gfxCtx);
GameState_SetFrameBuffer(gfxCtx);
gameState->main(gameState);
@ -268,9 +269,9 @@ void GameState_Update(GameState* gameState) {
} else if (SREG(48) > 0) {
func_800ACAF8(&D_80166528, gameState->input, gfxCtx);
gfxCtx->viMode = &D_80166528.viMode;
gfxCtx->viFeatures = D_80166528.viFeatures;
gfxCtx->xScale = 1.0f;
gfxCtx->yScale = 1.0f;
gfxCtx->viFeatures = D_80166528.viFeatures;
}
} else if (SREG(63) >= 2) {
gfxCtx->viMode = &gViConfigMode;
@ -309,20 +310,25 @@ void GameState_Update(GameState* gameState) {
HREG(84) = 0;
}
HREG(82) = CLAMP(HREG(82), 0, 0x30);
if (HREG(82) < 0) {
HREG(82) = 0;
}
if (HREG(82) > 0x30) {
HREG(82) = 0x30;
}
if ((HREG(83) != HREG(82)) || HREG(84) != HREG(81)) {
HREG(83) = HREG(82);
HREG(84) = HREG(81);
gViConfigAdditionalScanLines = HREG(82);
gViConfigYScale = HREG(81) == 0 ? 240.0f / ((u8)HREG(82) + 240.0f) : 1.0f;
gViConfigYScale = HREG(81) == 0 ? 240.0f / (gViConfigAdditionalScanLines + 240.0f) : 1.0f;
D_80009430 = 1;
}
}
if (SREG(94) != 2) {
GameState_Draw(gameState, gameState->gfxCtx);
func_800C49F4(gameState->gfxCtx);
if (R_PAUSE_MENU_MODE != 2) {
GameState_Draw(gameState, gfxCtx);
func_800C49F4(gfxCtx);
}
gameState->frames++;

View file

@ -70,7 +70,7 @@ void KaleidoScopeCall_Update(GlobalContext* globalCtx) {
pauseCtx->unk_1EC = 0;
pauseCtx->state++;
} else if (pauseCtx->state == 2 || pauseCtx->state == 9) {
osSyncPrintf("R_PAUSE_MENU_MODE=%d\n", R_PAUSE_MENU_MODE);
osSyncPrintf("PR_KAREIDOSCOPE_MODE=%d\n", R_PAUSE_MENU_MODE);
if (R_PAUSE_MENU_MODE >= 3) {
pauseCtx->state++;
}

View file

@ -1790,7 +1790,7 @@ void Gameplay_TriggerVoidOut(GlobalContext* globalCtx) {
gSaveContext.respawn[RESPAWN_MODE_DOWN].tempCollectFlags = globalCtx->actorCtx.flags.tempCollect;
gSaveContext.respawnFlag = 1;
globalCtx->sceneLoadFlag = 0x14;
globalCtx->nextEntranceIndex = gSaveContext.respawn[0].entranceIndex;
globalCtx->nextEntranceIndex = gSaveContext.respawn[RESPAWN_MODE_DOWN].entranceIndex;
globalCtx->fadeTransition = 2;
}

View file

@ -2,16 +2,13 @@
#include <global.h>
#include <ultra64/hardware.h>
s32 __osSpSetPc(u32 data) {
s32 __osSpSetPc(void* pc) {
register u32 spStatus = HW_REG(SP_STATUS_REG, u32);
if (!(spStatus & SP_STATUS_HALT)) {
return -1;
}
else {
HW_REG(SP_PC_REG, u32) = data;
} else {
HW_REG(SP_PC_REG, void*) = pc;
}
return 0;

View file

@ -28,7 +28,7 @@ s32 __osSiRawWriteIo(void*, u32);
s32 osPiRawReadIo(u32 a0, u32 *a1);
void __osSpSetStatus(u32);
u32 __osSpGetStatus();
s32 __osSpSetPc(u32 data);
s32 __osSpSetPc(void*);
s32 __osSpDeviceBusy();
s32 __osSiDeviceBusy();
s32 __osSpRawStartDma(u32 dir, void *sp_ptr, void *dram_ptr, size_t size);

View file

@ -7,9 +7,10 @@
}
static OSTask sTmpTask;
OSTask* _VirtualToPhysicalTask(OSTask* intp) {
OSTask* tp;
tp = &sTmpTask;
OSTask* tp = &sTmpTask;
bcopy(intp, tp, sizeof(OSTask));
_osVirtualToPhysical(tp->t.ucode);
@ -22,12 +23,9 @@ OSTask* _VirtualToPhysicalTask(OSTask* intp) {
return tp;
}
#ifdef NON_MATCHING
// very close to matching, just regalloc
void osSpTaskLoad(OSTask* intp) {
OSTask* tp = _VirtualToPhysicalTask(intp);
OSTask* tp;
tp = _VirtualToPhysicalTask(intp);
if (tp->t.flags & OS_TASK_YIELDED) {
tp->t.ucode_data = tp->t.yield_data_ptr;
tp->t.ucode_data_size = tp->t.yield_data_size;
@ -38,11 +36,11 @@ void osSpTaskLoad(OSTask* intp) {
}
osWritebackDCache(tp, sizeof(OSTask));
__osSpSetStatus(SP_CLR_SIG0 | SP_CLR_SIG1 | SP_CLR_SIG2 | SP_SET_INTR_BREAK);
while (__osSpSetPc(SP_IMEM_START) == -1) {
while (__osSpSetPc((void*)SP_IMEM_START) == -1) {
;
}
while (__osSpRawStartDma(1, (SP_IMEM_START - sizeof(*tp)), tp, sizeof(OSTask)) == -1) {
while (__osSpRawStartDma(1, (void*)(SP_IMEM_START - sizeof(*tp)), tp, sizeof(OSTask)) == -1) {
;
}
@ -50,13 +48,10 @@ void osSpTaskLoad(OSTask* intp) {
;
}
while (__osSpRawStartDma(1, SP_IMEM_START, tp->t.ucode_boot, tp->t.ucode_boot_size) == -1) {
while (__osSpRawStartDma(1, (void*)SP_IMEM_START, tp->t.ucode_boot, tp->t.ucode_boot_size) == -1) {
;
}
}
#else
#pragma GLOBAL_ASM("asm/non_matchings/code/sptask/osSpTaskLoad.s")
#endif
void osSpTaskStartGo(OSTask* tp) {

View file

@ -639,31 +639,30 @@ void func_80A544AC(EnHeishi2* this, GlobalContext* globalCtx) {
}
#ifdef NON_MATCHING
// ordering and float stuff
// regalloc differences
void func_80A5455C(EnHeishi2* this, GlobalContext* globalCtx) {
EnBom* bomb;
Vec3f vec;
Actor* thisx = &this->actor;
s16 temp;
if ((func_8010BDBC(&globalCtx->msgCtx) == 5)) {
if (func_80106BC8(globalCtx) != 0) {
Vec3f pos;
s32 rotY;
EnBom* bomb;
func_8002DF54(globalCtx, NULL, 7);
func_80106CCC(globalCtx);
vec.x = Math_Rand_CenteredFloat(20.0f) + this->unk_274.x;
vec.y = Math_Rand_CenteredFloat(20.0f) + (this->unk_274.y - 40.0f);
vec.z = Math_Rand_CenteredFloat(20.0f) + (this->unk_274.z - 20.0f);
bomb = (EnBom*)Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_BOM, vec.x, vec.y, vec.z, 0,
(s16)(Math_Rand_CenteredFloat(7000.0f) + thisx->rotTowardsLinkY), 0, 0);
if ((func_8010BDBC(&globalCtx->msgCtx) == 5) && (func_80106BC8(globalCtx) != 0)) {
func_8002DF54(globalCtx, NULL, 7);
func_80106CCC(globalCtx);
if (bomb != NULL) {
bomb->actor.speedXZ = Math_Rand_CenteredFloat(5.0f) + 10.0f;
bomb->actor.velocity.y = Math_Rand_CenteredFloat(5.0f) + 10.0f;
}
// This is down!
osSyncPrintf(VT_FGCOL(YELLOW) " ☆☆☆☆☆ これでダウンだ! ☆☆☆☆☆ \n" VT_RST);
this->actionFunc = func_80A546DC;
pos.x = Math_Rand_CenteredFloat(20.0f) + this->unk_274.x;
pos.y = Math_Rand_CenteredFloat(20.0f) + (this->unk_274.y - 40.0f);
pos.z = Math_Rand_CenteredFloat(20.0f) + (this->unk_274.z - 20.0f);
rotY = Math_Rand_CenteredFloat(7000.0f) + thisx->rotTowardsLinkY;
bomb = (EnBom*)Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_BOM, pos.x, pos.y, pos.z, 0, rotY, 0, 0);
if (bomb != NULL) {
bomb->actor.speedXZ = Math_Rand_CenteredFloat(5.0f) + 10.0f;
bomb->actor.velocity.y = Math_Rand_CenteredFloat(5.0f) + 10.0f;
}
// This is down!
osSyncPrintf(VT_FGCOL(YELLOW) " ☆☆☆☆☆ これでダウンだ! ☆☆☆☆☆ \n" VT_RST);
this->actionFunc = func_80A546DC;
}
}
#else