Просмотр исходного кода

change "Story" mode to "Tutorial"

jblanked 8 месяцев назад
Родитель
Сommit
f99de327fd
8 измененных файлов с 15 добавлено и 15 удалено
  1. 2 2
      callback/alloc.c
  2. 2 2
      callback/callback.c
  3. 1 1
      game/draw.c
  4. 3 3
      game/enemy.c
  5. 1 1
      game/game.c
  6. 1 1
      game/npc.c
  7. 2 2
      game/player.c
  8. 3 3
      game/player.h

+ 2 - 2
callback/alloc.c

@@ -390,8 +390,8 @@ bool alloc_game_submenu(void *context)
         {
             return false;
         }
-        submenu_add_item(app->submenu_game, "Tutorial", FlipWorldSubmenuIndexStory, callback_submenu_choices, app);
-        submenu_add_item(app->submenu_game, "PvP (Beta)", FlipWorldSubmenuIndexPvP, callback_submenu_choices, app);
+        submenu_add_item(app->submenu_game, "Tutorial", FlipWorldSubmenuIndexTutorial, callback_submenu_choices, app);
+        submenu_add_item(app->submenu_game, "PvP", FlipWorldSubmenuIndexPvP, callback_submenu_choices, app);
         submenu_add_item(app->submenu_game, "PvE", FlipWorldSubmenuIndexPvE, callback_submenu_choices, app);
     }
     return true;

+ 2 - 2
callback/callback.c

@@ -81,8 +81,8 @@ void callback_submenu_choices(void *context, uint32_t index)
         }
         view_dispatcher_switch_to_view(app->view_dispatcher, FlipWorldViewGameSubmenu);
         break;
-    case FlipWorldSubmenuIndexStory:
-        game_mode_index = 2; // GAME_MODE_STORY
+    case FlipWorldSubmenuIndexTutorial:
+        game_mode_index = 2; // GAME_MODE_TUTORIAL
         game_run(app);
         break;
     case FlipWorldSubmenuIndexPvP:

+ 1 - 1
game/draw.c

@@ -58,7 +58,7 @@ static void draw_menu(GameManager *manager, Canvas *canvas)
         0,
         &I_icon_menu_128x64px);
 
-    if (game_context->game_mode == GAME_MODE_STORY)
+    if (game_context->game_mode == GAME_MODE_TUTORIAL)
     {
         canvas_set_font(canvas, FontPrimary);
         canvas_draw_str(canvas, 45, 15, "Tutorial");

+ 3 - 3
game/enemy.c

@@ -136,7 +136,7 @@ static void enemy_render(Entity *self, GameManager *manager, Canvas *canvas, voi
     }
 
     // no enemies in story mode for now
-    if (game_context->game_mode != GAME_MODE_STORY || (game_context->game_mode == GAME_MODE_STORY && game_context->tutorial_step == 4))
+    if (game_context->game_mode != GAME_MODE_TUTORIAL || (game_context->game_mode == GAME_MODE_TUTORIAL && game_context->tutorial_step == 4))
     {
 
         // Draw enemy sprite relative to camera, centered on the enemy's position
@@ -227,7 +227,7 @@ static void enemy_collision(Entity *self, Entity *other, GameManager *manager, v
     GameContext *game_context = game_manager_game_context_get(manager);
     furi_check(game_context, "Enemy collision: GameContext is NULL");
     PlayerContext *player_context = entity_context_get(game_context->player);
-    if (game_context->game_mode == GAME_MODE_STORY && game_context->tutorial_step != 4)
+    if (game_context->game_mode == GAME_MODE_TUTORIAL && game_context->tutorial_step != 4)
     {
         // FURI_LOG_I("Game", "Enemy collision: No enemies in story mode");
         return;
@@ -265,7 +265,7 @@ static void enemy_collision(Entity *self, Entity *other, GameManager *manager, v
         // Handle Player Attacking Enemy (Press OK, facing enemy, and enemy not facing player)
         if (player_is_facing_enemy && game_context->last_button == GameKeyOk && !enemy_is_facing_player)
         {
-            if (game_context->game_mode == GAME_MODE_STORY && game_context->tutorial_step == 4)
+            if (game_context->game_mode == GAME_MODE_TUTORIAL && game_context->tutorial_step == 4)
             {
                 // FURI_LOG_I("Game", "Player attacked enemy '%d'!", enemy_context->id);
                 game_context->tutorial_step++;

+ 1 - 1
game/game.c

@@ -63,7 +63,7 @@ static void game_start(GameManager *game_manager, void *ctx)
                 game_context->level_count++;
         }
     }
-    else if (game_context->game_mode == GAME_MODE_STORY)
+    else if (game_context->game_mode == GAME_MODE_TUTORIAL)
     {
         // show tutorial only for now
         game_context->levels[0] = game_manager_add_level(game_manager, world_training());

+ 1 - 1
game/npc.c

@@ -109,7 +109,7 @@ static void npc_render(Entity *self, GameManager *manager, Canvas *canvas, void
         current_sprite = npc_context->sprite_right;
     }
     // no NPCs in story mode for now
-    if (game_context->game_mode != GAME_MODE_STORY)
+    if (game_context->game_mode != GAME_MODE_TUTORIAL)
     {
         // Draw NPC sprite relative to camera, centered on the NPC's position
         canvas_draw_sprite(

+ 2 - 2
game/player.c

@@ -467,7 +467,7 @@ static void player_update(Entity *self, GameManager *manager, void *context)
     }
 
     // adjust tutorial step
-    if (game_context->game_mode == GAME_MODE_STORY)
+    if (game_context->game_mode == GAME_MODE_TUTORIAL)
     {
         switch (game_context->tutorial_step)
         {
@@ -615,7 +615,7 @@ static void player_render(Entity *self, GameManager *manager, Canvas *canvas, vo
     canvas_draw_frame(canvas, -draw_camera_x, -draw_camera_y, WORLD_WIDTH, WORLD_HEIGHT);
 
     // render tutorial
-    if (game_context->game_mode == GAME_MODE_STORY)
+    if (game_context->game_mode == GAME_MODE_TUTORIAL)
     {
         player_draw_tutorial(canvas, manager);
 

+ 3 - 3
game/player.h

@@ -81,9 +81,9 @@ typedef enum
 // game modes
 typedef enum
 {
-    GAME_MODE_PVE = 0,   // player(s) vs everyone
-    GAME_MODE_PVP = 1,   // player vs player
-    GAME_MODE_STORY = 2, // story mode
+    GAME_MODE_PVE = 0,      // player(s) vs everyone
+    GAME_MODE_PVP = 1,      // player vs player
+    GAME_MODE_TUTORIAL = 2, // tutorial mode
 } GameMode;
 
 typedef struct