fix map warnings (#916)

* omo_17

* sam_06

* sam_06

* hos_02

* hos_03

* shops

* star kid name fix

* shop dialogue

* nok_11

* nok 14/15

* small fixes

* ready

Co-authored-by: HailSanta <Hail2Santa@gmail.com>
This commit is contained in:
HailSanta 2023-01-21 03:14:46 -05:00 committed by GitHub
parent 0cee144b18
commit 858eb4c19e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
186 changed files with 7445 additions and 2651 deletions

View File

@ -2310,22 +2310,16 @@ typedef struct MovingCloudFXData {
} MovingCloudFXData; // size = 0x48
typedef struct Effect75FXData {
/* 0x00 */ s32 unk_00;
/* 0x04 */ f32 unk_04;
/* 0x08 */ f32 unk_08;
/* 0x0C */ f32 unk_0C;
/* 0x00 */ s32 type;
/* 0x04 */ Vec3f pos;
/* 0x10 */ s32 unk_10;
/* 0x14 */ s32 unk_14;
/* 0x18 */ s32 unk_18;
/* 0x1C */ s32 unk_1C;
/* 0x20 */ s32 unk_20;
/* 0x18 */ Color3i primCol;
/* 0x24 */ s32 unk_24;
/* 0x28 */ s32 unk_28;
/* 0x2C */ s32 unk_2C;
/* 0x30 */ s32 unk_30;
/* 0x28 */ Color3i envCol;
/* 0x34 */ s32 unk_34;
/* 0x38 */ s32 unk_38;
/* 0x3C */ f32 unk_3C;
/* 0x38 */ s32 masterAlpha;
/* 0x3C */ f32 scale;
/* 0x40 */ f32 unk_40;
/* 0x44 */ f32 unk_44;
/* 0x48 */ f32 unk_48;

View File

@ -686,7 +686,7 @@ enum SoundIDs {
SOUND_162 = 0x00000162,
SOUND_ENTER_PIPE = 0x00000163,
SOUND_SMASH_GOOMNUT_TREE = 0x00000165,
SOUND_166 = 0x00000166,
SOUND_SHAKE_TREE = 0x00000166,
SOUND_167 = 0x00000167,
SOUND_168 = 0x00000168,
SOUND_DUST_OFF = 0x00000172,
@ -1689,7 +1689,7 @@ enum ItemIDs {
ITEM_LETTER20 = 0x0000004E,
ITEM_LETTER21 = 0x0000004F,
ITEM_LETTER22 = 0x00000050,
ITEM_LETTER23 = 0x00000051,
ITEM_LETTER_TO_FROSTT = 0x00000051,
ITEM_LETTER24 = 0x00000052,
ITEM_ARTIFACT = 0x00000053,
ITEM_LETTER25 = 0x00000054,
@ -5309,6 +5309,41 @@ enum ShopFlags {
SHOP_FLAG_80000000 = 0x80000000,
};
enum {
SHOP_MSG_BUY_CONFIRM = 0x00,
SHOP_MSG_NOT_ENOUGH_COINS = 0x01,
SHOP_MSG_NOT_ENOUGH_ROOM = 0x02,
SHOP_MSG_BUY_THANK_YOU = 0x03,
SHOP_MSG_GREETING = 0x04,
SHOP_MSG_INSTRUCTIONS = 0x05,
SHOP_MSG_NOTHING_TO_SELL = 0x06,
SHOP_MSG_SELL_WHICH = 0x07,
SHOP_MSG_SELL_CONFIRM = 0x08,
SHOP_MSG_SELL_CANCEL = 0x09,
SHOP_MSG_SELL_MORE = 0x0A,
SHOP_MSG_SELL_THANKS = 0x0B,
SHOP_MSG_NOTHING_TO_CHECK = 0x0C,
SHOP_MSG_NO_CHECK_ROOM = 0x0D,
SHOP_MSG_CHECK_WHICH = 0x0E,
SHOP_MSG_CHECK_ACCEPTED = 0x0F,
SHOP_MSG_CHECK_MORE = 0x10,
SHOP_MSG_NOTHING_TO_CLAIM = 0x11,
SHOP_MSG_NO_CLAIM_ROOM = 0x12,
SHOP_MSG_CLAIM_WHICH = 0x13,
SHOP_MSG_CLAIM_ACCEPTED = 0x14,
SHOP_MSG_CLAIM_MORE = 0x15,
SHOP_MSG_FAREWELL = 0x16,
};
enum {
SHOP_BUY_RESULT_NOT_ENOUGH_COINS = 0,
SHOP_BUY_RESULT_OK = 1,
SHOP_BUY_RESULT_2 = 2,
SHOP_BUY_RESULT_CANCEL = 3,
SHOP_BUY_RESULT_4 = 4,
SHOP_BUY_RESULT_NOT_ENOUGH_ROOM = 5,
};
enum EncounterStatusFlags {
ENCOUNTER_STATUS_FLAG_0 = 0x00000000,
ENCOUNTER_STATUS_FLAG_1 = 0x00000001,
@ -6274,6 +6309,7 @@ enum BackgroundFlags {
};
enum FogModes {
FOG_MODE_UNCHANGED = -1,
FOG_MODE_0 = 0,
FOG_MODE_1 = 1,
FOG_MODE_2 = 2,

View File

@ -287,6 +287,7 @@ ApiStatus DemoJoystickRadial(Evt* script, s32 isInitialCall);
ApiStatus DemoJoystickXY(Evt* script, s32 isInitialCall);
ApiStatus WaitForPlayerInputEnabled(Evt* script, s32 isInitialCall);
ApiStatus func_802D2484(Evt* script, s32 isInitialCall);
ApiStatus WaitForPlayerTouchingFloor(Evt* script, s32 isInitialCall);
ApiStatus IsPlayerOnValidFloor(Evt* script, s32 isInitialCall);
ApiStatus WaitForPlayerMoveToComplete(Evt* script, s32 isInitialCall);
ApiStatus func_802CFE2C(Evt* script, s32 isInitialCall);

View File

@ -219,9 +219,10 @@ extern HeapNode gSpriteHeapPtr;
extern s32 D_8029C890[10][5];
// Heap?
// frame buffers
extern u16 D_8038F800[];
extern u16 D_803B5000[];
extern u16 D_803DA800[];
extern HeapNode heap_collisionHead;
extern HeapNode heap_generalHead;

View File

@ -0,0 +1,12 @@
#include "common.h"
// skips ahead in buffer by constant + count * size
API_CALLABLE(N(AdvanceBuffer)) {
Bytecode* args = script->ptrReadPos;
s32 constant = evt_get_variable(script, *args++);
s32 size = evt_get_variable(script, *args++);
s32 count = evt_get_variable(script, *args++);
script->buffer = &script->buffer[constant + size * count];
return ApiStatus_DONE2;
}

View File

@ -1,10 +0,0 @@
#include "common.h"
ApiStatus N(UnkBufferFunc)(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
s32 temp_s1 = evt_get_variable(script, *args++);
s32 temp_s0_3 = evt_get_variable(script, *args++);
script->buffer = &script->buffer[temp_s1 + (temp_s0_3 * evt_get_variable(script, *args++))];
return ApiStatus_DONE2;
}

View File

@ -18,7 +18,7 @@ EvtScript N(EVS_SearchBush) = {
EVT_CALL(N(TransformFoliage), LVar3, EVT_FLOAT(0.1), 1, LVarF, 0)
EVT_IF_EQ(LocalFlag(0), 0)
EVT_SET(LocalFlag(0), 1)
EVT_CALL(PlaySoundAtModel, LVar3, 339, 0)
EVT_CALL(PlaySoundAtModel, LVar3, SOUND_SEARCH_BUSH, 0)
EVT_END_IF
EVT_END_LOOP
EVT_WAIT(1)
@ -74,7 +74,7 @@ EvtScript N(EVS_ShakeTree) = {
EVT_BUF_READ1(LVar5)
EVT_CALL(GetPlayerPos, LVar6, LVarF, LVar8)
EVT_CALL(PlaySound, SOUND_SMASH_GOOMNUT_TREE)
EVT_CALL(PlaySound, 358)
EVT_CALL(PlaySound, SOUND_SHAKE_TREE)
EVT_THREAD
EVT_SET(LocalFlag(0), 0)
EVT_IF_NE(LVar1, 0)
@ -87,7 +87,7 @@ EvtScript N(EVS_ShakeTree) = {
EVT_CALL(N(TransformFoliage), LVar3, EVT_FLOAT(0.1), EVT_FLOAT(0.2), LVarF, 0)
EVT_IF_EQ(LocalFlag(0), 0)
EVT_SET(LocalFlag(0), 1)
EVT_CALL(PlaySoundAtModel, LVar3, 358, 0)
EVT_CALL(PlaySoundAtModel, LVar3, SOUND_SHAKE_TREE, 0)
EVT_END_IF
EVT_END_LOOP
EVT_WAIT(1)
@ -119,7 +119,7 @@ EvtScript N(EVS_ShakeTree) = {
EVT_CALL(N(TransformFoliage), LVar4, EVT_FLOAT(0.1), EVT_FLOAT(0.2), LVarF, 0)
EVT_IF_EQ(LocalFlag(0), 0)
EVT_SET(LocalFlag(0), 1)
EVT_CALL(PlaySoundAtModel, LVar4, 357, 0)
EVT_CALL(PlaySoundAtModel, LVar4, SOUND_SMASH_GOOMNUT_TREE, 0)
EVT_END_IF
EVT_END_LOOP
EVT_WAIT(1)

View File

@ -1084,7 +1084,7 @@ FoldGfxDescriptor* fold_load_gfx(FoldState* state) {
}
if (state->gfxBufs[1] != NULL) {
// fold_add_to_gfx_cache(state->gfxBufs[1], 1);
romEnd = state->gfxBufs[1]; // required to match
romEnd = (u8*) state->gfxBufs[1]; // required to match
fold_add_to_gfx_cache(state->gfxBufs[1], 1);
state->gfxBufs[1] = NULL;
}

View File

@ -13,7 +13,7 @@ void fx_75_update(EffectInstance* effect);
void fx_75_render(EffectInstance* effect);
void fx_75_appendGfx(void* effect);
EffectInstance* fx_75_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5) {
EffectInstance* fx_75_main(s32 arg0, f32 posX, f32 posY, f32 posZ, f32 scale, s32 arg5) {
EffectBlueprint bp;
EffectInstance* effect;
Effect75FXData* data;
@ -32,7 +32,7 @@ EffectInstance* fx_75_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32
data = effect->data.unk_75 = shim_general_heap_malloc(numParts * sizeof(*data));
ASSERT(effect->data.unk_75 != NULL);
data->unk_00 = arg0;
data->type = arg0;
data->unk_14 = 0;
if (arg5 <= 0) {
data->unk_10 = 1000;
@ -40,18 +40,18 @@ EffectInstance* fx_75_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32
data->unk_10 = arg5;
}
data->unk_24 = 0;
data->unk_04 = arg1;
data->unk_08 = arg2;
data->unk_0C = arg3;
data->unk_3C = arg4;
data->unk_18 = 0;
data->unk_1C = 180;
data->unk_20 = 220;
data->unk_28 = 0;
data->unk_2C = 0;
data->unk_30 = 0;
data->pos.x = posX;
data->pos.y = posY;
data->pos.z = posZ;
data->scale = scale;
data->primCol.r = 0;
data->primCol.g = 180;
data->primCol.b = 220;
data->envCol.r = 0;
data->envCol.g = 0;
data->envCol.b = 0;
data->unk_34 = 0;
data->unk_38 = 0;
data->masterAlpha = 0;
data->unk_40 = 0;
data->unk_44 = 0;
data->unk_50 = 0;
@ -146,7 +146,9 @@ void fx_75_update(EffectInstance* effect) {
data->unk_54 -= 256.0f;
}
data->unk_34 = data->unk_60 + (shim_sin_deg(unk_14 * 20) * (data->unk_64 - data->unk_60) + (data->unk_64 - data->unk_60)) * 0.5;
data->unk_34 = data->unk_60
+ (shim_sin_deg(unk_14 * 20) * (data->unk_64 - data->unk_60)
+ (data->unk_64 - data->unk_60)) * 0.5;
}
void fx_75_render(EffectInstance* effect) {
@ -160,7 +162,9 @@ void fx_75_render(EffectInstance* effect) {
f32 outZ;
f32 outS;
shim_transform_point(&gCameras[gCurrentCameraID].perspectiveMatrix[0], data->unk_04, data->unk_08, data->unk_0C, 1.0f, &outX, &outY, &outZ, &outS);
shim_transform_point(&gCameras[gCurrentCameraID].perspectiveMatrix[0],
data->pos.x, data->pos.y, data->pos.z, 1.0f,
&outX, &outY, &outZ, &outS);
outDist = outZ + 5000;
if (outDist < 0) {
@ -188,33 +192,33 @@ void func_E00EA664(void) {
void fx_75_appendGfx(void* effect) {
Effect75FXData* data = ((EffectInstance*)effect)->data.unk_75;
Camera* camera = &gCameras[gCurrentCameraID];
s32 unk_00 = data->unk_00;
s32 temp_40 = data->unk_40 * 4.0f;
s32 temp_44 = data->unk_44 * 4.0f;
s32 temp_50 = data->unk_50 * 4.0f;
s32 temp_54 = data->unk_54 * 4.0f;
Matrix4f sp18;
Matrix4f sp58;
s32 type = data->type;
s32 uls0 = data->unk_40 * 4.0f;
s32 ult0 = data->unk_44 * 4.0f;
s32 uls1 = data->unk_50 * 4.0f;
s32 ult1 = data->unk_54 * 4.0f;
Matrix4f mtxTransfrom;
Matrix4f mtxTemp;
gDPPipeSync(gMasterGfxPos++);
gSPSegment(gMasterGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
shim_guTranslateF(sp18, data->unk_04, data->unk_08, data->unk_0C);
shim_guScaleF(sp58, data->unk_3C, data->unk_3C, data->unk_3C);
shim_guMtxCatF(sp58, sp18, sp18);
if (unk_00 == 1) {
shim_guRotateF(sp58, 180.0f, 0.0f, 0.0f, 1.0f);
shim_guMtxCatF(sp58, sp18, sp18);
shim_guTranslateF(mtxTransfrom, data->pos.x, data->pos.y, data->pos.z);
shim_guScaleF(mtxTemp, data->scale, data->scale, data->scale);
shim_guMtxCatF(mtxTemp, mtxTransfrom, mtxTransfrom);
if (type == 1) {
shim_guRotateF(mtxTemp, 180.0f, 0.0f, 0.0f, 1.0f);
shim_guMtxCatF(mtxTemp, mtxTransfrom, mtxTransfrom);
}
shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);
shim_guMtxF2L(mtxTransfrom, &gDisplayContext->matrixStack[gMatrixListPos]);
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPMatrix(gMasterGfxPos++, camera->unkMatrix, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
gDPSetPrimColor(gMasterGfxPos++, 0, 0, data->unk_18, data->unk_1C, data->unk_20, data->unk_34);
gDPSetEnvColor(gMasterGfxPos++, data->unk_28, data->unk_2C, data->unk_30, data->unk_24 * data->unk_38 / 255);
gDPSetPrimColor(gMasterGfxPos++, 0, 0, data->primCol.r, data->primCol.g, data->primCol.b, data->unk_34);
gDPSetEnvColor(gMasterGfxPos++, data->envCol.r, data->envCol.g, data->envCol.b, data->unk_24 * data->masterAlpha / 255);
gSPDisplayList(gMasterGfxPos++, D_E00EAA58[0]);
gDPSetTileSize(gMasterGfxPos++, G_TX_RENDERTILE, temp_40, temp_44, temp_40 + 252, temp_44 + 252);
gDPSetTileSize(gMasterGfxPos++, 1, temp_50, temp_54, temp_50 + 252, temp_54 + 252);
gSPDisplayList(gMasterGfxPos++, D_E00EAA50[unk_00]);
gDPSetTileSize(gMasterGfxPos++, G_TX_RENDERTILE, uls0, ult0, uls0 + 252, ult0 + 252);
gDPSetTileSize(gMasterGfxPos++, 1, uls1, ult1, uls1 + 252, ult1 + 252);
gSPDisplayList(gMasterGfxPos++, D_E00EAA50[type]);
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
}

View File

@ -9,7 +9,7 @@ NUUcode nugfx_ucode = {
};
u16* FrameBuf[3] = {
D_8038F800, D_803B5000, &heap_battleHead
D_8038F800, D_803B5000, D_803DA800
};
Gfx rdpstateinit_dl[] = {

View File

@ -7,7 +7,7 @@
#include "model.h"
u16* D_800778A0[] = {
D_8038F800, D_803B5000, &heap_battleHead,
D_8038F800, D_803B5000, D_803DA800
};
s32 D_800778AC[] = {

View File

@ -6,7 +6,7 @@
#include "sprite.h"
#include "model.h"
u16* D_80077980[] = { D_8038F800, D_803B5000, &heap_battleHead };
u16* D_80077980[] = { D_8038F800, D_803B5000, D_803DA800 };
NUPiOverlaySegment D_8007798C = {
.romStart = filemenu_ROM_START,

View File

@ -6,7 +6,7 @@
#include "sprite.h"
#include "model.h"
u16* D_80077950[] = { D_8038F800, D_803B5000, (u16*) &heap_battleHead };
u16* D_80077950[] = { D_8038F800, D_803B5000, D_803DA800 };
NUPiOverlaySegment D_8007795C = {
.romStart = pause_ROM_START,

View File

@ -2,29 +2,29 @@
#define NAMESPACE dro_01_Shop
s32 N(ShopMessages)[] = {
MSG_Shop_0049,
MSG_Shop_004A,
MSG_Shop_004B,
MSG_Shop_004C,
MSG_Shop_004D,
MSG_Shop_004E,
MSG_Shop_004F,
MSG_Shop_0050,
MSG_Shop_0051,
MSG_Shop_0052,
MSG_Shop_0053,
MSG_Shop_0054,
MSG_Shop_0055,
MSG_Shop_0056,
MSG_Shop_0057,
MSG_Shop_0058,
MSG_Shop_0059,
MSG_Shop_005A,
MSG_Shop_005B,
MSG_Shop_005C,
MSG_Shop_005D,
MSG_Shop_005E,
MSG_Shop_005F,
[SHOP_MSG_BUY_CONFIRM ] MSG_Shop_00_DR001,
[SHOP_MSG_NOT_ENOUGH_COINS ] MSG_Shop_01_DR001,
[SHOP_MSG_NOT_ENOUGH_ROOM ] MSG_Shop_02_DR001,
[SHOP_MSG_BUY_THANK_YOU ] MSG_Shop_03_DR001,
[SHOP_MSG_GREETING ] MSG_Shop_04_DR001,
[SHOP_MSG_INSTRUCTIONS ] MSG_Shop_05_DR001,
[SHOP_MSG_NOTHING_TO_SELL ] MSG_Shop_06_DR001,
[SHOP_MSG_SELL_WHICH ] MSG_Shop_07_DR001,
[SHOP_MSG_SELL_CONFIRM ] MSG_Shop_08_DR001,
[SHOP_MSG_SELL_CANCEL ] MSG_Shop_09_DR001,
[SHOP_MSG_SELL_MORE ] MSG_Shop_0A_DR001,
[SHOP_MSG_SELL_THANKS ] MSG_Shop_0B_DR001,
[SHOP_MSG_NOTHING_TO_CHECK ] MSG_Shop_0C_DR001,
[SHOP_MSG_NO_CHECK_ROOM ] MSG_Shop_0D_DR001,
[SHOP_MSG_CHECK_WHICH ] MSG_Shop_0E_DR001,
[SHOP_MSG_CHECK_ACCEPTED ] MSG_Shop_0F_DR001,
[SHOP_MSG_CHECK_MORE ] MSG_Shop_10_DR001,
[SHOP_MSG_NOTHING_TO_CLAIM ] MSG_Shop_11_DR001,
[SHOP_MSG_NO_CLAIM_ROOM ] MSG_Shop_12_DR001,
[SHOP_MSG_CLAIM_WHICH ] MSG_Shop_13_DR001,
[SHOP_MSG_CLAIM_ACCEPTED ] MSG_Shop_14_DR001,
[SHOP_MSG_CLAIM_MORE ] MSG_Shop_15_DR001,
[SHOP_MSG_FAREWELL ] MSG_Shop_16_DR001,
};
ShopItemData N(Inventory)[] = {
@ -41,10 +41,10 @@ ShopSellPriceData N(PriceList)[] = {
{ .itemID = ITEM_SNOWMAN_DOLL, .sellPrice = 12 },
{ .itemID = ITEM_MELON, .sellPrice = 10 },
{ .itemID = ITEM_ICED_POTATO, .sellPrice = 10 },
{ .itemID = ITEM_TASTY_TONIC, .sellPrice = 5 },
{ .itemID = ITEM_SUPER_SODA, .sellPrice = 6 },
{ .itemID = ITEM_TASTY_TONIC, .sellPrice = 5 },
{ .itemID = ITEM_SUPER_SODA, .sellPrice = 6 },
{ .itemID = ITEM_SPECIAL_SHAKE, .sellPrice = 15 },
{ .itemID = ITEM_DRIED_PASTA, .sellPrice = 2 },
{ .itemID = ITEM_DRIED_PASTA, .sellPrice = 2 },
{},
};
@ -114,9 +114,9 @@ enum {
EvtScript N(EVS_OnBuy) = {
EVT_SWITCH(LVar0)
EVT_CASE_EQ(3)
EVT_CASE_EQ(4)
EVT_CASE_EQ(1)
EVT_CASE_EQ(SHOP_BUY_RESULT_CANCEL)
EVT_CASE_EQ(SHOP_BUY_RESULT_4)
EVT_CASE_EQ(SHOP_BUY_RESULT_OK)
EVT_SET(LVar2, AB_DRO_SHOP_PREV1)
EVT_SET(LVar3, AB_DRO_SHOP_PREV2)
EVT_SET(LVar4, AB_DRO_SHOP_PREV3)
@ -148,7 +148,7 @@ EvtScript N(EVS_OnBuy) = {
EVT_CASE_DEFAULT
EVT_SET(AB_DRO_SHOP_PREV1, SEQ_NONE)
EVT_END_SWITCH
EVT_CASE_EQ(2)
EVT_CASE_EQ(SHOP_BUY_RESULT_2)
EVT_END_SWITCH
EVT_RETURN
EVT_END

View File

@ -49,9 +49,6 @@ extern EvtScript N(EVS_PlayRestMusic);
extern EvtScript N(EVS_PlayMoustafaMusic);
extern EvtScript N(EVS_SetupBuildings);
extern EvtScript N(EVS_ToadHouse_SetDialogue);
extern EvtScript N(8024D434);
extern EvtScript N(EVS_ToadHouse_GetInBed);
extern EvtScript N(EVS_ToadHouse_ReturnFromRest);
#endif

View File

@ -56,7 +56,6 @@ MAP_STATIC_PAD(1,key_item);
#include "world/common/complete/NormalItemChoice.inc.c"
#include "world/common/complete/ToadHouseBlanketAnim.inc.c"
#include "world/common/atomic/ToadHouse.inc.c"
#include "world/common/atomic/ToadHouse.data.inc.c"

View File

@ -2,24 +2,32 @@
#define _WORLD_AREA_HOS_HOS_H_
enum {
AB_HOS_0 = AreaByte(0),
AB_HOS_1 = AreaByte(1),
AB_HOS_2 = AreaByte(2),
AB_HOS_3 = AreaByte(3),
AB_HOS_4 = AreaByte(4),
AB_HOS_5 = AreaByte(5),
AB_HOS_6 = AreaByte(6),
AB_HOS_7 = AreaByte(7),
AB_HOS_8 = AreaByte(8),
AB_HOS_9 = AreaByte(9),
AB_HOS_A = AreaByte(10),
AB_HOS_B = AreaByte(11),
AB_HOS_C = AreaByte(12),
AB_HOS_D = AreaByte(13),
AB_HOS_E = AreaByte(14),
AB_HOS_F = AreaByte(15),
AB_HOS_0 = AreaByte(0),
AB_HOS_1 = AreaByte(1),
AB_HOS_2 = AreaByte(2),
AB_HOS_3 = AreaByte(3),
AB_HOS_4 = AreaByte(4),
AB_HOS_5 = AreaByte(5),
AB_HOS_6 = AreaByte(6),
AB_HOS_7 = AreaByte(7),
AB_HOS_8 = AreaByte(8),
AB_HOS_9 = AreaByte(9),
AB_HOS_A = AreaByte(10),
AB_HOS_B = AreaByte(11),
AB_HOS_C = AreaByte(12),
AB_HOS_D = AreaByte(13),
AB_HOS_E = AreaByte(14),
AB_HOS_F = AreaByte(15),
};
#define AF_HOS(index) AreaFlag(index)
extern MapSettings hos_00_settings;
extern MapSettings hos_01_settings;
extern MapSettings hos_02_settings;
extern MapSettings hos_03_settings;
extern MapSettings hos_04_settings;
extern MapSettings hos_05_settings;
extern MapSettings hos_06_settings;
extern MapSettings hos_10_settings;
extern MapSettings hos_20_settings;
#endif

View File

@ -30,7 +30,7 @@ ApiStatus func_80240B64_A113E4(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
EffectInstance* effect = (EffectInstance*) evt_get_variable(script, *args++);
effect->data.unk_75->unk_38 = evt_get_variable(script, *args++);
effect->data.unk_75->masterAlpha = evt_get_variable(script, *args++);
return ApiStatus_DONE2;
}

View File

@ -1,137 +0,0 @@
#include "hos_02.h"
#include "effects.h"
static char* N(exit_str_0) = "hos_01";
static char* N(exit_str_1) = "hos_03";
extern u16 D_802433AC_A195CC;
extern u16 D_802433AE_A195CE;
extern u16 D_802433B0_A195D0;
extern u16 D_802433B2_A195D2;
extern u16 D_802433B4_A195D4;
#include "world/common/atomic/TexturePan.inc.c"
void func_8024030C_A1652C(void) {
f32 scale = ((sins(D_802433AC_A195CC) * (1 / 32768.0f)) * 0.5 * 0.5) + 1.05;
D_802433AC_A195CC += 409;
guScale(&gDisplayContext->matrixStack[gMatrixListPos], scale, scale, scale);
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++],
G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
}
void func_80240434_A16654(void) {
Vtx* firstVertex;
Vtx* copiedVertices;
s32 numVertices;
s32 i;
s32 temp3;
mdl_get_copied_vertices(VTX_COPY_0, &firstVertex, &copiedVertices, &numVertices);
for (i = 0; i < numVertices; i++) {
u8* colors = copiedVertices[i].v.cn;
s16 temp1 = (sins(D_802433AE_A195CE * (i % 3 + 1) + i) + 0x8000) / 2;
colors[0] = temp1 * 155 / 0x8000 + 100;
colors[1] = temp1 * 155 / 0x8000 + 100;
temp3 = sins(D_802433AE_A195CE / 0x8000 * (((i / 2) % 3 + 1) << 15) + D_802433AE_A195CE / 0x4000 * 0x8000 + i) + 0x8000;
colors[2] = colors[0] * temp3 / 0x10000;
}
gSPDisplayList(gMasterGfxPos++, mdl_get_copied_gfx(VTX_COPY_0));
D_802433AE_A195CE += 0x253;
}
void func_80240610_A16830(void) {
Vtx* firstVertex;
Vtx* copiedVertices;
s32 numVertices;
s32 i;
s32 temp3;
mdl_get_copied_vertices(VTX_COPY_1, &firstVertex, &copiedVertices, &numVertices);
for (i = 0; i < numVertices; i++) {
u8* colors = copiedVertices[i].v.cn;
s16 temp1 = (sins(D_802433B0_A195D0 * (i % 3 + 1) + i) + 0x8000) / 2;
colors[0] = temp1 * 155 / 0x8000 + 48.62745098039216;
colors[1] = temp1 * 155 / 0x8000 + 89.41176470588236;
temp3 = sins(D_802433B0_A195D0 / 0x8000 * (((i / 2) % 3 + 1) << 15) + D_802433B0_A195D0 / 0x4000 * 0x8000 + i) + 0x8000;
colors[2] = colors[0] * temp3 / 0x10000 + 99.6078431372549;
}
gSPDisplayList(gMasterGfxPos++, mdl_get_copied_gfx(VTX_COPY_1));
D_802433B0_A195D0 += 0x253;
}
void func_80240904_A16B24(void) {
Vtx* firstVertex;
Vtx* copiedVertices;
s32 numVertices;
s32 i;
s32 temp3;
mdl_get_copied_vertices(VTX_COPY_2, &firstVertex, &copiedVertices, &numVertices);
for (i = 0; i < numVertices; i++) {
u8* colors = copiedVertices[i].v.cn;
s16 temp1 = (sins(D_802433B2_A195D2 * (i % 3 + 1) + i) + 0x8000) / 2;
colors[0] = temp1 * 155 / 0x8000 + 67.45098039215686;
colors[1] = temp1 * 155 / 0x8000 + 100.0;
temp3 = sins(D_802433B2_A195D2 / 0x8000 * (((i / 2) % 3 + 1) << 15) + D_802433B2_A195D2 / 0x4000 * 0x8000 + i) + 0x8000;
colors[2] = colors[0] * temp3 / 0x10000 + 59.21568627450981;
}
gSPDisplayList(gMasterGfxPos++, mdl_get_copied_gfx(VTX_COPY_2));
D_802433B2_A195D2 += 0x253;
}
void func_80240BFC_A16E1C(void) {
Vtx* firstVertex;
Vtx* copiedVertices;
s32 numVertices;
s32 i;
s32 temp3;
mdl_get_copied_vertices(VTX_COPY_3, &firstVertex, &copiedVertices, &numVertices);
for (i = 0; i < numVertices; i++) {
u8* colors = copiedVertices[i].v.cn;
s16 temp1 = (sins(D_802433B4_A195D4 * (i % 3 + 1) + i) + 0x8000) / 2;
colors[0] = temp1 * 155 / 0x8000 + 100.0;
colors[1] = temp1 * 155 / 0x8000 + 80.3921568627451;
temp3 = sins(D_802433B4_A195D4 / 0x8000 * (((i / 2) % 3 + 1) << 15) + D_802433B4_A195D4 / 0x4000 * 0x8000 + i) + 0x8000;
colors[2] = colors[0] * temp3 / 0x10000 + 96.07843137254902;
}
gSPDisplayList(gMasterGfxPos++, mdl_get_copied_gfx(VTX_COPY_3));
D_802433B4_A195D4 += 0x253;
}
ApiStatus func_80240EF4_A17114(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
EffectInstance* effect = (EffectInstance*) evt_get_variable(script, *args++);
effect->data.unk_75->unk_78 = 190.0f;
effect->data.unk_75->unk_7C = 220.0f;
effect->data.unk_75->unk_68 = 0.7f;
effect->data.unk_75->unk_38 = 255;
return ApiStatus_DONE2;
}
ApiStatus func_80240F68_A17188(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
EffectInstance* effect = (EffectInstance*) evt_get_variable(script, *args++);
effect->data.unk_75->unk_78 = 170.0f;
effect->data.unk_75->unk_7C = 170.0f;
effect->data.unk_75->unk_68 = 2.0f;
effect->data.unk_75->unk_38 = 255;
return ApiStatus_DONE2;
}

View File

@ -1,5 +0,0 @@
#include "hos_02.h"
#include "world/common/enemy/ai/FlyingAI.inc.c"
#include "world/common/enemy/ai/FlyingNoAttackAI.inc.c"

View File

@ -2,8 +2,31 @@
/// @brief Shooting Star Summit - Star Way
#include "common.h"
#include "../hos.h"
#include "message_ids.h"
#include "map.h"
#include "../hos.h"
#include "mapfs/hos_02_shape.h"
#include "mapfs/hos_02_hit.h"
enum {
NPC_Ember_01 = 0,
NPC_Ember_02 = 1,
NPC_Ember_03 = 2,
};
enum {
MV_StarBeamEffect = MapVar(10),
};
#define NAMESPACE hos_02
extern EvtScript N(EVS_Main);
extern EvtScript N(EVS_SetupMusic);
extern EvtScript N(EVS_SetupModelFX);
extern EvtScript N(EVS_DescendStarBeam);
extern EvtScript N(EVS_SetupUnused);
extern NpcGroupList N(DefaultNPCs);
API_CALLABLE(N(func_80240EF4_A17114));
API_CALLABLE(N(func_80240F68_A17188));

View File

@ -0,0 +1,23 @@
#include "hos_02.h"
EntryList N(Entrances) = {
[hos_02_ENTRY_0] { -1005.0, -171.0, 225.0, 90.0 },
[hos_02_ENTRY_1] { 1160.0, 503.0, 350.0, 270.0 },
[hos_02_ENTRY_2] { 0.0, 0.0, 0.0, 0.0 },
[hos_02_ENTRY_3] { 0.0, 0.0, 0.0, 0.0 },
[hos_02_ENTRY_4] { 0.0, 0.0, 0.0, 0.0 },
[hos_02_ENTRY_5] { 0.0, 0.0, 0.0, 0.0 },
[hos_02_ENTRY_6] { 0.0, 0.0, 0.0, 0.0 },
[hos_02_ENTRY_7] { 0.0, 0.0, 0.0, 0.0 },
[hos_02_ENTRY_8] { 0.0, 0.0, 0.0, 0.0 },
[hos_02_ENTRY_9] { 0.0, 0.0, 0.0, 0.0 },
[hos_02_ENTRY_A] { 354.0, 0.0, 294.0, 117.0 },
};
MapSettings N(settings) = {
.main = &N(EVS_Main),
.entryList = &N(Entrances),
.entryCount = ENTRY_COUNT(N(Entrances)),
.background = &gBackgroundImage,
.tattle = { MSG_MapTattle_hos_02 },
};

View File

@ -0,0 +1,10 @@
#include "hos_02.h"
EvtScript N(EVS_SetupMusic) = {
EVT_CALL(GetEntryID, LVar0)
EVT_IF_EQ(LVar0, hos_02_ENTRY_1)
EVT_CALL(SetMusicTrack, 0, SONG_STAR_WAY_OPENS, 3, 8)
EVT_END_IF
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,118 @@
#include "hos_02.h"
EvtScript N(EVS_ExitStarBeam) = {
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(GetPartnerInUse, LVar0)
EVT_IF_NE(LVar0, PARTNER_NONE)
EVT_CALL(InterruptUsePartner)
EVT_WAIT(20)
EVT_LOOP(0)
EVT_WAIT(1)
EVT_CALL(IsPlayerOnValidFloor, LVar0)
EVT_IF_EQ(LVar0, TRUE)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_END_IF
EVT_CALL(DisablePlayerPhysics, TRUE)
EVT_CALL(DisablePartnerAI, 0)
EVT_EXEC_WAIT(N(EVS_DescendStarBeam))
EVT_CALL(GotoMap, EVT_PTR("hos_01"), hos_01_ENTRY_1)
EVT_WAIT(100)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_ExitWalk_hos_03_0) = EVT_EXIT_WALK(60, hos_02_ENTRY_1, "hos_03", hos_03_ENTRY_0);
EvtScript N(EVS_BindExitTriggers) = {
EVT_CALL(GetEntryID, LVar0)
EVT_IF_NE(LVar0, hos_02_ENTRY_0)
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitStarBeam)), TRIGGER_FLOOR_TOUCH, COLLIDER_deiliw, 1, 0)
EVT_END_IF
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_hos_03_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_EnterStarBeam) = {
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(DisablePlayerPhysics, TRUE)
EVT_CALL(DisablePartnerAI, 0)
EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE)
EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -1105, -171, 225)
EVT_CALL(SetPanTarget, CAM_DEFAULT, -1105, -171, 225)
EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(300.0))
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0))
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0))
EVT_SET(LVar2, 360)
EVT_CALL(MakeLerp, -400, -171, 60, EASING_QUADRATIC_OUT)
EVT_LOOP(0)
EVT_CALL(UpdateLerp)
EVT_CALL(SetPlayerPos, -1105, LVar0, 225)
EVT_CALL(SetNpcPos, NPC_PARTNER, -1105, LVar0, 215)
EVT_ADD(LVar2, 40)
EVT_CALL(InterpPlayerYaw, LVar2, 0)
EVT_CALL(SetNpcRotation, NPC_PARTNER, 0, LVar2, 0)
EVT_WAIT(1)
EVT_IF_EQ(LVar1, 0)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_SET(LVar0, LVar2)
EVT_SUB(LVar0, 360)
EVT_SUB(LVar2, LVar0)
EVT_SET(LVar0, 40)
EVT_LABEL(10)
EVT_IF_LT(LVar2, 450)
EVT_CALL(InterpPlayerYaw, LVar2, 0)
EVT_CALL(SetNpcRotation, NPC_PARTNER, 0, LVar2, 0)
EVT_ADD(LVar2, LVar0)
EVT_WAIT(1)
EVT_GOTO(10)
EVT_END_IF
EVT_SET(LVar2, 90)
EVT_SUB(LVar0, 5)
EVT_IF_GT(LVar0, 20)
EVT_GOTO(10)
EVT_END_IF
EVT_CALL(SetNpcRotation, NPC_PARTNER, 0, 0, 0)
EVT_CALL(N(func_80240EF4_A17114), MV_StarBeamEffect)
EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, TRUE)
EVT_CALL(EnablePartnerAI)
EVT_CALL(DisablePlayerPhysics, FALSE)
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0)
EVT_CALL(SetMusicTrack, 0, SONG_STAR_WAY_OPENS, 3, 8)
EVT_CALL(DisablePlayerInput, FALSE)
EVT_CALL(AwaitPlayerLeave, -1105, 225, 40)
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitStarBeam)), TRIGGER_FLOOR_TOUCH, COLLIDER_deiliw, 1, 0)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_Main) = {
EVT_SET(GB_WorldLocation, LOCATION_STAR_WAY)
EVT_CALL(SetSpriteShading, SHADING_NONE)
EVT_SETUP_CAMERA_DEFAULT()
EVT_SET(GF_MAP_StarWay, TRUE)
EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs)))
EVT_CALL(GetEntryID, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(hos_02_ENTRY_0)
EVT_THREAD
EVT_EXEC_WAIT(N(EVS_EnterStarBeam))
EVT_EXEC(N(EVS_BindExitTriggers))
EVT_END_THREAD
EVT_CASE_EQ(hos_02_ENTRY_1)
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK)
EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers)))
EVT_EXEC(EnterWalk)
EVT_END_SWITCH
EVT_EXEC(N(EVS_SetupModelFX))
EVT_EXEC(N(EVS_SetupUnused))
EVT_EXEC(N(EVS_SetupMusic))
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,345 @@
#include "hos_02.h"
#include "effects.h"
#include "world/common/atomic/TexturePan.inc.c"
#include "world/common/atomic/TexturePan.data.inc.c"
u16 N(HaloScalePhaseAngle) = 0;
void N(build_gfx_lamp_halos)(void) {
f32 scale = ((sins(N(HaloScalePhaseAngle)) * (1.0f / 0x8000)) * 0.5 * 0.5) + 1.05;
N(HaloScalePhaseAngle) += (s32)RAD_TO_BINANG(25.1720);
guScale(&gDisplayContext->matrixStack[gMatrixListPos], scale, scale, scale);
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++],
G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
}
u16 N(YellowStarPhaseAngle) = 0;
void N(build_gfx_yellow_stars)(void) {
Vtx* firstVertex;
Vtx* copiedVertices;
s32 numVertices;
s32 i;
s32 temp3;
mdl_get_copied_vertices(VTX_COPY_0, &firstVertex, &copiedVertices, &numVertices);
for (i = 0; i < numVertices; i++) {
u8* colors = copiedVertices[i].v.cn;
s16 temp1 = (sins(N(YellowStarPhaseAngle) * (i % 3 + 1) + i) + 0x8000) / 2;
colors[0] = temp1 * 155 / 0x8000 + 100;
colors[1] = temp1 * 155 / 0x8000 + 100;
temp3 = sins(N(YellowStarPhaseAngle) / 0x8000 * (((i / 2) % 3 + 1) << 15) + N(YellowStarPhaseAngle) / 0x4000 * 0x8000 + i) + 0x8000;
colors[2] = colors[0] * temp3 / 0x10000;
}
gSPDisplayList(gMasterGfxPos++, mdl_get_copied_gfx(VTX_COPY_0));
N(YellowStarPhaseAngle) += (s32)RAD_TO_BINANG(25.1898);
}
u16 N(BlueStarPhaseAngle) = 0;
void N(build_gfx_blue_stars)(void) {
Vtx* firstVertex;
Vtx* copiedVertices;
s32 numVertices;
s32 i;
s32 temp3;
mdl_get_copied_vertices(VTX_COPY_1, &firstVertex, &copiedVertices, &numVertices);
for (i = 0; i < numVertices; i++) {
u8* colors = copiedVertices[i].v.cn;
s16 temp1 = (sins(N(BlueStarPhaseAngle) * (i % 3 + 1) + i) + 0x8000) / 2;
colors[0] = temp1 * 155 / 0x8000 + 48.62745098039216;
colors[1] = temp1 * 155 / 0x8000 + 89.41176470588236;
temp3 = sins(N(BlueStarPhaseAngle) / 0x8000 * (((i / 2) % 3 + 1) << 15) + N(BlueStarPhaseAngle) / 0x4000 * 0x8000 + i) + 0x8000;
colors[2] = colors[0] * temp3 / 0x10000 + 99.6078431372549;
}
gSPDisplayList(gMasterGfxPos++, mdl_get_copied_gfx(VTX_COPY_1));
N(BlueStarPhaseAngle) += (s32)RAD_TO_BINANG(25.1898);
}
u16 N(GreenStarPhaseAngle) = 0;
void N(build_gfx_green_stars)(void) {
Vtx* firstVertex;
Vtx* copiedVertices;
s32 numVertices;
s32 i;
s32 temp3;
mdl_get_copied_vertices(VTX_COPY_2, &firstVertex, &copiedVertices, &numVertices);
for (i = 0; i < numVertices; i++) {
u8* colors = copiedVertices[i].v.cn;
s16 temp1 = (sins(N(GreenStarPhaseAngle) * (i % 3 + 1) + i) + 0x8000) / 2;
colors[0] = temp1 * 155 / 0x8000 + 67.45098039215686;
colors[1] = temp1 * 155 / 0x8000 + 100.0;
temp3 = sins(N(GreenStarPhaseAngle) / 0x8000 * (((i / 2) % 3 + 1) << 15) + N(GreenStarPhaseAngle) / 0x4000 * 0x8000 + i) + 0x8000;
colors[2] = colors[0] * temp3 / 0x10000 + 59.21568627450981;
}
gSPDisplayList(gMasterGfxPos++, mdl_get_copied_gfx(VTX_COPY_2));
N(GreenStarPhaseAngle) += (s32)RAD_TO_BINANG(25.1898);
}
u16 N(PinkStarPhaseAngle) = 0;
void N(build_gfx_pink_stars)(void) {
Vtx* firstVertex;
Vtx* copiedVertices;
s32 numVertices;
s32 i;
s32 temp3;
mdl_get_copied_vertices(VTX_COPY_3, &firstVertex, &copiedVertices, &numVertices);
for (i = 0; i < numVertices; i++) {
u8* colors = copiedVertices[i].v.cn;
s16 temp1 = (sins(N(PinkStarPhaseAngle) * (i % 3 + 1) + i) + 0x8000) / 2;
colors[0] = temp1 * 155 / 0x8000 + 100.0;
colors[1] = temp1 * 155 / 0x8000 + 80.3921568627451;
temp3 = sins(N(PinkStarPhaseAngle) / 0x8000 * (((i / 2) % 3 + 1) << 15) + N(PinkStarPhaseAngle) / 0x4000 * 0x8000 + i) + 0x8000;
colors[2] = colors[0] * temp3 / 0x10000 + 96.07843137254902;
}
gSPDisplayList(gMasterGfxPos++, mdl_get_copied_gfx(VTX_COPY_3));
N(PinkStarPhaseAngle) += (s32)RAD_TO_BINANG(25.1898);
}
API_CALLABLE(N(func_80240EF4_A17114)) {
Bytecode* args = script->ptrReadPos;
EffectInstance* effect = (EffectInstance*) evt_get_variable(script, *args++);
effect->data.unk_75->unk_78 = 190.0f;
effect->data.unk_75->unk_7C = 220.0f;
effect->data.unk_75->unk_68 = 0.7f;
effect->data.unk_75->masterAlpha = 255;
return ApiStatus_DONE2;
}
API_CALLABLE(N(func_80240F68_A17188)) {
Bytecode* args = script->ptrReadPos;
EffectInstance* effect = (EffectInstance*) evt_get_variable(script, *args++);
effect->data.unk_75->unk_78 = 170.0f;
effect->data.unk_75->unk_7C = 170.0f;
effect->data.unk_75->unk_68 = 2.0f;
effect->data.unk_75->masterAlpha = 255;
return ApiStatus_DONE2;
}
EvtScript N(EVS_SetupModelFX) = {
EVT_PLAY_EFFECT(EFFECT_75, 1, -1105, -86, 230, 1, -1)
EVT_SET(MV_StarBeamEffect, LVarF)
EVT_CALL(GetEntryID, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(hos_02_ENTRY_0)
EVT_CALL(N(func_80240F68_A17188), MV_StarBeamEffect)
EVT_CASE_EQ(hos_02_ENTRY_1)
EVT_CALL(N(func_80240EF4_A17114), MV_StarBeamEffect)
EVT_END_SWITCH
EVT_CALL(EnableTexPanning, MODEL_o380, TRUE)
EVT_CALL(EnableTexPanning, MODEL_o395, TRUE)
EVT_CALL(EnableTexPanning, MODEL_o549, TRUE)
EVT_CALL(EnableTexPanning, MODEL_o552, TRUE)
EVT_THREAD
TEX_PAN_PARAMS_ID(TEX_PANNER_1)
TEX_PAN_PARAMS_STEP( 80, -200, -50, 100)
TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1)
TEX_PAN_PARAMS_INIT( 0, 0, 0, 0)
EVT_EXEC(N(EVS_UpdateTexturePan))
EVT_END_THREAD
// custom gfx for lantern glow halos, flags for the entire lamp posts
EVT_CALL(SetModelCustomGfx, MODEL_o414, CUSTOM_GFX_0, FOG_MODE_UNCHANGED)
EVT_CALL(SetModelCustomGfx, MODEL_o415, CUSTOM_GFX_0, FOG_MODE_UNCHANGED)
EVT_CALL(SetModelCustomGfx, MODEL_o399, CUSTOM_GFX_0, FOG_MODE_UNCHANGED)
EVT_CALL(SetModelCustomGfx, MODEL_o398, CUSTOM_GFX_0, FOG_MODE_UNCHANGED)
EVT_CALL(SetModelCustomGfx, MODEL_o347, CUSTOM_GFX_0, FOG_MODE_UNCHANGED)
EVT_CALL(SetModelCustomGfx, MODEL_o348, CUSTOM_GFX_0, FOG_MODE_UNCHANGED)
EVT_CALL(SetCustomGfxBuilders, CUSTOM_GFX_0, EVT_PTR(N(build_gfx_lamp_halos)), NULL)
EVT_CALL(SetModelFlags, MODEL_o414, MODEL_FLAG_USE_CAMERA_UNK_MATRIX, TRUE)
EVT_CALL(SetModelFlags, MODEL_o415, MODEL_FLAG_USE_CAMERA_UNK_MATRIX, TRUE)
EVT_CALL(SetModelFlags, MODEL_o399, MODEL_FLAG_USE_CAMERA_UNK_MATRIX, TRUE)
EVT_CALL(SetModelFlags, MODEL_o398, MODEL_FLAG_USE_CAMERA_UNK_MATRIX, TRUE)
EVT_CALL(SetModelFlags, MODEL_o347, MODEL_FLAG_USE_CAMERA_UNK_MATRIX, TRUE)
EVT_CALL(SetModelFlags, MODEL_o348, MODEL_FLAG_USE_CAMERA_UNK_MATRIX, TRUE)
EVT_CALL(SetModelFlags, MODEL_o407, MODEL_FLAG_USE_CAMERA_UNK_MATRIX, TRUE)
EVT_CALL(SetModelFlags, MODEL_o408, MODEL_FLAG_USE_CAMERA_UNK_MATRIX, TRUE)
EVT_CALL(SetModelFlags, MODEL_o413, MODEL_FLAG_USE_CAMERA_UNK_MATRIX, TRUE)
EVT_CALL(SetModelFlags, MODEL_o446, MODEL_FLAG_USE_CAMERA_UNK_MATRIX, TRUE)
EVT_CALL(SetModelFlags, MODEL_o447, MODEL_FLAG_USE_CAMERA_UNK_MATRIX, TRUE)
EVT_CALL(SetModelFlags, MODEL_o448, MODEL_FLAG_USE_CAMERA_UNK_MATRIX, TRUE)
EVT_CALL(SetModelFlags, MODEL_o456, MODEL_FLAG_USE_CAMERA_UNK_MATRIX, TRUE)
EVT_CALL(SetModelFlags, MODEL_o457, MODEL_FLAG_USE_CAMERA_UNK_MATRIX, TRUE)
EVT_CALL(SetModelFlags, MODEL_o458, MODEL_FLAG_USE_CAMERA_UNK_MATRIX, TRUE)
// yellow stars
EVT_CALL(MakeLocalVertexCopy, VTX_COPY_0, MODEL_o466, TRUE)
EVT_CALL(SetCustomGfxBuilders, CUSTOM_GFX_1, EVT_PTR(N(build_gfx_yellow_stars)), NULL)
EVT_CALL(SetModelCustomGfx, MODEL_o466, CUSTOM_GFX_1, FOG_MODE_UNCHANGED)
EVT_CALL(SetModelCustomGfx, MODEL_o467, CUSTOM_GFX_1, FOG_MODE_UNCHANGED)
EVT_CALL(SetModelCustomGfx, MODEL_o468, CUSTOM_GFX_1, FOG_MODE_UNCHANGED)
EVT_CALL(SetModelCustomGfx, MODEL_o469, CUSTOM_GFX_1, FOG_MODE_UNCHANGED)
EVT_CALL(SetModelCustomGfx, MODEL_o470, CUSTOM_GFX_1, FOG_MODE_UNCHANGED)
EVT_CALL(SetModelCustomGfx, MODEL_o471, CUSTOM_GFX_1, FOG_MODE_UNCHANGED)
EVT_CALL(SetModelCustomGfx, MODEL_o472, CUSTOM_GFX_1, FOG_MODE_UNCHANGED)
EVT_CALL(SetModelCustomGfx, MODEL_o541, CUSTOM_GFX_1, FOG_MODE_UNCHANGED)
EVT_CALL(SetModelCustomGfx, MODEL_o542, CUSTOM_GFX_1, FOG_MODE_UNCHANGED)
EVT_CALL(SetModelCustomGfx, MODEL_o545, CUSTOM_GFX_1, FOG_MODE_UNCHANGED)
EVT_CALL(SetModelCustomGfx, MODEL_o548, CUSTOM_GFX_1, FOG_MODE_UNCHANGED)
EVT_CALL(SetModelFlags, MODEL_o466, MODEL_FLAG_HAS_LOCAL_VERTEX_COPY, TRUE)
EVT_CALL(SetModelFlags, MODEL_o467, MODEL_FLAG_HAS_LOCAL_VERTEX_COPY, TRUE)
EVT_CALL(SetModelFlags, MODEL_o468, MODEL_FLAG_HAS_LOCAL_VERTEX_COPY, TRUE)
EVT_CALL(SetModelFlags, MODEL_o469, MODEL_FLAG_HAS_LOCAL_VERTEX_COPY, TRUE)
EVT_CALL(SetModelFlags, MODEL_o470, MODEL_FLAG_HAS_LOCAL_VERTEX_COPY, TRUE)
EVT_CALL(SetModelFlags, MODEL_o471, MODEL_FLAG_HAS_LOCAL_VERTEX_COPY, TRUE)
EVT_CALL(SetModelFlags, MODEL_o472, MODEL_FLAG_HAS_LOCAL_VERTEX_COPY, TRUE)
EVT_CALL(SetModelFlags, MODEL_o541, MODEL_FLAG_HAS_LOCAL_VERTEX_COPY, TRUE)
EVT_CALL(SetModelFlags, MODEL_o542, MODEL_FLAG_HAS_LOCAL_VERTEX_COPY, TRUE)
EVT_CALL(SetModelFlags, MODEL_o545, MODEL_FLAG_HAS_LOCAL_VERTEX_COPY, TRUE)
EVT_CALL(SetModelFlags, MODEL_o548, MODEL_FLAG_HAS_LOCAL_VERTEX_COPY, TRUE)
// blue stars
EVT_CALL(MakeLocalVertexCopy, VTX_COPY_1, MODEL_o466, TRUE)
EVT_CALL(SetCustomGfxBuilders, CUSTOM_GFX_2, EVT_PTR(N(build_gfx_blue_stars)), NULL)
EVT_CALL(SetModelCustomGfx, MODEL_o543, CUSTOM_GFX_2, FOG_MODE_UNCHANGED)
EVT_CALL(SetModelCustomGfx, MODEL_o539, CUSTOM_GFX_2, FOG_MODE_UNCHANGED)
EVT_CALL(SetModelFlags, MODEL_o543, MODEL_FLAG_HAS_LOCAL_VERTEX_COPY, TRUE)
EVT_CALL(SetModelFlags, MODEL_o539, MODEL_FLAG_HAS_LOCAL_VERTEX_COPY, TRUE)
// green stars
EVT_CALL(MakeLocalVertexCopy, VTX_COPY_2, MODEL_o466, TRUE)
EVT_CALL(SetCustomGfxBuilders, CUSTOM_GFX_3, EVT_PTR(N(build_gfx_green_stars)), NULL)
EVT_CALL(SetModelCustomGfx, MODEL_o546, CUSTOM_GFX_3, FOG_MODE_UNCHANGED)
EVT_CALL(SetModelCustomGfx, MODEL_o540, CUSTOM_GFX_3, FOG_MODE_UNCHANGED)
EVT_CALL(SetModelFlags, MODEL_o546, MODEL_FLAG_HAS_LOCAL_VERTEX_COPY, TRUE)
EVT_CALL(SetModelFlags, MODEL_o540, MODEL_FLAG_HAS_LOCAL_VERTEX_COPY, TRUE)
// pink stars
EVT_CALL(MakeLocalVertexCopy, VTX_COPY_3, MODEL_o466, TRUE)
EVT_CALL(SetCustomGfxBuilders, CUSTOM_GFX_4, EVT_PTR(N(build_gfx_pink_stars)), NULL)
EVT_CALL(SetModelCustomGfx, MODEL_o544, CUSTOM_GFX_4, FOG_MODE_UNCHANGED)
EVT_CALL(SetModelCustomGfx, MODEL_o547, CUSTOM_GFX_4, FOG_MODE_UNCHANGED)
EVT_CALL(SetModelFlags, MODEL_o544, MODEL_FLAG_HAS_LOCAL_VERTEX_COPY, TRUE)
EVT_CALL(SetModelFlags, MODEL_o547, MODEL_FLAG_HAS_LOCAL_VERTEX_COPY, TRUE)
EVT_THREAD
EVT_LOOP(0)
EVT_CALL(MakeLerp, -13, 13, 20, EASING_COS_IN_OUT)
EVT_LOOP(0)
EVT_CALL(UpdateLerp)
EVT_CALL(TranslateModel, MODEL_o466, 0, LVar0, 0)
EVT_CALL(TranslateModel, MODEL_o470, 0, LVar0, 0)
EVT_CALL(TranslateModel, MODEL_o471, 0, LVar0, 0)
EVT_CALL(TranslateModel, MODEL_o472, 0, LVar0, 0)
EVT_CALL(TranslateModel, MODEL_o541, 0, LVar0, 0)
EVT_CALL(TranslateModel, MODEL_o543, 0, LVar0, 0)
EVT_CALL(TranslateModel, MODEL_o545, 0, LVar0, 0)
EVT_CALL(TranslateModel, MODEL_o547, 0, LVar0, 0)
EVT_CALL(TranslateModel, MODEL_o539, 0, LVar0, 0)
EVT_WAIT(1)
EVT_IF_EQ(LVar1, 0)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_CALL(MakeLerp, 13, -13, 20, EASING_COS_IN_OUT)
EVT_LOOP(0)
EVT_CALL(UpdateLerp)
EVT_CALL(TranslateModel, MODEL_o466, 0, LVar0, 0)
EVT_CALL(TranslateModel, MODEL_o470, 0, LVar0, 0)
EVT_CALL(TranslateModel, MODEL_o471, 0, LVar0, 0)
EVT_CALL(TranslateModel, MODEL_o472, 0, LVar0, 0)
EVT_CALL(TranslateModel, MODEL_o541, 0, LVar0, 0)
EVT_CALL(TranslateModel, MODEL_o543, 0, LVar0, 0)
EVT_CALL(TranslateModel, MODEL_o545, 0, LVar0, 0)
EVT_CALL(TranslateModel, MODEL_o547, 0, LVar0, 0)
EVT_CALL(TranslateModel, MODEL_o539, 0, LVar0, 0)
EVT_WAIT(1)
EVT_IF_EQ(LVar1, 0)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_END_LOOP
EVT_END_THREAD
EVT_THREAD
EVT_LOOP(0)
EVT_CALL(MakeLerp, 13, -13, 20, EASING_COS_IN_OUT)
EVT_LOOP(0)
EVT_CALL(UpdateLerp)
EVT_CALL(TranslateModel, MODEL_o467, 0, LVar0, 0)
EVT_CALL(TranslateModel, MODEL_o468, 0, LVar0, 0)
EVT_CALL(TranslateModel, MODEL_o469, 0, LVar0, 0)
EVT_CALL(TranslateModel, MODEL_o542, 0, LVar0, 0)
EVT_CALL(TranslateModel, MODEL_o544, 0, LVar0, 0)
EVT_CALL(TranslateModel, MODEL_o546, 0, LVar0, 0)
EVT_CALL(TranslateModel, MODEL_o548, 0, LVar0, 0)
EVT_CALL(TranslateModel, MODEL_o540, 0, LVar0, 0)
EVT_WAIT(1)
EVT_IF_EQ(LVar1, 0)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_CALL(MakeLerp, -13, 13, 20, EASING_COS_IN_OUT)
EVT_LOOP(0)
EVT_CALL(UpdateLerp)
EVT_CALL(TranslateModel, MODEL_o467, 0, LVar0, 0)
EVT_CALL(TranslateModel, MODEL_o468, 0, LVar0, 0)
EVT_CALL(TranslateModel, MODEL_o469, 0, LVar0, 0)
EVT_CALL(TranslateModel, MODEL_o542, 0, LVar0, 0)
EVT_CALL(TranslateModel, MODEL_o544, 0, LVar0, 0)
EVT_CALL(TranslateModel, MODEL_o546, 0, LVar0, 0)
EVT_CALL(TranslateModel, MODEL_o548, 0, LVar0, 0)
EVT_CALL(TranslateModel, MODEL_o540, 0, LVar0, 0)
EVT_WAIT(1)
EVT_IF_EQ(LVar1, 0)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_END_LOOP
EVT_END_THREAD
EVT_THREAD
EVT_LOOP(0)
EVT_CALL(MakeLerp, 0, 360, 50, EASING_COS_IN_OUT)
EVT_LOOP(0)
EVT_CALL(UpdateLerp)
EVT_CALL(RotateModel, MODEL_o466, LVar0, 0, 1, 0)
EVT_CALL(RotateModel, MODEL_o470, LVar0, 0, 1, 0)
EVT_CALL(RotateModel, MODEL_o471, LVar0, 0, 1, 0)
EVT_CALL(RotateModel, MODEL_o472, LVar0, 0, 1, 0)
EVT_CALL(RotateModel, MODEL_o541, LVar0, 0, 1, 0)
EVT_CALL(RotateModel, MODEL_o543, LVar0, 0, 1, 0)
EVT_CALL(RotateModel, MODEL_o545, LVar0, 0, 1, 0)
EVT_CALL(RotateModel, MODEL_o547, LVar0, 0, 1, 0)
EVT_CALL(RotateModel, MODEL_o539, LVar0, 0, 1, 0)
EVT_WAIT(1)
EVT_IF_EQ(LVar1, 0)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_END_LOOP
EVT_END_THREAD
EVT_LOOP(0)
EVT_CALL(MakeLerp, 360, 0, 44, EASING_COS_IN_OUT)
EVT_LOOP(0)
EVT_CALL(UpdateLerp)
EVT_CALL(RotateModel, MODEL_o467, LVar0, 0, 1, 0)
EVT_CALL(RotateModel, MODEL_o468, LVar0, 0, 1, 0)
EVT_CALL(RotateModel, MODEL_o469, LVar0, 0, 1, 0)
EVT_CALL(RotateModel, MODEL_o542, LVar0, 0, 1, 0)
EVT_CALL(RotateModel, MODEL_o544, LVar0, 0, 1, 0)
EVT_CALL(RotateModel, MODEL_o546, LVar0, 0, 1, 0)
EVT_CALL(RotateModel, MODEL_o548, LVar0, 0, 1, 0)
EVT_CALL(RotateModel, MODEL_o540, LVar0, 0, 1, 0)
EVT_WAIT(1)
EVT_IF_EQ(LVar1, 0)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_END_LOOP
EVT_RETURN
EVT_END
};

View File

@ -1,6 +1,11 @@
#include "hos_02.h"
ApiStatus func_80240FD0_A171F0(Evt* script, s32 isInitialCall) {
API_CALLABLE(N(FetchEntryID)) {
script->varTable[0] = gGameStatusPtr->entryID;
return ApiStatus_DONE2;
}
EvtScript N(EVS_SetupUnused) = {
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,79 @@
#include "hos_02.h"
#include "world/common/enemy/complete/Ember.inc.c"
StaticNpc N(NpcData_Ember) = {
.id = NPC_Ember_01,
.settings = &N(NpcSettings_Ember),
.pos = { -410.0f, -15.0f, 260.0f },
.yaw = 90,
.flags = ENEMY_FLAG_100 | ENEMY_FLAG_400 | ENEMY_FLAG_800,
.drops = EMBER_DROPS,
.territory = {
.wander = {
.isFlying = TRUE,
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
.wanderShape = SHAPE_CYLINDER,
.centerPos = { -410, -15, 260 },
.wanderSize = { 30 },
.detectShape = SHAPE_CYLINDER,
.detectPos = { -410, -15, 260 },
.detectSize = { 1000 },
}
},
.animations = EMBER_ANIMS,
.aiDetectFlags = AI_DETECT_SENSITIVE_MOTION,
};
StaticNpc N(NpcData_Ember_02) = {
.id = NPC_Ember_02,
.settings = &N(NpcSettings_Ember),
.pos = { 220.0f, 200.0f, -205.0f },
.yaw = 90,
.flags = ENEMY_FLAG_100 | ENEMY_FLAG_400 | ENEMY_FLAG_800,
.drops = EMBER_DROPS,
.territory = {
.wander = {
.isFlying = TRUE,
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
.wanderShape = SHAPE_CYLINDER,
.centerPos = { 220, 200, -205 },
.wanderSize = { 30 },
.detectShape = SHAPE_CYLINDER,
.detectPos = { 220, 200, -205 },
.detectSize = { 1000 },
}
},
.animations = EMBER_ANIMS,
.aiDetectFlags = AI_DETECT_SENSITIVE_MOTION,
};
StaticNpc N(NpcData_Ember_03) = {
.id = NPC_Ember_03,
.settings = &N(NpcSettings_Ember),
.pos = { -135.0f, 370.0f, 270.0f },
.yaw = 90,
.flags = ENEMY_FLAG_100 | ENEMY_FLAG_400 | ENEMY_FLAG_800,
.drops = EMBER_DROPS,
.territory = {
.wander = {
.isFlying = TRUE,
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
.wanderShape = SHAPE_CYLINDER,
.centerPos = { -135, 370, 270 },
.wanderSize = { 30 },
.detectShape = SHAPE_CYLINDER,
.detectPos = { -135, 370, 270 },
.detectSize = { 1000 },
}
},
.animations = EMBER_ANIMS,
.aiDetectFlags = AI_DETECT_SENSITIVE_MOTION,
};
NpcGroupList N(DefaultNPCs) = {
NPC_GROUP(N(NpcData_Ember), BTL_HOS_FORMATION_01, BTL_HOS_STAGE_01),
NPC_GROUP(N(NpcData_Ember_02), BTL_HOS_FORMATION_01, BTL_HOS_STAGE_01),
NPC_GROUP(N(NpcData_Ember_03), BTL_HOS_FORMATION_01, BTL_HOS_STAGE_01),
{}
};

View File

@ -0,0 +1,39 @@
#include "hos_02.h"
EvtScript N(EVS_DescendStarBeam) = {
EVT_CALL(SetMusicTrack, 0, SONG_STAR_WAY_OPENS, 2, 8)
EVT_CALL(N(func_80240F68_A17188), MV_StarBeamEffect)
EVT_CALL(SetPlayerSpeed, EVT_FLOAT(3.0))
EVT_CALL(PlayerMoveTo, -1105, 230, 0)
EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE)
EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_40, TRUE)
EVT_CALL(SetNpcJumpscale, NPC_PARTNER, EVT_FLOAT(0.5))
EVT_CALL(NpcJump0, NPC_PARTNER, -1105, -171, 220, 5)
EVT_THREAD
EVT_SET(LVar0, 0)
EVT_SET(LVar1, 90)
EVT_LOOP(0)
EVT_ADD(LVar0, 2)
EVT_ADD(LVar1, LVar0)
EVT_CALL(InterpPlayerYaw, LVar1, 0)
EVT_CALL(SetNpcRotation, NPC_PARTNER, 0, LVar1, 0)
EVT_WAIT(1)
EVT_END_LOOP
EVT_END_THREAD
EVT_WAIT(60)
EVT_CALL(GetPlayerPos, LVar2, LVar3, LVar4)
EVT_SET(LVar5, LVar4)
EVT_ADD(LVar5, -10)
EVT_CALL(MakeLerp, LVar3, -600, 40, EASING_QUADRATIC_IN)
EVT_LOOP(0)
EVT_CALL(UpdateLerp)
EVT_CALL(SetPlayerPos, LVar2, LVar0, LVar4)
EVT_CALL(SetNpcPos, NPC_PARTNER, LVar2, LVar0, LVar5)
EVT_WAIT(1)
EVT_IF_EQ(LVar1, 0)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_RETURN
EVT_END
};

View File

@ -1,6 +0,0 @@
#include "hos_03.h"
static char* N(exit_str_0) = "hos_02";
static char* N(exit_str_1) = "hos_04";
#include "world/common/todo/GetFloorCollider.inc.c"

View File

@ -1,94 +0,0 @@
#include "hos_03.h"
extern u16 D_80243BCC_A1ECCC;
extern u16 D_80243BCE_A1ECCE;
extern u16 D_80243BD0_A1ECD0;
extern u16 D_80243BD2_A1ECD2;
extern u16 D_80243BD4_A1ECD4;
#include "world/common/atomic/TexturePan.inc.c"
void func_8024033C_A1B43C(void) {
Vtx* firstVertex;
Vtx* copiedVertices;
s32 numVertices;
s32 i;
s32 temp3;
f32 angle = sins(D_80243BCC_A1ECCC) / 32768.0f * 45.0f;
D_80243BCC_A1ECCC += 0x400;
guRotate(&gDisplayContext->matrixStack[gMatrixListPos], angle, 0.0f, 1.0f, 0.0f);
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
mdl_get_copied_vertices(VTX_COPY_1, &firstVertex, &copiedVertices, &numVertices);
for (i = 0; i < numVertices; i++) {
u8* colors = copiedVertices[i].v.cn;
s16 temp1 = (sins(D_80243BCE_A1ECCE * (i % 3 + 1) + i) + 0x8000) / 2;
colors[0] = temp1 * 155 / 0x8000 + 100;
colors[1] = temp1 * 155 / 0x8000 + 100;
temp3 = sins(D_80243BCE_A1ECCE / 0x8000 * (((i / 2) % 3 + 1) << 15) + D_80243BCE_A1ECCE / 0x4000 * 0x8000 + i) + 0x8000;
colors[2] = colors[0] * temp3 / 0x10000;
}
gSPClearGeometryMode(gMasterGfxPos++, G_CULL_BOTH);
gSPDisplayList(gMasterGfxPos++, mdl_get_copied_gfx(VTX_COPY_1));
D_80243BCE_A1ECCE += 0x666;
}
void func_8024060C_A1B70C(void) {
Vtx* firstVertex;
Vtx* copiedVertices;
s32 numVertices;
s32 i;
s32 temp3;
mdl_get_copied_vertices(VTX_COPY_2, &firstVertex, &copiedVertices, &numVertices);
for (i = 0; i < numVertices; i++) {
u8* colors = copiedVertices[i].v.cn;
s16 temp1 = (sins(D_80243BD0_A1ECD0 * (i % 3 + 1) + i) + 0x8000) / 2;
colors[0] = temp1 * 155 / 0x8000 + 100;
colors[1] = temp1 * 155 / 0x8000 + 100;
temp3 = sins(D_80243BD0_A1ECD0 / 0x8000 * (((i / 2) % 3 + 1) << 15) + D_80243BD0_A1ECD0 / 0x4000 * 0x8000 + i) + 0x8000;
colors[2] = colors[0] * temp3 / 0x10000;
}
gSPDisplayList(gMasterGfxPos++, mdl_get_copied_gfx(VTX_COPY_2));
D_80243BD0_A1ECD0 += 0x253;
}
void func_802407E8_A1B8E8(void) {
Vtx* firstVertex;
Vtx* copiedVertices;
s32 numVertices;
s32 i;
mdl_get_copied_vertices(VTX_COPY_0, &firstVertex, &copiedVertices, &numVertices);
for (i = 0; i < numVertices; i++) {
Vtx* vtxDst = &copiedVertices[i];
Vtx* vtxSrc = &firstVertex[i];
s32 v0 = sins(D_80243BD2_A1ECD2 * (i % 3 + 1) + i * 0x2AAA) * 50;
vtxDst->v.ob[1] = vtxSrc->v.ob[1] + v0 / 0x8000;
}
gSPDisplayList(gMasterGfxPos++, mdl_get_copied_gfx(VTX_COPY_0));
D_80243BD2_A1ECD2 += 0xA3;
}
void func_80240928_A1BA28(void) {
f32 scale = ((sins(D_80243BD4_A1ECD4) * (1 / 32768.0f)) * 0.5 * 0.5) + 1.05;
D_80243BD4_A1ECD4 += 409;
guScale(&gDisplayContext->matrixStack[gMatrixListPos], scale, scale, scale);
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++],
G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
}
ApiStatus func_80240A50_A1BB50(Evt* script, s32 isInitialCall) {
script->varTable[0] = gGameStatusPtr->entryID;
return ApiStatus_DONE2;
}

View File

@ -1,4 +0,0 @@
#include "hos_03.h"
#include "common/foliage.inc.c"

View File

@ -1,15 +0,0 @@
#include "hos_03.h"
#define CHUCK_QUIZMO_NPC_ID 7
#include "world/common/enemy/ai/FlyingAI.inc.c"
#include "world/common/atomic/ToadHouse.inc.c"
extern s32 N(Quizmo_Worker);
extern s32 N(Quizmo_AnswerResult);
extern EffectInstance* N(Quizmo_StageEffect);
extern EffectInstance* N(Quizmo_AudienceEffect);
extern EffectInstance* N(Quizmo_VannaTEffect);
#include "world/common/atomic/Quizmo.inc.c"

View File

@ -2,8 +2,35 @@
/// @brief Shooting Star Summit - Star Haven
#include "common.h"
#include "../hos.h"
#include "message_ids.h"
#include "map.h"
#include "../hos.h"
#include "mapfs/hos_03_shape.h"
#include "mapfs/hos_03_hit.h"
#include "sprite/npc/StarMan.h"
#include "sprite/npc/ChuckQuizmo.h"
enum {
NPC_StarMan_01 = 0,
NPC_StarMan_02 = 1,
NPC_StarMan_03 = 2,
NPC_StarMan_04 = 3,
NPC_StarMan_05 = 4,
NPC_StarMan_ToadHouse = 5,
NPC_StarMan_ShopOwner = 6,
NPC_ChuckQuizmo = 7,
};
#define NAMESPACE hos_03
extern EvtScript N(EVS_Main);
extern EvtScript N(EVS_SetupMusic);
extern EvtScript N(EVS_PlayRestingSong);
extern EvtScript N(EVS_SetupAurora);
extern EvtScript N(EVS_SetupRooms);
extern EvtScript N(EVS_SetupShop);
extern EvtScript N(EVS_SetupFoliage);
extern EvtScript N(EVS_MakeEntities);
extern NpcGroupList N(DefaultNPCs);

View File

@ -0,0 +1,23 @@
#include "hos_03.h"
EntryList N(Entrances) = {
[hos_03_ENTRY_0] { -497.0, 0.0, 479.0, 45.0 },
[hos_03_ENTRY_1] { 705.0, 0.0, 0.0, 270.0 },
[hos_03_ENTRY_2] { 0.0, 0.0, 0.0, 0.0 },
[hos_03_ENTRY_3] { 0.0, 0.0, 0.0, 0.0 },
[hos_03_ENTRY_4] { 0.0, 0.0, 0.0, 0.0 },
[hos_03_ENTRY_5] { 0.0, 0.0, 0.0, 0.0 },
[hos_03_ENTRY_6] { 0.0, 0.0, 0.0, 0.0 },
[hos_03_ENTRY_7] { 0.0, 0.0, 0.0, 0.0 },
[hos_03_ENTRY_8] { 0.0, 0.0, 0.0, 0.0 },
[hos_03_ENTRY_9] { 0.0, 0.0, 0.0, 0.0 },
[hos_03_ENTRY_A] { 354.0, 0.0, 294.0, 117.0 },
};
MapSettings N(settings) = {
.main = &N(EVS_Main),
.entryList = &N(Entrances),
.entryCount = ENTRY_COUNT(N(Entrances)),
.background = &gBackgroundImage,
.tattle = { MSG_MapTattle_hos_03 },
};

View File

@ -0,0 +1,13 @@
#include "hos_03.h"
EvtScript N(EVS_SetupMusic) = {
EVT_CALL(SetMusicTrack, 0, SONG_STAR_HAVEN, 0, 8)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_PlayRestingSong) = {
EVT_CALL(SetMusicTrack, 0, SONG_TAKING_REST, 0, 8)
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,83 @@
#include "hos_03.h"
EvtScript N(EVS_ExitWalk_hos_02_1) = EVT_EXIT_WALK(60, hos_03_ENTRY_0, "hos_02", hos_02_ENTRY_1);
EvtScript N(EVS_ExitWalk_hos_04_0) = EVT_EXIT_WALK(60, hos_03_ENTRY_1, "hos_04", hos_04_ENTRY_0);
EvtScript N(EVS_BindExitTriggers) = {
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_hos_02_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilisw, 1, 0)
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_hos_04_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0)
EVT_RETURN
EVT_END
};
#include "world/common/todo/GetFloorCollider.inc.c"
EvtScript N(EVS_ControlUpperVisibility) = {
EVT_LABEL(0)
EVT_CALL(N(GetFloorCollider), LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(COLLIDER_o18)
EVT_GOTO(10)
EVT_CASE_EQ(COLLIDER_o218)
EVT_GOTO(10)
EVT_CASE_EQ(COLLIDER_o224)
EVT_GOTO(10)
EVT_CASE_EQ(COLLIDER_o7)
EVT_GOTO(10)
EVT_CASE_EQ(COLLIDER_o234)
EVT_GOTO(10)
EVT_CASE_EQ(COLLIDER_o235)
EVT_LABEL(10)
EVT_CALL(EnableGroup, MODEL_g50, FALSE)
EVT_CALL(EnableGroup, MODEL_g39, FALSE)
EVT_WAIT(1)
EVT_LABEL(15)
EVT_CALL(N(GetFloorCollider), LVar1)
EVT_IF_EQ(LVar1, -1)
EVT_WAIT(1)
EVT_GOTO(15)
EVT_END_IF
EVT_IF_EQ(LVar0, LVar1)
EVT_WAIT(1)
EVT_GOTO(15)
EVT_END_IF
EVT_CALL(EnableGroup, MODEL_g50, TRUE) // house
EVT_CALL(EnableGroup, MODEL_g39, TRUE) // shop
EVT_END_SWITCH
EVT_WAIT(1)
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_Main) = {
EVT_SET(GB_WorldLocation, LOCATION_STAR_HAVEN)
EVT_CALL(SetSpriteShading, SHADING_NONE)
EVT_SETUP_CAMERA_ALT_NO_LEAD()
EVT_IF_EQ(GB_StoryProgress, STORY_CH8_OPENED_PATH_TO_STAR_WAY)
EVT_SET(GB_StoryProgress, STORY_CH8_REACHED_STAR_HAVEN)
EVT_END_IF
EVT_SET(GF_MAP_StarHaven, TRUE)
EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs)))
EVT_EXEC_WAIT(N(EVS_MakeEntities))
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK)
EVT_CALL(GetLoadType, LVar1)
EVT_IF_EQ(LVar1, LOAD_FROM_FILE_SELECT)
EVT_EXEC(EnterSavePoint)
EVT_EXEC(N(EVS_BindExitTriggers))
EVT_ELSE
EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers)))
EVT_EXEC(EnterWalk)
EVT_WAIT(1)
EVT_END_IF
EVT_EXEC(N(EVS_SetupAurora))
EVT_CALL(UseAdvancedDoorSounds, DOOR_SOUNDS_UNUSED)
EVT_EXEC(N(EVS_SetupMusic))
EVT_CALL(PlaySound, SOUND_80000063)
EVT_EXEC(N(EVS_SetupRooms))
EVT_EXEC(N(EVS_SetupShop))
EVT_EXEC(N(EVS_SetupFoliage))
EVT_EXEC(N(EVS_ControlUpperVisibility))
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,161 @@
#include "hos_03.h"
#include "world/common/atomic/TexturePan.inc.c"
#include "world/common/atomic/TexturePan.data.inc.c"
u16 N(D_80243BCC_A1ECCC) = 0;
u16 N(D_80243BCE_A1ECCE) = 0;
void N(func_8024033C_A1B43C)(void) {
Vtx* firstVertex;
Vtx* copiedVertices;
s32 numVertices;
s32 i;
s32 temp3;
f32 angle = sins(N(D_80243BCC_A1ECCC)) * (1.0f / 32768.0f) * 45.0f;
N(D_80243BCC_A1ECCC) += 0x400;
guRotate(&gDisplayContext->matrixStack[gMatrixListPos], angle, 0.0f, 1.0f, 0.0f);
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
mdl_get_copied_vertices(VTX_COPY_1, &firstVertex, &copiedVertices, &numVertices);
for (i = 0; i < numVertices; i++) {
u8* colors = copiedVertices[i].v.cn;
s16 temp1 = (sins(N(D_80243BCE_A1ECCE) * (i % 3 + 1) + i) + 0x8000) / 2;
colors[0] = temp1 * 155 / 0x8000 + 100;
colors[1] = temp1 * 155 / 0x8000 + 100;
temp3 = sins(N(D_80243BCE_A1ECCE) / 0x8000 * (((i / 2) % 3 + 1) << 15) + N(D_80243BCE_A1ECCE) / 0x4000 * 0x8000 + i) + 0x8000;
colors[2] = colors[0] * temp3 / 0x10000;
}
gSPClearGeometryMode(gMasterGfxPos++, G_CULL_BOTH);
gSPDisplayList(gMasterGfxPos++, mdl_get_copied_gfx(VTX_COPY_1));
N(D_80243BCE_A1ECCE) += 0x666;
}
u16 N(D_80243BD0_A1ECD0) = 0;
void N(func_8024060C_A1B70C)(void) {
Vtx* firstVertex;
Vtx* copiedVertices;
s32 numVertices;
s32 i;
s32 temp3;
mdl_get_copied_vertices(VTX_COPY_2, &firstVertex, &copiedVertices, &numVertices);
for (i = 0; i < numVertices; i++) {
u8* colors = copiedVertices[i].v.cn;
s16 temp1 = (sins(N(D_80243BD0_A1ECD0) * (i % 3 + 1) + i) + 0x8000) / 2;
colors[0] = temp1 * 155 / 0x8000 + 100;
colors[1] = temp1 * 155 / 0x8000 + 100;
temp3 = sins(N(D_80243BD0_A1ECD0) / 0x8000 * (((i / 2) % 3 + 1) << 15) + N(D_80243BD0_A1ECD0) / 0x4000 * 0x8000 + i) + 0x8000;
colors[2] = colors[0] * temp3 / 0x10000;
}
gSPDisplayList(gMasterGfxPos++, mdl_get_copied_gfx(VTX_COPY_2));
N(D_80243BD0_A1ECD0) += (s32)RAD_TO_BINANG(25.1898);
}
u16 N(AuroraPhaseAngle) = 0;
void N(build_gfx_aurora)(void) {
Vtx* firstVertex;
Vtx* copiedVertices;
s32 numVertices;
s32 i;
mdl_get_copied_vertices(VTX_COPY_0, &firstVertex, &copiedVertices, &numVertices);
for (i = 0; i < numVertices; i++) {
Vtx* vtxDst = &copiedVertices[i];
Vtx* vtxSrc = &firstVertex[i];
s32 v0 = sins(N(AuroraPhaseAngle) * (i % 3 + 1) + i * 0x2AAA) * 50;
vtxDst->v.ob[1] = vtxSrc->v.ob[1] + v0 / 0x8000;
}
gSPDisplayList(gMasterGfxPos++, mdl_get_copied_gfx(VTX_COPY_0));
N(AuroraPhaseAngle) += 0xA3;
}
u16 N(HaloScalePhaseAngle) = 0;
void N(build_gfx_lamp_halos)(void) {
f32 scale = ((sins(N(HaloScalePhaseAngle)) * (1.0f / 0x8000)) * 0.5 * 0.5) + 1.05;
N(HaloScalePhaseAngle) += (s32)RAD_TO_BINANG(25.1720);
guScale(&gDisplayContext->matrixStack[gMatrixListPos], scale, scale, scale);
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++],
G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
}
API_CALLABLE(N(func_80240A50_A1BB50)) {
script->varTable[0] = gGameStatusPtr->entryID;
return ApiStatus_DONE2;
}
EvtScript N(EVS_SetupAurora) = {
EVT_THREAD
TEX_PAN_PARAMS_ID(TEX_PANNER_1)
TEX_PAN_PARAMS_STEP( 100, -80, -50, 120)
TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1)
TEX_PAN_PARAMS_INIT( 0, 0, 0, 0)
EVT_EXEC(N(EVS_UpdateTexturePan))
EVT_END_THREAD
EVT_CALL(SetTexPanner, MODEL_o29, TEX_PANNER_1)
EVT_CALL(SetTexPanner, MODEL_o204, TEX_PANNER_1)
EVT_THREAD
TEX_PAN_PARAMS_ID(TEX_PANNER_3)
TEX_PAN_PARAMS_STEP( -300, 500, 0, 0)
TEX_PAN_PARAMS_FREQ( 1, 1, 0, 0)
TEX_PAN_PARAMS_INIT( 0, 0, 0, 0)
EVT_EXEC(N(EVS_UpdateTexturePan))
EVT_END_THREAD
EVT_CALL(SetTexPanner, MODEL_o87, TEX_PANNER_3)
EVT_CALL(SetTexPanner, MODEL_o134, TEX_PANNER_3)
EVT_CALL(SetTexPanner, MODEL_o171, TEX_PANNER_3)
EVT_THREAD
TEX_PAN_PARAMS_ID(TEX_PANNER_4)
TEX_PAN_PARAMS_STEP( 0, -800, 0, 0)
TEX_PAN_PARAMS_FREQ( 0, 1, 0, 0)
TEX_PAN_PARAMS_INIT( 0, 0, 0, 0)
EVT_EXEC(N(EVS_UpdateTexturePan))
EVT_END_THREAD
EVT_CALL(SetTexPanner, MODEL_o90, TEX_PANNER_4)
EVT_CALL(SetTexPanner, MODEL_o135, TEX_PANNER_4)
EVT_CALL(SetTexPanner, MODEL_o172, TEX_PANNER_4)
EVT_THREAD
TEX_PAN_PARAMS_ID(TEX_PANNER_5)
TEX_PAN_PARAMS_STEP( 0,-1500, 0, 0)
TEX_PAN_PARAMS_FREQ( 0, 1, 0, 0)
TEX_PAN_PARAMS_INIT( 0, 0, 0, 0)
EVT_EXEC(N(EVS_UpdateTexturePan))
EVT_END_THREAD
EVT_CALL(SetTexPanner, MODEL_o91, TEX_PANNER_5)
EVT_CALL(SetTexPanner, MODEL_o136, TEX_PANNER_5)
EVT_CALL(SetTexPanner, MODEL_o173, TEX_PANNER_5)
EVT_THREAD
TEX_PAN_PARAMS_ID(TEX_PANNER_6)
TEX_PAN_PARAMS_STEP( 0, 3000, 0, 0)
TEX_PAN_PARAMS_FREQ( 0, 1, 0, 0)
TEX_PAN_PARAMS_INIT( 0, 0, 0, 0)
EVT_EXEC(N(EVS_UpdateTexturePan))
EVT_END_THREAD
EVT_CALL(SetTexPanner, MODEL_o159, TEX_PANNER_6)
EVT_THREAD
TEX_PAN_PARAMS_ID(TEX_PANNER_7)
TEX_PAN_PARAMS_STEP( 0, 4000, 0, 0)
TEX_PAN_PARAMS_FREQ( 0, 1, 0, 0)
TEX_PAN_PARAMS_INIT( 0, 0, 0, 0)
EVT_EXEC(N(EVS_UpdateTexturePan))
EVT_END_THREAD
EVT_CALL(SetTexPanner, MODEL_o160, TEX_PANNER_7)
EVT_CALL(MakeLocalVertexCopy, VTX_COPY_0, MODEL_o76, TRUE)
EVT_CALL(SetCustomGfxBuilders, CUSTOM_GFX_1, EVT_PTR(N(build_gfx_aurora)), 0)
EVT_CALL(SetModelCustomGfx, MODEL_o76, CUSTOM_GFX_1, FOG_MODE_UNCHANGED)
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,121 @@
#include "hos_03.h"
EvtScript N(EVS_SetDoorRot_House) = {
EVT_CALL(RotateGroup, MODEL_g54, LVar0, 0, 1, 0)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_MoveWalls_House) = {
EVT_SET(LVar1, LVar0)
EVT_MULF(LVar1, EVT_FLOAT(-1.0))
EVT_CALL(RotateGroup, MODEL_g71, LVar1, 0, 0, 1)
EVT_SET(LVar1, LVar0)
EVT_MULF(LVar1, EVT_FLOAT(-0.5))
EVT_CALL(RotateGroup, MODEL_g72, LVar1, 0, 1, 0)
EVT_SET(LVar1, LVar0)
EVT_MULF(LVar1, EVT_FLOAT(0.5))
EVT_CALL(RotateGroup, MODEL_g73, LVar1, 0, 1, 0)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_DropDoor_House) = {
EVT_CALL(RotateGroup, MODEL_g54, LVar0, 1, 0, 0)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_SetDoorRot_Shop) = {
EVT_CALL(RotateGroup, MODEL_g42, LVar0, 0, 1, 0)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_MoveWalls_Shop) = {
EVT_SET(LVar1, LVar0)
EVT_MULF(LVar1, EVT_FLOAT(-1.0))
EVT_CALL(RotateGroup, MODEL_g64, LVar1, 0, 0, 1)
EVT_SET(LVar1, LVar0)
EVT_MULF(LVar1, EVT_FLOAT(-0.5))
EVT_CALL(RotateGroup, MODEL_g65, LVar1, 0, 1, 0)
EVT_SET(LVar1, LVar0)
EVT_MULF(LVar1, EVT_FLOAT(0.5))
EVT_CALL(RotateGroup, MODEL_g66, LVar1, 0, 1, 0)
EVT_RETURN
EVT_END
};
s32 N(InteriorNPCs_Shop)[] = {
NPC_StarMan_ShopOwner,
-1
};
EvtScript N(EVS_SetDoorRot_ToadHouse) = {
EVT_CALL(RotateGroup, MODEL_g33, LVar0, 0, 1, 0)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_MoveWalls_ToadHouse) = {
EVT_SET(LVar1, LVar0)
EVT_MULF(LVar1, EVT_FLOAT(-1.0))
EVT_CALL(RotateGroup, MODEL_g58, LVar1, 0, 0, 1)
EVT_SET(LVar1, LVar0)
EVT_MULF(LVar1, EVT_FLOAT(-0.5))
EVT_CALL(RotateGroup, MODEL_g55, LVar1, 0, 1, 0)
EVT_SET(LVar1, LVar0)
EVT_MULF(LVar1, EVT_FLOAT(0.5))
EVT_CALL(RotateGroup, MODEL_g56, LVar1, 0, 1, 0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(90)
EVT_CALL(EnableModel, MODEL_o177, FALSE)
EVT_CASE_DEFAULT
EVT_CALL(EnableModel, MODEL_o177, TRUE)
EVT_END_SWITCH
EVT_RETURN
EVT_END
};
s32 N(InteriorNPCs_ToadHouse)[] = {
NPC_StarMan_ToadHouse,
-1
};
EvtScript N(EVS_SetupRooms) = {
// house
EVT_CALL(MakeDoorAdvanced,
VIS_GROUP_PAIR(VIS_GROUP_0, VIS_GROUP_0),
EVT_PTR(N(EVS_SetDoorRot_House)),
EVT_PTR(N(EVS_MoveWalls_House)),
EVT_PTR(N(EVS_DropDoor_House)),
NULL,
COLLIDER_o99,
COLLIDER_o184,
MODEL_o76,
NULL)
// shop
EVT_CALL(MakeDoorAdvanced,
VIS_GROUP_PAIR(VIS_GROUP_0, VIS_GROUP_0),
EVT_PTR(N(EVS_SetDoorRot_Shop)),
EVT_PTR(N(EVS_MoveWalls_Shop)),
NULL,
NULL,
COLLIDER_o72,
COLLIDER_o185,
MODEL_o76,
EVT_PTR(N(InteriorNPCs_Shop)))
// toad house
EVT_CALL(MakeDoorAdvanced,
VIS_GROUP_PAIR(VIS_GROUP_0, VIS_GROUP_0),
EVT_PTR(N(EVS_SetDoorRot_ToadHouse)),
EVT_PTR(N(EVS_MoveWalls_ToadHouse)),
NULL,
NULL,
COLLIDER_o100,
COLLIDER_o186,
MODEL_o76,
EVT_PTR(N(InteriorNPCs_ToadHouse)))
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,161 @@
#include "hos_03.h"
#include "effects.h"
#include "common/foliage.inc.c"
EvtScript N(EVS_ShakeTree_StarHaven) = {
EVT_SET_TIMESCALE(EVT_FLOAT(2.0))
EVT_USE_BUF(LVar0)
EVT_BUF_READ4(LVar1, LVar2, LVar3, LVar4)
EVT_BUF_READ1(LVar5)
EVT_CALL(GetPlayerPos, LVar6, LVarF, LVar8)
EVT_CALL(PlaySoundAtPlayer, SOUND_SMASH_GOOMNUT_TREE, 0)
EVT_CALL(PlaySoundAtPlayer, SOUND_SHAKE_TREE, 0)
EVT_THREAD
EVT_IF_NE(LVar1, 0)
EVT_WAIT(1)
EVT_LOOP(5)
EVT_USE_BUF(LVar1)
EVT_BUF_READ1(LVar2)
EVT_LOOP(LVar2)
EVT_BUF_READ1(LVar3)
EVT_CALL(N(TransformFoliage), LVar3, EVT_FLOAT(0.1), EVT_FLOAT(0.2), LVarF, 0)
EVT_END_LOOP
EVT_WAIT(1)
EVT_USE_BUF(LVar1)
EVT_BUF_READ1(LVar2)
EVT_LOOP(LVar2)
EVT_BUF_READ1(LVar3)
EVT_CALL(N(TransformFoliage), LVar3, EVT_FLOAT(0.1), EVT_FLOAT(-0.2), LVarF, 0)
EVT_END_LOOP
EVT_WAIT(1)
EVT_END_LOOP
EVT_USE_BUF(LVar1)
EVT_BUF_READ1(LVar2)
EVT_LOOP(LVar2)
EVT_BUF_READ1(LVar3)
EVT_CALL(TranslateModel, LVar3, 0, 0, 0)
EVT_END_LOOP
EVT_WAIT(1)
EVT_END_IF
EVT_END_THREAD
EVT_THREAD
EVT_IF_NE(LVar2, 0)
EVT_LOOP(5)
EVT_USE_BUF(LVar2)
EVT_BUF_READ1(LVar3)
EVT_LOOP(LVar3)
EVT_BUF_READ1(LVar4)
EVT_CALL(N(TransformFoliage), LVar4, EVT_FLOAT(0.1), EVT_FLOAT(0.2), LVarF, 0)
EVT_END_LOOP
EVT_WAIT(1)
EVT_USE_BUF(LVar2)
EVT_BUF_READ1(LVar3)
EVT_LOOP(LVar3)
EVT_BUF_READ1(LVar4)
EVT_CALL(N(TransformFoliage), LVar4, EVT_FLOAT(0.1), EVT_FLOAT(-0.2), LVarF, 0)
EVT_END_LOOP
EVT_WAIT(1)
EVT_END_LOOP
EVT_USE_BUF(LVar2)
EVT_BUF_READ1(LVar3)
EVT_LOOP(LVar3)
EVT_BUF_READ1(LVar4)
EVT_CALL(TranslateModel, LVar4, 0, 0, 0)
EVT_END_LOOP
EVT_WAIT(1)
EVT_END_IF
EVT_END_THREAD
EVT_THREAD
EVT_IF_NE(LVar3, 0)
EVT_USE_BUF(LVar3)
EVT_BUF_READ1(LVar4)
EVT_LOOP(LVar4)
EVT_BUF_READ1(LVar5)
EVT_BUF_READ3(LVar6, LVar7, LVar8)
EVT_BUF_READ3(LVar9, LVarA, LVarB)
EVT_IF_EQ(LVarB, 0)
EVT_CALL(DropItemEntity, LVar5, LVar6, LVar7, LVar8, LVar9, LVarA)
EVT_ELSE
EVT_CALL(GetValueByRef, LVarB, LVarC)
EVT_IF_EQ(LVarC, 0)
EVT_CALL(SetValueByRef, LVarB, 1)
EVT_CALL(DropItemEntity, LVar5, LVar6, LVar7, LVar8, LVar9, LVarA)
EVT_END_IF
EVT_END_IF
EVT_END_LOOP
EVT_END_IF
EVT_END_THREAD
EVT_THREAD
EVT_IF_NE(LVar4, 0)
EVT_USE_BUF(LVar4)
EVT_BUF_READ1(LVar5)
EVT_LOOP(LVar5)
EVT_BUF_READ3(LVar6, LVar7, LVar8)
EVT_PLAY_EFFECT(EFFECT_SPARKLES, 2, LVar6, LVar7, LVar8, 50)
EVT_PLAY_EFFECT(EFFECT_SPARKLES, 2, LVar6, LVar7, LVar8, 50)
EVT_END_LOOP
EVT_END_IF
EVT_END_THREAD
EVT_IF_NE(LVar5, 0)
EVT_EXEC_WAIT(LVar5)
EVT_END_IF
EVT_WAIT(15)
EVT_RETURN
EVT_END
};
FoliageModelList N(Tree1_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o37, MODEL_o38, MODEL_o39);
FoliageModelList N(Tree1_TrunkModels) = FOLIAGE_MODEL_LIST(MODEL_o32, MODEL_o35, MODEL_o36);
FoliageVectorList N(Tree1_Effects) = {
.count = 2,
.vectors = {
{ -669.0f, 60.0f, 296.0f },
{ -584.0f, 60.0f, 286.0f },
}
};
ShakeTreeConfig N(ShakeTree_Tree1) = {
.leaves = &N(Tree1_LeafModels),
.trunk = &N(Tree1_TrunkModels),
.vectors = &N(Tree1_Effects),
};
BombTrigger N(BombPos_Tree1) = {
.pos = { -629.0f, 35.0f, 296.0f },
.radius = 0.0f
};
FoliageModelList N(Tree2_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o43, MODEL_o44, MODEL_o45);
FoliageModelList N(Tree2_TrunkModels) = FOLIAGE_MODEL_LIST(MODEL_o40, MODEL_o41, MODEL_o42);
FoliageVectorList N(Tree2_Effects) = {
.count = 2,
.vectors = {
{ -528.0f, 60.0f, 324.0f },
{ -443.0f, 60.0f, 314.0f },
}
};
ShakeTreeConfig N(ShakeTree_Tree2) = {
.leaves = &N(Tree2_LeafModels),
.trunk = &N(Tree2_TrunkModels),
.vectors = &N(Tree2_Effects),
};
BombTrigger N(BombPos_Tree2) = {
.pos = { -488.0f, 35.0f, 324.0f },
.radius = 0.0f
};
EvtScript N(EVS_SetupFoliage) = {
EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree1)))
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree_StarHaven)), TRIGGER_WALL_HAMMER, COLLIDER_o35, 1, 0)
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree_StarHaven)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree1)), 1, 0)
EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree2)))
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree_StarHaven)), TRIGGER_WALL_HAMMER, COLLIDER_o32, 1, 0)
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree_StarHaven)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree2)), 1, 0)
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,265 @@
#include "hos_03.h"
#include "world/common/npc/StarSpirit.inc.c"
#include "world/common/npc/StarSpirit_Wander.inc.c"
#include "world/common/complete/ToadHouseBlanketAnim.inc.c"
#include "world/common/atomic/ToadHouse.inc.c"
#include "world/common/atomic/ToadHouseHos.data.inc.c"
#define CHUCK_QUIZMO_NPC_ID NPC_ChuckQuizmo
#include "world/common/complete/Quizmo.inc.c"
EvtScript N(EVS_NpcInteract_StarKid_01) = {
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_StarMan_Talk, ANIM_StarMan_Idle, 0, MSG_HOS_005F)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_StarKid_01) = {
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_StarKid_01)))
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInteract_StarKid_02) = {
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_StarMan_Talk, ANIM_StarMan_Idle, 0, MSG_HOS_0060)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_StarKid_02) = {
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_StarKid_02)))
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInteract_StarKid_03) = {
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_StarMan_Talk, ANIM_StarMan_Idle, 0, MSG_HOS_0061)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_StarKid_03) = {
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_StarKid_03)))
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInteract_StarKid_04) = {
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_StarMan_Talk, ANIM_StarMan_Idle, 0, MSG_HOS_0062)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_StarKid_04) = {
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_StarKid_04)))
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInteract_StarKid_05) = {
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_StarMan_Talk, ANIM_StarMan_Idle, 0, MSG_HOS_0063)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_StarKid_05) = {
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_StarKid_05)))
EVT_RETURN
EVT_END
};
EvtScript N(EVS_ToadHouse_GetInBed) = {
EVT_EXEC(N(EVS_PlayRestingSong))
EVT_THREAD
EVT_WAIT(20)
EVT_CALL(N(ToadHouse_CamSetFOV), 0, 40)
EVT_CALL(SetCamType, CAM_DEFAULT, 4, FALSE)
EVT_CALL(SetCamPitch, CAM_DEFAULT, 34, -8)
EVT_CALL(SetCamDistance, CAM_DEFAULT, 220)
EVT_CALL(SetCamPosA, CAM_DEFAULT, EVT_FLOAT(448.0), EVT_FLOAT(180.0))
EVT_CALL(SetCamPosB, CAM_DEFAULT, EVT_FLOAT(410.0), EVT_FLOAT(150.0))
EVT_CALL(SetCamPosC, CAM_DEFAULT, 0, 25)
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0))
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
EVT_END_THREAD
EVT_CALL(func_802D1270, 442, 140, EVT_FLOAT(3.0))
EVT_CALL(InterpPlayerYaw, 191, 1)
EVT_WAIT(5)
EVT_CALL(InterpPlayerYaw, 204, 1)
EVT_CALL(HidePlayerShadow, TRUE)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_10002)
EVT_CALL(func_802D286C, 0x800)
EVT_CALL(func_802D2520, ANIM_Mario_10002, 5, 7, 1, 1, 0)
EVT_WAIT(61)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_8001D)
EVT_THREAD
EVT_WAIT(70)
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2)
EVT_WAIT(1)
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0)
EVT_END_THREAD
EVT_RETURN
EVT_END
};
EvtScript N(EVS_ToadHouse_ReturnFromRest) = {
EVT_EXEC(N(EVS_SetupMusic))
EVT_CALL(N(ToadHouse_CamSetFOV), 0, 25)
EVT_CALL(func_802D2520, ANIM_Mario_10002, 0, 0, 0, 0, 0)
EVT_CALL(SetPlayerPos, 445, 25, 185)
EVT_CALL(PlayerMoveTo, 440, 215, 20)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_ToadHouse_SetDialogue) = {
EVT_SET(LVar0, MSG_HOS_0064)
EVT_SET(LVar8, MSG_HOS_0065)
EVT_SET(LVar1, MSG_HOS_0066)
EVT_SET(LVar2, MSG_HOS_0067)
EVT_SET(LVar3, MSG_HOS_0068)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_ToadHouseKeeper) = {
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_ToadHouseKeeper)))
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInteract_ShopOwner) = {
EVT_EXEC_WAIT(ItemShopInteract)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_ShopOwner) = {
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_ShopOwner)))
EVT_RETURN
EVT_END
};
StaticNpc N(NpcData_StarKid_01)[] = {
{
.id = NPC_StarMan_01,
.settings = &N(NpcSettings_StarMan),
.pos = { -463.0f, 10.0f, 400.0f },
.yaw = 270,
.flags = ENEMY_FLAG_1 | ENEMY_FLAG_8 | ENEMY_FLAG_100 | ENEMY_FLAG_400 | ENEMY_FLAG_800,
.init = &N(EVS_NpcInit_StarKid_01),
.drops = STAR_MAN_DROPS,
.animations = STAR_MAN_ANIMS,
.tattle = MSG_NpcTattle_HOS_StarKidA,
},
{
.id = NPC_StarMan_02,
.settings = &N(NpcSettings_StarMan),
.pos = { -325.0f, 10.0f, 600.0f },
.yaw = 270,
.flags = ENEMY_FLAG_1 | ENEMY_FLAG_8 | ENEMY_FLAG_100 | ENEMY_FLAG_400 | ENEMY_FLAG_800,
.init = &N(EVS_NpcInit_StarKid_02),
.drops = STAR_MAN_DROPS,
.animations = STAR_MAN_ANIMS,
.tattle = MSG_NpcTattle_HOS_StarKidB,
},
{
.id = NPC_StarMan_03,
.settings = &N(NpcSettings_StarMan_Wander),
.pos = { 0.0f, 10.0f, 300.0f },
.yaw = 270,
.flags = ENEMY_FLAG_1 | ENEMY_FLAG_8 | ENEMY_FLAG_100 | ENEMY_FLAG_400 | ENEMY_FLAG_800,
.init = &N(EVS_NpcInit_StarKid_03),
.drops = STAR_MAN_DROPS,
.territory = {
.wander = {
.isFlying = TRUE,
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
.wanderShape = SHAPE_CYLINDER,
.centerPos = { 0, 10, 300 },
.wanderSize = { 30 },
.detectShape = SHAPE_CYLINDER,
.detectPos = { 0, 10, 300 },
.detectSize = { 30 },
}
},
.animations = STAR_MAN_ANIMS,
.tattle = MSG_NpcTattle_HOS_StarKidC,
},
{
.id = NPC_StarMan_04,
.settings = &N(NpcSettings_StarMan_Wander),
.pos = { 250.0f, 10.0f, 500.0f },
.yaw = 270,
.flags = ENEMY_FLAG_1 | ENEMY_FLAG_8 | ENEMY_FLAG_100 | ENEMY_FLAG_400 | ENEMY_FLAG_800,
.init = &N(EVS_NpcInit_StarKid_04),
.drops = STAR_MAN_DROPS,
.territory = {
.wander = {
.isFlying = TRUE,
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
.wanderShape = SHAPE_CYLINDER,
.centerPos = { 250, 10, 500 },
.wanderSize = { 30 },
.detectShape = SHAPE_CYLINDER,
.detectPos = { 250, 10, 500 },
.detectSize = { 30 },
}
},
.animations = STAR_MAN_ANIMS,
.tattle = MSG_NpcTattle_HOS_StarKidD,
},
{
.id = NPC_StarMan_05,
.settings = &N(NpcSettings_StarMan),
.pos = { -485.0f, 335.0f, -100.0f },
.yaw = 270,
.flags = ENEMY_FLAG_1 | ENEMY_FLAG_8 | ENEMY_FLAG_100 | ENEMY_FLAG_400 | ENEMY_FLAG_800,
.init = &N(EVS_NpcInit_StarKid_05),
.drops = STAR_MAN_DROPS,
.animations = STAR_MAN_ANIMS,
.tattle = MSG_NpcTattle_HOS_StarKidE,
},
{
.id = NPC_StarMan_ToadHouse,
.settings = &N(NpcSettings_StarMan),
.pos = { 458.0f, 35.0f, 233.0f },
.yaw = 270,
.flags = ENEMY_FLAG_1 | ENEMY_FLAG_8 | ENEMY_FLAG_100 | ENEMY_FLAG_400 | ENEMY_FLAG_800,
.init = &N(EVS_NpcInit_ToadHouseKeeper),
.drops = STAR_MAN_DROPS,
.animations = STAR_MAN_ANIMS,
.tattle = MSG_NpcTattle_HOS_ToadHouseStarKid,
},
{
.id = NPC_StarMan_ShopOwner,
.settings = &N(NpcSettings_StarMan),
.pos = { 140.0f, 285.0f, -315.0f },
.yaw = 270,
.flags = ENEMY_FLAG_1 | ENEMY_FLAG_8 | ENEMY_FLAG_100 | ENEMY_FLAG_400 | ENEMY_FLAG_800,
.init = &N(EVS_NpcInit_ShopOwner),
.drops = STAR_MAN_DROPS,
.animations = STAR_MAN_ANIMS,
.tattle = MSG_NpcTattle_HOS_ShopOwner,
},
{
.id = NPC_ChuckQuizmo,
.settings = &N(NpcSettings_ChuckQuizmo),
.pos = { -200.0f, 0.0f, 400.0f },
.yaw = 90,
.flags = ENEMY_FLAG_1 | ENEMY_FLAG_8 | ENEMY_FLAG_100 | ENEMY_FLAG_400 | ENEMY_FLAG_800 | ENEMY_FLAG_2000,
.initVarCount = 1,
.initVar = { .bytes = { 0, QUIZ_AREA_HOS, QUIZ_COUNT_HOS, QUIZ_MAP_HOS_03 }},
.drops = QUIZMO_DROPS,
.animations = QUIZMO_ANIMS,
.tattle = MSG_NpcTattle_ChuckQuizmo,
},
};
NpcGroupList N(DefaultNPCs) = {
NPC_GROUP(N(NpcData_StarKid_01)),
{}
};

