diff --git a/Data/Textures/atlas.png b/Data/Textures/atlas.png index f33551f..84227fb 100644 --- a/Data/Textures/atlas.png +++ b/Data/Textures/atlas.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:73183166e23dc80dfaff3276d48ffeecf84245e0f5a5079f89003108062c994b -size 4010697 +oid sha256:fa09cf9a837958a6aeb6f9031f7592522ffab4e75e341cfeac2e07130c0324c1 +size 4838947 diff --git a/Data/Textures/atlas.txt b/Data/Textures/atlas.txt index 02d89d0..0274259 100644 --- a/Data/Textures/atlas.txt +++ b/Data/Textures/atlas.txt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:020e9c5b6c86e74cd588e56ab7934643b132c65abc48f2a8e3fab8753e6cfe90 -size 2548 +oid sha256:900faecb6299c6cd1fc93e236be770291c5580b3f96aa5417885dc863519969c +size 2863 diff --git a/Data/Textures/atlas/club_terry_alive.png b/Data/Textures/atlas/club_terry_alive_1.png similarity index 100% rename from Data/Textures/atlas/club_terry_alive.png rename to Data/Textures/atlas/club_terry_alive_1.png diff --git a/Data/Textures/atlas/club_terry_alive_2.png b/Data/Textures/atlas/club_terry_alive_2.png new file mode 100644 index 0000000..3565062 --- /dev/null +++ b/Data/Textures/atlas/club_terry_alive_2.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cb78295163a465fa51cc39b773a93e22e6974785e149bd5c2583f9c0a65af70b +size 125948 diff --git a/Data/Textures/atlas/merchant_graveyard_1.png b/Data/Textures/atlas/merchant_graveyard_1.png new file mode 100644 index 0000000..e881870 --- /dev/null +++ b/Data/Textures/atlas/merchant_graveyard_1.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bab018cdfc3c60c0c0076276f6b370e37955662bb74d78da2bb46b851d641b32 +size 75722 diff --git a/Data/Textures/atlas/merchant_graveyard_2.png b/Data/Textures/atlas/merchant_graveyard_2.png new file mode 100644 index 0000000..5760e32 --- /dev/null +++ b/Data/Textures/atlas/merchant_graveyard_2.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0a6784822d844b28aa3683b62aef13ae2b3f7d99a515e3696470a3f04095993a +size 70643 diff --git a/Data/Textures/atlas/merchant_gym_1.png b/Data/Textures/atlas/merchant_gym_1.png new file mode 100644 index 0000000..4c4aa36 --- /dev/null +++ b/Data/Textures/atlas/merchant_gym_1.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:caad6b06f62fbd1889eef3a57e2053ab7b12dd189e34247e8f599c4c34d2de0c +size 77444 diff --git a/Data/Textures/atlas/merchant_gym_2.png b/Data/Textures/atlas/merchant_gym_2.png new file mode 100644 index 0000000..e80b1f8 --- /dev/null +++ b/Data/Textures/atlas/merchant_gym_2.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:81aa26ece4ae0fe3756781dca636923d9161ff6ebde3a1b45d4ad2eed7ee6ef3 +size 82171 diff --git a/Data/Textures/atlas/merchant_phone_company_1.png b/Data/Textures/atlas/merchant_phone_company_1.png new file mode 100644 index 0000000..e94df6b --- /dev/null +++ b/Data/Textures/atlas/merchant_phone_company_1.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8f7077d1650df84d538125c5ee180d59c9337cb7ffc155599fb72a1a995b1c0c +size 92997 diff --git a/Data/Textures/atlas/merchant_phone_company_2.png b/Data/Textures/atlas/merchant_phone_company_2.png new file mode 100644 index 0000000..6440b76 --- /dev/null +++ b/Data/Textures/atlas/merchant_phone_company_2.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ba0227945c81e95299ccc6d0443a3b35ce5e15ef7839d753ea57da32ac241853 +size 89460 diff --git a/Data/Textures/atlas/merchant_terry_1.png b/Data/Textures/atlas/merchant_terry_1.png new file mode 100644 index 0000000..94fcfd4 --- /dev/null +++ b/Data/Textures/atlas/merchant_terry_1.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:61bc464eeb530925e8e0b9dc216d55de8a10257dc8e07e8d4622c1d17cd78a72 +size 63709 diff --git a/Data/Textures/atlas/merchant_terry_2.png b/Data/Textures/atlas/merchant_terry_2.png new file mode 100644 index 0000000..541197f --- /dev/null +++ b/Data/Textures/atlas/merchant_terry_2.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8006ee914a72ceb11940d9068a416195179107cd06b2fb109782d72e28749055 +size 65849 diff --git a/Data/Textures/atlas/shadow_long_circle.png b/Data/Textures/atlas/shadow_long_circle.png new file mode 100644 index 0000000..2c749c6 --- /dev/null +++ b/Data/Textures/atlas/shadow_long_circle.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3d8f14083ed6e30db4bc87c75608d8d144d86afef5348e8cfa0de06fbf2b6e35 +size 7473 diff --git a/Data/Textures/atlas/shadow_tight_circle.png b/Data/Textures/atlas/shadow_tight_circle.png new file mode 100644 index 0000000..18b06d2 --- /dev/null +++ b/Data/Textures/atlas/shadow_tight_circle.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5ba23018e116c842e42fe05b851c91ba1d9ba0cb75e3c0fc6008e424fbe9f398 +size 4892 diff --git a/Data/Textures/atlas/smoochie_death_1.png b/Data/Textures/atlas/smoochie_death_1.png index b4d521b..e117ea2 100644 --- a/Data/Textures/atlas/smoochie_death_1.png +++ b/Data/Textures/atlas/smoochie_death_1.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:eb168db28afcca101510a37823e5c61d6632a28503e64da2eca7af11d75cc16f -size 13648 +oid sha256:88abd1fbd6f79fd428aaecf4117cdcaac349ed1502e7bd5bf09cd0ee63b9afdb +size 13451 diff --git a/Data/Textures/atlas/smoochie_death_2.png b/Data/Textures/atlas/smoochie_death_2.png index 5426a07..a60a0ed 100644 --- a/Data/Textures/atlas/smoochie_death_2.png +++ b/Data/Textures/atlas/smoochie_death_2.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:affa3d846b2fae2954f8376228c1b87ced3012202b6f4e3a884b05c7cb83e699 -size 12875 +oid sha256:2a5ad673bc65e9e5ca84a72d855bc32d93e922e00332d15d4a48010da6a2d402 +size 12824 diff --git a/Data/Textures/atlas/smoochie_death_3.png b/Data/Textures/atlas/smoochie_death_3.png index 04fed38..0d30a43 100644 --- a/Data/Textures/atlas/smoochie_death_3.png +++ b/Data/Textures/atlas/smoochie_death_3.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3378c4d94e7de1990acfef02a0f268a595ae805d71f92600fc6932d7a2ea2374 -size 11185 +oid sha256:2de29e254c7812c30cff961eb5921bd836762a67a3e5deabd282b53878a9acde +size 10983 diff --git a/Data/Textures/atlas/smoochie_death_4.png b/Data/Textures/atlas/smoochie_death_4.png index 7cbc8f7..a804de7 100644 --- a/Data/Textures/atlas/smoochie_death_4.png +++ b/Data/Textures/atlas/smoochie_death_4.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7ddfbb2a29e92412337777cae28853d60b5184772dceae5ffcf215eb42b415f5 -size 8853 +oid sha256:92694789a27305c55c71c5414daf365d0d412dc1c3da08e968afb34d4c7816cf +size 8820 diff --git a/Data/Textures/atlas/smoochie_death_5.png b/Data/Textures/atlas/smoochie_death_5.png index 393f933..46ffa09 100644 --- a/Data/Textures/atlas/smoochie_death_5.png +++ b/Data/Textures/atlas/smoochie_death_5.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9258977f052aca4b774a586f2533fb4ac10a11f9469fff9ac6b35594afe9bfb2 -size 6331 +oid sha256:e362cfd1f1b890e821a39e7cc4350a932d086a67fce99e6027dc592142af15fb +size 6262 diff --git a/Data/Textures/atlas/smoochie_death_6.png b/Data/Textures/atlas/smoochie_death_6.png index 841e8bb..788922f 100644 --- a/Data/Textures/atlas/smoochie_death_6.png +++ b/Data/Textures/atlas/smoochie_death_6.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5f3da85946efc55675f57f8c0aff85cef0e46e9e58f1772238da51ab038e06f8 -size 4120 +oid sha256:2a5a286031be6d840940df25116a90485da586b753225f6b81fc1397e8f54d7e +size 4110 diff --git a/Data/Textures/atlas/smoochie_death_7.png b/Data/Textures/atlas/smoochie_death_7.png index bd88af3..710d2e5 100644 --- a/Data/Textures/atlas/smoochie_death_7.png +++ b/Data/Textures/atlas/smoochie_death_7.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:21eb54716b0a1839496e061065b51c39caaaa5eb7929193bbee272870ab67ac7 +oid sha256:d275e8220a24201a1955f413ddd29d541cc0508e8e88d772151ef71417a788b1 size 2407 diff --git a/Data/Textures/atlas/terry_merchant_01.png b/Data/Textures/atlas/terry_merchant_01.png deleted file mode 100644 index 9064f01..0000000 --- a/Data/Textures/atlas/terry_merchant_01.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:563b65531ff3f34a50ebd48bbbf702cbfc4e19aaa0c763c85d21968fa45d35e3 -size 63561 diff --git a/Data/Textures/atlas/terry_merchant_02.png b/Data/Textures/atlas/terry_merchant_02.png deleted file mode 100644 index c6370df..0000000 --- a/Data/Textures/atlas/terry_merchant_02.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ef54a671483d9cca0fcf73cdec386fa2476738549af29dd76e3f725f78fe96a4 -size 66032 diff --git a/Data/Textures/sprite_spec.txt b/Data/Textures/sprite_spec.txt index fdbbd07..ac4dc8c 100644 --- a/Data/Textures/sprite_spec.txt +++ b/Data/Textures/sprite_spec.txt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0855932bf54ec8903cc44d87aee7ba96c4e903e18b5ee2444d86071777284d5a -size 555 +oid sha256:2195fc517f0432ccef6e6d0ac920ed3771e99567a8c5d243422e7f021faa9b18 +size 670 diff --git a/feely_pona.cpp b/feely_pona.cpp index 57f77ea..59b4672 100644 --- a/feely_pona.cpp +++ b/feely_pona.cpp @@ -142,12 +142,16 @@ static void FP_Game_MoveEntity(FP_Game *game, FP_GameEntityHandle entity_handle, entity_collides_with_collider = false; } break; - case FP_EntityType_Nil: /*FALLTRHU*/ - case FP_EntityType_Terry: /*FALLTRHU*/ - case FP_EntityType_Merchant: /*FALLTRHU*/ - case FP_EntityType_Count: break; - case FP_EntityType_ClubTerry: break; - case FP_EntityType_Map: break; + case FP_EntityType_Nil: break; + case FP_EntityType_Terry: break; + case FP_EntityType_MerchantTerry: break; + case FP_EntityType_Count: break; + case FP_EntityType_ClubTerry: break; + case FP_EntityType_Map: break; + case FP_EntityType_MerchantGraveyard: break; + case FP_EntityType_MerchantGym: break; + case FP_EntityType_MerchantPhoneCompany: break; + case FP_EntityType_Heart: break; } if (!entity_collides_with_collider) @@ -302,54 +306,26 @@ void TELY_DLL_Init(void *user_data) game->player = terry; } - FP_Entity_CreateMerchant(game, Dqn_V2_InitNx2(1018, -351), "Merchant"); - FP_Entity_CreateClubTerry(game, Dqn_V2_InitNx2(1000, 400), "Club Terry"); + { + Dqn_V2 base_top_left_pos = Dqn_V2_InitNx2(1018, -335); + Dqn_V2 base_bottom_right_pos = Dqn_V2_InitNx2(2118, +351); + + Dqn_V2 base_top_left = base_top_left_pos; + Dqn_V2 base_top_right = Dqn_V2_InitNx2(base_bottom_right_pos.x, base_top_left_pos.y); + Dqn_V2 base_bottom_left = Dqn_V2_InitNx2(base_top_left_pos.x, base_bottom_right_pos.y); + Dqn_V2 base_bottom_right = Dqn_V2_InitNx2(base_bottom_right_pos.x, base_bottom_right_pos.y); + + FP_Entity_CreateMerchantTerry(game, base_top_left, "Merchant"); + FP_Entity_CreateMerchantGraveyard(game, base_bottom_left, "Graveyard"); + FP_Entity_CreateMerchantGym(game, base_bottom_right, "Gym"); + FP_Entity_CreateMerchantPhoneCompany(game, base_top_right, "PhoneCompany"); + } + + FP_Entity_CreateClubTerry(game, Dqn_V2_InitNx2(567, -191), "Club Terry"); game->tile_size = 37; Dqn_V2I max_tile = platform->core.window_size / game->tile_size; - // NOTE: Wall ================================================================================== - if (0) { - Dqn_V2I vert_wall_tile_size = Dqn_V2I_InitNx2(1, 12); - Dqn_V2I right_wall_tile_pos = Dqn_V2I_InitNx2(max_tile.x - vert_wall_tile_size.x - 0, (max_tile.y / 2.f) - (vert_wall_tile_size.y * .5f)); - - Dqn_V2I left_wall_top_tile = Dqn_V2I_InitNx2(max_tile.x - vert_wall_tile_size.x - 12, (max_tile.y / 2.f) - (vert_wall_tile_size.y * .5f)); - Dqn_V2I left_wall_bottom_tile = Dqn_V2I_InitNx2(left_wall_top_tile.x, left_wall_top_tile.y + vert_wall_tile_size.y); - - - { - Dqn_V2I const vert_wall_part_tile_size = Dqn_V2I_InitNx2(1, (vert_wall_tile_size.y / 2) - 2); - FP_Entity_CreateWallAtTile(game, DQN_STRING8("Base left-top wall"), left_wall_top_tile, vert_wall_part_tile_size); - - Dqn_V2I bottom_part_tile = Dqn_V2I_InitNx2(left_wall_top_tile.x, left_wall_top_tile.y + vert_wall_tile_size.y - vert_wall_part_tile_size.y); - FP_Entity_CreateWallAtTile(game, DQN_STRING8("Base left-bottom wall"), bottom_part_tile, vert_wall_part_tile_size); - } - - FP_GameEntityHandle right_wall = FP_Entity_CreateWallAtTile(game, DQN_STRING8("Base right wall"), right_wall_tile_pos, vert_wall_tile_size); - Dqn_Rect right_wall_box = FP_Game_CalcEntityWorldHitBox(game, right_wall); - Dqn_V2I right_wall_bottom_tile = FP_Game_WorldPosToTilePos(game, right_wall_box.pos + Dqn_V2_InitNx2(0, right_wall_box.size.y)); - Dqn_V2I right_wall_top_left_tile = FP_Game_WorldPosToTilePos(game, right_wall_box.pos); - - { - Dqn_V2I hori_wall_tile_size = Dqn_V2I_InitNx2((right_wall_tile_pos.x - left_wall_top_tile.x - 1) / 2 - 1, 1); - { - Dqn_V2I bottom_left_wall_tile_pos = Dqn_V2I_InitNx2(left_wall_bottom_tile.x + 1, left_wall_bottom_tile.y - 1); - FP_Entity_CreateWallAtTile(game, DQN_STRING8("Base bottom-left wall"), bottom_left_wall_tile_pos, hori_wall_tile_size); - - Dqn_V2I bottom_right_wall_tile_pos = Dqn_V2I_InitNx2(right_wall_bottom_tile.x - hori_wall_tile_size.x, right_wall_bottom_tile.y - 1); - FP_Entity_CreateWallAtTile(game, DQN_STRING8("Base bottom-right wall"), bottom_right_wall_tile_pos, hori_wall_tile_size); - } - - { - Dqn_V2I top_left_wall_tile_pos = Dqn_V2I_InitNx2(left_wall_top_tile.x + 1, left_wall_top_tile.y); - FP_Entity_CreateWallAtTile(game, DQN_STRING8("Base top-left wall"), top_left_wall_tile_pos, hori_wall_tile_size); - - Dqn_V2I top_right_wall_tile_pos = Dqn_V2I_InitNx2(right_wall_top_left_tile.x - hori_wall_tile_size.x, right_wall_top_left_tile.y); - FP_Entity_CreateWallAtTile(game, DQN_STRING8("Base top-right wall"), top_right_wall_tile_pos, hori_wall_tile_size); - } - } - } - // NOTE: Mid lane mob spawner ================================================================== Dqn_V2 base_mid_p = Dqn_V2_InitNx2(1580, 0.f); Dqn_V2 mid_lane_mob_spawner_pos = Dqn_V2_InitNx2(game->map->local_hit_box_size.w * -0.5f, 0.f); @@ -858,16 +834,69 @@ void FP_EntityActionStateMachine(FP_Game *game, TELY_Audio *audio, TELY_Platform } } break; - case FP_EntityType_Merchant: { - FP_EntityTerryMerchantState *state = DQN_CAST(FP_EntityTerryMerchantState *)&action->state; + case FP_EntityType_MerchantTerry: { + FP_EntityMerchantTerryState *state = DQN_CAST(FP_EntityMerchantTerryState *)&action->state; switch (*state) { - case FP_EntityTerryMerchantState_Nil: { - action->next_state = FP_EntityTerryMerchantState_Idle; + case FP_EntityMerchantTerryState_Nil: { + action->next_state = FP_EntityMerchantTerryState_Idle; } break; - case FP_EntityTerryMerchantState_Idle: { + case FP_EntityMerchantTerryState_Idle: { if (entering_new_state) { - TELY_AssetAnimatedSprite sprite = TELY_Asset_MakeAnimatedSprite(sheet, g_anim_names.terry_merchant, TELY_AssetFlip_No); + TELY_AssetAnimatedSprite sprite = TELY_Asset_MakeAnimatedSprite(sheet, g_anim_names.merchant_terry, TELY_AssetFlip_No); + uint64_t duration_ms = FP_GAME_ENTITY_ACTION_INFINITE_TIMER; + FP_Game_EntityActionReset(game, entity->handle, duration_ms, sprite); + } + + } break; + } + } break; + + case FP_EntityType_MerchantPhoneCompany: { + FP_EntityMerchantPhoneCompanyState *state = DQN_CAST(FP_EntityMerchantPhoneCompanyState *)&action->state; + switch (*state) { + case FP_EntityMerchantPhoneCompanyState_Nil: { + action->next_state = FP_EntityMerchantPhoneCompanyState_Idle; + } break; + + case FP_EntityMerchantPhoneCompanyState_Idle: { + if (entering_new_state) { + TELY_AssetAnimatedSprite sprite = TELY_Asset_MakeAnimatedSprite(sheet, g_anim_names.merchant_phone_company, TELY_AssetFlip_No); + uint64_t duration_ms = FP_GAME_ENTITY_ACTION_INFINITE_TIMER; + FP_Game_EntityActionReset(game, entity->handle, duration_ms, sprite); + } + } break; + } + } break; + + case FP_EntityType_MerchantGym: { + FP_EntityMerchantGymState *state = DQN_CAST(FP_EntityMerchantGymState *)&action->state; + switch (*state) { + case FP_EntityMerchantGymState_Nil: { + action->next_state = FP_EntityMerchantGymState_Idle; + } break; + + case FP_EntityMerchantGymState_Idle: { + if (entering_new_state) { + TELY_AssetAnimatedSprite sprite = TELY_Asset_MakeAnimatedSprite(sheet, g_anim_names.merchant_gym, TELY_AssetFlip_No); + uint64_t duration_ms = FP_GAME_ENTITY_ACTION_INFINITE_TIMER; + FP_Game_EntityActionReset(game, entity->handle, duration_ms, sprite); + } + + } break; + } + } break; + + case FP_EntityType_MerchantGraveyard: { + FP_EntityMerchantGraveyardState *state = DQN_CAST(FP_EntityMerchantGraveyardState *)&action->state; + switch (*state) { + case FP_EntityMerchantGraveyardState_Nil: { + action->next_state = FP_EntityMerchantGraveyardState_Idle; + } break; + + case FP_EntityMerchantGraveyardState_Idle: { + if (entering_new_state) { + TELY_AssetAnimatedSprite sprite = TELY_Asset_MakeAnimatedSprite(sheet, g_anim_names.merchant_graveyard, TELY_AssetFlip_No); uint64_t duration_ms = FP_GAME_ENTITY_ACTION_INFINITE_TIMER; FP_Game_EntityActionReset(game, entity->handle, duration_ms, sprite); } @@ -1032,11 +1061,14 @@ void FP_Update(TELY_Platform *platform, FP_Game *game, TELY_PlatformInput *input move_entity = *state == FP_EntityClingerState_Run || *state == FP_EntityClingerState_Idle; } break; - case FP_EntityType_Merchant: break; - case FP_EntityType_Nil: break; - case FP_EntityType_ClubTerry: break; - case FP_EntityType_Count: break; - case FP_EntityType_Map: break; + case FP_EntityType_Nil: break; + case FP_EntityType_ClubTerry: break; + case FP_EntityType_Count: break; + case FP_EntityType_Map: break; + case FP_EntityType_MerchantTerry: break; + case FP_EntityType_MerchantGraveyard: break; + case FP_EntityType_MerchantPhoneCompany: break; + case FP_EntityType_Heart: break; } if (move_entity) { @@ -1259,9 +1291,6 @@ void FP_Update(TELY_Platform *platform, FP_Game *game, TELY_PlatformInput *input } switch (entity->type) { - case FP_EntityType_Nil: /*FALLTHRU*/ - case FP_EntityType_Merchant: break; - case FP_EntityType_Terry: /*FALLTHRU*/ case FP_EntityType_Smoochie: /*FALLTHRU*/ case FP_EntityType_Clinger: { @@ -1280,9 +1309,15 @@ void FP_Update(TELY_Platform *platform, FP_Game *game, TELY_PlatformInput *input } break; case FP_EntityType_Count: DQN_INVALID_CODE_PATH; break; - case FP_EntityType_ClubTerry: break; - case FP_EntityType_Map: break; - case FP_EntityType_Heart: break; + + case FP_EntityType_Nil: break; + case FP_EntityType_ClubTerry: break; + case FP_EntityType_Map: break; + case FP_EntityType_Heart: break; + case FP_EntityType_MerchantTerry: break; + case FP_EntityType_MerchantGraveyard: break; + case FP_EntityType_MerchantGym: break; + case FP_EntityType_MerchantPhoneCompany: break; } } @@ -1422,12 +1457,16 @@ void FP_Update(TELY_Platform *platform, FP_Game *game, TELY_PlatformInput *input permit_attack = false; } break; - case FP_EntityType_Nil: /*FALLTRHU*/ - case FP_EntityType_Terry: /*FALLTRHU*/ - case FP_EntityType_Merchant: /*FALLTRHU*/ - case FP_EntityType_Count: break; - case FP_EntityType_ClubTerry: break; - case FP_EntityType_Map: break; + case FP_EntityType_Nil: break; + case FP_EntityType_Terry: break; + case FP_EntityType_Count: break; + case FP_EntityType_ClubTerry: break; + case FP_EntityType_Map: break; + case FP_EntityType_MerchantTerry: break; + case FP_EntityType_MerchantGraveyard: break; + case FP_EntityType_MerchantGym: break; + case FP_EntityType_MerchantPhoneCompany: break; + case FP_EntityType_Heart: break; } if (!permit_attack) diff --git a/feely_pona.h b/feely_pona.h index b21bdee..ee407a3 100644 --- a/feely_pona.h +++ b/feely_pona.h @@ -23,28 +23,10 @@ struct FP_Meters struct FP_GlobalAnimations { - Dqn_String8 terry_walk_idle = DQN_STRING8("terry_walk_idle"); - Dqn_String8 terry_walk_up = DQN_STRING8("terry_walk_up"); - Dqn_String8 terry_walk_down = DQN_STRING8("terry_walk_down"); - Dqn_String8 terry_walk_left = DQN_STRING8("terry_walk_left"); - Dqn_String8 terry_walk_right = DQN_STRING8("terry_walk_right"); - Dqn_String8 terry_attack_up = DQN_STRING8("terry_attack_up"); - Dqn_String8 terry_attack_side = DQN_STRING8("terry_attack_side"); - Dqn_String8 terry_attack_down = DQN_STRING8("terry_attack_down"); - Dqn_String8 terry_merchant = DQN_STRING8("terry_merchant"); - - Dqn_String8 smoochie_walk_up = DQN_STRING8("smoochie_walk_up"); - Dqn_String8 smoochie_walk_down = DQN_STRING8("smoochie_walk_down"); - Dqn_String8 smoochie_walk_left = DQN_STRING8("smoochie_walk_left"); - Dqn_String8 smoochie_walk_right = DQN_STRING8("smoochie_walk_right"); - Dqn_String8 smoochie_attack_down = DQN_STRING8("smoochie_attack_down"); - Dqn_String8 smoochie_hurt_side = DQN_STRING8("smoochie_hurt_side"); - Dqn_String8 smoochie_attack_heart = DQN_STRING8("smoochie_attack_heart"); - Dqn_String8 smoochie_death = DQN_STRING8("smoochie_death"); - Dqn_String8 clinger_attack_down = DQN_STRING8("clinger_attack_down"); Dqn_String8 clinger_attack_side = DQN_STRING8("clinger_attack_side"); Dqn_String8 clinger_attack_up = DQN_STRING8("clinger_attack_up"); + Dqn_String8 clinger_death = DQN_STRING8("clinger_death"); Dqn_String8 clinger_walk_up = DQN_STRING8("clinger_walk_up"); Dqn_String8 clinger_walk_down = DQN_STRING8("clinger_walk_down"); @@ -56,6 +38,33 @@ struct FP_GlobalAnimations Dqn_String8 heart_bleed = DQN_STRING8("heart_bleed"); Dqn_String8 map = DQN_STRING8("map"); + + Dqn_String8 merchant_graveyard = DQN_STRING8("merchant_graveyard"); + Dqn_String8 merchant_gym = DQN_STRING8("merchant_gym"); + Dqn_String8 merchant_phone_company= DQN_STRING8("merchant_phone_company"); + Dqn_String8 merchant_terry = DQN_STRING8("merchant_terry"); + + Dqn_String8 shadow_long_circle = DQN_STRING8("shadow_long_circle"); + Dqn_String8 shadow_tight_circle = DQN_STRING8("shadow_tight_circle"); + + Dqn_String8 smoochie_walk_up = DQN_STRING8("smoochie_walk_up"); + Dqn_String8 smoochie_walk_down = DQN_STRING8("smoochie_walk_down"); + Dqn_String8 smoochie_walk_left = DQN_STRING8("smoochie_walk_left"); + Dqn_String8 smoochie_walk_right = DQN_STRING8("smoochie_walk_right"); + Dqn_String8 smoochie_attack_down = DQN_STRING8("smoochie_attack_down"); + Dqn_String8 smoochie_hurt_side = DQN_STRING8("smoochie_hurt_side"); + Dqn_String8 smoochie_attack_heart = DQN_STRING8("smoochie_attack_heart"); + Dqn_String8 smoochie_death = DQN_STRING8("smoochie_death"); + + Dqn_String8 terry_attack_up = DQN_STRING8("terry_attack_up"); + Dqn_String8 terry_attack_side = DQN_STRING8("terry_attack_side"); + Dqn_String8 terry_attack_down = DQN_STRING8("terry_attack_down"); + + Dqn_String8 terry_walk_idle = DQN_STRING8("terry_walk_idle"); + Dqn_String8 terry_walk_up = DQN_STRING8("terry_walk_up"); + Dqn_String8 terry_walk_down = DQN_STRING8("terry_walk_down"); + Dqn_String8 terry_walk_left = DQN_STRING8("terry_walk_left"); + Dqn_String8 terry_walk_right = DQN_STRING8("terry_walk_right"); } g_anim_names; diff --git a/feely_pona_entity.h b/feely_pona_entity.h index e0c145e..38bf088 100644 --- a/feely_pona_entity.h +++ b/feely_pona_entity.h @@ -9,7 +9,10 @@ enum FP_EntityType FP_EntityType_Map, FP_EntityType_Terry, FP_EntityType_Smoochie, - FP_EntityType_Merchant, + FP_EntityType_MerchantTerry, + FP_EntityType_MerchantGraveyard, + FP_EntityType_MerchantGym, + FP_EntityType_MerchantPhoneCompany, FP_EntityType_ClubTerry, FP_EntityType_Clinger, FP_EntityType_Heart, @@ -45,10 +48,28 @@ enum FP_EntityClingerState FP_EntityClingerState_Run, }; -enum FP_EntityTerryMerchantState +enum FP_EntityMerchantTerryState { - FP_EntityTerryMerchantState_Nil, - FP_EntityTerryMerchantState_Idle, + FP_EntityMerchantTerryState_Nil, + FP_EntityMerchantTerryState_Idle, +}; + +enum FP_EntityMerchantGymState +{ + FP_EntityMerchantGymState_Nil, + FP_EntityMerchantGymState_Idle, +}; + +enum FP_EntityMerchantPhoneCompanyState +{ + FP_EntityMerchantPhoneCompanyState_Nil, + FP_EntityMerchantPhoneCompanyState_Idle, +}; + +enum FP_EntityMerchantGraveyardState +{ + FP_EntityMerchantGraveyardState_Nil, + FP_EntityMerchantGraveyardState_Idle, }; enum FP_EntityClubTerryState diff --git a/feely_pona_entity_create.cpp b/feely_pona_entity_create.cpp index 1fac6d8..e7ebb7f 100644 --- a/feely_pona_entity_create.cpp +++ b/feely_pona_entity_create.cpp @@ -150,7 +150,7 @@ static FP_GameEntityHandle FP_Entity_CreateTerry(FP_Game *game, Dqn_V2 pos, DQN_ return result; } -static FP_GameEntityHandle FP_Entity_CreateMerchant(FP_Game *game, Dqn_V2 pos, DQN_FMT_STRING_ANNOTATE char const *fmt, ...) +static FP_GameEntityHandle FP_Entity_CreateMerchantTerry(FP_Game *game, Dqn_V2 pos, DQN_FMT_STRING_ANNOTATE char const *fmt, ...) { va_list args; va_start(args, fmt); @@ -158,7 +158,61 @@ static FP_GameEntityHandle FP_Entity_CreateMerchant(FP_Game *game, Dqn_V2 pos, D FP_GameEntityHandle result = entity->handle; va_end(args); - entity->type = FP_EntityType_Merchant; + entity->type = FP_EntityType_MerchantTerry; + entity->local_pos = pos; + entity->local_hit_box_size = Dqn_V2_InitNx2(50, 50); + entity->sprite_height.meters = 3.66f; + FP_Entity_AddDebugEditorFlags(game, result); + entity->flags |= FP_GameEntityFlag_NonTraversable; + + return result; +} + +static FP_GameEntityHandle FP_Entity_CreateMerchantGraveyard(FP_Game *game, Dqn_V2 pos, DQN_FMT_STRING_ANNOTATE char const *fmt, ...) +{ + va_list args; + va_start(args, fmt); + FP_GameEntity *entity = FP_Game_MakeEntityPointerFV(game, fmt, args); + FP_GameEntityHandle result = entity->handle; + va_end(args); + + entity->type = FP_EntityType_MerchantGraveyard; + entity->local_pos = pos; + entity->local_hit_box_size = Dqn_V2_InitNx2(50, 50); + entity->sprite_height.meters = 3.66f; + FP_Entity_AddDebugEditorFlags(game, result); + entity->flags |= FP_GameEntityFlag_NonTraversable; + + return result; +} + +static FP_GameEntityHandle FP_Entity_CreateMerchantGym(FP_Game *game, Dqn_V2 pos, DQN_FMT_STRING_ANNOTATE char const *fmt, ...) +{ + va_list args; + va_start(args, fmt); + FP_GameEntity *entity = FP_Game_MakeEntityPointerFV(game, fmt, args); + FP_GameEntityHandle result = entity->handle; + va_end(args); + + entity->type = FP_EntityType_MerchantGym; + entity->local_pos = pos; + entity->local_hit_box_size = Dqn_V2_InitNx2(50, 50); + entity->sprite_height.meters = 3.66f; + FP_Entity_AddDebugEditorFlags(game, result); + entity->flags |= FP_GameEntityFlag_NonTraversable; + + return result; +} + +static FP_GameEntityHandle FP_Entity_CreateMerchantPhoneCompany(FP_Game *game, Dqn_V2 pos, DQN_FMT_STRING_ANNOTATE char const *fmt, ...) +{ + va_list args; + va_start(args, fmt); + FP_GameEntity *entity = FP_Game_MakeEntityPointerFV(game, fmt, args); + FP_GameEntityHandle result = entity->handle; + va_end(args); + + entity->type = FP_EntityType_MerchantPhoneCompany; entity->local_pos = pos; entity->local_hit_box_size = Dqn_V2_InitNx2(50, 50); entity->sprite_height.meters = 3.66f;