|
|
@@ -2,9 +2,9 @@
|
|
|
|
|
|
#include <stddef.h>
|
|
|
|
|
|
-#include "../../engine/vector.h"
|
|
|
+#include "src/engine/vector.h"
|
|
|
|
|
|
-#include "../../game.h"
|
|
|
+#include "src/game.h"
|
|
|
|
|
|
#include "blinking_sprite.h"
|
|
|
#include "delayed_sprite.h"
|
|
|
@@ -21,61 +21,57 @@ typedef struct
|
|
|
} LevelMenuContext;
|
|
|
|
|
|
static void
|
|
|
-level_menu_alloc(Level* level, GameManager* manager, void* context)
|
|
|
+level_menu_alloc(Level* level, GameManager* manager, void* _level_context)
|
|
|
{
|
|
|
- LevelMenuContext* menu_context = context;
|
|
|
+ LevelMenuContext* menu_context = _level_context;
|
|
|
|
|
|
- static const float initial_amimation_duration = 45.0f;
|
|
|
+ const float initial_amimation_duration = 45.0f;
|
|
|
|
|
|
// Quadrastic logo
|
|
|
menu_context->quadrastic_logo =
|
|
|
- level_add_entity(level, &moving_sprite_description);
|
|
|
- moving_sprite_init(menu_context->quadrastic_logo,
|
|
|
- manager,
|
|
|
- (Vector){ .x = 9, .y = 64 },
|
|
|
- (Vector){ .x = 9, .y = 2 },
|
|
|
- initial_amimation_duration,
|
|
|
- "quadrastic.fxbm");
|
|
|
+ moving_sprite_add_to_level(level,
|
|
|
+ manager,
|
|
|
+ (Vector){ .x = 9, .y = 64 },
|
|
|
+ (Vector){ .x = 9, .y = 2 },
|
|
|
+ initial_amimation_duration,
|
|
|
+ "quadrastic.fxbm");
|
|
|
|
|
|
// Press ok logo
|
|
|
menu_context->press_ok =
|
|
|
- level_add_entity(level, &blinking_sprite_description);
|
|
|
- blinking_sprite_init(menu_context->press_ok,
|
|
|
- manager,
|
|
|
- (Vector){ .x = 31, .y = 33 },
|
|
|
- initial_amimation_duration,
|
|
|
- 15.0f,
|
|
|
- 7.0f,
|
|
|
- "press_ok.fxbm");
|
|
|
+ blinking_sprite_add_to_level(level,
|
|
|
+ manager,
|
|
|
+ (Vector){ .x = 31, .y = 33 },
|
|
|
+ initial_amimation_duration,
|
|
|
+ 15.0f,
|
|
|
+ 7.0f,
|
|
|
+ "press_ok.fxbm");
|
|
|
|
|
|
// Settings button
|
|
|
menu_context->left_button =
|
|
|
- level_add_entity(level, &delayed_sprite_description);
|
|
|
- delayed_sprite_init(menu_context->left_button,
|
|
|
- manager,
|
|
|
- (Vector){ .x = 0, .y = 57 },
|
|
|
- initial_amimation_duration,
|
|
|
- "left_button.fxbm");
|
|
|
+ delayed_sprite_add_to_level(level,
|
|
|
+ manager,
|
|
|
+ (Vector){ .x = 0, .y = 57 },
|
|
|
+ initial_amimation_duration,
|
|
|
+ "left_button.fxbm");
|
|
|
|
|
|
// About button
|
|
|
menu_context->right_button =
|
|
|
- level_add_entity(level, &delayed_sprite_description);
|
|
|
- delayed_sprite_init(menu_context->right_button,
|
|
|
- manager,
|
|
|
- (Vector){ .x = 115, .y = 57 },
|
|
|
- initial_amimation_duration,
|
|
|
- "right_button.fxbm");
|
|
|
+ delayed_sprite_add_to_level(level,
|
|
|
+ manager,
|
|
|
+ (Vector){ .x = 115, .y = 57 },
|
|
|
+ initial_amimation_duration,
|
|
|
+ "right_button.fxbm");
|
|
|
|
|
|
// Menu
|
|
|
level_add_entity(level, &menu_description);
|
|
|
}
|
|
|
|
|
|
static void
|
|
|
-level_menu_start(Level* level, GameManager* manager, void* context)
|
|
|
+level_menu_start(Level* level, GameManager* manager, void* _level_context)
|
|
|
{
|
|
|
UNUSED(level);
|
|
|
UNUSED(manager);
|
|
|
- UNUSED(context);
|
|
|
+ UNUSED(_level_context);
|
|
|
|
|
|
FURI_LOG_D(GAME_NAME, "Menu level started");
|
|
|
}
|