View File

@ -0,0 +1,86 @@
#include "hos_03.h"
s32 N(ShopMessages)[] = {
[SHOP_MSG_BUY_CONFIRM ] MSG_Shop_00_HOS03,
[SHOP_MSG_NOT_ENOUGH_COINS ] MSG_Shop_01_HOS03,
[SHOP_MSG_NOT_ENOUGH_ROOM ] MSG_Shop_02_HOS03,
[SHOP_MSG_BUY_THANK_YOU ] MSG_Shop_03_HOS03,
[SHOP_MSG_GREETING ] MSG_Shop_04_HOS03,
[SHOP_MSG_INSTRUCTIONS ] MSG_Shop_05_HOS03,
[SHOP_MSG_NOTHING_TO_SELL ] MSG_Shop_06_HOS03,
[SHOP_MSG_SELL_WHICH ] MSG_Shop_07_HOS03,
[SHOP_MSG_SELL_CONFIRM ] MSG_Shop_08_HOS03,
[SHOP_MSG_SELL_CANCEL ] MSG_Shop_09_HOS03,
[SHOP_MSG_SELL_MORE ] MSG_Shop_0A_HOS03,
[SHOP_MSG_SELL_THANKS ] MSG_Shop_0B_HOS03,
[SHOP_MSG_NOTHING_TO_CHECK ] MSG_Shop_0C_HOS03,
[SHOP_MSG_NO_CHECK_ROOM ] MSG_Shop_0D_HOS03,
[SHOP_MSG_CHECK_WHICH ] MSG_Shop_0E_HOS03,
[SHOP_MSG_CHECK_ACCEPTED ] MSG_Shop_0F_HOS03,
[SHOP_MSG_CHECK_MORE ] MSG_Shop_10_HOS03,
[SHOP_MSG_NOTHING_TO_CLAIM ] MSG_Shop_11_HOS03,
[SHOP_MSG_NO_CLAIM_ROOM ] MSG_Shop_12_HOS03,
[SHOP_MSG_CLAIM_WHICH ] MSG_Shop_13_HOS03,
[SHOP_MSG_CLAIM_ACCEPTED ] MSG_Shop_14_HOS03,
[SHOP_MSG_CLAIM_MORE ] MSG_Shop_15_HOS03,
[SHOP_MSG_FAREWELL ] MSG_Shop_16_HOS03,
};
ShopItemData N(Inventory)[] = {
{ .itemID = ITEM_STOP_WATCH, .price = 15, .descMsg = MSG_ItemShopDesc_StopWatch },
{ .itemID = ITEM_SHOOTING_STAR, .price = 15, .descMsg = MSG_ItemShopDesc_ShootingStar },
{ .itemID = ITEM_SUPER_SODA, .price = 3, .descMsg = MSG_ItemShopDesc_SuperSoda },
{ .itemID = ITEM_MAPLE_SYRUP, .price = 10, .descMsg = MSG_ItemShopDesc_MapleSyrup },
{ .itemID = ITEM_LIFE_SHROOM, .price = 25, .descMsg = MSG_ItemShopDesc_LifeShroom },
{ .itemID = ITEM_SUPER_SHROOM, .price = 10, .descMsg = MSG_ItemShopDesc_SuperShroom },
{},
};
ShopSellPriceData N(PriceList)[] = {
{ .itemID = ITEM_DRIED_PASTA, .sellPrice = 7 },
{ .itemID = ITEM_THUNDER_RAGE, .sellPrice = 15 },
{ .itemID = ITEM_SHOOTING_STAR, .sellPrice = 14 },
{ .itemID = ITEM_HONEY_SHROOM, .sellPrice = 15 },
{ .itemID = ITEM_SLEEPY_SHEEP, .sellPrice = 10 },
{ .itemID = ITEM_CAKE, .sellPrice = 15 },
{ .itemID = ITEM_STOP_WATCH, .sellPrice = 14 },
{ .itemID = ITEM_KOOPASTA, .sellPrice = 15 },
{ .itemID = ITEM_SHROOM_CAKE, .sellPrice = 30 },
{ .itemID = ITEM_SWEET_SHROOM, .sellPrice = 70 },
{},
};
EvtScript N(EVS_OnBuy) = {
EVT_SWITCH(LVar0)
EVT_CASE_EQ(SHOP_BUY_RESULT_CANCEL)
EVT_CASE_EQ(SHOP_BUY_RESULT_4)
EVT_CASE_EQ(SHOP_BUY_RESULT_OK)
EVT_CASE_EQ(SHOP_BUY_RESULT_2)
EVT_END_SWITCH
EVT_RETURN
EVT_END
};
ShopItemLocation N(ItemPositions)[] = {
{ .posModelID = MODEL_o121, .triggerColliderID = COLLIDER_o203 },
{ .posModelID = MODEL_o122, .triggerColliderID = COLLIDER_o204 },
{ .posModelID = MODEL_o123, .triggerColliderID = COLLIDER_o205 },
{ .posModelID = MODEL_o124, .triggerColliderID = COLLIDER_o206 },
{ .posModelID = MODEL_o125, .triggerColliderID = COLLIDER_o207 },
{ .posModelID = MODEL_o126, .triggerColliderID = COLLIDER_o208 },
};
ShopOwner N(Owner) = {
.npcID = NPC_StarMan_ShopOwner,
.idleAnim = ANIM_StarMan_Idle,
.talkAnim = ANIM_StarMan_Talk,
.onBuyEvt = &N(EVS_OnBuy),
.shopMsgIDs = N(ShopMessages),
};
EvtScript N(EVS_SetupShop) = {
EVT_CALL(MakeShop, EVT_PTR(N(ItemPositions)), EVT_PTR(N(Inventory)), EVT_PTR(N(PriceList)), 0)
EVT_CALL(MakeShopOwner, EVT_PTR(N(Owner)))
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,9 @@
#include "hos_03.h"
#include "entity.h"
EvtScript N(EVS_MakeEntities) = {
EVT_CALL(MakeEntity, EVT_PTR(Entity_SavePoint), 200, 60, 275, 0, MAKE_ENTITY_END)
EVT_CALL(SetEntityCullMode, 3)
EVT_RETURN
EVT_END
};

View File

@ -233,10 +233,6 @@ EvtScript N(EVS_SetupRooms) = {
EVT_END
};
extern EvtScript N(EVS_ToadHouse_SetDialogue);
extern EvtScript N(EVS_ToadHouse_GetInBed);
extern EvtScript N(EVS_ToadHouse_ReturnFromRest);
#include "world/common/complete/ToadHouseBlanketAnim.inc.c"
#include "world/common/atomic/ToadHouse.inc.c"
#include "world/common/atomic/ToadHouse.data.inc.c"

View File

@ -1,9 +1,7 @@
#include "kmr_05.h"
#include "world/common/enemy/complete/Goomba_Wander.inc.c"
#include "world/common/enemy/complete/Paragoomba_Wander.inc.c"
#include "world/common/enemy/complete/SpikedGoomba_Wander.inc.c"
EvtScript N(EVS_GoompaRemark) = {

View File

@ -1,9 +1,5 @@
#include "kmr_20.h"
extern EvtScript N(EVS_ToadHouse_SetDialogue);
extern EvtScript N(EVS_ToadHouse_GetInBed);
extern EvtScript N(EVS_ToadHouse_ReturnFromRest);
#include "world/common/complete/ToadHouseBlanketAnim.inc.c"
#include "world/common/atomic/ToadHouse.inc.c"
#include "world/common/atomic/ToadHouse.data.inc.c"

View File

@ -4,10 +4,6 @@
#include "world/common/npc/Dryite_Stationary.inc.c"
#include "world/common/enemy/complete/Koopatrol_Patrol.inc.c"
extern EvtScript N(EVS_ToadHouse_SetDialogue);
extern EvtScript N(EVS_ToadHouse_GetInBed);
extern EvtScript N(EVS_ToadHouse_ReturnFromRest);
#include "world/common/complete/ToadHouseBlanketAnim.inc.c"
#include "world/common/atomic/ToadHouse.inc.c"
#include "world/common/atomic/ToadHouse.data.inc.c"

View File

@ -5,10 +5,6 @@
#include "world/common/enemy/complete/Koopatrol_Patrol.inc.c"
extern EvtScript N(EVS_ToadHouse_SetDialogue);
extern EvtScript N(EVS_ToadHouse_GetInBed);
extern EvtScript N(EVS_ToadHouse_ReturnFromRest);
#include "world/common/complete/ToadHouseBlanketAnim.inc.c"
#include "world/common/atomic/ToadHouse.inc.c"
#include "world/common/atomic/ToadHouse.data.inc.c"

View File

@ -1,29 +1,29 @@
#include "kpa_96.h"
s32 N(ShopMessages)[] = {
MSG_Shop_00BC,
MSG_Shop_00BD,
MSG_Shop_00BE,
MSG_Shop_00BF,
MSG_Shop_00C0,
MSG_Shop_00C1,
MSG_Shop_00C2,
MSG_Shop_00C3,
MSG_Shop_00C4,
MSG_Shop_00C5,
MSG_Shop_00C6,
MSG_Shop_00C7,
MSG_Shop_00C8,
MSG_Shop_00C9,
MSG_Shop_00CA,
MSG_Shop_00CB,
MSG_Shop_00CC,
MSG_Shop_00CD,
MSG_Shop_00CE,
MSG_Shop_00CF,
MSG_Shop_00D0,
MSG_Shop_00D1,
MSG_Shop_00D2,
[SHOP_MSG_BUY_CONFIRM ] MSG_Shop_00_KPA96,
[SHOP_MSG_NOT_ENOUGH_COINS ] MSG_Shop_01_KPA96,
[SHOP_MSG_NOT_ENOUGH_ROOM ] MSG_Shop_02_KPA96,
[SHOP_MSG_BUY_THANK_YOU ] MSG_Shop_03_KPA96,
[SHOP_MSG_GREETING ] MSG_Shop_04_KPA96,
[SHOP_MSG_INSTRUCTIONS ] MSG_Shop_05_KPA96,
[SHOP_MSG_NOTHING_TO_SELL ] MSG_Shop_06_KPA96,
[SHOP_MSG_SELL_WHICH ] MSG_Shop_07_KPA96,
[SHOP_MSG_SELL_CONFIRM ] MSG_Shop_08_KPA96,
[SHOP_MSG_SELL_CANCEL ] MSG_Shop_09_KPA96,
[SHOP_MSG_SELL_MORE ] MSG_Shop_0A_KPA96,
[SHOP_MSG_SELL_THANKS ] MSG_Shop_0B_KPA96,
[SHOP_MSG_NOTHING_TO_CHECK ] MSG_Shop_0C_KPA96,
[SHOP_MSG_NO_CHECK_ROOM ] MSG_Shop_0D_KPA96,
[SHOP_MSG_CHECK_WHICH ] MSG_Shop_0E_KPA96,
[SHOP_MSG_CHECK_ACCEPTED ] MSG_Shop_0F_KPA96,
[SHOP_MSG_CHECK_MORE ] MSG_Shop_10_KPA96,
[SHOP_MSG_NOTHING_TO_CLAIM ] MSG_Shop_11_KPA96,
[SHOP_MSG_NO_CLAIM_ROOM ] MSG_Shop_12_KPA96,
[SHOP_MSG_CLAIM_WHICH ] MSG_Shop_13_KPA96,
[SHOP_MSG_CLAIM_ACCEPTED ] MSG_Shop_14_KPA96,
[SHOP_MSG_CLAIM_MORE ] MSG_Shop_15_KPA96,
[SHOP_MSG_FAREWELL ] MSG_Shop_16_KPA96,
};
ShopItemData N(Inventory)[] = {
@ -50,10 +50,10 @@ ShopSellPriceData N(PriceList)[] = {
EvtScript N(EVS_OnBuy) = {
EVT_SWITCH(LVar0)
EVT_CASE_EQ(3)
EVT_CASE_EQ(4)
EVT_CASE_EQ(1)
EVT_CASE_EQ(1)
EVT_CASE_EQ(SHOP_BUY_RESULT_CANCEL)
EVT_CASE_EQ(SHOP_BUY_RESULT_4)
EVT_CASE_EQ(SHOP_BUY_RESULT_OK)
EVT_CASE_EQ(SHOP_BUY_RESULT_OK) //@bug duplicate case
EVT_END_SWITCH
EVT_RETURN
EVT_END

View File

@ -1,29 +1,29 @@
#include "mac_00.h"
s32 N(ShopMessages)[] = {
MSG_Shop_0000,
MSG_Shop_0001,
MSG_Shop_0002,
MSG_Shop_0003,
MSG_Shop_0004,
MSG_Shop_0005,
MSG_Shop_0006,
MSG_Shop_0007,
MSG_Shop_0008,
MSG_Shop_0009,
MSG_Shop_000A,
MSG_Shop_000B,
MSG_Shop_000C,
MSG_Shop_000D,
MSG_Shop_000E,
MSG_Shop_000F,
MSG_Shop_0010,
MSG_Shop_0011,
MSG_Shop_0012,
MSG_Shop_0013,
MSG_Shop_0014,
MSG_Shop_0015,
MSG_Shop_0016,
[SHOP_MSG_BUY_CONFIRM ] MSG_Shop_00_MAC00,
[SHOP_MSG_NOT_ENOUGH_COINS ] MSG_Shop_01_MAC00,
[SHOP_MSG_NOT_ENOUGH_ROOM ] MSG_Shop_02_MAC00,
[SHOP_MSG_BUY_THANK_YOU ] MSG_Shop_03_MAC00,
[SHOP_MSG_GREETING ] MSG_Shop_04_MAC00,
[SHOP_MSG_INSTRUCTIONS ] MSG_Shop_05_MAC00,
[SHOP_MSG_NOTHING_TO_SELL ] MSG_Shop_06_MAC00,
[SHOP_MSG_SELL_WHICH ] MSG_Shop_07_MAC00,
[SHOP_MSG_SELL_CONFIRM ] MSG_Shop_08_MAC00,
[SHOP_MSG_SELL_CANCEL ] MSG_Shop_09_MAC00,
[SHOP_MSG_SELL_MORE ] MSG_Shop_0A_MAC00,
[SHOP_MSG_SELL_THANKS ] MSG_Shop_0B_MAC00,
[SHOP_MSG_NOTHING_TO_CHECK ] MSG_Shop_0C_MAC00,
[SHOP_MSG_NO_CHECK_ROOM ] MSG_Shop_0D_MAC00,
[SHOP_MSG_CHECK_WHICH ] MSG_Shop_0E_MAC00,
[SHOP_MSG_CHECK_ACCEPTED ] MSG_Shop_0F_MAC00,
[SHOP_MSG_CHECK_MORE ] MSG_Shop_10_MAC00,
[SHOP_MSG_NOTHING_TO_CLAIM ] MSG_Shop_11_MAC00,
[SHOP_MSG_NO_CLAIM_ROOM ] MSG_Shop_12_MAC00,
[SHOP_MSG_CLAIM_WHICH ] MSG_Shop_13_MAC00,
[SHOP_MSG_CLAIM_ACCEPTED ] MSG_Shop_14_MAC00,
[SHOP_MSG_CLAIM_MORE ] MSG_Shop_15_MAC00,
[SHOP_MSG_FAREWELL ] MSG_Shop_16_MAC00,
};
ShopItemData N(Inventory)[] = {
@ -49,10 +49,10 @@ ShopSellPriceData N(PriceList)[] = {
EvtScript N(EVS_OnBuy) = {
EVT_SWITCH(LVar0)
EVT_CASE_EQ(3)
EVT_CASE_EQ(4)
EVT_CASE_EQ(1)
EVT_CASE_EQ(2)
EVT_CASE_EQ(SHOP_BUY_RESULT_CANCEL)
EVT_CASE_EQ(SHOP_BUY_RESULT_4)
EVT_CASE_EQ(SHOP_BUY_RESULT_OK)
EVT_CASE_EQ(SHOP_BUY_RESULT_2)
EVT_END_SWITCH
EVT_RETURN
EVT_END

View File

@ -92,29 +92,29 @@ API_CALLABLE(N(CreateShopInventory)) {
}
s32 N(ShopMessages)[] = {
MSG_Shop_0017,
MSG_Shop_0018,
MSG_Shop_0002,
MSG_Shop_0019,
MSG_Shop_0004,
MSG_Shop_0005,
MSG_Shop_0006,
MSG_Shop_0007,
MSG_Shop_0008,
MSG_Shop_0009,
MSG_Shop_000A,
MSG_Shop_000B,
MSG_Shop_000C,
MSG_Shop_000D,
MSG_Shop_000E,
MSG_Shop_000F,
MSG_Shop_0010,
MSG_Shop_0011,
MSG_Shop_0012,
MSG_Shop_0013,
MSG_Shop_0014,
MSG_Shop_0015,
MSG_Shop_001A,
[SHOP_MSG_BUY_CONFIRM ] MSG_Shop_00_MAC01,
[SHOP_MSG_NOT_ENOUGH_COINS ] MSG_Shop_01_MAC01,
[SHOP_MSG_NOT_ENOUGH_ROOM ] MSG_Shop_02_MAC00,
[SHOP_MSG_BUY_THANK_YOU ] MSG_Shop_03_MAC01,
[SHOP_MSG_GREETING ] MSG_Shop_04_MAC00,
[SHOP_MSG_INSTRUCTIONS ] MSG_Shop_05_MAC00,
[SHOP_MSG_NOTHING_TO_SELL ] MSG_Shop_06_MAC00,
[SHOP_MSG_SELL_WHICH ] MSG_Shop_07_MAC00,
[SHOP_MSG_SELL_CONFIRM ] MSG_Shop_08_MAC00,
[SHOP_MSG_SELL_CANCEL ] MSG_Shop_09_MAC00,
[SHOP_MSG_SELL_MORE ] MSG_Shop_0A_MAC00,
[SHOP_MSG_SELL_THANKS ] MSG_Shop_0B_MAC00,
[SHOP_MSG_NOTHING_TO_CHECK ] MSG_Shop_0C_MAC00,
[SHOP_MSG_NO_CHECK_ROOM ] MSG_Shop_0D_MAC00,
[SHOP_MSG_CHECK_WHICH ] MSG_Shop_0E_MAC00,
[SHOP_MSG_CHECK_ACCEPTED ] MSG_Shop_0F_MAC00,
[SHOP_MSG_CHECK_MORE ] MSG_Shop_10_MAC00,
[SHOP_MSG_NOTHING_TO_CLAIM ] MSG_Shop_11_MAC00,
[SHOP_MSG_NO_CLAIM_ROOM ] MSG_Shop_12_MAC00,
[SHOP_MSG_CLAIM_WHICH ] MSG_Shop_13_MAC00,
[SHOP_MSG_CLAIM_ACCEPTED ] MSG_Shop_14_MAC00,
[SHOP_MSG_CLAIM_MORE ] MSG_Shop_15_MAC00,
[SHOP_MSG_FAREWELL ] MSG_Shop_16_MAC01,
};
ShopSellPriceData N(RowfDummyPriceList)[] = {
@ -124,22 +124,22 @@ ShopSellPriceData N(RowfDummyPriceList)[] = {
EvtScript N(EVS_OnBuy) = {
EVT_SWITCH(LVar0)
EVT_CASE_EQ(3)
EVT_CASE_EQ(4)
EVT_CASE_EQ(1)
EVT_CASE_EQ(SHOP_BUY_RESULT_CANCEL)
EVT_CASE_EQ(SHOP_BUY_RESULT_4)
EVT_CASE_EQ(SHOP_BUY_RESULT_OK)
EVT_SWITCH(LVar2)
EVT_CASE_EQ(0)
EVT_CASE_EQ(0) // left badge shop slot
EVT_SET(GF_MAC01_RowfBadgeAvailableA, TRUE)
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_b3, COLLIDER_FLAGS_UPPER_MASK)
EVT_CASE_EQ(1)
EVT_CASE_EQ(1) // middle badge shop slot
EVT_SET(GF_MAC01_RowfBadgeAvailableB, TRUE)
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_b2, COLLIDER_FLAGS_UPPER_MASK)
EVT_CASE_EQ(2)
EVT_CASE_EQ(2) // right badge shop slot
EVT_SET(GF_MAC01_RowfBadgeAvailableC, TRUE)
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_b1, COLLIDER_FLAGS_UPPER_MASK)
EVT_END_SWITCH
EVT_CALL(N(SetRowfBadgeBought), LVar2)
EVT_CASE_EQ(2)
EVT_CASE_EQ(SHOP_BUY_RESULT_2)
EVT_END_SWITCH
EVT_RETURN
EVT_END

View File

@ -3,9 +3,6 @@
#include "hud_element.h"
extern IconHudScriptPair gItemHudScripts[];
extern EvtScript N(EVS_ToadHouse_GetInBed);
extern EvtScript N(EVS_ToadHouse_SetDialogue);
extern EvtScript N(EVS_ToadHouse_ReturnFromRest);
extern EvtScript N(EVS_MerlonBargeOut);
#include "world/common/npc/Toad_Wander.inc.c"
@ -32,15 +29,13 @@ NpcSettings N(NpcSettings_Parakarry) = {
#define CHUCK_QUIZMO_NPC_ID NPC_ChuckQuizmo
#include "world/common/complete/Quizmo.inc.c"
#include "world/common/complete/ToadHouseBlanketAnim.inc.c"
#define KNOCK_DOWN_MAP_VAR MV_KnockdownWorker
#include "world/common/complete/KnockDownPlayer.inc.c"
#include "world/common/complete/ToadHouseBlanketAnim.inc.c"
#include "world/common/atomic/ToadHouse.inc.c"
#include "world/common/atomic/ToadHouse.data.inc.c"
MAP_STATIC_PAD(1,key_choice);
#include "world/common/complete/KeyItemChoice.inc.c"

View File

@ -99,9 +99,9 @@ EvtScript N(EVS_ToadKid1_LetterRewardB) = {
EVT_IF_EQ(LVarC, 2)
EVT_CALL(SpeakToPlayer, NPC_ToadKid_02, ANIM_ToadKid_Yellow_Talk, ANIM_ToadKid_Yellow_Idle, 0, MSG_MAC_Station_0052)
EVT_SET(LVar1, 1)
EVT_SET(LVar0, ITEM_LETTER23)
EVT_SET(LVar0, ITEM_LETTER_TO_FROSTT)
EVT_EXEC_WAIT(N(GiveKeyReward))
EVT_CALL(AddKeyItem, ITEM_LETTER23)
EVT_CALL(AddKeyItem, ITEM_LETTER_TO_FROSTT)
EVT_END_IF
EVT_RETURN
EVT_END

View File

@ -1,29 +1,29 @@
#include "mac_04.h"
s32 N(ShopMessages)[] = {
MSG_Shop_001B,
MSG_Shop_001C,
MSG_Shop_001D,
MSG_Shop_001E,
MSG_Shop_001F,
MSG_Shop_0020,
MSG_Shop_0021,
MSG_Shop_0022,
MSG_Shop_0023,
MSG_Shop_0024,
MSG_Shop_0025,
MSG_Shop_0026,
MSG_Shop_0027,
MSG_Shop_0028,
MSG_Shop_0029,
MSG_Shop_002A,
MSG_Shop_002B,
MSG_Shop_002C,
MSG_Shop_002D,
MSG_Shop_002E,
MSG_Shop_002F,
MSG_Shop_0030,
MSG_Shop_0031,
[SHOP_MSG_BUY_CONFIRM ] MSG_Shop_00_MAC04,
[SHOP_MSG_NOT_ENOUGH_COINS ] MSG_Shop_01_MAC04,
[SHOP_MSG_NOT_ENOUGH_ROOM ] MSG_Shop_02_MAC04,
[SHOP_MSG_BUY_THANK_YOU ] MSG_Shop_03_MAC04,
[SHOP_MSG_GREETING ] MSG_Shop_04_MAC04,
[SHOP_MSG_INSTRUCTIONS ] MSG_Shop_05_MAC04,
[SHOP_MSG_NOTHING_TO_SELL ] MSG_Shop_06_MAC04,
[SHOP_MSG_SELL_WHICH ] MSG_Shop_07_MAC04,
[SHOP_MSG_SELL_CONFIRM ] MSG_Shop_08_MAC04,
[SHOP_MSG_SELL_CANCEL ] MSG_Shop_09_MAC04,
[SHOP_MSG_SELL_MORE ] MSG_Shop_0A_MAC04,
[SHOP_MSG_SELL_THANKS ] MSG_Shop_0B_MAC04,
[SHOP_MSG_NOTHING_TO_CHECK ] MSG_Shop_0C_MAC04,
[SHOP_MSG_NO_CHECK_ROOM ] MSG_Shop_0D_MAC04,
[SHOP_MSG_CHECK_WHICH ] MSG_Shop_0E_MAC04,
[SHOP_MSG_CHECK_ACCEPTED ] MSG_Shop_0F_MAC04,
[SHOP_MSG_CHECK_MORE ] MSG_Shop_10_MAC04,
[SHOP_MSG_NOTHING_TO_CLAIM ] MSG_Shop_11_MAC04,
[SHOP_MSG_NO_CLAIM_ROOM ] MSG_Shop_12_MAC04,
[SHOP_MSG_CLAIM_WHICH ] MSG_Shop_13_MAC04,
[SHOP_MSG_CLAIM_ACCEPTED ] MSG_Shop_14_MAC04,
[SHOP_MSG_CLAIM_MORE ] MSG_Shop_15_MAC04,
[SHOP_MSG_FAREWELL ] MSG_Shop_16_MAC04,
};
ShopItemData N(Inventory)[] = {
@ -48,10 +48,10 @@ ShopSellPriceData N(PriceList)[] = {
EvtScript N(EVS_OnBuy) = {
EVT_SWITCH(LVar0)
EVT_CASE_EQ(3)
EVT_CASE_EQ(4)
EVT_CASE_EQ(1)
EVT_CASE_EQ(1)
EVT_CASE_EQ(SHOP_BUY_RESULT_CANCEL)
EVT_CASE_EQ(SHOP_BUY_RESULT_4)
EVT_CASE_EQ(SHOP_BUY_RESULT_OK)
EVT_CASE_EQ(SHOP_BUY_RESULT_OK) //@bug duplicate case
EVT_END_SWITCH
EVT_RETURN
EVT_END

View File

@ -2,24 +2,36 @@
#define _WORLD_AREA_NOK_NOK_H_
enum {
AB_NOK_0 = AreaByte(0),
AB_NOK_1 = AreaByte(1),
AB_NOK_2 = AreaByte(2),
AB_NOK_3 = AreaByte(3),
AB_NOK_4 = AreaByte(4),
AB_NOK_5 = AreaByte(5),
AB_NOK_6 = AreaByte(6),
AB_NOK_7 = AreaByte(7),
AB_NOK_8 = AreaByte(8),
AB_NOK_9 = AreaByte(9),
AB_NOK_A = AreaByte(10),
AB_NOK_B = AreaByte(11),
AB_NOK_C = AreaByte(12),
AB_NOK_D = AreaByte(13),
AB_NOK_E = AreaByte(14),
AB_NOK_F = AreaByte(15),
AB_NOK_0 = AreaByte(0),
AB_NOK_1 = AreaByte(1),
AB_NOK_2 = AreaByte(2),
AB_NOK_3 = AreaByte(3),
AB_NOK_4 = AreaByte(4),
AB_NOK_5 = AreaByte(5),
AB_NOK_6 = AreaByte(6),
AB_NOK_7 = AreaByte(7),
AB_NOK_8 = AreaByte(8),
AB_NOK_9 = AreaByte(9),
AB_NOK_A = AreaByte(10),
AB_NOK_B = AreaByte(11),
AB_NOK_C = AreaByte(12),
AB_NOK_D = AreaByte(13),
AB_NOK_E = AreaByte(14),
AB_NOK_F = AreaByte(15),
};
#define AF_NOK(index) AreaFlag(index)
enum {
AF_NOK_02 = AreaFlag(2),
};
extern MapSettings nok_01_settings;
extern MapSettings nok_02_settings;
extern MapSettings nok_03_settings;
extern MapSettings nok_04_settings;
extern MapSettings nok_11_settings;
extern MapSettings nok_12_settings;
extern MapSettings nok_13_settings;
extern MapSettings nok_14_settings;
extern MapSettings nok_15_settings;
#endif

View File

@ -1,30 +0,0 @@
#include "nok_11.h"
static char* N(exit_str_0) = "mac_01";
static char* N(exit_str_1) = "nok_12";
#include "world/common/enemy/ai/TackleAI.inc.c"
#include "world/common/enemy/ai/FlyingAI.inc.c"
#include "common/foliage.inc.c"
ApiStatus func_80241F08_9F6948(Evt* script, s32 isInitialCall) {
PlayerData* playerData = &gPlayerData;
if (playerData->coins >= 100) {
script->varTable[0] = FALSE;
} else {
script->varTable[0] = TRUE;
}
return ApiStatus_DONE2;
}
ApiStatus func_80241F30_9F6970(Evt* script, s32 isInitialCall) {
PlayerData* playerData = &gPlayerData;
playerData->coins -= 100;
return ApiStatus_DONE2;
}

View File

@ -2,8 +2,33 @@
/// @brief Koopa Region - Pleasant Path Entry
#include "common.h"
#include "../nok.h"
#include "message_ids.h"
#include "map.h"
#include "../nok.h"
#include "mapfs/nok_11_shape.h"
#include "mapfs/nok_11_hit.h"
#include "sprite/npc/WorldGoombario.h"
#include "sprite/npc/WorldKooper.h"
#include "sprite/npc/WorldBombette.h"
enum {
NPC_KoopaTroopa = 0,
NPC_Paragoomba = 2,
NPC_SpikedGoomba = 4,
NPC_JrTroopa_01 = 5,
NPC_JrTroopa_02 = 6,
NPC_KentCKoopa_01 = 7,
NPC_KentCKoopa_02 = 8,
};
#define NAMESPACE nok_11
extern EvtScript N(EVS_Main);
extern EvtScript N(EVS_SetupMusic);
extern EvtScript N(EVS_PlayJrTroopaSong);
extern EvtScript N(EVS_MakeEntities);
extern NpcGroupList N(DefaultNPCs);
extern NpcGroupList N(JrTroopaNPCs);
extern NpcGroupList N(KentCKoopaNPCs);

View File

@ -0,0 +1,14 @@
#include "nok_11.h"
EntryList N(Entrances) = {
[nok_11_ENTRY_0] { -758.0, 0.0, -49.0, 90.0 },
[nok_11_ENTRY_1] { 886.0, 0.0, -40.0, 270.0 },
};
MapSettings N(settings) = {
.main = &N(EVS_Main),
.entryList = &N(Entrances),
.entryCount = ENTRY_COUNT(N(Entrances)),
.background = &gBackgroundImage,
.tattle = { MSG_MapTattle_nok_11 },
};

View File

@ -0,0 +1,13 @@
#include "nok_11.h"
EvtScript N(EVS_SetupMusic) = {
EVT_CALL(SetMusicTrack, 0, SONG_PLEASANT_PATH, 0, 8)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_PlayJrTroopaSong) = {
EVT_CALL(SetMusicTrack, 0, SONG_JR_TROOPA_THEME, 0, 8)
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,116 @@
#include "nok_11.h"
EvtScript N(EVS_ExitWalk_mac_01_1) = {
EVT_IF_EQ(GB_KootFavor_State, 2)
EVT_SET(GF_KootFavor_LeftKoopaArea, TRUE)
EVT_END_IF
EVT_CALL(UseExitHeading, 60, nok_11_ENTRY_0)
EVT_EXEC(ExitWalk)
EVT_CALL(GotoMap, EVT_PTR("mac_01"), mac_01_ENTRY_1)
EVT_WAIT(100)
EVT_RETURN
EVT_END
};
// EVT_EXIT_WALK without EVT_SET_GROUP
EvtScript N(EVS_ExitWalk_nok_12_0) = {
EVT_CALL(UseExitHeading, 60, nok_11_ENTRY_1)
EVT_EXEC(ExitWalk)
EVT_CALL(GotoMap, EVT_PTR("nok_12"), nok_12_ENTRY_0)
EVT_WAIT(100)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_TexPan_Flowers) = {
EVT_CALL(SetTexPanner, MODEL_hana2, TEX_PANNER_0)
EVT_CALL(SetTexPanner, MODEL_hana3, TEX_PANNER_0)
EVT_CALL(SetTexPanner, MODEL_hana4, TEX_PANNER_0)
EVT_CALL(SetTexPanner, MODEL_hana5, TEX_PANNER_0)
EVT_CALL(SetTexPanner, MODEL_hana6, TEX_PANNER_0)
EVT_CALL(SetTexPanner, MODEL_hana7, TEX_PANNER_0)
EVT_CALL(SetTexPanner, MODEL_hana8, TEX_PANNER_0)
EVT_CALL(SetTexPanner, MODEL_hana9, TEX_PANNER_0)
EVT_CALL(SetTexPanner, MODEL_hana10, TEX_PANNER_0)
EVT_CALL(SetTexPanner, MODEL_hanahana, TEX_PANNER_0)
EVT_LABEL(10)
EVT_LOOP(12)
EVT_CALL(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_MAIN, 0, 0)
EVT_WAIT(1)
EVT_END_LOOP
EVT_LOOP(12)
EVT_CALL(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_MAIN, 0x4000, 0)
EVT_WAIT(1)
EVT_END_LOOP
EVT_GOTO(10)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_TexPan_Water) = {
EVT_THREAD
EVT_CALL(SetTexPanner, MODEL_suimen1, TEX_PANNER_1)
EVT_SET(LVar0, 0)
EVT_SET(LVar1, 0)
EVT_SET(LVar2, 0)
EVT_LABEL(10)
EVT_CALL(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, LVar0, 0)
EVT_CALL(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_AUX, LVar1, LVar2)
EVT_SUB(LVar0, 100)
EVT_SUB(LVar1, 400)
EVT_ADD(LVar1, 1000)
EVT_WAIT(1)
EVT_GOTO(10)
EVT_END_THREAD
EVT_CALL(SetTexPanner, MODEL_kabemizu, TEX_PANNER_2)
EVT_SET(LVar0, 0)
EVT_SET(LVar1, 0)
EVT_SET(LVar2, 0)
EVT_LABEL(20)
EVT_CALL(SetTexPanOffset, TEX_PANNER_2, TEX_PANNER_MAIN, LVar0, 0)
EVT_CALL(SetTexPanOffset, TEX_PANNER_2, TEX_PANNER_AUX, LVar1, LVar2)
EVT_SUB(LVar0, 100)
EVT_ADD(LVar1, 800)
EVT_SUB(LVar1, 400)
EVT_WAIT(1)
EVT_GOTO(20)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_BindExitTriggers) = {
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_mac_01_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiri1, 1, 0)
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_nok_12_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili2, 1, 0)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_Main) = {
EVT_SET(GB_WorldLocation, LOCATION_PLEASANT_PATH)
EVT_CALL(SetSpriteShading, SHADING_NONE)
EVT_SETUP_CAMERA_DEFAULT()
EVT_SET(GF_MAP_PleasantPath, TRUE)
EVT_IF_EQ(GB_StoryProgress, STORY_CH1_STAR_SPRIT_DEPARTED)
EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(JrTroopaNPCs)))
EVT_ELSE
EVT_IF_GE(GB_StoryProgress, STORY_CH5_RETURNED_TO_TOAD_TOWN)
EVT_IF_EQ(GF_NOK11_Defeated_KentC, FALSE)
EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(KentCKoopaNPCs)))
EVT_ELSE
EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs)))
EVT_END_IF
EVT_ELSE
EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs)))
EVT_END_IF
EVT_END_IF
EVT_EXEC_WAIT(N(EVS_MakeEntities))
EVT_EXEC(N(EVS_TexPan_Flowers))
EVT_EXEC(N(EVS_TexPan_Water))
EVT_EXEC(N(EVS_SetupMusic))
EVT_CALL(PlaySound, SOUND_8000005B)
EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers)))
EVT_EXEC(EnterWalk)
EVT_WAIT(1)
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,17 @@
#include "nok_11.h"
#include "entity.h"
EvtScript N(EVS_MakeEntities) = {
EVT_CALL(MakeEntity, EVT_PTR(Entity_BrickBlock), 30, 60, -85, 0, MAKE_ENTITY_END)
EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), 110, 60, -85, 0, ITEM_COIN, MAKE_ENTITY_END)
EVT_CALL(AssignBlockFlag, GF_NOK11_ItemBlock_Coin)
EVT_CALL(MakeEntity, EVT_PTR(Entity_BrickBlock), 330, 60, -85, 0, MAKE_ENTITY_END)
EVT_CALL(MakeEntity, EVT_PTR(Entity_RedBlock), 380, 60, -85, 0, ITEM_DIZZY_ATTACK, MAKE_ENTITY_END)
EVT_CALL(AssignBlockFlag, GF_NOK11_BadgeBlock_DizzyAttack)
EVT_CALL(MakeEntity, EVT_PTR(Entity_BrickBlock), 650, 60, -85, 0, MAKE_ENTITY_END)
EVT_CALL(MakeEntity, EVT_PTR(Entity_BrickBlock), 700, 60, -85, 0, MAKE_ENTITY_END)
EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), 750, 60, -85, 0, ITEM_FRIGHT_JAR, MAKE_ENTITY_END)
EVT_CALL(AssignBlockFlag, GF_NOK11_ItemBlock_FrightJar)
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,622 @@
#include "nok_11.h"
#include "world/common/enemy/complete/Goomba_Wander.inc.c"
#include "world/common/enemy/complete/KoopaTroopa_Wander.inc.c"
#include "world/common/enemy/complete/Paragoomba_Wander.inc.c"
#include "world/common/enemy/complete/SpikedGoomba_Wander.inc.c"
#include "world/common/npc/JrTroopa.inc.c"
#include "world/common/enemy/complete/KentCKoopa.inc.c"
#include "common/foliage.inc.c"
EvtScript N(EVS_JrTroopa_RunFX) = {
EVT_LOOP(0)
EVT_CALL(GetNpcPos, NPC_JrTroopa_01, LVar0, LVar1, LVar2)
EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 1, LVar0, LVar1, LVar2, 0)
EVT_WAIT(3)
EVT_END_LOOP
EVT_RETURN
EVT_END
};
FoliageModelList N(SceneBush_Models) = FOLIAGE_MODEL_LIST(MODEL_o125);
SearchBushConfig N(SearchBush_Scene) = {
.bush = &N(SceneBush_Models),
};
EvtScript N(EVS_NpcIdle_JrTroopa_01) = {
EVT_LOOP(0)
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
EVT_IF_LE(LVar0, -125)
EVT_BREAK_LOOP
EVT_END_IF
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CHILD_THREAD
EVT_LABEL(10)
EVT_WAIT(3)
EVT_CALL(PlayerFaceNpc, NPC_SELF, FALSE)
EVT_WAIT(1)
EVT_GOTO(10)
EVT_END_CHILD_THREAD
EVT_EXEC(N(EVS_PlayJrTroopaSong))
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_JrTroopa_Talk, ANIM_JrTroopa_Idle, 5, MSG_CH1_011E)
EVT_WAIT(15)
EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE)
EVT_CALL(SetCamProperties, CAM_DEFAULT, EVT_FLOAT(90.0), -190, 0, -40, 200, EVT_FLOAT(15.0), EVT_FLOAT(-8.5))
EVT_WAIT(15)
EVT_SET(LVar0, EVT_PTR(N(SearchBush_Scene)))
EVT_EXEC(N(EVS_SearchBush))
EVT_WAIT(15)
EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_32C, 0)
EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(1.0))
EVT_CALL(NpcJump0, NPC_SELF, -230, 0, -157, 15)
EVT_CALL(NpcFacePlayer, NPC_SELF, 0)
EVT_WAIT(15)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_JrTroopa_PointTalk, ANIM_JrTroopa_PointTapFoot, 0, MSG_CH1_011F)
EVT_CALL(SetCamProperties, CAM_DEFAULT, EVT_FLOAT(4.0), -140, 0, -40, 400, EVT_FLOAT(15.0), EVT_FLOAT(-5.0))
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_JrTroopa_Charge)
EVT_WAIT(10)
EVT_THREAD
EVT_WAIT(10)
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_JrTroopa_Trip)
EVT_CALL(ShowMessageAtScreenPos, MSG_CH1_0120, 160, 40)
EVT_END_THREAD
EVT_THREAD
EVT_END_THREAD
EVT_THREAD
EVT_WAIT(10)
EVT_LOOP(10)
EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2)
EVT_PLAY_EFFECT(EFFECT_WALKING_DUST, 2, LVar0, LVar1, LVar2, 0, 0)
EVT_WAIT(2)
EVT_END_LOOP
EVT_END_THREAD
EVT_CALL(NpcMoveTo, NPC_SELF, -201, -67, 10)
EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(2.0))
EVT_CALL(NpcJump1, NPC_SELF, -191, 0, -32, 5)
EVT_EXEC_GET_TID(N(EVS_JrTroopa_RunFX), LVarA)
EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_167, 0)
EVT_CALL(NpcMoveTo, NPC_SELF, -165, 50, 15)
EVT_KILL_THREAD(LVarA)
EVT_CALL(StopSound, SOUND_167)
EVT_WAIT(5)
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_JrTroopa_FallHeadfirstBack)
EVT_WAIT(15)
EVT_THREAD
EVT_WAIT(15)
EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_20AD, 0)
EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2)
EVT_SUB(LVar0, 5)
EVT_PLAY_EFFECT(EFFECT_WATER_SPLASH, 2, LVar0, LVar1, LVar2, EVT_FLOAT(0.7), 30)
EVT_ADD(LVar0, 10)
EVT_PLAY_EFFECT(EFFECT_WATER_SPLASH, 2, LVar0, LVar1, LVar2, EVT_FLOAT(0.7), 30)
EVT_WAIT(5)
EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2)
EVT_SUB(LVar0, 25)
EVT_PLAY_EFFECT(EFFECT_WATER_SPLASH, 2, LVar0, LVar1, LVar2, EVT_FLOAT(0.7), 30)
EVT_ADD(LVar0, 10)
EVT_PLAY_EFFECT(EFFECT_WATER_SPLASH, 2, LVar0, LVar1, LVar2, EVT_FLOAT(0.7), 30)
EVT_WAIT(5)
EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2)
EVT_SUB(LVar0, -15)
EVT_PLAY_EFFECT(EFFECT_WATER_SPLASH, 2, LVar0, LVar1, LVar2, EVT_FLOAT(0.7), 30)
EVT_ADD(LVar0, 10)
EVT_PLAY_EFFECT(EFFECT_WATER_SPLASH, 2, LVar0, LVar1, LVar2, EVT_FLOAT(0.7), 30)
EVT_END_THREAD
EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_301, 0)
EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(0.5))
EVT_CALL(NpcJump0, NPC_SELF, -165, -90, 50, 20)
EVT_WAIT(30)
EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_74, 0)
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_JrTroopa_ScamperBack)
EVT_CALL(SetNpcYaw, NPC_SELF, 270)
EVT_THREAD
EVT_WAIT(85)
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_JrTroopa_ClimbUpBack)
EVT_END_THREAD
EVT_CALL(SetNpcJumpscale, NPC_SELF, 0)
EVT_CALL(NpcJump0, NPC_SELF, -165, 0, 50, 90)
EVT_WAIT(30)
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_JrTroopa_Charge)
EVT_CALL(NpcMoveTo, NPC_SELF, -190, -45, 10)
EVT_CALL(NpcFacePlayer, NPC_SELF, 0)
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_JrTroopa_PointTapFoot)
EVT_CALL(SetCamProperties, CAM_DEFAULT, EVT_FLOAT(90.0), -140, 0, -40, 250, EVT_FLOAT(15.0), EVT_FLOAT(-8.5))
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_JrTroopa_PointTalk, ANIM_JrTroopa_PointTapFoot, 0, MSG_CH1_0121)
EVT_CALL(DisablePartnerAI, 0)
EVT_CALL(GetCurrentPartnerID, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(PARTNER_GOOMBARIO)
EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 5, MSG_CH1_0122)
EVT_CASE_EQ(PARTNER_KOOPER)
EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldKooper_Talk, ANIM_WorldKooper_Idle, 5, MSG_CH1_0123)
EVT_CASE_EQ(PARTNER_BOMBETTE)
EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 5, MSG_CH1_0124)
EVT_END_SWITCH
EVT_CALL(EnablePartnerAI)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_JrTroopa_PointTalk, ANIM_JrTroopa_PointTapFoot, 0, MSG_CH1_0125)
EVT_CALL(ShowChoice, MSG_Choice_0013)
EVT_WAIT(10)
EVT_IF_EQ(LVar0, 0)
EVT_CALL(ContinueSpeech, NPC_SELF, ANIM_JrTroopa_PointTalk, ANIM_JrTroopa_PointTapFoot, 0, MSG_CH1_0126)
EVT_ELSE
EVT_CALL(ContinueSpeech, NPC_SELF, ANIM_JrTroopa_PointTalk, ANIM_JrTroopa_PointTapFoot, 0, MSG_CH1_0127)
EVT_END_IF
EVT_WAIT(10)
EVT_CALL(StartBossBattle, SONG_JR_TROOPA_BATTLE)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcAI_JrTroopa_01) = {
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInteract_JrTroopa_01) = {
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_JrTroopa_Defeated, ANIM_JrTroopa_Defeated, 5, MSG_CH1_012B)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcIdle_JrTroopa_02) = {
EVT_LOOP(0)
EVT_CALL(GetNpcPos, NPC_JrTroopa_01, LVar0, LVar1, LVar2)
EVT_CALL(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2)
EVT_WAIT(1)
EVT_END_LOOP
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcHit_JrTroopa_02) = {
EVT_CALL(GetOwnerEncounterTrigger, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(ENCOUNTER_TRIGGER_JUMP)
EVT_CASE_OR_EQ(ENCOUNTER_TRIGGER_HAMMER)
EVT_CASE_OR_EQ(ENCOUNTER_TRIGGER_PARTNER)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_JrTroopa_Defeated, ANIM_JrTroopa_Defeated, 5, MSG_CH1_012B)
EVT_CALL(DisablePlayerInput, FALSE)
EVT_END_SWITCH
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcDefeat_JrTroopa_01) = {
EVT_CALL(ClearDefeatedEnemies)
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_JrTroopa_Defeated)
EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetNpcPos, NPC_JrTroopa_02, LVar0, LVar1, LVar2)
EVT_CALL(SetNpcCollisionSize, NPC_SELF, 24, 32)
EVT_CALL(SetNpcCollisionSize, NPC_JrTroopa_02, 24, 32)
EVT_SET(GB_StoryProgress, STORY_CH1_DEFEATED_JR_TROOPA)
EVT_THREAD
EVT_WAIT(4)
EVT_EXEC(N(EVS_SetupMusic))
EVT_END_THREAD
EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_NpcAI_JrTroopa_01)))
EVT_CALL(SetNpcFlagBits, NPC_JrTroopa_02, NPC_FLAG_2, TRUE)
EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(90.0))
EVT_CALL(DisablePlayerInput, FALSE)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInteract_KentCKoopa_02) = {
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_KentCKoopa_Anim02, ANIM_KentCKoopa_Anim01, 0, MSG_CH1_0134)
EVT_RETURN
EVT_END
};
API_CALLABLE(N(KentCheckNotEnoughCoins)) {
PlayerData* playerData = &gPlayerData;
if (playerData->coins >= 100) {
script->varTable[0] = FALSE;
} else {
script->varTable[0] = TRUE;
}
return ApiStatus_DONE2;
}
API_CALLABLE(N(KentTakeCoins)) {
PlayerData* playerData = &gPlayerData;
playerData->coins -= 100;
return ApiStatus_DONE2;
}
EvtScript N(EVS_NpcIdle_KentCKoopa_01) = {
EVT_LABEL(1)
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
EVT_IF_EQ(AB_NOK_2, 0)
EVT_IF_GE(LVar0, -260)
EVT_GOTO(10)
EVT_ELSE
EVT_GOTO(2)
EVT_END_IF
EVT_ELSE
EVT_IF_LE(LVar0, -55)
EVT_GOTO(10)
EVT_ELSE
EVT_GOTO(2)
EVT_END_IF
EVT_END_IF
EVT_LABEL(2)
EVT_WAIT(1)
EVT_GOTO(1)
EVT_LABEL(10)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(InterruptUsePartner)
EVT_CALL(SetMusicTrack, 0, SONG_MINIBOSS_BATTLE, 0, 8)
EVT_CALL(SpeakToPlayer, NPC_KentCKoopa_02, ANIM_KentCKoopa_Anim02, ANIM_KentCKoopa_Anim01, 0, MSG_CH1_012C)
EVT_IF_EQ(AB_NOK_2, 0)
EVT_SET(LVar0, 20)
EVT_ELSE
EVT_SET(LVar0, -20)
EVT_END_IF
EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(5.0), LVar0, EVT_FLOAT(275.0), EVT_FLOAT(17.5), EVT_FLOAT(-12.0))
EVT_CALL(SpeakToPlayer, NPC_KentCKoopa_02, ANIM_KentCKoopa_Anim02, ANIM_KentCKoopa_Anim01, 0, MSG_CH1_012D)
EVT_LABEL(15)
EVT_CALL(ShowCoinCounter, TRUE)
EVT_CALL(ShowChoice, MSG_Choice_0045)
EVT_IF_EQ(LVar0, 0)
EVT_GOTO(30)
EVT_END_IF
EVT_IF_EQ(LVar0, 1)
EVT_GOTO(50)
EVT_END_IF
EVT_IF_EQ(AB_NOK_2, 0)
EVT_SET(LVar0, 20)
EVT_ELSE
EVT_SET(LVar0, -20)
EVT_END_IF
EVT_CALL(ShowCoinCounter, FALSE)
EVT_CALL(ContinueSpeech, NPC_KentCKoopa_02, ANIM_KentCKoopa_Anim02, ANIM_KentCKoopa_Anim01, 0, MSG_CH1_012E)
EVT_CALL(ShowCoinCounter, TRUE)
EVT_CALL(ShowChoice, MSG_Choice_0045)
EVT_IF_EQ(LVar0, 0)
EVT_GOTO(30)
EVT_END_IF
EVT_IF_EQ(LVar0, 1)
EVT_GOTO(50)
EVT_END_IF
EVT_CALL(ShowCoinCounter, FALSE)
EVT_LABEL(20)
EVT_CALL(ContinueSpeech, NPC_KentCKoopa_02, ANIM_KentCKoopa_Anim02, ANIM_KentCKoopa_Anim01, 0, MSG_CH1_0135)
EVT_CALL(StartBossBattle, SONG_SPECIAL_BATTLE)
EVT_IF_EQ(AB_NOK_2, 0)
EVT_SET(LVar0, 20)
EVT_ELSE
EVT_SET(LVar0, -20)
EVT_END_IF
EVT_CALL(SpeakToPlayer, NPC_KentCKoopa_02, ANIM_KentCKoopa_Anim02, ANIM_KentCKoopa_Anim01, 0, MSG_CH1_0136)
EVT_CALL(SetNpcAnimation, NPC_KentCKoopa_02, ANIM_KentCKoopa_Anim05)
EVT_IF_EQ(AB_NOK_2, 0)
EVT_SET(LVar0, 90)
EVT_ELSE
EVT_SET(LVar0, 270)
EVT_END_IF
EVT_CALL(InterpNpcYaw, NPC_KentCKoopa_02, LVar0, 0)
EVT_WAIT(30)
EVT_IF_EQ(AB_NOK_2, 0)
EVT_SET(LVar0, 125)
EVT_ELSE
EVT_SET(LVar0, -430)
EVT_END_IF
EVT_CALL(NpcMoveTo, NPC_KentCKoopa_02, LVar0, -37, 40)
EVT_CALL(SetNpcPos, NPC_KentCKoopa_02, 0, -1000, 0)
EVT_CALL(SetNpcPos, NPC_SELF, 0, -1000, 0)
EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(5.0))
EVT_GOTO(100)
EVT_LABEL(30)
EVT_CALL(N(KentCheckNotEnoughCoins))
EVT_IF_EQ(LVar0, 1)
EVT_GOTO(40)
EVT_END_IF
EVT_CALL(CloseMessage)
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
EVT_IF_EQ(AB_NOK_2, 0)
EVT_SET(LVar0, -215)
EVT_ELSE
EVT_SET(LVar0, -100)
EVT_END_IF
EVT_CALL(SetNpcAnimation, NPC_KentCKoopa_02, ANIM_KentCKoopa_Anim03)
EVT_CALL(NpcMoveTo, NPC_KentCKoopa_02, LVar0, LVar2, 20)
EVT_CALL(SetNpcAnimation, NPC_KentCKoopa_02, ANIM_KentCKoopa_Anim01)
EVT_CALL(N(KentTakeCoins))
EVT_CALL(ShowCoinCounter, FALSE)
EVT_CALL(SpeakToPlayer, NPC_KentCKoopa_02, ANIM_KentCKoopa_Anim02, ANIM_KentCKoopa_Anim01, 0, MSG_CH1_0133)
EVT_WAIT(20)
EVT_CALL(SetNpcAnimation, NPC_KentCKoopa_02, ANIM_KentCKoopa_Anim03)
EVT_CALL(NpcMoveTo, NPC_KentCKoopa_02, -167, -100, 20)
EVT_CALL(SetNpcFlagBits, NPC_KentCKoopa_02, NPC_FLAG_100, FALSE)
EVT_CALL(BindNpcInteract, NPC_KentCKoopa_02, EVT_PTR(N(EVS_NpcInteract_KentCKoopa_02)))
EVT_CALL(SetNpcPos, NPC_SELF, 0, -1000, 0)
EVT_CALL(SetNpcAnimation, NPC_KentCKoopa_02, ANIM_KentCKoopa_Anim01)
EVT_IF_EQ(AB_NOK_2, 0)
EVT_SET(LVar0, 270)
EVT_ELSE
EVT_SET(LVar0, 90)
EVT_END_IF
EVT_CALL(InterpNpcYaw, NPC_KentCKoopa_02, LVar0, 0)
EVT_WAIT(10)
EVT_CALL(SpeakToPlayer, NPC_KentCKoopa_02, ANIM_KentCKoopa_Anim02, ANIM_KentCKoopa_Anim01, 0, MSG_CH1_0134)
EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(5.0))
EVT_GOTO(100)
EVT_LABEL(40)
EVT_CALL(ShowCoinCounter, FALSE)
EVT_CALL(ContinueSpeech, NPC_KentCKoopa_02, ANIM_KentCKoopa_Anim02, ANIM_KentCKoopa_Anim01, 0, MSG_CH1_012F)
EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(5.0))
EVT_EXEC(N(EVS_SetupMusic))
EVT_WAIT(30)
EVT_CALL(DisablePlayerInput, FALSE)
EVT_LABEL(41)
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
EVT_IF_EQ(AB_NOK_2, 0)
EVT_IF_GE(LVar0, -255)
EVT_SET(LVar3, -256)
EVT_GOTO(43)
EVT_ELSE
EVT_GOTO(42)
EVT_END_IF
EVT_ELSE
EVT_IF_LE(LVar0, -60)
EVT_SET(LVar3, -59)
EVT_GOTO(43)
EVT_ELSE
EVT_GOTO(42)
EVT_END_IF
EVT_END_IF
EVT_LABEL(42)
EVT_WAIT(1)
EVT_GOTO(41)
EVT_LABEL(43)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(InterruptUsePartner)
EVT_CALL(SetPlayerPos, LVar3, LVar1, LVar2)
EVT_CALL(SpeakToPlayer, NPC_KentCKoopa_02, ANIM_KentCKoopa_Anim02, ANIM_KentCKoopa_Anim01, 0, MSG_CH1_0130)
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
EVT_CALL(SetPlayerPos, LVar3, LVar1, LVar2)
EVT_CALL(DisablePlayerInput, FALSE)
EVT_GOTO(41)
EVT_LABEL(50)
EVT_CALL(ShowCoinCounter, FALSE)
EVT_CALL(ContinueSpeech, NPC_KentCKoopa_02, ANIM_KentCKoopa_Anim02, ANIM_KentCKoopa_Anim01, 0, MSG_CH1_0131)
EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(5.0))
EVT_EXEC(N(EVS_SetupMusic))
EVT_WAIT(30)
EVT_CALL(DisablePlayerInput, FALSE)
EVT_LABEL(51)
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
EVT_IF_EQ(AB_NOK_2, 0)
EVT_IF_GE(LVar0, -255)
EVT_SET(LVar3, -256)
EVT_GOTO(53)
EVT_ELSE
EVT_GOTO(52)
EVT_END_IF
EVT_ELSE
EVT_IF_LE(LVar0, -60)
EVT_SET(LVar3, -59)
EVT_GOTO(53)
EVT_ELSE
EVT_GOTO(52)
EVT_END_IF
EVT_END_IF
EVT_LABEL(52)
EVT_WAIT(1)
EVT_GOTO(51)
EVT_LABEL(53)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(InterruptUsePartner)
EVT_CALL(SetMusicTrack, 0, SONG_MINIBOSS_BATTLE, 0, 8)
EVT_CALL(SetPlayerPos, LVar3, LVar1, LVar2)
EVT_CALL(SpeakToPlayer, NPC_KentCKoopa_02, ANIM_KentCKoopa_Anim02, ANIM_KentCKoopa_Anim01, 0, MSG_CH1_0132)
EVT_IF_EQ(AB_NOK_2, 0)
EVT_SET(LVar0, 20)
EVT_ELSE
EVT_SET(LVar0, -20)
EVT_END_IF
EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(5.0), LVar0, EVT_FLOAT(275.0), EVT_FLOAT(17.5), EVT_FLOAT(-12.0))
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
EVT_CALL(SetPlayerPos, LVar3, LVar1, LVar2)
EVT_GOTO(15)
EVT_LABEL(100)
EVT_EXEC(N(EVS_SetupMusic))
EVT_WAIT(30)
EVT_CALL(DisablePlayerInput, FALSE)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcDefeat_KentCKoopa_01) = {
EVT_SET(GF_NOK11_Defeated_KentC, TRUE)
EVT_CALL(ClearDefeatedEnemies)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcDefeat_KentCKoopa_02) = {
EVT_CALL(ClearDefeatedEnemies)
EVT_RETURN
EVT_END
};
StaticNpc N(NpcData_KoopaTroopa) = {
.id = NPC_KoopaTroopa,
.settings = &N(NpcSettings_KoopaTroopa_Wander),
.pos = { -350.0f, 0.0f, -30.0f },
.yaw = 90,
.flags = ENEMY_FLAG_400 | ENEMY_FLAG_800 | ENEMY_FLAG_2000,
.drops = KOOPA_TROOPA_DROPS_B,
.territory = {
.wander = {
.isFlying = TRUE,
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
.wanderShape = SHAPE_RECT,
.centerPos = { -350, 0, -30 },
.wanderSize = { 50, 20 },
.detectShape = SHAPE_CYLINDER,
.detectPos = { -350, 0, -30 },
.detectSize = { 250 },
}
},
.animations = KOOPA_TROOPA_ANIMS,
};
StaticNpc N(NpcData_Paragoomba) = {
.id = NPC_Paragoomba,
.settings = &N(NpcSettings_Paragoomba_Wander),
.pos = { 0.0f, 60.0f, -30.0f },
.yaw = 0,
.flags = ENEMY_FLAG_100 | ENEMY_FLAG_400,
.drops = PARAGOOMBA_DROPS,
.territory = {
.wander = {
.isFlying = FALSE,
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
.wanderShape = SHAPE_RECT,
.centerPos = { 0, 60, -30 },
.wanderSize = { 50, 20 },
.detectShape = SHAPE_CYLINDER,
.detectPos = { 0, 60, -30 },
.detectSize = { 250 },
}
},
.animations = PARAGOOMBA_ANIMS,
};
StaticNpc N(NpcData_SpikedGoomba) = {
.id = NPC_SpikedGoomba,
.settings = &N(NpcSettings_SpikedGoomba_Wander),
.pos = { 430.0f, 0.0f, -27.0f },
.yaw = 270,
.flags = ENEMY_FLAG_400 | ENEMY_FLAG_800 | ENEMY_FLAG_2000,
.drops = SPIKED_GOOMBA_DROPS,
.territory = {
.wander = {
.isFlying = TRUE,
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
.wanderShape = SHAPE_RECT,
.centerPos = { 430, 0, -27 },
.wanderSize = { 50, 20 },
.detectShape = SHAPE_CYLINDER,
.detectPos = { 430, 0, -27 },
.detectSize = { 250 },
}
},
.animations = SPIKED_GOOMBA_ANIMS,
};
EvtScript N(EVS_NpcInit_JrTroopa_01) = {
EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_JrTroopa_01)))
EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_JrTroopa_01)))
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_JrTroopa_01)))
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_JrTroopa_02) = {
EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_JrTroopa_02)))
EVT_CALL(BindNpcHit, NPC_SELF, EVT_PTR(N(EVS_NpcHit_JrTroopa_02)))
EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_HAS_SHADOW, FALSE)
EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_2, TRUE)
EVT_RETURN
EVT_END
};
StaticNpc N(NpcData_JrTroopa)[] = {
{
.id = NPC_JrTroopa_01,
.settings = &N(NpcSettings_JrTroopa),
.pos = { -170.0f, 0.0f, -155.0f },
.yaw = 90,
.flags = ENEMY_FLAG_1 | ENEMY_FLAG_4 | ENEMY_FLAG_8 | ENEMY_FLAG_100 | ENEMY_FLAG_400 | ENEMY_FLAG_800 | ENEMY_FLAG_40000 | ENEMY_FLAG_200000 | ENEMY_FLAG_400000,
.init = &N(EVS_NpcInit_JrTroopa_01),
.drops = JR_TROOPA_DROPS,
.animations = JR_TROOPA_ANIMS,
.tattle = MSG_NpcTattle_JrTroopa,
},
{
.id = NPC_JrTroopa_02,
.settings = &N(NpcSettings_JrTroopa),
.pos = { -170.0f, 0.0f, -155.0f },
.yaw = 90,
.flags = ENEMY_FLAG_4 | ENEMY_FLAG_8 | ENEMY_FLAG_100 | ENEMY_FLAG_200 | ENEMY_FLAG_400 | ENEMY_FLAG_800 | ENEMY_FLAG_40000 | ENEMY_FLAG_100000 | ENEMY_FLAG_200000 | ENEMY_FLAG_400000 | ENEMY_FLAG_800000 | ENEMY_FLAG_IGNORE_TOUCH | ENEMY_FLAG_20000000,
.init = &N(EVS_NpcInit_JrTroopa_02),
.drops = JR_TROOPA_DROPS,
.animations = JR_TROOPA_ANIMS,
.tattle = MSG_NpcTattle_JrTroopa,
},
};
EvtScript N(EVS_NpcInit_KentCKoopa_01) = {
EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_KentCKoopa_01)))
EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_KentCKoopa_01)))
EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE)
EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_100, TRUE)
EVT_CALL(GetEntryID, AB_NOK_2)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_KentCKoopa_02) = {
EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_KentCKoopa_02)))
EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_100, TRUE)
EVT_CALL(GetEntryID, LVar3)
EVT_IF_EQ(LVar3, nok_11_ENTRY_0)
EVT_CALL(SetNpcYaw, NPC_SELF, 270)
EVT_ELSE
EVT_CALL(SetNpcYaw, NPC_SELF, 90)
EVT_END_IF
EVT_RETURN
EVT_END
};
StaticNpc N(NpcData_KentCKoopa)[] = {
{
.id = NPC_KentCKoopa_01,
.settings = &N(NpcSettings_KentCKoopa),
.pos = { -164.0f, 0.0f, -37.0f },
.yaw = 270,
.flags = ENEMY_FLAG_4 | ENEMY_FLAG_100 | ENEMY_FLAG_400 | ENEMY_FLAG_800 | ENEMY_FLAG_4000 | ENEMY_FLAG_40000 | ENEMY_FLAG_100000 | ENEMY_FLAG_200000 | ENEMY_FLAG_800000,
.init = &N(EVS_NpcInit_KentCKoopa_01),
.drops = KENT_C_KOOPA_DROPS,
.animations = KENT_C_KOOPA_ANIMS,
},
{
.id = NPC_KentCKoopa_02,
.settings = &N(NpcSettings_KentCKoopa),
.pos = { -164.0f, 0.0f, -37.0f },
.yaw = 270,
.flags = ENEMY_FLAG_1 | ENEMY_FLAG_4 | ENEMY_FLAG_100 | ENEMY_FLAG_400 | ENEMY_FLAG_800 | ENEMY_FLAG_100000 | ENEMY_FLAG_200000 | ENEMY_FLAG_400000 | ENEMY_FLAG_800000,
.init = &N(EVS_NpcInit_KentCKoopa_02),
.drops = KENT_C_KOOPA_DROPS,
.animations = KENT_C_KOOPA_ANIMS,
.tattle = MSG_NpcTattle_KentCKoopa,
},
};
NpcGroupList N(DefaultNPCs) = {
NPC_GROUP(N(NpcData_KoopaTroopa), BTL_NOK_FORMATION_08, BTL_NOK_STAGE_00),
NPC_GROUP(N(NpcData_Paragoomba), BTL_NOK_FORMATION_02, BTL_NOK_STAGE_00),
NPC_GROUP(N(NpcData_SpikedGoomba), BTL_NOK_FORMATION_03, BTL_NOK_STAGE_01),
{}
};
NpcGroupList N(JrTroopaNPCs) = {
NPC_GROUP(N(NpcData_JrTroopa), BTL_KMR_PART_3_FORMATION_03),
{}
};
NpcGroupList N(KentCKoopaNPCs) = {
NPC_GROUP(N(NpcData_KentCKoopa), BTL_NOK_FORMATION_18, BTL_NOK_STAGE_00),
{}
};

