Skip to content

Commit 975f117

Browse files
authored
Merge pull request #12 from bigb4321/master
More to come...
2 parents 63bf93c + 308c4ad commit 975f117

File tree

207 files changed

+1969
-167
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

207 files changed

+1969
-167
lines changed

README.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,20 @@ Welcome to **Flipper Hero**, an engaging typing practice game ported for the Fli
1818

1919
## Screenshots
2020

21-
![1](./screenshots/flipper_hero_1.png)
21+
![1](./screenshots/Screenshot-1.png)
2222

23-
![2](./screenshots/flipper_hero_2.png)
23+
![2](./screenshots/Screenshot-2.png)
2424

25-
![3](./screenshots/flipper_hero_3.png)
25+
![3](./screenshots/Screenshot-3.png)
2626

27+
![4](./screenshots/Screenshot-4.png)
2728
## Introduction
2829

2930
**Flipper Hero** is inspired by the beloved minigame "Stratagem Hero, " found in the "Helldivers 2" universe. Situated on your Ship, this game becomes a crucial part of your journey, allowing you to practice typing Stratagem Codes flawlessly. The better you perform, the higher your score!
31+
Flipper Hero has been updated to more closely resemble its inspiration, Stratagem Hero from Helldivers 2.
32+
A pause menu has been added with a few settings. It can be accessed by pressing the "BACK" button. Settings can be saved by pressing the "OK" button in the settings menu.
33+
The "New Strgms:" option in the settings menu enables the inclusion of stratagems not in Stratagem Hero. This includes stratagems from warbonds, and mission-specific stratagems.
34+
3035

3136
## Features
3237

application.fam

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ App(
99
],
1010
stack_size=1 * 1024,
1111
order=10,
12-
fap_version="1.3",
12+
fap_version="1.4",
1313
fap_icon="icons/hex_10px.png",
1414
fap_icon_assets="icons",
1515
fap_category="Games",

data/data.h

