diff --git a/Data/Textures/sprite_spec.txt b/Data/Textures/sprite_spec.txt index 2c232c1..7085808 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:44bf276c7b3964cb26b814255af5b025f7ae4eb9578fb8abe615f629aa98f46b -size 64 +oid sha256:ab456e41b467725247c512389177cc5ae21f413c0599a035542f38e6177e730d +size 94 diff --git a/Data/Textures/terry_movement.txt b/Data/Textures/terry_movement.txt deleted file mode 100644 index bb487a8..0000000 --- a/Data/Textures/terry_movement.txt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:786c4f514baf2c413109503bf02ab442695a9bf2e71edc8fbc5f53150e81dbb0 -size 670 diff --git a/Data/Textures/terry_movement.png b/Data/Textures/terry_walk.png similarity index 100% rename from Data/Textures/terry_movement.png rename to Data/Textures/terry_walk.png diff --git a/Data/Textures/terry_walk.txt b/Data/Textures/terry_walk.txt new file mode 100644 index 0000000..7911d11 --- /dev/null +++ b/Data/Textures/terry_walk.txt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8683c5ba59f09a4ad2021c75d1c5786bb4873a21b01decedc7e63961bfff349c +size 696 diff --git a/Data/Textures/terry_movement/Walk_down_1.png b/Data/Textures/terry_walk/terry_walk_down_1.png similarity index 100% rename from Data/Textures/terry_movement/Walk_down_1.png rename to Data/Textures/terry_walk/terry_walk_down_1.png diff --git a/Data/Textures/terry_movement/Walk_down_2.png b/Data/Textures/terry_walk/terry_walk_down_2.png similarity index 100% rename from Data/Textures/terry_movement/Walk_down_2.png rename to Data/Textures/terry_walk/terry_walk_down_2.png diff --git a/Data/Textures/terry_movement/Walk_down_3.png b/Data/Textures/terry_walk/terry_walk_down_3.png similarity index 100% rename from Data/Textures/terry_movement/Walk_down_3.png rename to Data/Textures/terry_walk/terry_walk_down_3.png diff --git a/Data/Textures/terry_movement/Walk_down_4.png b/Data/Textures/terry_walk/terry_walk_down_4.png similarity index 100% rename from Data/Textures/terry_movement/Walk_down_4.png rename to Data/Textures/terry_walk/terry_walk_down_4.png diff --git a/Data/Textures/terry_movement/Walk_down_5.png b/Data/Textures/terry_walk/terry_walk_down_5.png similarity index 100% rename from Data/Textures/terry_movement/Walk_down_5.png rename to Data/Textures/terry_walk/terry_walk_down_5.png diff --git a/Data/Textures/terry_movement/Walk_down_6.png b/Data/Textures/terry_walk/terry_walk_down_6.png similarity index 100% rename from Data/Textures/terry_movement/Walk_down_6.png rename to Data/Textures/terry_walk/terry_walk_down_6.png diff --git a/Data/Textures/terry_movement/Walk_down_7.png b/Data/Textures/terry_walk/terry_walk_down_7.png similarity index 100% rename from Data/Textures/terry_movement/Walk_down_7.png rename to Data/Textures/terry_walk/terry_walk_down_7.png diff --git a/Data/Textures/terry_movement/Walk_idle_1.png b/Data/Textures/terry_walk/terry_walk_idle_1.png similarity index 100% rename from Data/Textures/terry_movement/Walk_idle_1.png rename to Data/Textures/terry_walk/terry_walk_idle_1.png diff --git a/Data/Textures/terry_movement/Walk_idle_2.png b/Data/Textures/terry_walk/terry_walk_idle_2.png similarity index 100% rename from Data/Textures/terry_movement/Walk_idle_2.png rename to Data/Textures/terry_walk/terry_walk_idle_2.png diff --git a/Data/Textures/terry_movement/Walk_idle_3.png b/Data/Textures/terry_walk/terry_walk_idle_3.png similarity index 100% rename from Data/Textures/terry_movement/Walk_idle_3.png rename to Data/Textures/terry_walk/terry_walk_idle_3.png diff --git a/Data/Textures/terry_movement/Walk_idle_4.png b/Data/Textures/terry_walk/terry_walk_idle_4.png similarity index 100% rename from Data/Textures/terry_movement/Walk_idle_4.png rename to Data/Textures/terry_walk/terry_walk_idle_4.png diff --git a/Data/Textures/terry_movement/Walk_idle_5.png b/Data/Textures/terry_walk/terry_walk_idle_5.png similarity index 100% rename from Data/Textures/terry_movement/Walk_idle_5.png rename to Data/Textures/terry_walk/terry_walk_idle_5.png diff --git a/Data/Textures/terry_movement/Walk_idle_6.png b/Data/Textures/terry_walk/terry_walk_idle_6.png similarity index 100% rename from Data/Textures/terry_movement/Walk_idle_6.png rename to Data/Textures/terry_walk/terry_walk_idle_6.png diff --git a/Data/Textures/terry_movement/Walk_idle_7.png b/Data/Textures/terry_walk/terry_walk_idle_7.png similarity index 100% rename from Data/Textures/terry_movement/Walk_idle_7.png rename to Data/Textures/terry_walk/terry_walk_idle_7.png diff --git a/Data/Textures/terry_movement/Walk_idle_8.png b/Data/Textures/terry_walk/terry_walk_idle_8.png similarity index 100% rename from Data/Textures/terry_movement/Walk_idle_8.png rename to Data/Textures/terry_walk/terry_walk_idle_8.png diff --git a/Data/Textures/terry_movement/Walk_left_1.png b/Data/Textures/terry_walk/terry_walk_left_1.png similarity index 100% rename from Data/Textures/terry_movement/Walk_left_1.png rename to Data/Textures/terry_walk/terry_walk_left_1.png diff --git a/Data/Textures/terry_movement/Walk_left_2.png b/Data/Textures/terry_walk/terry_walk_left_2.png similarity index 100% rename from Data/Textures/terry_movement/Walk_left_2.png rename to Data/Textures/terry_walk/terry_walk_left_2.png diff --git a/Data/Textures/terry_movement/Walk_left_3.png b/Data/Textures/terry_walk/terry_walk_left_3.png similarity index 100% rename from Data/Textures/terry_movement/Walk_left_3.png rename to Data/Textures/terry_walk/terry_walk_left_3.png diff --git a/Data/Textures/terry_movement/Walk_left_4.png b/Data/Textures/terry_walk/terry_walk_left_4.png similarity index 100% rename from Data/Textures/terry_movement/Walk_left_4.png rename to Data/Textures/terry_walk/terry_walk_left_4.png diff --git a/Data/Textures/terry_movement/Walk_left_5.png b/Data/Textures/terry_walk/terry_walk_left_5.png similarity index 100% rename from Data/Textures/terry_movement/Walk_left_5.png rename to Data/Textures/terry_walk/terry_walk_left_5.png diff --git a/Data/Textures/terry_movement/Walk_left_6.png b/Data/Textures/terry_walk/terry_walk_left_6.png similarity index 100% rename from Data/Textures/terry_movement/Walk_left_6.png rename to Data/Textures/terry_walk/terry_walk_left_6.png diff --git a/Data/Textures/terry_movement/Walk_left_7.png b/Data/Textures/terry_walk/terry_walk_left_7.png similarity index 100% rename from Data/Textures/terry_movement/Walk_left_7.png rename to Data/Textures/terry_walk/terry_walk_left_7.png diff --git a/Data/Textures/terry_movement/Walk_right_1.png b/Data/Textures/terry_walk/terry_walk_right_1.png similarity index 100% rename from Data/Textures/terry_movement/Walk_right_1.png rename to Data/Textures/terry_walk/terry_walk_right_1.png diff --git a/Data/Textures/terry_movement/Walk_right_2.png b/Data/Textures/terry_walk/terry_walk_right_2.png similarity index 100% rename from Data/Textures/terry_movement/Walk_right_2.png rename to Data/Textures/terry_walk/terry_walk_right_2.png diff --git a/Data/Textures/terry_movement/Walk_right_3.png b/Data/Textures/terry_walk/terry_walk_right_3.png similarity index 100% rename from Data/Textures/terry_movement/Walk_right_3.png rename to Data/Textures/terry_walk/terry_walk_right_3.png diff --git a/Data/Textures/terry_movement/Walk_right_4.png b/Data/Textures/terry_walk/terry_walk_right_4.png similarity index 100% rename from Data/Textures/terry_movement/Walk_right_4.png rename to Data/Textures/terry_walk/terry_walk_right_4.png diff --git a/Data/Textures/terry_movement/Walk_right_5.png b/Data/Textures/terry_walk/terry_walk_right_5.png similarity index 100% rename from Data/Textures/terry_movement/Walk_right_5.png rename to Data/Textures/terry_walk/terry_walk_right_5.png diff --git a/Data/Textures/terry_movement/Walk_right_6.png b/Data/Textures/terry_walk/terry_walk_right_6.png similarity index 100% rename from Data/Textures/terry_movement/Walk_right_6.png rename to Data/Textures/terry_walk/terry_walk_right_6.png diff --git a/Data/Textures/terry_movement/Walk_right_7.png b/Data/Textures/terry_walk/terry_walk_right_7.png similarity index 100% rename from Data/Textures/terry_movement/Walk_right_7.png rename to Data/Textures/terry_walk/terry_walk_right_7.png diff --git a/Data/Textures/terry_movement/Walk_up_1.png b/Data/Textures/terry_walk/terry_walk_up_1.png similarity index 100% rename from Data/Textures/terry_movement/Walk_up_1.png rename to Data/Textures/terry_walk/terry_walk_up_1.png diff --git a/Data/Textures/terry_movement/Walk_up_2.png b/Data/Textures/terry_walk/terry_walk_up_2.png similarity index 100% rename from Data/Textures/terry_movement/Walk_up_2.png rename to Data/Textures/terry_walk/terry_walk_up_2.png diff --git a/Data/Textures/terry_movement/Walk_up_3.png b/Data/Textures/terry_walk/terry_walk_up_3.png similarity index 100% rename from Data/Textures/terry_movement/Walk_up_3.png rename to Data/Textures/terry_walk/terry_walk_up_3.png diff --git a/Data/Textures/terry_movement/Walk_up_4.png b/Data/Textures/terry_walk/terry_walk_up_4.png similarity index 100% rename from Data/Textures/terry_movement/Walk_up_4.png rename to Data/Textures/terry_walk/terry_walk_up_4.png diff --git a/Data/Textures/terry_movement/Walk_up_5.png b/Data/Textures/terry_walk/terry_walk_up_5.png similarity index 100% rename from Data/Textures/terry_movement/Walk_up_5.png rename to Data/Textures/terry_walk/terry_walk_up_5.png diff --git a/Data/Textures/terry_movement/Walk_up_6.png b/Data/Textures/terry_walk/terry_walk_up_6.png similarity index 100% rename from Data/Textures/terry_movement/Walk_up_6.png rename to Data/Textures/terry_walk/terry_walk_up_6.png diff --git a/feely_pona.cpp b/feely_pona.cpp index 07c01da..953b80b 100644 --- a/feely_pona.cpp +++ b/feely_pona.cpp @@ -407,7 +407,9 @@ void TELY_DLL_Init(void *user_data) sheet->type = TELY_AssetSpriteSheetType_Rects; // NOTE: Load the sprite meta file ========================================================= - Dqn_String8 sprite_spec_path = Dqn_FsPath_ConvertF(scratch.arena, "%.*s/terry_movement.txt", DQN_STRING_FMT(assets->textures_dir)); + Dqn_String8 sheet_name = DQN_STRING8("terry_walk"); + + Dqn_String8 sprite_spec_path = Dqn_FsPath_ConvertF(scratch.arena, "%.*s/%.*s.txt", DQN_STRING_FMT(assets->textures_dir), DQN_STRING_FMT(sheet_name)); Dqn_String8 sprite_spec_buffer = platform->func_load_file(scratch.arena, sprite_spec_path); Dqn_String8SplitAllocResult lines = Dqn_String8_SplitAlloc(scratch.allocator, sprite_spec_buffer, DQN_STRING8("\n")); Dqn_usize sprite_rect_index = 0; @@ -423,7 +425,7 @@ void TELY_DLL_Init(void *user_data) // NOTE: Sprite sheet path Dqn_String8 sprite_sheet_path = Dqn_FsPath_ConvertF(scratch.arena, "%.*s/%.*s", DQN_STRING_FMT(assets->textures_dir), DQN_STRING_FMT(line_splits.data[1])); - sheet->tex_handle = platform->func_load_texture(assets, DQN_STRING8("Terry Movement"), sprite_sheet_path); + sheet->tex_handle = platform->func_load_texture(assets, sheet_name, sprite_sheet_path); DQN_ASSERTF(Dqn_Fs_Exists(sprite_sheet_path), "Required file does not exist '%.*s'", DQN_STRING_FMT(sprite_sheet_path)); // NOTE: Total sprite frame count @@ -871,7 +873,7 @@ void FP_Update(TELY_Platform *platform, FP_Game *game, TELY_Renderer *renderer, if (action->state == FP_GameEntityState_Idle) { if (action->flags & FP_GameEntityActionFlag_StateTransition) { - TELY_AssetSpriteAnimation *anim = entity->sprite_anims.data + TELY_Asset_GetSpriteAnimation(entity->sprite_anims, DQN_STRING8("Walk_idle")).index; + TELY_AssetSpriteAnimation *anim = entity->sprite_anims.data + TELY_Asset_GetSpriteAnimation(entity->sprite_anims, DQN_STRING8("terry_walk_idle")).index; FP_Game_EntityActionReset(action, FP_GAME_ENTITY_ACTION_INFINITE_TIMER, anim); } else if (we_are_clicked_entity) { if (TELY_Platform_InputScanCodeIsPressed(input, TELY_PlatformInputScanCode_J)) { @@ -927,7 +929,7 @@ void FP_Update(TELY_Platform *platform, FP_Game *game, TELY_Renderer *renderer, if (action->state == FP_GameEntityState_Run) { if (action->flags & FP_GameEntityActionFlag_StateTransition) { - TELY_AssetSpriteAnimation *anim = entity->sprite_anims.data + TELY_Asset_GetSpriteAnimation(entity->sprite_anims, DQN_STRING8("Walk_right")).index; + TELY_AssetSpriteAnimation *anim = entity->sprite_anims.data + TELY_Asset_GetSpriteAnimation(entity->sprite_anims, DQN_STRING8("terry_walk_right")).index; FP_Game_EntityActionReset(action, FP_GAME_ENTITY_ACTION_INFINITE_TIMER, anim); } else if (we_are_clicked_entity) { if (TELY_Platform_InputScanCodeIsPressed(input, TELY_PlatformInputScanCode_J)) { diff --git a/project.rdbg b/project.rdbg index 81ea7a9..d667917 100644 Binary files a/project.rdbg and b/project.rdbg differ