View File

@ -3,7 +3,7 @@
static char* N(exit_str_0) = "nok_11";
static char* N(exit_str_1) = "nok_13";
// copy of func_80240000_A02840
// copy of UpdateEnounterStages
ApiStatus func_80240000_9FA7F0(Evt* script, s32 isInitialCall) {
PlayerStatus* playerStatus = &gPlayerStatus;
EncounterStatus* encounterStatus = &gCurrentEncounter;

View File

@ -1,30 +0,0 @@
#include "nok_14.h"
static char* N(exit_str_0) = "nok_13";
static char* N(exit_str_1) = "nok_15";
// copy of func_80240000_9FA7F0
ApiStatus func_80240000_A02840(Evt* script, s32 isInitialCall) {
PlayerStatus* playerStatus = &gPlayerStatus;
EncounterStatus* encounterStatus = &gCurrentEncounter;
Bytecode *args = script->ptrReadPos;
s32 xMin = evt_get_variable(script, *args++);
s32 xMax = evt_get_variable(script, *args++);
s32 zMin = evt_get_variable(script, *args++);
s32 zMax = evt_get_variable(script, *args++);
s32 var5 = evt_get_variable(script, *args++);
s32 var6 = evt_get_variable(script, *args++);
s32 stage = var5;
s32 i;
if (xMin <= playerStatus->position.x && playerStatus->position.x <= xMax &&
zMin <= playerStatus->position.z && playerStatus->position.z <= zMax)
{
stage = var6;
}
for (i = 0; i < encounterStatus->numEncounters; i++) {
encounterStatus->encounterList[i]->stage = stage;
}
return ApiStatus_DONE2;
}

View File

@ -1,5 +0,0 @@
#include "nok_14.h"
#include "world/common/todo/SetCamera0Flag1000.inc.c"
#include "world/common/todo/UnsetCamera0Flag1000.inc.c"

View File

@ -1,5 +0,0 @@
#include "nok_14.h"
#include "world/common/enemy/ai/TackleAI.inc.c"
#include "world/common/enemy/ai/ParatroopaAI.inc.c"

View File

@ -2,8 +2,28 @@
/// @brief Koopa Region - Path to Fortress 1
#include "common.h"
#include "../nok.h"
#include "message_ids.h"
#include "map.h"
#include "../nok.h"
#include "mapfs/nok_14_shape.h"
#include "mapfs/nok_14_hit.h"
enum {
NPC_KoopaTroopa_01 = 0,
NPC_SpikedGoomba = 2,
NPC_ParaTroopa = 3,
NPC_KoopaTroopa_02 = 4,
};
enum {
MV_Item_ThunderBolt = MapVar(0),
};
#define NAMESPACE nok_14
extern EvtScript N(EVS_Main);
extern EvtScript N(EVS_SetupMusic);
extern EvtScript N(EVS_SetupBridge);
extern EvtScript N(EVS_MakeEntities);
extern NpcGroupList N(DefaultNPCs);

View File

@ -0,0 +1,14 @@
#include "nok_14.h"
EntryList N(Entrances) = {
[nok_14_ENTRY_0] { -855.0, 75.0, -35.0, 90.0 },
[nok_14_ENTRY_1] { 436.0, 0.0, -49.0, 270.0 },
};
MapSettings N(settings) = {
.main = &N(EVS_Main),
.entryList = &N(Entrances),
.entryCount = ENTRY_COUNT(N(Entrances)),
.background = &gBackgroundImage,
.tattle = { MSG_MapTattle_nok_14 },
};

View File

@ -0,0 +1,8 @@
#include "nok_14.h"
EvtScript N(EVS_SetupMusic) = {
EVT_CALL(SetMusicTrack, 0, SONG_PLEASANT_PATH, 0, 8)
EVT_CALL(PlaySound, SOUND_8000005B)
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,146 @@
#include "nok_14.h"
API_CALLABLE(N(UpdateEnounterStages)) {
PlayerStatus* playerStatus = &gPlayerStatus;
EncounterStatus* encounterStatus = &gCurrentEncounter;
Bytecode *args = script->ptrReadPos;
s32 xMin = evt_get_variable(script, *args++);
s32 xMax = evt_get_variable(script, *args++);
s32 zMin = evt_get_variable(script, *args++);
s32 zMax = evt_get_variable(script, *args++);
s32 stageWithoutBridge = evt_get_variable(script, *args++);
s32 stageWithBridge = evt_get_variable(script, *args++);
s32 stage = stageWithoutBridge;
s32 i;
if (xMin <= playerStatus->position.x && playerStatus->position.x <= xMax &&
zMin <= playerStatus->position.z && playerStatus->position.z <= zMax)
{
stage = stageWithBridge;
}
for (i = 0; i < encounterStatus->numEncounters; i++) {
encounterStatus->encounterList[i]->stage = stage;
}
return ApiStatus_DONE2;
}
// EVT_EXIT_WALK without EVT_SET_GROUP
EvtScript N(EVS_ExitWalk_nok_13_2) = {
EVT_CALL(UseExitHeading, 60, nok_14_ENTRY_0)
EVT_EXEC(ExitWalk)
EVT_CALL(GotoMap, EVT_PTR("nok_13"), nok_13_ENTRY_2)
EVT_WAIT(100)
EVT_RETURN
EVT_END
};
// EVT_EXIT_WALK without EVT_SET_GROUP
EvtScript N(EVS_ExitWalk_nok_15_0) = {
EVT_CALL(UseExitHeading, 60, nok_14_ENTRY_1)
EVT_EXEC(ExitWalk)
EVT_CALL(GotoMap, EVT_PTR("nok_15"), nok_15_ENTRY_0)
EVT_WAIT(100)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_TexPan_Flowers) = {
EVT_SET_GROUP(EVT_GROUP_00)
EVT_CALL(SetTexPanner, MODEL_hana1, TEX_PANNER_0)
EVT_CALL(SetTexPanner, MODEL_hana3, TEX_PANNER_0)
EVT_CALL(SetTexPanner, MODEL_hana4, TEX_PANNER_0)
EVT_LABEL(10)
EVT_LOOP(12)
EVT_CALL(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_MAIN, 0, 0)
EVT_WAIT(1)
EVT_END_LOOP
EVT_LOOP(12)
EVT_CALL(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_MAIN, 0x00004000, 0)
EVT_WAIT(1)
EVT_END_LOOP
EVT_GOTO(10)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_TexPan_Water) = {
EVT_SET_GROUP(EVT_GROUP_00)
EVT_THREAD
EVT_CALL(SetTexPanner, MODEL_suimen1, TEX_PANNER_1)
EVT_CALL(SetTexPanner, MODEL_suimen2, TEX_PANNER_1)
EVT_SET(LVar0, 0)
EVT_SET(LVar1, 0)
EVT_SET(LVar2, 0)
EVT_LABEL(10)
EVT_CALL(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, LVar0, 0)
EVT_CALL(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_AUX, LVar1, LVar2)
EVT_SUB(LVar0, 100)
EVT_SUB(LVar1, 400)
EVT_ADD(LVar1, 1000)
EVT_WAIT(1)
EVT_GOTO(10)
EVT_END_THREAD
EVT_THREAD
EVT_CALL(SetTexPanner, MODEL_kabemizu1, TEX_PANNER_2)
EVT_CALL(SetTexPanner, MODEL_kabemizu2, TEX_PANNER_2)
EVT_SET(LVar0, 0)
EVT_SET(LVar1, 0)
EVT_SET(LVar2, 0)
EVT_LABEL(20)
EVT_CALL(SetTexPanOffset, TEX_PANNER_2, TEX_PANNER_MAIN, LVar0, 0)
EVT_CALL(SetTexPanOffset, TEX_PANNER_2, TEX_PANNER_AUX, LVar1, LVar2)
EVT_SUB(LVar0, 100)
EVT_ADD(LVar1, 800)
EVT_SUB(LVar2, 400)
EVT_WAIT(1)
EVT_GOTO(20)
EVT_END_THREAD
EVT_CALL(SetTexPanner, MODEL_taki1, TEX_PANNER_3)
EVT_SET(LVar0, 0)
EVT_LABEL(30)
EVT_CALL(SetTexPanOffset, TEX_PANNER_3, TEX_PANNER_MAIN, 0, LVar0)
EVT_SUB(LVar0, 1000)
EVT_WAIT(1)
EVT_GOTO(30)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_BindExitTriggers) = {
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_nok_13_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0)
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_nok_15_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili2, 1, 0)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_UpdateEnounterStages) = {
EVT_LABEL(0)
EVT_IF_GE(GB_StoryProgress, STORY_CH1_MADE_SECOND_BRIDGE)
EVT_CALL(N(UpdateEnounterStages), -115, 110, -110, 999, BTL_NOK_STAGE_00, BTL_NOK_STAGE_02)
EVT_END_IF
EVT_WAIT(1)
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_Main) = {
EVT_SET(GB_WorldLocation, LOCATION_PLEASANT_PATH)
EVT_CALL(SetSpriteShading, SHADING_NONE)
EVT_SETUP_CAMERA_DEFAULT()
EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs)))
EVT_EXEC_WAIT(N(EVS_MakeEntities))
EVT_EXEC(N(EVS_TexPan_Flowers))
EVT_EXEC(N(EVS_TexPan_Water))
EVT_EXEC(N(EVS_SetupBridge))
EVT_EXEC(N(EVS_UpdateEnounterStages))
EVT_EXEC(N(EVS_SetupMusic))
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilit, COLLIDER_FLAGS_UPPER_MASK)
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilit2, COLLIDER_FLAGS_UPPER_MASK)
EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers)))
EVT_EXEC(EnterWalk)
EVT_WAIT(1)
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,73 @@
#include "nok_14.h"
#include "entity.h"
EvtScript N(EVS_ReadSign_NoEntry) = {
EVT_CALL(IsStartingConversation, LVar0)
EVT_IF_EQ(LVar0, TRUE)
EVT_RETURN
EVT_END_IF
EVT_SET_GROUP(EVT_GROUP_00)
EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_PARTIAL)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_0179, 160, 40)
EVT_CALL(DisablePlayerInput, FALSE)
EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_BreakBlock_ThunderBolt) = {
EVT_IF_EQ(GF_NOK14_Item_ThunderBolt, TRUE)
EVT_RETURN
EVT_END_IF
EVT_THREAD
EVT_CALL(DisablePlayerInput, TRUE)
EVT_LOOP(25)
EVT_WAIT(1)
EVT_CALL(GetNpcPos, NPC_KoopaTroopa_02, LVar0, LVar1, LVar2)
EVT_CALL(SetItemPos, MV_Item_ThunderBolt, LVar0, LVar1, LVar2)
EVT_END_LOOP
EVT_CALL(SetNpcPos, NPC_KoopaTroopa_02, 0, -1000, 0)
EVT_CALL(DisablePlayerInput, FALSE)
EVT_END_THREAD
EVT_CALL(SetNpcPos, NPC_KoopaTroopa_02, -345, 75, -117)
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
EVT_CALL(SetNpcJumpscale, NPC_KoopaTroopa_02, EVT_FLOAT(1.5))
EVT_IF_LE(LVar0, -345)
EVT_CALL(NpcJump0, NPC_KoopaTroopa_02, -280, 0, -112, 20)
EVT_ELSE
EVT_CALL(NpcJump0, NPC_KoopaTroopa_02, -410, 0, -112, 20)
EVT_END_IF
EVT_RETURN
EVT_END
};
EvtScript N(EVS_MakeEntities) = {
EVT_CALL(MakeEntity, EVT_PTR(Entity_Signpost), -150, 0, -175, 0, MAKE_ENTITY_END)
EVT_CALL(AssignScript, EVT_PTR(N(EVS_ReadSign_NoEntry)))
EVT_SET(LVar0, 1)
EVT_IF_LT(GB_StoryProgress, STORY_CH1_MADE_SECOND_BRIDGE)
EVT_SET(LVar0, 0)
EVT_END_IF
EVT_IF_EQ(LVar0, 0)
EVT_CALL(MakeEntity, EVT_PTR(Entity_BlueSwitch), 100, 0, -185, 0, MAKE_ENTITY_END)
EVT_CALL(AssignSwitchFlag, EVT_INDEX_OF_AREA_FLAG(AF_NOK_02))
EVT_END_IF
EVT_CALL(MakeItemEntity, ITEM_COIN, -655, 75, -35, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_NOK14_Item_CoinA)
EVT_CALL(MakeItemEntity, ITEM_COIN, -640, 75, -20, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_NOK14_Item_CoinB)
EVT_CALL(MakeItemEntity, ITEM_COIN, -640, 75, -50, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_NOK14_Item_CoinC)
EVT_CALL(MakeItemEntity, ITEM_COIN, -670, 75, -20, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_NOK14_Item_CoinD)
EVT_CALL(MakeItemEntity, ITEM_COIN, -670, 75, -50, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_NOK14_Item_CoinE)
EVT_CALL(MakeEntity, EVT_PTR(Entity_BrickBlock), -345, 77, -117, 0, MAKE_ENTITY_END)
EVT_CALL(AssignScript, EVT_PTR(N(EVS_BreakBlock_ThunderBolt)))
EVT_CALL(MakeItemEntity, ITEM_THUNDER_BOLT, -345, 102, -117, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_NOK14_Item_ThunderBolt)
EVT_SET(MV_Item_ThunderBolt, LVar0)
EVT_CALL(MakeEntity, EVT_PTR(Entity_BrickBlock), 200, 60, -160, 0, MAKE_ENTITY_END)
EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenYellowBlock), 250, 60, -160, 0, ITEM_FIRE_FLOWER, MAKE_ENTITY_END)
EVT_CALL(AssignBlockFlag, GF_NOK14_HiddenItem_FireFlower)
EVT_CALL(MakeEntity, EVT_PTR(Entity_BrickBlock), 300, 60, -160, 0, MAKE_ENTITY_END)
EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenPanel), -650, 75, -50, 0, MODEL_o251, MAKE_ENTITY_END)
EVT_CALL(AssignPanelFlag, GF_NOK14_HiddenPanel)
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,150 @@
#include "nok_14.h"
#include "world/common/todo/SetCamera0Flag1000.inc.c"
#include "world/common/todo/UnsetCamera0Flag1000.inc.c"
EvtScript N(EVS_Scene_AssembleBridge) = {
EVT_SET_GROUP(EVT_GROUP_00)
EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_PARTIAL)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_WAIT(10)
EVT_CALL(DisablePlayerPhysics, TRUE)
EVT_CALL(N(SetCamera0Flag1000))
EVT_CALL(InterpCamTargetPos, CAM_DEFAULT, TRUE, 3, 0, -60, 20)
EVT_WAIT(10)
EVT_SET(GB_StoryProgress, STORY_CH1_MADE_SECOND_BRIDGE)
EVT_CALL(PlaySoundAt, SOUND_71, 0, 0, 0, -60)
EVT_CALL(MakeLerp, -200, 0, 15, EASING_COS_IN)
EVT_LABEL(10)
EVT_CALL(UpdateLerp)
EVT_CALL(TranslateGroup, MODEL_hashi, 0, LVar0, 0)
EVT_WAIT(1)
EVT_IF_NE(LVar1, 0)
EVT_GOTO(10)
EVT_END_IF
EVT_LOOP(6)
EVT_CALL(TranslateGroup, MODEL_hashi, 0, 3, 0)
EVT_WAIT(1)
EVT_CALL(TranslateGroup, MODEL_hashi, 0, 0, 0)
EVT_WAIT(1)
EVT_END_LOOP
EVT_WAIT(15)
EVT_CALL(PlaySoundAt, SOUND_67, 0, -84, 0, -60)
EVT_THREAD
EVT_CALL(MakeLerp, 0, 90, 8, EASING_COS_IN_OUT)
EVT_LABEL(20)
EVT_CALL(UpdateLerp)
EVT_CALL(RotateModel, MODEL_ita11, LVar0, -1, 0, 0)
EVT_WAIT(1)
EVT_IF_NE(LVar1, 0)
EVT_GOTO(20)
EVT_END_IF
EVT_END_THREAD
EVT_WAIT(3)
EVT_CALL(PlaySoundAt, SOUND_68, 0, -56, 0, -60)
EVT_THREAD
EVT_CALL(MakeLerp, 0, 90, 8, EASING_LINEAR)
EVT_LABEL(24)
EVT_CALL(UpdateLerp)
EVT_CALL(RotateModel, MODEL_ita22, LVar0, 1, 0, 0)
EVT_WAIT(1)
EVT_IF_NE(LVar1, 0)
EVT_GOTO(24)
EVT_END_IF
EVT_END_THREAD
EVT_WAIT(3)
EVT_CALL(PlaySoundAt, SOUND_69, 0, -28, 0, -60)
EVT_THREAD
EVT_CALL(MakeLerp, 0, 90, 8, EASING_LINEAR)
EVT_LABEL(21)
EVT_CALL(UpdateLerp)
EVT_CALL(RotateModel, MODEL_ita33, LVar0, -1, 0, 0)
EVT_WAIT(1)
EVT_IF_NE(LVar1, 0)
EVT_GOTO(21)
EVT_END_IF
EVT_END_THREAD
EVT_WAIT(3)
EVT_CALL(PlaySoundAt, SOUND_6A, 0, 0, 0, -60)
EVT_THREAD
EVT_CALL(MakeLerp, 0, 90, 8, EASING_LINEAR)
EVT_LABEL(25)
EVT_CALL(UpdateLerp)
EVT_CALL(RotateModel, MODEL_ita44, LVar0, 1, 0, 0)
EVT_WAIT(1)
EVT_IF_NE(LVar1, 0)
EVT_GOTO(25)
EVT_END_IF
EVT_END_THREAD
EVT_WAIT(3)
EVT_CALL(PlaySoundAt, SOUND_6B, 0, 28, 0, -60)
EVT_THREAD
EVT_CALL(MakeLerp, 0, 90, 8, EASING_LINEAR)
EVT_LABEL(22)
EVT_CALL(UpdateLerp)
EVT_CALL(RotateModel, MODEL_ita55, LVar0, -1, 0, 0)
EVT_WAIT(1)
EVT_IF_NE(LVar1, 0)
EVT_GOTO(22)
EVT_END_IF
EVT_END_THREAD
EVT_WAIT(3)
EVT_CALL(PlaySoundAt, SOUND_6C, 0, 56, 0, -60)
EVT_THREAD
EVT_CALL(MakeLerp, 0, 90, 8, EASING_LINEAR)
EVT_LABEL(26)
EVT_CALL(UpdateLerp)
EVT_CALL(RotateModel, MODEL_ita66, LVar0, 1, 0, 0)
EVT_WAIT(1)
EVT_IF_NE(LVar1, 0)
EVT_GOTO(26)
EVT_END_IF
EVT_END_THREAD
EVT_WAIT(3)
EVT_CALL(PlaySoundAt, SOUND_6D, 0, 84, 0, -60)
EVT_THREAD
EVT_CALL(MakeLerp, 0, 90, 8, EASING_LINEAR)
EVT_LABEL(23)
EVT_CALL(UpdateLerp)
EVT_CALL(RotateModel, MODEL_ita77, LVar0, -1, 0, 0)
EVT_WAIT(1)
EVT_IF_NE(LVar1, 0)
EVT_GOTO(23)
EVT_END_IF
EVT_END_THREAD
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt1, COLLIDER_FLAGS_UPPER_MASK)
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o255, COLLIDER_FLAGS_UPPER_MASK)
EVT_WAIT(20)
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
EVT_CALL(InterpCamTargetPos, CAM_DEFAULT, TRUE, LVar0, LVar1, LVar2, 10)
EVT_CALL(N(UnsetCamera0Flag1000))
EVT_CALL(DisablePlayerPhysics, FALSE)
EVT_CALL(DisablePlayerInput, FALSE)
EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL)
EVT_UNBIND
EVT_RETURN
EVT_END
};
EvtScript N(EVS_SetupBridge) = {
EVT_SET(LVar0, 1)
EVT_IF_LT(GB_StoryProgress, STORY_CH1_MADE_SECOND_BRIDGE)
EVT_SET(LVar0, 0)
EVT_END_IF
EVT_IF_EQ(LVar0, 0)
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_Scene_AssembleBridge)), TRIGGER_AREA_FLAG_SET, AF_NOK_02, 1, 0)
EVT_CALL(TranslateGroup, MODEL_hashi, 0, -200, 0)
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o255, COLLIDER_FLAGS_UPPER_MASK)
EVT_RETURN
EVT_END_IF
EVT_CALL(RotateModel, MODEL_ita11, 90, -1, 0, 0)
EVT_CALL(RotateModel, MODEL_ita33, 90, -1, 0, 0)
EVT_CALL(RotateModel, MODEL_ita55, 90, -1, 0, 0)
EVT_CALL(RotateModel, MODEL_ita77, 90, -1, 0, 0)
EVT_CALL(RotateModel, MODEL_ita22, 90, 1, 0, 0)
EVT_CALL(RotateModel, MODEL_ita44, 90, 1, 0, 0)
EVT_CALL(RotateModel, MODEL_ita66, 90, 1, 0, 0)
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt1, COLLIDER_FLAGS_UPPER_MASK)
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,139 @@
#include "nok_14.h"
#include "world/common/enemy/complete/KoopaTroopa_Wander.inc.c"
#include "world/common/enemy/complete/SpikedGoomba_Wander.inc.c"
#include "world/common/enemy/complete/Paratroopa.inc.c"
#include "world/common/enemy/complete/KoopaTroopa_Stationary.inc.c"
EvtScript N(EVS_NpcIdle_KoopaTroopa_01) = {
EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2)
EVT_CALL(AwaitPlayerApproach, -650, -35, 100)
EVT_CALL(PlaySoundAt, SOUND_SEARCH_BUSH, 0, -650, 75, -120)
EVT_THREAD
EVT_LOOP(5)
EVT_CALL(TranslateModel, MODEL_o122, 2, 0, 0)
EVT_WAIT(1)
EVT_CALL(TranslateModel, MODEL_o122, -2, 0, 0)
EVT_WAIT(1)
EVT_END_LOOP
EVT_END_THREAD
EVT_WAIT(5)
EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_40 | NPC_FLAG_40000 | NPC_FLAG_200000, TRUE)
EVT_THREAD
EVT_CALL(MakeLerp, 0, 360, 20, EASING_LINEAR)
EVT_LABEL(1)
EVT_CALL(UpdateLerp)
EVT_CALL(SetNpcRotation, NPC_SELF, 0, LVar0, 0)
EVT_WAIT(1)
EVT_IF_EQ(LVar1, 1)
EVT_GOTO(1)
EVT_END_IF
EVT_END_THREAD
EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(0.6))
EVT_CALL(NpcJump0, NPC_SELF, -650, 75, -30, 20)
EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_40 | NPC_FLAG_40000 | NPC_FLAG_200000, FALSE)
EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_GRAVITY, TRUE)
EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_NpcAI_KoopaTroopa_Wander)))
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_KoopaTroopa_01) = {
EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_GRAVITY, FALSE)
EVT_CALL(SetNpcPos, NPC_SELF, -650, 75, -150)
EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_KoopaTroopa_01)))
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_KoopaTroopa_02) = {
EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_HAS_SHADOW, FALSE)
EVT_RETURN
EVT_END
};
StaticNpc N(NpcData_KoopaTroopa_01) = {
.id = NPC_KoopaTroopa_01,
.settings = &N(NpcSettings_KoopaTroopa_Wander),
.pos = { -667.0f, 75.0f, -50.0f },
.yaw = 270,
.flags = ENEMY_FLAG_400 | ENEMY_FLAG_2000,
.init = &N(EVS_NpcInit_KoopaTroopa_01),
.drops = KOOPA_TROOPA_DROPS_B,
.territory = {
.wander = {
.isFlying = FALSE,
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
.wanderShape = SHAPE_CYLINDER,
.centerPos = { -690, 75, -50 },
.wanderSize = { 50 },
.detectShape = SHAPE_CYLINDER,
.detectPos = { -670, 75, -112 },
.detectSize = { 500 },
}
},
.animations = KOOPA_TROOPA_ANIMS,
};
StaticNpc N(NpcData_ParaTroopa) = {
.id = NPC_ParaTroopa,
.settings = &N(NpcSettings_ParaTroopa),
.pos = { 184.0f, 50.0f, -100.0f },
.yaw = 270,
.flags = ENEMY_FLAG_400 | ENEMY_FLAG_800,
.drops = PARATROOPA_DROPS,
.territory = {
.wander = {
.isFlying = FALSE,
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
.wanderShape = SHAPE_RECT,
.centerPos = { 184, 50, -100 },
.wanderSize = { 65, 40 },
.detectShape = SHAPE_CYLINDER,
.detectPos = { 238, 50, -100 },
.detectSize = { 200 },
}
},
.animations = PARATROOPA_ANIMS,
};
StaticNpc N(NpcData_SpikedGoomba) = {
.id = NPC_SpikedGoomba,
.settings = &N(NpcSettings_SpikedGoomba_Wander),
.pos = { -257.0f, 0.0f, -47.0f },
.yaw = 90,
.flags = ENEMY_FLAG_400 | ENEMY_FLAG_800 | ENEMY_FLAG_2000,
.drops = SPIKED_GOOMBA_DROPS,
.territory = {
.wander = {
.isFlying = TRUE,
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
.wanderShape = SHAPE_CYLINDER,
.centerPos = { -257, 0, -47 },
.wanderSize = { 50 },
.detectShape = SHAPE_CYLINDER,
.detectPos = { -257, 0, -47 },
.detectSize = { 200 },
}
},
.animations = SPIKED_GOOMBA_ANIMS,
};
StaticNpc N(NpcData_KoopaTroopa_02) = {
.id = NPC_KoopaTroopa_02,
.settings = &N(NpcSettings_KoopaTroopa_Stationary),
.pos = { NPC_DISPOSE_LOCATION },
.yaw = 0,
.flags = ENEMY_FLAG_1 | ENEMY_FLAG_200 | ENEMY_FLAG_400 | ENEMY_FLAG_800 | ENEMY_FLAG_4000,
.init = &N(EVS_NpcInit_KoopaTroopa_02),
.drops = KOOPA_TROOPA_DROPS_B,
.animations = KOOPA_TROOPA_ANIMS,
};
NpcGroupList N(DefaultNPCs) = {
NPC_GROUP(N(NpcData_KoopaTroopa_01), BTL_NOK_FORMATION_0B, BTL_NOK_STAGE_00),
NPC_GROUP(N(NpcData_ParaTroopa), BTL_NOK_FORMATION_11, BTL_NOK_STAGE_02),
NPC_GROUP(N(NpcData_SpikedGoomba), BTL_NOK_FORMATION_06, BTL_NOK_STAGE_00),
NPC_GROUP(N(NpcData_KoopaTroopa_02), BTL_NOK_FORMATION_0C, BTL_NOK_STAGE_00),
{}
};