Lines changed: 82 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
#include <input/input.h>
2+
#include <gui/icon.h>
3+
#include <gui/canvas.h>
4+
5+
// I'm using the code for sound from Doom by MMX @ https://github.com/xMasterX/all-the-plugins/tree/dev/base_pack/doom
6+
// Thanks for the permission, MMX!
7+
#include "../helpers/sound.h"
8+
9+
210
#pragma once
11+
// Likelyhood for special rounds to force a stratagem to match the theme, out of 10.
12+
#define SPECIAL_ROUND_SELECTION_CHANCE 75
13+
#define MENU_OPTION_COUNT 3
14+
#define SOUND
315
typedef enum {
416
EventTypeTick,
517
EventTypeKey,
@@ -10,21 +22,89 @@ typedef struct {
1022
InputEvent input;
1123
} PluginEvent;
1224

25+
typedef struct {
26+
int32_t score;
27+
int32_t round;
28+
29+
// bool states[2];
30+
} Record;
31+
32+
typedef enum {
33+
SpecialRoundNone,
34+
SpecialRoundOrbital,
35+
SpecialRoundEagle,
36+
SpecialRoundBackpack,
37+
SpecialRoundWeapon,
38+
} SpecialRound;
39+
40+
typedef struct {
41+
bool unfaithful; // For adherence to original Stratagem Hero. If true, removes warbond stratagems.
42+
bool enable_sound; // Whether or not to play jingles at the ends of games/rounds
43+
bool center_queue; // If true, draw the current stratagem in the middle. If false, draw it offset to the left.
44+
} Config;
45+
1346
typedef struct {
1447
FuriMutex* mutex;
48+
49+
// ARROW HANDLING
1550
char arrowDirections[8]; // Store directions of up to 8 arrows
1651
bool arrowFilled[8]; // Track whether each arrow is filled
1752
int numArrows; // Number of arrows currently active
1853
int nextArrowToFill; // Index of the next arrow to fill
54+
char seq_buf[9]; // Buffer for arrow sequences
55+
56+
// QUEUE
57+
int queue_spot; // Current place in the stratgaem queue
58+
int stratagem_queue[20]; // 20 long even though there will only be a max of 16 stratagems. I honstly don't know why i did this lol
59+
SpecialRound special_round;
60+
61+
char name_buf[32]; // Buffer for stratagem name
62+
63+
// GAME STATS
1964
int score;
2065
int round;
2166
int timer;
22-
int32_t record_score;
23-
int32_t record_round;
67+
Record* record; // High score and high round
68+
69+
// MENU HANDLING
70+
int menu_spot;
71+
Config* config;
72+
73+
74+
// MARQUEE
75+
bool init_marquee;
76+
bool do_marquee;
77+
int marquee_data[3];
78+
// 0: Time at stratagem start
79+
// 1: Current offset
80+
// 2: Marquee spacing
81+
82+
// END OF ROUND BONUSES
83+
bool perfect;
84+
int bonuses[3]; // round bonus at 0, time bonus at 1, perfect bonus at 2.
85+
86+
// GAME STATE
87+
bool allowMenuInput;
88+
bool allowOkInput;
89+
bool allowPauseInput;
90+
bool isGamePaused;
2491
bool isGameStarted;
92+
bool isScoreScreen;
93+
bool isPreRound;
94+
bool isRoundOver;
2595
bool isGameOver;
96+
97+
//Music stuff
98+
#ifdef SOUND
99+
MusicPlayer* music_instance;
100+
bool playing_sound;
101+
bool gameOverSoundPlayed;
102+
int mus_timer;
103+
#endif
26104
} PluginState;
27105

106+
107+
28108
typedef enum {
29109
ArrowDirectionUp,
30110
ArrowDirectionRight,

docs/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
## Flipper Hero Game
22

33
Flipper Hero is a typing game that challenges you to improve your typing skills by inputting codes. Track your high score and challenge yourself to beat it with each attempt.
4+
Flpper Hero has been updated to more closely resemble its inspiration, Stratagem Hero from Helldivers 2.
5+
A pause menu has been added with a few settings. It can be accessed by pressing the "BACK" button. Settings can be saved by pressing the "OK" button in the settings menu.
6+
The "New Strgms:" option in the settings menu enables the inclusion of stratagems not in Stratagem Hero. This includes stratagems from warbonds, and mission-specific stratagems.
7+
48

59
## Features
610
- **Typing Practice:** Enhance your typing skills by inputting codes.

docs/changelog.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,28 @@
1+
## v1.4
2+
- Updated for SDK version 1.4.3
3+
- Added all stratagems (as of Helldivers 2 version 1.005.001)
4+
- Created and implemented stratagem icons and stratagem queue
5+
- Replaced randomly-generated sequences with aforementioned stratagems.
6+
- Added stratagem name display.
7+
- Implemented distinct rounds to more closely resemble Stratagem Hero
8+
- Added end-of-round bonuses
9+
- Added "special rounds" with accompanying splash text before them
10+
- Added saved high score
11+
- Updated pre-game and game over screens to show high score (And high round on game over screen)
12+
- Marquee effect on names that don't fit in the frame
13+
- Added jingles at game over/end of rounds
14+
- Added settings menu with the following options:
15+
- - Whether or not to use stratagems that aren't in Stratagem Hero
16+
- - Enable/disable sound
17+
- - Where to draw the current stratagem (center, or offset to the left)
18+
- Added ability to save settings
19+
- Reorganized some code structure:
20+
- - Moved rendering code to its own file
21+
- - Created dedicated files for stratagem data
22+
- - Moved input handling from flipper_hero_app() to its own function
23+
- Used sound code from Doom by xMasterX at https://github.com/xMasterX/all-the-plugins/tree/dev/base_pack/doom
24+
- Separate files are saved for high score storage and config storage. I did this because it was a much bigger headache than using one file for both
25+
126
## v1.3
227

328
- Updated for SDK version 1.3.0-rc f7 compatibility

0 commit comments

Comments
 (0)