View File

@ -1,12 +0,0 @@
#include "nok_15.h"
static char* N(exit_str_0) = "nok_14";
static char* N(exit_str_1) = "trd_00";
static char* N(exit_str_2) = "nok_15";
static char* N(exit_str_3) = "";
#include "world/common/entity/Pipe.inc.c"
#include "world/common/enemy/ai/TackleAI.inc.c"
#include "world/common/enemy/ai/ParatroopaAI.inc.c"

View File

@ -1,4 +0,0 @@
#include "nok_15.h"
#include "common/foliage.inc.c"

View File

@ -2,8 +2,26 @@
/// @brief Koopa Region - Path to Fortress 2
#include "common.h"
#include "../nok.h"
#include "message_ids.h"
#include "map.h"
#include "../nok.h"
#include "mapfs/nok_15_shape.h"
#include "mapfs/nok_15_hit.h"
enum {
NPC_KoopaTroopa = 0,
NPC_ParaTroopa = 1,
};
enum {
MF_TreeDrop_StarPiece = MapFlag(10),
};
#define NAMESPACE nok_15
extern EvtScript N(EVS_Main);
extern EvtScript N(EVS_SetupMusic);
extern EvtScript N(EVS_SetupFoliage);
extern EvtScript N(EVS_MakeEntities);
extern NpcGroupList N(DefaultNPCs);

View File

@ -0,0 +1,17 @@
#include "nok_15.h"
EntryList N(Entrances) = {
[nok_15_ENTRY_0] { -782.0, 0.0, -48.0, 90.0 },
[nok_15_ENTRY_1] { -21.0, 0.0, -931.0, 145.0 },
[nok_15_ENTRY_2] { -238.0, 200.0, -758.0, 130.0 },
[nok_15_ENTRY_3] { -62.0, 30.0, -430.0, 0.0 },
[nok_15_ENTRY_4] { -138.0, 260.0, -638.0, 320.0 },
};
MapSettings N(settings) = {
.main = &N(EVS_Main),
.entryList = &N(Entrances),
.entryCount = ENTRY_COUNT(N(Entrances)),
.background = &gBackgroundImage,
.tattle = { MSG_MapTattle_nok_15 },
};

View File

@ -0,0 +1,8 @@
#include "nok_15.h"
EvtScript N(EVS_SetupMusic) = {
EVT_CALL(SetMusicTrack, 0, SONG_PLEASANT_PATH, 0, 8)
EVT_CALL(PlaySound, SOUND_8000005B)
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,152 @@
#include "nok_15.h"
#include "effects.h"
#include "world/common/entity/Pipe.inc.c"
#include "world/common/entity/Pipe.data.inc.c"
// EVT_EXIT_WALK without EVT_SET_GROUP
EvtScript N(EVS_ExitWalk_nok_14_1) = {
EVT_CALL(UseExitHeading, 60, nok_15_ENTRY_0)
EVT_EXEC(ExitWalk)
EVT_CALL(GotoMap, EVT_PTR("nok_14"), nok_14_ENTRY_1)
EVT_WAIT(100)
EVT_RETURN
EVT_END
};
// EVT_EXIT_WALK without EVT_SET_GROUP
EvtScript N(EVS_ExitWalk_trd_00_0) = {
EVT_CALL(UseExitHeading, 60, nok_15_ENTRY_1)
EVT_EXEC(ExitWalk)
EVT_CALL(GotoMap, EVT_PTR("trd_00"), trd_00_ENTRY_0)
EVT_WAIT(100)
EVT_RETURN
EVT_END
};
// EVT_EXIT_WALK without EVT_SET_GROUP
EvtScript N(EVS_ExitWalk_trd_00_4) = {
EVT_CALL(UseExitHeading, 60, nok_15_ENTRY_2)
EVT_EXEC(ExitWalk)
EVT_CALL(GotoMap, EVT_PTR("trd_00"), trd_00_ENTRY_4)
EVT_WAIT(100)
EVT_RETURN
EVT_END
};
BombTrigger N(BombPos_Wall) = {
.pos = { -26.0f, 0.0f, -531.0f },
.radius = 0.0f
};
EvtScript N(EVS_Blast_Wall) = {
EVT_PLAY_EFFECT(EFFECT_BOMBETTE_BREAKING, 0, 60, 61, 1, 10, 30)
EVT_SET(GF_NOK15_BombedWall, TRUE)
EVT_CALL(EnableModel, MODEL_bomb_ato, TRUE)
EVT_CALL(EnableModel, MODEL_bomb_1, FALSE)
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt1, COLLIDER_FLAGS_UPPER_MASK)
EVT_UNBIND
EVT_RETURN
EVT_END
};
EvtScript N(EVS_TexPan_Water) = {
EVT_THREAD
EVT_CALL(SetTexPanner, MODEL_suimen1, TEX_PANNER_1)
EVT_SET(LVar0, 0)
EVT_SET(LVar1, 0)
EVT_SET(LVar2, 0)
EVT_LABEL(10)
EVT_CALL(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, LVar0, 0)
EVT_CALL(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_AUX, LVar1, LVar2)
EVT_SUB(LVar0, 100)
EVT_SUB(LVar1, 400)
EVT_ADD(LVar1, 1000)
EVT_WAIT(1)
EVT_GOTO(10)
EVT_END_THREAD
EVT_CALL(SetTexPanner, MODEL_kabemizu1, TEX_PANNER_2)
EVT_SET(LVar0, 0)
EVT_SET(LVar1, 0)
EVT_SET(LVar2, 0)
EVT_LABEL(20)
EVT_CALL(SetTexPanOffset, TEX_PANNER_2, TEX_PANNER_MAIN, LVar0, 0)
EVT_CALL(SetTexPanOffset, TEX_PANNER_2, TEX_PANNER_AUX, LVar1, LVar2)
EVT_SUB(LVar0, 100)
EVT_ADD(LVar1, 800)
EVT_SUB(LVar2, 400)
EVT_WAIT(1)
EVT_GOTO(20)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_GotoMap_nok_15_4) = {
EVT_CALL(GotoMap, EVT_PTR("nok_15"), nok_15_ENTRY_4)
EVT_WAIT(100)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_GotoMap_nok_15_3) = {
EVT_CALL(GotoMap, EVT_PTR("nok_15"), nok_15_ENTRY_3)
EVT_WAIT(100)
EVT_RETURN
EVT_END
};
MAP_RODATA_PAD(1, exits);
EvtScript N(EVS_ExitPipe) = {
EVT_SET(LVarA, LVar0)
EVT_SET(LVarB, LVar1)
EVT_SET(LVarC, LVar2)
EVT_EXEC_WAIT(N(EVS_Pipe_ExitVertical))
EVT_RETURN
EVT_END
};
EvtScript N(EVS_BindExitTriggers) = {
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_nok_14_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0)
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_trd_00_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili2, 1, 0)
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_trd_00_4)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili3, 1, 0)
EVT_SET(LVar0, nok_15_ENTRY_3)
EVT_SET(LVar1, COLLIDER_o680)
EVT_SET(LVar2, EVT_PTR(N(EVS_GotoMap_nok_15_4)))
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitPipe)), TRIGGER_FLOOR_TOUCH, LVar1, 1, 0)
EVT_SET(LVar0, nok_15_ENTRY_4)
EVT_SET(LVar1, COLLIDER_o679)
EVT_SET(LVar2, EVT_PTR(N(EVS_GotoMap_nok_15_3)))
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitPipe)), TRIGGER_FLOOR_TOUCH, LVar1, 1, 0)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_Main) = {
EVT_SET(GB_WorldLocation, LOCATION_PLEASANT_PATH)
EVT_CALL(SetSpriteShading, SHADING_NONE)
EVT_SETUP_CAMERA_DEFAULT()
EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs)))
EVT_EXEC_WAIT(N(EVS_MakeEntities))
EVT_EXEC(N(EVS_SetupFoliage))
EVT_EXEC(N(EVS_TexPan_Water))
EVT_IF_EQ(GF_NOK15_BombedWall, FALSE)
EVT_CALL(EnableModel, MODEL_bomb_ato, FALSE)
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_Blast_Wall)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Wall)), 1, 0)
EVT_ELSE
EVT_CALL(EnableModel, MODEL_bomb_1, FALSE)
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt1, COLLIDER_FLAGS_UPPER_MASK)
EVT_END_IF
EVT_EXEC(N(EVS_SetupMusic))
EVT_CALL(GetEntryID, LVar0)
EVT_IF_LE(LVar0, nok_15_ENTRY_2)
EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers)))
EVT_EXEC(EnterWalk)
EVT_ELSE
EVT_SET(LVarA, EVT_PTR(N(EVS_BindExitTriggers)))
EVT_EXEC(N(EVS_Pipe_EnterVertical))
EVT_END_IF
EVT_WAIT(1)
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,8 @@
#include "nok_15.h"
#include "entity.h"
EvtScript N(EVS_MakeEntities) = {
EVT_CALL(MakeEntity, EVT_PTR(Entity_HeartBlock), -50, 60, -825, 35, 6, MAKE_ENTITY_END)
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,57 @@
#include "nok_15.h"
#include "world/common/enemy/complete/KoopaTroopa_Wander.inc.c"
#include "world/common/enemy/complete/Paratroopa.inc.c"
#include "world/common/enemy/complete/SpikedGoomba_Wander.inc.c"
StaticNpc N(NpcData_KoopaTroopa) = {
.id = NPC_KoopaTroopa,
.settings = &N(NpcSettings_KoopaTroopa_Wander),
.pos = { -450.0f, 0.0f, -45.0f },
.yaw = 270,
.flags = ENEMY_FLAG_400 | ENEMY_FLAG_800 | ENEMY_FLAG_2000,
.drops = KOOPA_TROOPA_DROPS_B,
.territory = {
.wander = {
.isFlying = TRUE,
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
.wanderShape = SHAPE_CYLINDER,
.centerPos = { -450, 0, -45 },
.wanderSize = { 30 },
.detectShape = SHAPE_CYLINDER,
.detectPos = { -450, 0, -45 },
.detectSize = { 200 },
}
},
.animations = KOOPA_TROOPA_ANIMS,
.aiDetectFlags = AI_DETECT_SIGHT,
};
StaticNpc N(NpcData_ParaTroopa) = {
.id = NPC_ParaTroopa,
.settings = &N(NpcSettings_ParaTroopa),
.pos = { -150.0f, 50.0f, -70.0f },
.yaw = 270,
.flags = ENEMY_FLAG_400 | ENEMY_FLAG_800,
.drops = PARATROOPA_DROPS,
.territory = {
.wander = {
.isFlying = FALSE,
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
.wanderShape = SHAPE_CYLINDER,
.centerPos = { -150, 50, -70 },
.wanderSize = { 30 },
.detectShape = SHAPE_CYLINDER,
.detectPos = { -150, 50, -70 },
.detectSize = { 200 },
}
},
.animations = PARATROOPA_ANIMS,
.aiDetectFlags = AI_DETECT_SIGHT,
};
NpcGroupList N(DefaultNPCs) = {
NPC_GROUP(N(NpcData_KoopaTroopa), BTL_NOK_FORMATION_0D, BTL_NOK_STAGE_00),
NPC_GROUP(N(NpcData_ParaTroopa), BTL_NOK_FORMATION_14, BTL_NOK_STAGE_00),
{}
};

View File

@ -0,0 +1,38 @@
#include "nok_15.h"
#include "common/foliage.inc.c"
FoliageModelList N(Tree1_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_ha);
FoliageModelList N(Tree1_TrunkModels) = FOLIAGE_MODEL_LIST(MODEL_moku);
FoliageDropList N(Tree1_Drops) = {
.count = 1,
.drops = {
{
.itemID = ITEM_STAR_PIECE,
.pos = { -523, 100, -110 },
.spawnMode = ITEM_SPAWN_MODE_FALL_NEVER_VANISH,
.pickupFlag = GF_NOK15_Tree1_StarPiece,
.spawnFlag = MF_TreeDrop_StarPiece,
},
}
};
ShakeTreeConfig N(ShakeTree_Tree1) = {
.leaves = &N(Tree1_LeafModels),
.trunk = &N(Tree1_TrunkModels),
.drops = &N(Tree1_Drops),
};
BombTrigger N(BombPos_Tree1) = {
.pos = { -592.0f, 0.0f, -118.0f },
.radius = 0.0f
};
EvtScript N(EVS_SetupFoliage) = {
EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree1)))
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o677, 1, 0)
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree1)), 1, 0)
EVT_RETURN
EVT_END
};

View File

@ -1,29 +1,29 @@
#include "obk_03.h"
s32 N(ShopMessages)[] = {
MSG_Shop_0060,
MSG_Shop_0061,
MSG_Shop_0062,
MSG_Shop_0063,
MSG_Shop_0064,
MSG_Shop_0065,
MSG_Shop_0066,
MSG_Shop_0067,
MSG_Shop_0068,
MSG_Shop_0069,
MSG_Shop_006A,
MSG_Shop_006B,
MSG_Shop_006C,
MSG_Shop_006D,
MSG_Shop_006E,
MSG_Shop_006F,
MSG_Shop_0070,
MSG_Shop_0071,
MSG_Shop_0072,
MSG_Shop_0073,
MSG_Shop_0074,
MSG_Shop_0075,
MSG_Shop_0076,
[SHOP_MSG_BUY_CONFIRM ] MSG_Shop_00_OBK03,
[SHOP_MSG_NOT_ENOUGH_COINS ] MSG_Shop_01_OBK03,
[SHOP_MSG_NOT_ENOUGH_ROOM ] MSG_Shop_02_OBK03,
[SHOP_MSG_BUY_THANK_YOU ] MSG_Shop_03_OBK03,
[SHOP_MSG_GREETING ] MSG_Shop_04_OBK03,
[SHOP_MSG_INSTRUCTIONS ] MSG_Shop_05_OBK03,
[SHOP_MSG_NOTHING_TO_SELL ] MSG_Shop_06_OBK03,
[SHOP_MSG_SELL_WHICH ] MSG_Shop_07_OBK03,
[SHOP_MSG_SELL_CONFIRM ] MSG_Shop_08_OBK03,
[SHOP_MSG_SELL_CANCEL ] MSG_Shop_09_OBK03,
[SHOP_MSG_SELL_MORE ] MSG_Shop_0A_OBK03,
[SHOP_MSG_SELL_THANKS ] MSG_Shop_0B_OBK03,
[SHOP_MSG_NOTHING_TO_CHECK ] MSG_Shop_0C_OBK03,
[SHOP_MSG_NO_CHECK_ROOM ] MSG_Shop_0D_OBK03,
[SHOP_MSG_CHECK_WHICH ] MSG_Shop_0E_OBK03,
[SHOP_MSG_CHECK_ACCEPTED ] MSG_Shop_0F_OBK03,
[SHOP_MSG_CHECK_MORE ] MSG_Shop_10_OBK03,
[SHOP_MSG_NOTHING_TO_CLAIM ] MSG_Shop_11_OBK03,
[SHOP_MSG_NO_CLAIM_ROOM ] MSG_Shop_12_OBK03,
[SHOP_MSG_CLAIM_WHICH ] MSG_Shop_13_OBK03,
[SHOP_MSG_CLAIM_ACCEPTED ] MSG_Shop_14_OBK03,
[SHOP_MSG_CLAIM_MORE ] MSG_Shop_15_OBK03,
[SHOP_MSG_FAREWELL ] MSG_Shop_16_OBK03,
};
ShopItemData N(Inventory)[] = {
@ -56,10 +56,10 @@ ShopItemLocation N(ItemPositions)[] = {
EvtScript N(EVS_OnBuy) = {
EVT_SWITCH(LVar0)
EVT_CASE_EQ(3)
EVT_CASE_EQ(4)
EVT_CASE_EQ(1)
EVT_CASE_EQ(2)
EVT_CASE_EQ(SHOP_BUY_RESULT_CANCEL)
EVT_CASE_EQ(SHOP_BUY_RESULT_4)
EVT_CASE_EQ(SHOP_BUY_RESULT_OK)
EVT_CASE_EQ(SHOP_BUY_RESULT_2)
EVT_END_SWITCH
EVT_RETURN
EVT_END

View File

@ -21,6 +21,8 @@ enum {
};
enum {
AF_OMO_02 = AreaFlag(2),
AF_OMO_03 = AreaFlag(3),
AF_OMO07_NpcPool0 = AreaFlag(7),
AF_OMO07_NpcPool1 = AreaFlag(8),
AF_OMO07_NpcPool2 = AreaFlag(9),

View File

@ -8,7 +8,7 @@
#include "common/CompareFloats.inc.c"
#include "common/UnkBufferFunc.inc.c"
#include "common/AdvanceBuffer.inc.c"
#include "common/SetPlayerStatusPosYaw.inc.c"

View File

@ -495,7 +495,7 @@ StaticNpc N(NpcData_GrooveGuy) = {
.pos = { 320.0f, 10.0f, -145.0f },
.yaw = 270,
.flags = ENEMY_FLAG_400 | ENEMY_FLAG_800,
.drops = GROOVE_GUY_DROPS,
.drops = GROOVE_GUY_DROPS_A,
.territory = {
.wander = {
.isFlying = TRUE,

View File

@ -15,7 +15,7 @@ static char* N(exit_str_7) = "";
#include "common/CompareFloats.inc.c"
#include "common/UnkBufferFunc.inc.c"
#include "common/AdvanceBuffer.inc.c"
#include "common/SetPlayerStatusPosYaw.inc.c"

View File

@ -13,7 +13,7 @@ static char* N(exit_str_5) = "omo_16";
#include "common/CompareFloats.inc.c"
#include "common/UnkBufferFunc.inc.c"
#include "common/AdvanceBuffer.inc.c"
#include "common/SetPlayerStatusPosYaw.inc.c"

View File

@ -15,7 +15,7 @@ static char* N(exit_str_7) = "";
#include "common/CompareFloats.inc.c"
#include "common/UnkBufferFunc.inc.c"
#include "common/AdvanceBuffer.inc.c"
#include "common/SetPlayerStatusPosYaw.inc.c"

View File

@ -11,7 +11,7 @@ static char* N(exit_str_3) = "omo_03";
#include "common/CompareFloats.inc.c"
#include "common/UnkBufferFunc.inc.c"
#include "common/AdvanceBuffer.inc.c"
#include "common/SetPlayerStatusPosYaw.inc.c"

View File

@ -1,26 +0,0 @@
#include "omo_17.h"
static char* N(exit_str_0) = "omo_05";
static char* N(exit_str_1) = "omo_06";
static char* N(exit_str_2) = "omo_10";
static char* N(exit_str_3) = "omo_08";
static char* N(exit_str_4) = "omo_06\0";
static char* N(exit_str_5) = "omo_03";
static char* N(exit_str_6) = "omo_05\0";
static char* N(exit_str_7) = "";
#include "world/common/todo/UnsetCamera0MoveFlag1.inc.c"
#include "common/SetAngleClamped.inc.c"
#include "common/CompareFloats.inc.c"
#include "common/UnkBufferFunc.inc.c"
#include "common/SetPlayerStatusPosYaw.inc.c"
#include "common/SetNpcPosYaw.inc.c"
#include "common/CosInterpMinMax.inc.c"
#include "common/IsAOrBPressed.inc.c"

View File

@ -1,13 +0,0 @@
#include "omo_17.h"
#include "world/common/enemy/ai/ShyGuyWanderAI.inc.c"
#include "world/common/enemy/ai/GrooveGuyAI.inc.c"
#include "world/common/enemy/ai/FlyingAI.inc.c"
#include "world/common/enemy/ai/RangedAttackAI.inc.c"
#include "world/common/todo/SetInstigatorValue_3.inc.c"
#include "world/common/todo/GetEncounterEnemyIsOwner.inc.c"

View File

@ -2,8 +2,45 @@
/// @brief Shy Guy's Toybox - PNK Tracks Hallway
#include "common.h"
#include "../omo.h"
#include "message_ids.h"
#include "map.h"
#include "../omo.h"
#include "mapfs/omo_17_shape.h"
#include "mapfs/omo_17_hit.h"
#include "sprite/npc/TrainStationToad.h"
#include "sprite/npc/SpyGuy.h"
#include "sprite/npc/PyroGuy.h"
#include "sprite/npc/GrooveGuy.h"
enum {
NPC_Conductor = 0,
NPC_SpyGuy = 1,
NPC_SpyGuy_Rock1 = 2,
NPC_SpyGuy_Rock2 = 3,
NPC_SpyGuy_Rock3 = 4,
NPC_PyroGuy = 5,
NPC_GrooveGuy = 6,
};
enum {
MV_Unk_00 = MapVar(0),
MV_Unk_01 = MapVar(1),
MV_Unk_02 = MapVar(2),
MV_TrainPos = MapVar(11),
MV_Unk_0C = MapVar(12),
MV_Unk_0D = MapVar(13),
};
enum {
MF_Unk_00 = MapFlag(0),
};
#define NAMESPACE omo_17
extern EvtScript N(EVS_Main);
extern EvtScript N(EVS_SetupGizmos);
extern EvtScript N(EVS_EnterTrain);
extern EvtScript N(EVS_MakeEntities);
extern NpcGroupList N(DefaultNPCs);

View File

@ -0,0 +1,18 @@
#include "omo_17.h"
EntryList N(Entrances) = {
[omo_17_ENTRY_0] { -600.0, 0.0, 135.0, 90.0 },
[omo_17_ENTRY_1] { -600.0, 10.0, -135.0, 90.0 },
[omo_17_ENTRY_2] { 600.0, 0.0, 135.0, 270.0 },
[omo_17_ENTRY_3] { 600.0, 10.0, -135.0, 270.0 },
[omo_17_ENTRY_4] { -600.0, 10.0, 0.0, 90.0 },
[omo_17_ENTRY_5] { 600.0, 10.0, 0.0, 270.0 },
};
MapSettings N(settings) = {
.main = &N(EVS_Main),
.entryList = &N(Entrances),
.entryCount = ENTRY_COUNT(N(Entrances)),
.background = &gBackgroundImage,
.tattle = { MSG_MapTattle_omo_17 },
};

View File

@ -0,0 +1,38 @@
#include "omo_17.h"
EvtScript N(EVS_ExitWalk_omo_05_0) = EVT_EXIT_WALK(60, omo_17_ENTRY_0, "omo_05", omo_05_ENTRY_0);
EvtScript N(EVS_ExitWalk_omo_05_1) = EVT_EXIT_WALK(60, omo_17_ENTRY_1, "omo_05", omo_05_ENTRY_1);
EvtScript N(EVS_ExitWalk_omo_06_0) = EVT_EXIT_WALK(60, omo_17_ENTRY_2, "omo_06", omo_06_ENTRY_0);
EvtScript N(EVS_ExitWalk_omo_06_1) = EVT_EXIT_WALK(60, omo_17_ENTRY_3, "omo_06", omo_06_ENTRY_1);
EvtScript N(EVS_BindExitTriggers) = {
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_omo_05_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0)
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_omo_05_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili5, 1, 0)
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_omo_06_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili2, 1, 0)
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_omo_06_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili6, 1, 0)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_Main) = {
EVT_SET(GB_WorldLocation, LOCATION_SHY_GUYS_TOYBOX)
EVT_CALL(SetSpriteShading, SHADING_NONE)
EVT_SETUP_CAMERA_DEFAULT()
EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs)))
EVT_EXEC_WAIT(N(EVS_MakeEntities))
EVT_EXEC_WAIT(N(EVS_SetupGizmos))
EVT_CALL(SetMusicTrack, 0, SONG_SHY_GUY_TOYBOX, 0, 8)
EVT_CALL(GetEntryID, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_RANGE(omo_17_ENTRY_4, omo_17_ENTRY_5)
EVT_EXEC_WAIT(N(EVS_EnterTrain))
EVT_WAIT(3)
EVT_CASE_DEFAULT
EVT_CALL(SetGroupEnabled, MODEL_popo, 0)
EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers)))
EVT_EXEC(EnterWalk)
EVT_WAIT(1)
EVT_END_SWITCH
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,39 @@
#include "omo_17.h"
EvtScript N(EVS_Gizmos_Wheels) = {
EVT_LABEL(0)
EVT_CALL(MakeLerp, 0, -360, 100, EASING_LINEAR)
EVT_LABEL(1)
EVT_CALL(UpdateLerp)
EVT_CALL(RotateModel, MODEL_ha1, LVar0, 0, 0, 1)
EVT_CALL(RotateModel, MODEL_ha2, LVar0, 0, 0, 1)
EVT_CALL(RotateModel, MODEL_ha3, LVar0, 0, 0, 1)
EVT_CALL(RotateModel, MODEL_ha4, LVar0, 0, 0, 1)
EVT_CALL(RotateModel, MODEL_ha5, LVar0, 0, 0, 1)
EVT_CALL(RotateModel, MODEL_ha6, LVar0, 0, 0, 1)
EVT_CALL(RotateModel, MODEL_ha7, LVar0, 0, 0, 1)
EVT_CALL(RotateModel, MODEL_ha8, LVar0, 0, 0, 1)
EVT_CALL(RotateModel, MODEL_ha9, LVar0, 0, 0, 1)
EVT_CALL(RotateModel, MODEL_ha10, LVar0, 0, 0, 1)
EVT_CALL(RotateModel, MODEL_ha11, LVar0, 0, 0, 1)
EVT_CALL(RotateModel, MODEL_ha12, LVar0, 0, 0, 1)
EVT_CALL(RotateModel, MODEL_ha13, LVar0, 0, 0, 1)
EVT_CALL(RotateModel, MODEL_ha14, LVar0, 0, 0, 1)
EVT_CALL(RotateModel, MODEL_ha15, LVar0, 0, 0, 1)
EVT_CALL(RotateModel, MODEL_ha16, LVar0, 0, 0, 1)
EVT_CALL(RotateModel, MODEL_ha17, LVar0, 0, 0, 1)
EVT_CALL(RotateModel, MODEL_ha18, LVar0, 0, 0, 1)
EVT_WAIT(1)
EVT_IF_EQ(LVar1, 1)
EVT_GOTO(1)
EVT_END_IF
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_SetupGizmos) = {
EVT_EXEC(N(EVS_Gizmos_Wheels))
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,585 @@
#include "omo_17.h"
#include "world/common/todo/UnsetCamera0MoveFlag1.inc.c"
#include "common/SetAngleClamped.inc.c"
#include "common/CompareFloats.inc.c"
#include "common/AdvanceBuffer.inc.c"
#include "common/SetPlayerStatusPosYaw.inc.c"
#include "common/SetNpcPosYaw.inc.c"
#include "common/CosInterpMinMax.inc.c"
#include "common/IsAOrBPressed.inc.c"
EvtScript N(EVS_Scene_RideTrain) = {
EVT_MALLOC_ARRAY(20, LVar0)
EVT_USE_ARRAY(LVar0)
EVT_SETF(ArrayVar(2), EVT_FLOAT(0.0))
EVT_SETF(ArrayVar(3), EVT_FLOAT(0.0))
EVT_SETF(ArrayVar(7), EVT_FLOAT(0.0))
EVT_SETF(ArrayVar(8), EVT_FLOAT(0.0))
EVT_SETF(ArrayVar(14), EVT_FLOAT(0.0))
EVT_SETF(ArrayVar(15), EVT_FLOAT(0.0))
EVT_SETF(ArrayVar(16), EVT_FLOAT(0.0))
EVT_SET(AF_OMO_03, FALSE)
EVT_LABEL(0)
EVT_SWITCH(MV_Unk_00)
EVT_CASE_EQ(0)
EVT_USE_BUF(MV_Unk_01)
EVT_BUF_READ3(LVar0, LVar1, LVar2)
EVT_SETF(ArrayVar(0), LVar0)
EVT_SETF(ArrayVar(1), LVar1)
EVT_CALL(AddVectorPolar, ArrayVar(0), ArrayVar(1), EVT_FLOAT(40.0), LVar2)
EVT_SETF(ArrayVar(5), LVar0)
EVT_SETF(ArrayVar(6), LVar1)
EVT_SETF(LVar3, LVar2)
EVT_ADDF(LVar3, EVT_FLOAT(180.0))
EVT_CALL(AddVectorPolar, ArrayVar(5), ArrayVar(6), EVT_FLOAT(40.0), LVar3)
EVT_SETF(ArrayVar(11), LVar0)
EVT_SETF(ArrayVar(12), LVar1)
EVT_SETF(MV_TrainPos, ArrayVar(11))
EVT_SETF(MV_Unk_0C, ArrayVar(12))
EVT_SETF(MV_Unk_0D, LVar2)
EVT_SETF(ArrayVar(17), EVT_FLOAT(0.0))
EVT_LABEL(11)
EVT_BUF_READ2(LVar2, LVar3)
EVT_IF_EQ(LVar2, -1)
EVT_GOTO(12)
EVT_END_IF
EVT_CALL(GetDist2D, LVar4, LVar0, LVar1, LVar2, LVar3)
EVT_ADDF(ArrayVar(17), LVar4)
EVT_SETF(LVar0, LVar2)
EVT_SETF(LVar1, LVar3)
EVT_GOTO(11)
EVT_LABEL(12)
EVT_SUBF(ArrayVar(17), EVT_FLOAT(40.0))
EVT_SETF(ArrayVar(10), EVT_FLOAT(0.0))
EVT_SETF(ArrayVar(13), EVT_FLOAT(0.0))
EVT_SET(ArrayVar(18), 0)
EVT_IF_EQ(MF_Unk_00, TRUE)
EVT_SET(MV_Unk_00, 1)
EVT_END_IF
EVT_CASE_EQ(1)
EVT_USE_BUF(MV_Unk_01)
EVT_CALL(N(AdvanceBuffer), 3, 0, 0)
EVT_BUF_READ2(LVar0, LVar1)
EVT_IF_EQ(LVar0, -1)
EVT_SET(MV_Unk_00, 100)
EVT_SET(MF_Unk_00, FALSE)
EVT_ELSE
EVT_SETF(ArrayVar(2), LVar0)
EVT_SETF(ArrayVar(3), LVar1)
EVT_SET(ArrayVar(4), 1)
EVT_SETF(ArrayVar(7), LVar0)
EVT_SETF(ArrayVar(8), LVar1)
EVT_SET(ArrayVar(9), 1)
EVT_SET(MV_Unk_00, 10)
EVT_END_IF
EVT_CASE_EQ(10)
EVT_SWITCH(MV_Unk_02)
EVT_CASE_EQ(0)
EVT_SETF(ArrayVar(10), EVT_FLOAT(10.0))
EVT_CASE_EQ(1)
EVT_CALL(N(CosInterpMinMax), ArrayVar(18), ArrayVar(10), EVT_FLOAT(0.0), EVT_FLOAT(10.0), 100, 1, EVT_FLOAT(0.0))
EVT_ADD(ArrayVar(18), 1)
EVT_CASE_EQ(2)
EVT_SET(LVar0, ArrayVar(13))
EVT_SET(LVar1, ArrayVar(17))
EVT_CALL(N(CosInterpMinMax), LVar0, ArrayVar(10), EVT_FLOAT(10.0), EVT_FLOAT(2.0), LVar1, 0, EVT_FLOAT(0.0))
EVT_CASE_EQ(3)
EVT_SET(LVar0, ArrayVar(13))
EVT_SET(LVar1, ArrayVar(17))
EVT_DIV(LVar1, 2)
EVT_CALL(N(CosInterpMinMax), LVar0, ArrayVar(10), EVT_FLOAT(1.0), EVT_FLOAT(10.0), LVar1, 0, EVT_FLOAT(0.0))
EVT_END_SWITCH
EVT_CALL(GetDist2D, LVar0, ArrayVar(0), ArrayVar(1), ArrayVar(2), ArrayVar(3))
EVT_CALL(N(CompareFloats), LVar0, ArrayVar(10), LVar2)
EVT_IF_EQ(LVar2, 1)
EVT_CALL(N(SetAngleClamped), LVar0, ArrayVar(0), ArrayVar(1), ArrayVar(2), ArrayVar(3))
EVT_CALL(AddVectorPolar, ArrayVar(0), ArrayVar(1), ArrayVar(10), LVar0)
EVT_ELSE
EVT_SETF(LVar1, ArrayVar(10))
EVT_SUBF(LVar1, LVar0)
EVT_SETF(ArrayVar(0), ArrayVar(2))
EVT_SETF(ArrayVar(1), ArrayVar(3))
EVT_USE_BUF(MV_Unk_01)
EVT_CALL(N(AdvanceBuffer), 3, 2, ArrayVar(4))
EVT_BUF_READ2(ArrayVar(2), ArrayVar(3))
EVT_ADD(ArrayVar(4), 1)
EVT_IF_EQ(ArrayVar(2), -1)
EVT_SET(MV_Unk_00, 100)
EVT_SET(MF_Unk_00, FALSE)
EVT_SET(LocalFlag(1), TRUE)
EVT_ELSE
EVT_CALL(N(SetAngleClamped), LVar0, ArrayVar(0), ArrayVar(1), ArrayVar(2), ArrayVar(3))
EVT_CALL(AddVectorPolar, ArrayVar(0), ArrayVar(1), LVar1, LVar0)
EVT_END_IF
EVT_END_IF
EVT_CALL(GetDist2D, LVar0, ArrayVar(5), ArrayVar(6), ArrayVar(7), ArrayVar(8))
EVT_CALL(N(CompareFloats), LVar0, ArrayVar(10), LVar2)
EVT_IF_EQ(LVar2, 1)
EVT_CALL(N(SetAngleClamped), LVar0, ArrayVar(5), ArrayVar(6), ArrayVar(7), ArrayVar(8))
EVT_CALL(AddVectorPolar, ArrayVar(5), ArrayVar(6), ArrayVar(10), LVar0)
EVT_ELSE
EVT_SETF(LVar1, ArrayVar(10))
EVT_SUBF(LVar1, LVar0)
EVT_SETF(ArrayVar(5), ArrayVar(7))
EVT_SETF(ArrayVar(6), ArrayVar(8))
EVT_USE_BUF(MV_Unk_01)
EVT_CALL(N(AdvanceBuffer), 3, 2, ArrayVar(9))
EVT_BUF_READ2(ArrayVar(7), ArrayVar(8))
EVT_ADD(ArrayVar(9), 1)
EVT_IF_EQ(ArrayVar(7), -1)
EVT_SET(MV_Unk_00, 100)
EVT_SET(MF_Unk_00, FALSE)
EVT_SET(LocalFlag(1), FALSE)
EVT_ELSE
EVT_CALL(N(SetAngleClamped), LVar0, ArrayVar(5), ArrayVar(6), ArrayVar(7), ArrayVar(8))
EVT_CALL(AddVectorPolar, ArrayVar(5), ArrayVar(6), LVar1, LVar0)
EVT_END_IF
EVT_END_IF
EVT_IF_EQ(MV_Unk_00, 100)
EVT_IF_EQ(LocalFlag(1), TRUE)
EVT_CALL(N(SetAngleClamped), LVar0, ArrayVar(0), ArrayVar(1), ArrayVar(5), ArrayVar(6))
EVT_SETF(ArrayVar(5), ArrayVar(0))
EVT_SETF(ArrayVar(6), ArrayVar(1))
EVT_CALL(AddVectorPolar, ArrayVar(5), ArrayVar(6), EVT_FLOAT(80.0), LVar0)
EVT_ELSE
EVT_CALL(N(SetAngleClamped), LVar0, ArrayVar(5), ArrayVar(6), ArrayVar(0), ArrayVar(1))
EVT_SETF(ArrayVar(0), ArrayVar(5))
EVT_SETF(ArrayVar(1), ArrayVar(6))
EVT_CALL(AddVectorPolar, ArrayVar(0), ArrayVar(1), EVT_FLOAT(80.0), LVar0)
EVT_END_IF
EVT_END_IF
EVT_SETF(LVar0, ArrayVar(0))
EVT_SETF(LVar1, ArrayVar(1))
EVT_ADDF(LVar0, ArrayVar(5))
EVT_ADDF(LVar1, ArrayVar(6))
EVT_DIVF(LVar0, EVT_FLOAT(2.0))
EVT_DIVF(LVar1, EVT_FLOAT(2.0))
EVT_CALL(N(SetAngleClamped), LVar2, ArrayVar(5), ArrayVar(6), ArrayVar(0), ArrayVar(1))
EVT_SETF(MV_TrainPos, LVar0)
EVT_SETF(MV_Unk_0C, LVar1)
EVT_SETF(MV_Unk_0D, LVar2)
EVT_CALL(GetDist2D, LVar3, LVar0, LVar1, ArrayVar(11), ArrayVar(12))
EVT_ADDF(ArrayVar(13), LVar3)
EVT_SETF(ArrayVar(14), ArrayVar(13))
EVT_MULF(ArrayVar(14), EVT_FLOAT(1.4326172))
EVT_IF_EQ(LocalFlag(0), FALSE)
EVT_SETF(LVar0, ArrayVar(10))
EVT_IF_LT(LVar0, 1)
EVT_SETF(LVar0, EVT_FLOAT(1.0))
EVT_END_IF
EVT_DIVF(LVar0, EVT_FLOAT(3.0))
EVT_SUBF(ArrayVar(15), LVar0)
EVT_IF_LT(ArrayVar(15), -10)
EVT_SETF(ArrayVar(15), EVT_FLOAT(-10.0))
EVT_SET(LocalFlag(0), TRUE)
EVT_IF_EQ(AF_OMO_03, FALSE)
EVT_CALL(PlaySound, SOUND_1FF)
EVT_ELSE
EVT_CALL(PlaySound, SOUND_84)
EVT_END_IF
EVT_END_IF
EVT_ELSE
EVT_SETF(LVar0, ArrayVar(10))
EVT_IF_LT(LVar0, 1)
EVT_SETF(LVar0, EVT_FLOAT(1.0))
EVT_END_IF
EVT_DIVF(LVar0, EVT_FLOAT(3.0))
EVT_ADDF(ArrayVar(15), LVar0)
EVT_IF_GT(ArrayVar(15), 10)
EVT_SETF(ArrayVar(15), EVT_FLOAT(10.0))
EVT_SET(LocalFlag(0), FALSE)
EVT_IF_EQ(AF_OMO_03, FALSE)
EVT_CALL(PlaySound, SOUND_1FE)
EVT_SET(AF_OMO_03, TRUE)
EVT_ELSE
EVT_CALL(PlaySound, SOUND_1FE)
EVT_SET(AF_OMO_03, FALSE)
EVT_END_IF
EVT_END_IF
EVT_END_IF
EVT_SETF(LVar0, MV_TrainPos)
EVT_SETF(LVar1, MV_Unk_0C)
EVT_SETF(LVar2, MV_Unk_0D)
EVT_CALL(AddVectorPolar, LVar0, LVar1, EVT_FLOAT(15.0), LVar2)
EVT_CALL(N(SetPlayerStatusPosYaw), LVar0, 50, LVar1, MV_Unk_0D)
EVT_SETF(LVar0, MV_TrainPos)
EVT_SETF(LVar1, MV_Unk_0C)
EVT_SETF(LVar2, MV_Unk_0D)
EVT_ADDF(LVar2, EVT_FLOAT(180.0))
EVT_CALL(AddVectorPolar, LVar0, LVar1, EVT_FLOAT(15.0), LVar2)
EVT_CALL(N(SetNpcPosYaw), -4, LVar0, 50, LVar1, MV_Unk_0D)
EVT_SETF(LVar0, MV_TrainPos)
EVT_SETF(LVar1, MV_Unk_0C)
EVT_SETF(LVar2, MV_Unk_0D)
EVT_IF_LT(LVar2, 180)
EVT_ADDF(LVar2, EVT_FLOAT(90.0))
EVT_ELSE
EVT_SUBF(LVar2, EVT_FLOAT(90.0))
EVT_END_IF
EVT_CALL(AddVectorPolar, LVar0, LVar1, EVT_FLOAT(20.0), LVar2)
EVT_CALL(N(SetNpcPosYaw), 0, LVar0, 50, LVar1, MV_Unk_0D)
EVT_CASE_EQ(100)
EVT_END_SWITCH
EVT_CALL(TranslateGroup, MODEL_p2, EVT_FLOAT(79.1), EVT_FLOAT(-27.93), EVT_FLOAT(-29.53))
EVT_CALL(TranslateGroup, MODEL_p3, EVT_FLOAT(-35.1), EVT_FLOAT(-27.93), EVT_FLOAT(-29.53))
EVT_CALL(RotateGroup, MODEL_p2, EVT_FLOAT(-45.0), EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(1.0))
EVT_CALL(RotateGroup, MODEL_p3, EVT_FLOAT(45.0), EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(1.0))
EVT_CALL(TranslateGroup, MODEL_p5, EVT_FLOAT(40.5), EVT_FLOAT(-20.0), EVT_FLOAT(-0.4))
EVT_CALL(TranslateGroup, MODEL_p6, EVT_FLOAT(-39.5), EVT_FLOAT(-20.0), EVT_FLOAT(-0.4))
EVT_CALL(TranslateGroup, MODEL_popo, MV_TrainPos, EVT_FLOAT(10.0), MV_Unk_0C)
EVT_IF_LT(MV_Unk_0D, 180)
EVT_SETF(LVar1, MV_Unk_0D)
EVT_SUBF(LVar1, EVT_FLOAT(90.0))
EVT_CALL(RotateGroup, MODEL_popo, LVar1, EVT_FLOAT(0.0), EVT_FLOAT(-1.0), EVT_FLOAT(0.0))
EVT_ELSE
EVT_SETF(LVar1, MV_Unk_0D)
EVT_SUBF(LVar1, EVT_FLOAT(180.0))
EVT_SUBF(LVar1, EVT_FLOAT(90.0))
EVT_CALL(RotateGroup, MODEL_popo, LVar1, EVT_FLOAT(0.0), EVT_FLOAT(-1.0), EVT_FLOAT(0.0))
EVT_END_IF
EVT_CALL(RotateGroup, MODEL_p2, EVT_FLOAT(45.0), EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(1.0))
EVT_CALL(RotateGroup, MODEL_p3, EVT_FLOAT(-45.0), EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(1.0))
EVT_CALL(TranslateGroup, MODEL_p2, EVT_FLOAT(-79.1), EVT_FLOAT(27.93), EVT_FLOAT(29.53))
EVT_CALL(TranslateGroup, MODEL_p3, EVT_FLOAT(35.1), EVT_FLOAT(27.93), EVT_FLOAT(29.53))
EVT_CALL(TranslateGroup, MODEL_p5, EVT_FLOAT(-40.5), EVT_FLOAT(20.0), EVT_FLOAT(0.4))
EVT_CALL(TranslateGroup, MODEL_p6, EVT_FLOAT(39.5), EVT_FLOAT(20.0), EVT_FLOAT(0.4))
EVT_IF_LT(MV_Unk_0D, 180)
EVT_CALL(RotateGroup, MODEL_p5, ArrayVar(14), EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(-1.0))
EVT_CALL(RotateGroup, MODEL_p6, ArrayVar(14), EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(-1.0))
EVT_ELSE
EVT_CALL(RotateGroup, MODEL_p5, ArrayVar(14), EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(1.0))
EVT_CALL(RotateGroup, MODEL_p6, ArrayVar(14), EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(1.0))
EVT_END_IF
EVT_CALL(TranslateGroup, MODEL_p2, EVT_FLOAT(0.0), ArrayVar(15), EVT_FLOAT(0.0))
EVT_SETF(LVar0, ArrayVar(15))
EVT_MULF(LVar0, EVT_FLOAT(-1.0))
EVT_CALL(TranslateGroup, MODEL_p3, EVT_FLOAT(0.0), LVar0, EVT_FLOAT(0.0))
EVT_SETF(LVar0, ArrayVar(10))
EVT_IF_LT(LVar0, 1)
EVT_SETF(LVar0, EVT_FLOAT(1.0))
EVT_END_IF
EVT_ADDF(ArrayVar(16), LVar0)
EVT_IF_GT(ArrayVar(16), 360)
EVT_SUBF(ArrayVar(16), EVT_FLOAT(360.0))
EVT_END_IF
EVT_CALL(RotateGroup, MODEL_p4, ArrayVar(16), EVT_FLOAT(0.0), EVT_FLOAT(1.0), EVT_FLOAT(0.0))
EVT_SETF(ArrayVar(11), MV_TrainPos)
EVT_SETF(ArrayVar(12), MV_Unk_0C)
EVT_WAIT(1)
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_80244FB8) = {
EVT_LABEL(0)
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
EVT_CALL(SetCamTarget, CAM_DEFAULT, LVar0, 0, LVar2)
EVT_WAIT(1)
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_80245020) = {
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
EVT_CALL(MakeLerp, 0, LVar1, 45, EASING_LINEAR)
EVT_LOOP(0)
EVT_CALL(UpdateLerp)
EVT_CALL(GetPlayerPos, LVar2, LVar3, LVar4)
EVT_CALL(SetCamTarget, CAM_DEFAULT, LVar2, LVar0, LVar4)
EVT_WAIT(1)
EVT_IF_EQ(LVar1, 0)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_RETURN
EVT_END
};
EvtScript N(EVS_802450E4) = {
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
EVT_CALL(MakeLerp, LVar1, 0, 40, EASING_LINEAR)
EVT_LOOP(0)
EVT_CALL(UpdateLerp)
EVT_CALL(GetPlayerPos, LVar2, LVar3, LVar4)
EVT_CALL(SetCamTarget, CAM_DEFAULT, LVar2, LVar0, LVar4)
EVT_WAIT(1)
EVT_IF_EQ(LVar1, 0)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_LOOP(0)
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
EVT_CALL(SetCamTarget, CAM_DEFAULT, LVar0, 0, LVar2)
EVT_WAIT(1)
EVT_END_LOOP
EVT_RETURN
EVT_END
};
EvtScript N(EVS_802451FC) = {
EVT_CALL(SetNpcFlagBits, NPC_Conductor, NPC_FLAG_40 | NPC_FLAG_100, TRUE)
EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_40 | NPC_FLAG_100, TRUE)
EVT_THREAD
EVT_USE_BUF(LVar0)
EVT_BUF_READ3(LVar1, LVar2, LVar3)
EVT_CALL(AddVectorPolar, LVar1, LVar2, EVT_FLOAT(15.0), LVar3)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_Walking)
EVT_CALL(SetPlayerSpeed, EVT_FLOAT(4.0))
EVT_CALL(PlayerMoveTo, LVar1, LVar2, 0)
EVT_CALL(SetPlayerSpeed, EVT_FLOAT(0.7))
EVT_CALL(PlayerMoveTo, LVar1, LVar2, 0)
EVT_CALL(SetPlayerPos, LVar1, 50, LVar2)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_10002)
EVT_CALL(InterpPlayerYaw, LVar3, 0)
EVT_END_THREAD
EVT_WAIT(5)
EVT_USE_BUF(LVar0)
EVT_BUF_READ3(LVar1, LVar2, LVar3)
EVT_SETF(LVarA, LVar3)
EVT_ADDF(LVar3, EVT_FLOAT(180.0))
EVT_CALL(AddVectorPolar, LVar1, LVar2, EVT_FLOAT(15.0), LVar3)
EVT_CALL(SetNpcJumpscale, NPC_PARTNER, EVT_FLOAT(0.7))
EVT_CALL(NpcJump0, NPC_PARTNER, LVar1, 50, LVar2, 10)
EVT_CALL(SetNpcSpeed, NPC_PARTNER, EVT_FLOAT(0.5))
EVT_CALL(NpcMoveTo, NPC_PARTNER, LVar1, LVar2, 0)
EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_RUN)
EVT_CALL(InterpNpcYaw, NPC_PARTNER, LVarA, 0)
EVT_WAIT(5)
EVT_USE_BUF(LVar0)
EVT_BUF_READ3(LVar1, LVar2, LVar3)
EVT_SETF(LVarA, LVar3)
EVT_IF_LT(LVar3, 180)
EVT_ADDF(LVar3, EVT_FLOAT(90.0))
EVT_ELSE
EVT_SUBF(LVar3, EVT_FLOAT(90.0))
EVT_END_IF
EVT_SETF(LVar4, LVar1)
EVT_SETF(LVar5, LVar2)
EVT_SETF(LVar6, LVar3)
EVT_CALL(AddVectorPolar, LVar1, LVar2, EVT_FLOAT(100.0), LVar3)
EVT_CALL(SetNpcSpeed, NPC_Conductor, EVT_FLOAT(3.0))
EVT_CALL(SetNpcAnimation, NPC_Conductor, ANIM_TrainStationToad_Walk)
EVT_CALL(NpcMoveTo, NPC_Conductor, LVar1, LVar2, 0)
EVT_CALL(SetNpcAnimation, NPC_Conductor, ANIM_TrainStationToad_Idle)
EVT_CALL(AddVectorPolar, LVar4, LVar5, EVT_FLOAT(20.0), LVar6)
EVT_CALL(SetNpcJumpscale, NPC_Conductor, EVT_FLOAT(0.7))
EVT_CALL(NpcJump0, NPC_Conductor, LVar4, 50, LVar5, 10)
EVT_CALL(InterpNpcYaw, NPC_Conductor, LVarA, 0)
EVT_CALL(SpeakToPlayer, NPC_Conductor, ANIM_TrainStationToad_Talk, ANIM_TrainStationToad_Idle, 5, MSG_CH4_0009)
EVT_CALL(PlaySound, SOUND_83)
EVT_CALL(SetMusicTrack, 0, SONG_TOYBOX_TRAIN, 0, 8)
EVT_WAIT(10)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_802455FC) = {
EVT_CALL(StopSound, SOUND_83)
EVT_CALL(SetMusicTrack, 0, SONG_SHY_GUY_TOYBOX, 0, 8)
EVT_CALL(SetNpcFlagBits, NPC_Conductor, NPC_FLAG_40 | NPC_FLAG_100, TRUE)
EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_40 | NPC_FLAG_100, TRUE)
EVT_SETF(LVar0, MV_TrainPos)
EVT_SETF(LVar1, MV_Unk_0C)
EVT_SETF(LVar2, MV_Unk_0D)
EVT_IF_LT(LVar2, 180)
EVT_ADDF(LVar2, EVT_FLOAT(90.0))
EVT_ELSE
EVT_SUBF(LVar2, EVT_FLOAT(90.0))
EVT_END_IF
EVT_CALL(AddVectorPolar, LVar0, LVar1, EVT_FLOAT(100.0), LVar2)
EVT_THREAD
EVT_CALL(SetNpcJumpscale, NPC_Conductor, EVT_FLOAT(1.0))
EVT_CALL(NpcJump0, NPC_Conductor, LVar0, 50, LVar1, 10)
EVT_CALL(SetNpcAnimation, NPC_Conductor, ANIM_TrainStationToad_Walk)
EVT_CALL(SetNpcSpeed, NPC_Conductor, EVT_FLOAT(2.0))
EVT_USE_BUF(LVar9)
EVT_BUF_READ2(LVar3, LVar4)
EVT_CALL(NpcMoveTo, NPC_Conductor, LVar3, LVar4, 0)
EVT_CALL(SetNpcAnimation, NPC_Conductor, ANIM_TrainStationToad_Idle)
EVT_CALL(InterpNpcYaw, NPC_Conductor, 270, 15)
EVT_CALL(SetNpcFlagBits, NPC_Conductor, NPC_FLAG_40 | NPC_FLAG_100, FALSE)
EVT_END_THREAD
EVT_WAIT(10)
EVT_THREAD
EVT_ADDF(LVar2, EVT_FLOAT(60.0))
EVT_CALL(AddVectorPolar, LVar0, LVar1, EVT_FLOAT(20.0), LVar2)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_Walking)
EVT_CALL(SetPlayerSpeed, EVT_FLOAT(3.0))
EVT_CALL(PlayerMoveTo, LVar0, LVar1, 0)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_10002)
EVT_END_THREAD
EVT_WAIT(10)
EVT_SUB(LVar1, 30)
EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_JUMP)
EVT_CALL(SetNpcSpeed, NPC_PARTNER, EVT_FLOAT(2.5))
EVT_CALL(NpcMoveTo, NPC_PARTNER, LVar0, LVar1, 0)
EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_RUN)
EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_40 | NPC_FLAG_100, FALSE)
EVT_RETURN
EVT_END
};
EvtScript N(D_802458F8_DF4798) = {
EVT_SWITCH(AB_OMO_6)
EVT_CASE_EQ(0)
EVT_CALL(GotoMapSpecial, EVT_PTR("omo_03"), omo_03_ENTRY_3, TRANSITION_1)
EVT_CASE_EQ(1)
EVT_CALL(GotoMapSpecial, EVT_PTR("omo_06"), omo_06_ENTRY_3, TRANSITION_1)
EVT_CASE_EQ(2)
EVT_CALL(GotoMapSpecial, EVT_PTR("omo_08"), omo_08_ENTRY_2, TRANSITION_1)
EVT_CASE_EQ(3)
EVT_CALL(GotoMapSpecial, EVT_PTR("omo_10"), omo_10_ENTRY_3, TRANSITION_1)
EVT_END_SWITCH
EVT_WAIT(100)
EVT_RETURN
EVT_END
};
EvtScript N(D_802459B8_DF4858) = {
EVT_SWITCH(AB_OMO_5)
EVT_CASE_RANGE(0, 1)
EVT_SWITCH(AB_OMO_6)
EVT_CASE_EQ(0)
EVT_CALL(GotoMapSpecial, EVT_PTR("omo_03"), omo_03_ENTRY_2, TRANSITION_1)
EVT_CASE_EQ(1)
EVT_CALL(GotoMapSpecial, EVT_PTR("omo_06"), omo_06_ENTRY_2, TRANSITION_1)
EVT_CASE_EQ(2)
EVT_CALL(GotoMapSpecial, EVT_PTR("omo_08"), omo_08_ENTRY_1, TRANSITION_1)
EVT_CASE_EQ(3)
EVT_CALL(GotoMapSpecial, EVT_PTR("omo_10"), omo_10_ENTRY_2, TRANSITION_1)
EVT_END_SWITCH
EVT_CASE_EQ(2)
EVT_SWITCH(AB_OMO_6)
EVT_CASE_EQ(0)
EVT_CALL(GotoMapSpecial, EVT_PTR("omo_03"), omo_03_ENTRY_2, TRANSITION_1)
EVT_CASE_EQ(1)
EVT_IF_EQ(GF_OMO03_BlueSwitchActivated, TRUE)
EVT_CALL(GotoMapSpecial, EVT_PTR("omo_06"), omo_06_ENTRY_2, TRANSITION_1)
EVT_ELSE
EVT_CALL(GotoMapSpecial, EVT_PTR("omo_03"), omo_03_ENTRY_2, TRANSITION_1)
EVT_END_IF
EVT_CASE_EQ(3)
EVT_CALL(GotoMapSpecial, EVT_PTR("omo_10"), omo_10_ENTRY_2, TRANSITION_1)
EVT_END_SWITCH
EVT_CASE_EQ(3)
EVT_SWITCH(AB_OMO_6)
EVT_CASE_EQ(0)
EVT_CALL(GotoMapSpecial, EVT_PTR("omo_03"), omo_03_ENTRY_2, TRANSITION_1)
EVT_CASE_EQ(1)
EVT_IF_EQ(GF_OMO03_BlueSwitchActivated, TRUE)
EVT_CALL(GotoMapSpecial, EVT_PTR("omo_06"), omo_06_ENTRY_2, TRANSITION_1)
EVT_ELSE
EVT_CALL(GotoMapSpecial, EVT_PTR("omo_03"), omo_03_ENTRY_2, TRANSITION_1)
EVT_END_IF
EVT_CASE_EQ(2)
EVT_IF_EQ(GF_OMO03_BlueSwitchActivated, TRUE)
EVT_CALL(GotoMapSpecial, EVT_PTR("omo_08"), omo_08_ENTRY_1, TRANSITION_1)
EVT_ELSE
EVT_CALL(GotoMapSpecial, EVT_PTR("omo_03"), omo_03_ENTRY_2, TRANSITION_1)
EVT_END_IF
EVT_END_SWITCH
EVT_END_SWITCH
EVT_WAIT(100)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_80245C5C) = {
EVT_LABEL(10)
EVT_WAIT(1)
EVT_CALL(N(IsAOrBPressed))
EVT_IF_NE(LVar0, 1)
EVT_GOTO(10)
EVT_END_IF
EVT_IF_EQ(AF_OMO_02, FALSE)
EVT_EXEC_WAIT(N(D_802458F8_DF4798))
EVT_ELSE
EVT_EXEC_WAIT(N(D_802459B8_DF4858))
EVT_END_IF
EVT_RETURN
EVT_END
};
EvtScript N(D_80245CEC_DF4B8C) = {
EVT_LABEL(0)
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
EVT_IF_LT(LVar0, -600)
EVT_SET(LVar0, -600)
EVT_END_IF
EVT_IF_GT(LVar0, 600)
EVT_SET(LVar0, 600)
EVT_END_IF
EVT_CALL(SetCamTarget, CAM_DEFAULT, LVar0, EVT_FLOAT(50.0), LVar2)
EVT_WAIT(1)
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
s32 N(EVS_TrainPath_LeftToRight)[] = {
EVT_FLOAT(-720.0), EVT_FLOAT(0.0), EVT_FLOAT(90.0),
EVT_FLOAT(720.0), EVT_FLOAT(0.0),
-1, -1, -1,
};
s32 N(EVS_TrainPath_RightToLeft)[] = {
EVT_FLOAT(720.0), EVT_FLOAT(0.0), EVT_FLOAT(270.0),
EVT_FLOAT(-720.0), EVT_FLOAT(0.0),
-1, -1, -1,
};
EvtScript N(EVS_EnterTrain) = {
EVT_CALL(ParentColliderToModel, COLLIDER_p1, MODEL_o1)
EVT_CALL(ParentColliderToModel, COLLIDER_pp1, MODEL_o1)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(DisablePlayerPhysics, TRUE)
EVT_CALL(DisablePartnerAI, 0)
EVT_EXEC(N(D_80245CEC_DF4B8C))
EVT_CALL(GetEntryID, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(omo_17_ENTRY_4)
EVT_SET(MV_Unk_00, 0)
EVT_SET(MV_Unk_01, EVT_PTR(N(EVS_TrainPath_LeftToRight)))
EVT_SET(MV_Unk_02, 0)
EVT_EXEC(N(EVS_Scene_RideTrain))
EVT_SET(MF_Unk_00, TRUE)
EVT_THREAD
EVT_LABEL(10)
EVT_IF_LT(MV_TrainPos, 600)
EVT_WAIT(1)
EVT_GOTO(10)
EVT_END_IF
EVT_CALL(GotoMap, EVT_PTR("omo_06"), omo_06_ENTRY_0)
EVT_WAIT(100)
EVT_END_THREAD
EVT_CASE_EQ(omo_17_ENTRY_5)
EVT_SET(MV_Unk_00, 0)
EVT_SET(MV_Unk_01, EVT_PTR(N(EVS_TrainPath_RightToLeft)))
EVT_SET(MV_Unk_02, 0)
EVT_EXEC(N(EVS_Scene_RideTrain))
EVT_SET(MF_Unk_00, TRUE)
EVT_THREAD
EVT_LABEL(20)
EVT_IF_GT(MV_TrainPos, -600)
EVT_WAIT(1)
EVT_GOTO(20)
EVT_END_IF
EVT_CALL(GotoMap, EVT_PTR("omo_05"), omo_05_ENTRY_1)
EVT_WAIT(100)
EVT_END_THREAD
EVT_END_SWITCH
EVT_RETURN
EVT_END
};
MAP_RODATA_PAD(1, strings);

View File

@ -0,0 +1,124 @@
#include "omo_17.h"
#include "world/common/enemy/complete/ShyGuy_Wander.inc.c"
#include "world/common/enemy/complete/PyroGuy.inc.c"
#include "world/common/enemy/complete/GrooveGuy.inc.c"
#include "world/common/enemy/complete/SkyGuy.inc.c"
#include "world/common/enemy/complete/SpyGuy.inc.c"
EvtScript N(EVS_NpcAuxAI_Conductor) = {
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInteract_Conductor) = {
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcAI_Conductor) = {
EVT_RETURN
EVT_END
};
NpcSettings N(NpcSettings_Conductor) = {
.defaultAnim = ANIM_TrainStationToad_Blue_Idle,
.height = 24,
.radius = 24,
.otherAI = &N(EVS_NpcAuxAI_Conductor),
.onInteract = &N(EVS_NpcInteract_Conductor),
.ai = &N(EVS_NpcAI_Conductor),
.flags = ENEMY_FLAG_100 | ENEMY_FLAG_200 | ENEMY_FLAG_400 | ENEMY_FLAG_800,
};
StaticNpc N(NpcData_Conductor) = {
.id = NPC_Conductor,
.settings = &N(NpcSettings_Conductor),
.pos = { NPC_DISPOSE_LOCATION },
.yaw = 0,
.flags = ENEMY_FLAG_1,
.initVarCount = 1,
.initVar = { .value = 0 },
};
StaticNpc N(NpcData_SpyGuy)[] = {
{
.id = NPC_SpyGuy,
.settings = &N(NpcSettings_SpyGuy),
.pos = { -305.0f, 0.0f, 135.0f },
.yaw = 270,
.flags = ENEMY_FLAG_400 | ENEMY_FLAG_800,
.drops = SPY_GUY_DROPS,
.territory = {
.wander = {
.isFlying = TRUE,
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
.wanderShape = SHAPE_CYLINDER,
.centerPos = { -305, 0, 135 },
.wanderSize = { 30 },
.detectShape = SHAPE_CYLINDER,
.detectPos = { -305, 0, 135 },
.detectSize = { 250 },
}
},
.animations = SPY_GUY_ANIMS,
.aiDetectFlags = AI_DETECT_SIGHT,
},
SPY_GUY_ROCK_HITBOX(NPC_SpyGuy_Rock1),
SPY_GUY_ROCK_HITBOX(NPC_SpyGuy_Rock2),
SPY_GUY_ROCK_HITBOX(NPC_SpyGuy_Rock3),
};
StaticNpc N(NpcData_PyroGuy) = {
.id = NPC_PyroGuy,
.settings = &N(NpcSettings_PyroGuy),
.pos = { 354.0f, 10.0f, -113.0f },
.yaw = 270,
.flags = ENEMY_FLAG_400 | ENEMY_FLAG_800,
.drops = PYRO_GUY_DROPS,
.territory = {
.wander = {
.isFlying = TRUE,
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
.wanderShape = SHAPE_CYLINDER,
.centerPos = { 354, 10, -113 },
.wanderSize = { 30 },
.detectShape = SHAPE_CYLINDER,
.detectPos = { 354, 10, -113 },
.detectSize = { 250 },
}
},
.animations = PYRO_GUY_ANIMS,
.aiDetectFlags = AI_DETECT_SIGHT,
};
StaticNpc N(NpcData_GrooveGuy) = {
.id = NPC_GrooveGuy,
.settings = &N(NpcSettings_GrooveGuy),
.pos = { -150.0f, 10.0f, -125.0f },
.yaw = 90,
.flags = ENEMY_FLAG_400 | ENEMY_FLAG_800,
.drops = GROOVE_GUY_DROPS_B,
.territory = {
.wander = {
.isFlying = TRUE,
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
.wanderShape = SHAPE_CYLINDER,
.centerPos = { -150, 10, -125 },
.wanderSize = { 30 },
.detectShape = SHAPE_CYLINDER,
.detectPos = { -150, 10, -125 },
.detectSize = { 200 },
}
},
.animations = GROOVE_GUY_ANIMS,
.aiDetectFlags = AI_DETECT_SIGHT,
};
NpcGroupList N(DefaultNPCs) = {
NPC_GROUP(N(NpcData_SpyGuy), BTL_OMO_FORMATION_17, BTL_OMO_STAGE_06),
NPC_GROUP(N(NpcData_PyroGuy), BTL_OMO_FORMATION_1D, BTL_OMO_STAGE_06),
NPC_GROUP(N(NpcData_GrooveGuy), BTL_OMO_FORMATION_2B, BTL_OMO_STAGE_06),
NPC_GROUP(N(NpcData_Conductor)),
{}
};

View File

@ -0,0 +1,15 @@
#include "omo_17.h"
#include "entity.h"
EvtScript N(EVS_MakeEntities) = {
EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), -75, 120, 135, 0, ITEM_COIN, MAKE_ENTITY_END)
EVT_CALL(AssignBlockFlag, GF_OMO17_ItemBlock_CoinA)
EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), -50, 70, -150, 0, ITEM_COIN, MAKE_ENTITY_END)
EVT_CALL(AssignBlockFlag, GF_OMO17_ItemBlock_CoinB)
EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), 0, 70, -150, 0, ITEM_COIN, MAKE_ENTITY_END)
EVT_CALL(AssignBlockFlag, GF_OMO17_ItemBlock_CoinC)
EVT_CALL(MakeEntity, EVT_PTR(Entity_MulticoinBlock), -25, 70, -150, 0, MAKE_ENTITY_END)
EVT_CALL(AssignBlockFlag, GF_OMO17_MultiCoinBrick)
EVT_RETURN
EVT_END
};

View File

@ -2,24 +2,41 @@
#define _WORLD_AREA_SAM_SAM_H_
enum {
AB_SAM_0 = AreaByte(0),
AB_SAM_1 = AreaByte(1),
AB_SAM_2 = AreaByte(2),
AB_SAM_3 = AreaByte(3),
AB_SAM_4 = AreaByte(4),
AB_SAM_5 = AreaByte(5),
AB_SAM_6 = AreaByte(6),
AB_SAM_7 = AreaByte(7),
AB_SAM_8 = AreaByte(8),
AB_SAM_9 = AreaByte(9),
AB_SAM_A = AreaByte(10),
AB_SAM_B = AreaByte(11),
AB_SAM_C = AreaByte(12),
AB_SAM_D = AreaByte(13),
AB_SAM_E = AreaByte(14),
AB_SAM_F = AreaByte(15),
AB_SAM_0 = AreaByte(0),
AB_SAM_1 = AreaByte(1),
AB_SAM_2 = AreaByte(2),
AB_SAM_3 = AreaByte(3),
AB_SAM_4 = AreaByte(4),
AB_SAM_5 = AreaByte(5),
AB_SAM_6 = AreaByte(6),
AB_SAM_7 = AreaByte(7),
AB_SAM_8 = AreaByte(8),
AB_SAM_9 = AreaByte(9),
AB_SAM_A = AreaByte(10),
AB_SAM_B = AreaByte(11),
AB_SAM_C = AreaByte(12),
AB_SAM_D = AreaByte(13),
AB_SAM_E = AreaByte(14),
AB_SAM_F = AreaByte(15),
};
#define AF_SAM(index) AreaFlag(index)
enum {
AF_SAM06_Snowing = AreaFlag(1),
AF_SAM06_LastSnowing = AreaFlag(2),
AF_SAM_05 = AreaFlag(5),
};
extern MapSettings sam_01_settings;
extern MapSettings sam_02_settings;
extern MapSettings sam_03_settings;
extern MapSettings sam_04_settings;
extern MapSettings sam_05_settings;
extern MapSettings sam_06_settings;
extern MapSettings sam_07_settings;
extern MapSettings sam_08_settings;
extern MapSettings sam_09_settings;
extern MapSettings sam_10_settings;
extern MapSettings sam_11_settings;
extern MapSettings sam_12_settings;
#endif

View File

@ -1,9 +0,0 @@
#include "sam_06.h"
static char* N(exit_str_0) = "sam_05";
static char* N(exit_str_1) = "";
#include "world/common/atomic/TexturePan.inc.c"
#include "common/foliage.inc.c"

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