Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Onboard Manual #379

Open
wants to merge 43 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
20571c2
This is stupid but implement italics
dylwhich Nov 27, 2022
3309c00
Rough manual prototype missing rich_text.c
dylwhich Dec 3, 2022
2a1ebe0
Markdown parser skeleton
dylwhich Dec 3, 2022
46629f2
Parse all the escape sequences
dylwhich Dec 3, 2022
2a29fc0
dont forget images
dylwhich Dec 3, 2022
06c8d21
Fix image parsing and escaping
dylwhich Dec 3, 2022
2e3f6d9
Manual mode that uses markdown, kinda
dylwhich Dec 3, 2022
1faf98f
Markdown drawing functions WIP
dylwhich Dec 3, 2022
dde6e90
Add generic drawTextAttrs functions
dylwhich Dec 4, 2022
7aea38f
Fix markdown pagination
dylwhich Dec 4, 2022
6fe55c8
Working markdown text styles and such
dylwhich Dec 4, 2022
a44ac2e
Word wrap fixes
dylwhich Dec 4, 2022
098a3d0
Ugh I guess I'll let wordWrap know about pointer-terminated strings...
dylwhich Dec 4, 2022
7c3c12b
Simplify markdown drawing
dylwhich Dec 4, 2022
6994676
The line planner compiles
dylwhich Dec 6, 2022
d6a36ff
Even more working markdown printing
dylwhich Dec 6, 2022
f1481a5
Wow that error was the only problem
dylwhich Dec 7, 2022
c97d8b9
Add loading indicator to manual
dylwhich Dec 7, 2022
7020b31
Fix centering text
dylwhich Dec 7, 2022
db710d8
Add fancer text and clean up
dylwhich Dec 7, 2022
072dc2b
Merge remote-tracking branch 'origin/main' into onboard-manual-take-2
dylwhich Dec 16, 2022
88c63df
Remove requirement for bresenham.h from display.c
Brycey92 Dec 22, 2022
28a0b89
#Define out debug prints to speed up linked lists
Brycey92 Dec 23, 2022
11eaa53
Defining out debug prints for manual
maxwelllc Dec 23, 2022
d6e622a
Fixing #ifdef indentation
maxwelllc Dec 23, 2022
832da7a
Define out manual waiting icon
Brycey92 Dec 23, 2022
39de125
Clean up manual debug prints
dylwhich Dec 23, 2022
0386ca7
Add missing lipsum text
dylwhich Dec 23, 2022
8233956
Merge remote-tracking branch 'origin/main' into onboard-manual-take-2
dylwhich Jan 10, 2023
0e14b62
Fix incorrect centering math
dylwhich Jan 11, 2023
7d3d51b
Fix missing word breaks
dylwhich Jan 11, 2023
1b89823
Fix mdContinue_t not actually restoring style, font, etc.
dylwhich Jan 11, 2023
5c586c6
Fix leading whitespace breaking header measurement
dylwhich Jan 12, 2023
9dc2031
Fix continued headers not being centered
dylwhich Jan 12, 2023
1e3af76
Move text functions to font.h
dylwhich Jan 15, 2023
4141c35
Support preprocessing .md files as text
dylwhich Jan 15, 2023
610db9d
Add real manual copy
dylwhich Jan 15, 2023
dd1d22e
Fix page breaks
dylwhich Jan 15, 2023
fe44870
Move manual into chapters
dylwhich Jan 16, 2023
5ba2423
Change manual BG color
dylwhich Jan 16, 2023
87b131f
Fix invalid characters in manual texts
dylwhich Jan 16, 2023
29e6e63
Add invalid character detection to text preprocessor
dylwhich Jan 16, 2023
49ff398
Fix last incomplete line not being drawn
dylwhich Jan 16, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions assets/texts/manual/colorchord.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# \c540Colorchord\C

\lC\c505_The Swadge's sound-reactive LEDs make any music a party!_\C\L

Use Left and Right or Select to select options like microphone gain, LED brightness, and LED output style.

Use Up, Down, A, B, and Start to cycle through options.
5 changes: 5 additions & 0 deletions assets/texts/manual/dice_roller.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# \c540Dice Roller\C

\lC\c505_Roll Dice! (That's it)_\C\L

Roll Dice! Use Up and Down to adjust values, and Left and Right to select either number of dice or number of sides. '6d20' would roll 6 dice with 20 sides each. Press A or B to reroll. Your recent rolls will be visible in the History panel.
9 changes: 9 additions & 0 deletions assets/texts/manual/donut_jump.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# \c540Donut Jump\C

\lC\c505_Jump your way to a sweet victory!_\C\L

Use the Directional Buttons to move King Donut from block to block to change the blocks' colors. Once all blocks have changed from blue to gold, the round is complete. Build a combo by only jumping on blue blocks without being hit by the Evil Eclair or Devil Donut. Not all blocks are good for landing on, either.

The red blocks are just as devious as the enemies and will cause you to lose a life. The purple blocks will eliminate your combo, but they are also the only spaces that enemies dare not travel.

Keep your eyes open for the Can of Cowabunga, which gives you momentary relief as the enemies won't chase you while it is active. But, be aware they can still harm you if you try and share the same space.
9 changes: 9 additions & 0 deletions assets/texts/manual/flyin_donut.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# \c540Flyin Donut\C

\lC\c505_Fly through a reimagined Gaylord Atrium (and collect beans!)_\C\L

Use the up, down, left, and right buttons to pilot the Bean Blaster. The Bean Blaster is a high-energy ship, so it's always moving forward. Pressing the action button will push it even faster, at the cost of maneuverability.

If you don't like the way it's handling, you can invert the Y axis from the main menu.

You must go through all donuts and through the gazebo at the end to complete the Atrium Course. Free Flight mode is also available if you just want to sightsee!
11 changes: 11 additions & 0 deletions assets/texts/manual/gamepad.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# \c235Tools\C

---

# \c540Gamepad\C

\lC\c505_Use the Swadge as a USB Gamepad!_\C\L

Choose your Gamepad type, plug it into a PC or your game console of choice with a USB C-A or C-C cable (not included), and game on! All of the buttons, touch buttons, Touchpad analog value, and accelerometer data are sent to the host PC.

In Switch mode, holding Down and pressing Start is equivalent to pressing the console's 'Home' button. Holding Down and pressing Select will capture a screenshot on the console.
7 changes: 7 additions & 0 deletions assets/texts/manual/jukebox.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# \c540Jukebox\C

\lC\c505_Listen to your favorite Swadge music and SFX anytime!_\C\L

Once you enter the Jukebox mode, pick either Music or SFX on the menu, and you can get started. Use the Directional Buttons to find that underground theme you liked from Swadge Land, or give a listen to unused and hidden songs!

To entertain your eyes while we entertain your ears, you can pick from a selection of our favorite LED animations from the Light Dances mode.
7 changes: 7 additions & 0 deletions assets/texts/manual/light_dances.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# \c540Light Dances\C

\lC\c505_Show off your Swadge with your favorite LED animations!_\C\L

Choose your animation with Left and Right, adjust the brightness with Up and Down, and adjust the speed with the X and Y touch buttons.

The display will turn off after a few seconds and can be awakened with any button.
13 changes: 13 additions & 0 deletions assets/texts/manual/main_menu.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# \c540Main Menu\C

\lC\c505_Every journey has a beginning!_\C\L

There are three main categories - **Tools**, **Music**, and **Games** - and you can find them all here!

To return to the Main Menu
at any time, hold down
**Select** + **Start** for a few seconds.

The Settings menu lets you turn music and sound effects on and off, set LED brightness, screensaver timeout, and mic gain.

Oh, and check out the credits!
7 changes: 7 additions & 0 deletions assets/texts/manual/manual_intro.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# \c235Meet Your Swadge\C

---

More info, tips, and development resources are available at \c505~https://swadge.com/super2023/~\C

Use Left and Right to navigate pages. Press Select to open the Table of Contents.
11 changes: 11 additions & 0 deletions assets/texts/manual/mfpaint.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# \c540MFPaint\C

\lC\c505_Create your very own 8-bit art masterpieces!_\C\L

In Draw mode, the Directional Buttons move the cursor around the canvas. Press or hold A to draw or select points, depending on which tool is selected. Press B to swap the foreground and background colors. Tap X or swipe right on the touchpad to increases brush size; tap Y or swipe left on the touchpad to decrease brush size.

Press and hold the Touchpad to enable select mode, where Up and Down change the foreground color, and Left and Right change the active tool. Releasing the touchpad confirms and exits select mode. Press Start to toggle the save menu. Here, you can save and load from four slots, reset the canvas, edit the palette, and exit Draw mode.

Once you've created your masterpiece, it can be viewed in all its glory in the Gallery. Cycle through all your creations or just show off your favorite, accompanied by your favorite LED dance. In the Sharing menu, you can wirelessly send and receive your creations!

To send, select Share, pick the artwork to share, and press A. The Swadge will search for a nearby receiver, and automatically send the artwork. To receive, select Receive, and the Swadge will search for a nearby sender, and receive the artwork. After receiving, you may select a slot with Left and Right, and save with A, or press B to exit without saving.
15 changes: 15 additions & 0 deletions assets/texts/manual/pi_cross.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# \c540Pi-Cross\C

\lC\c505_Solve nonogram puzzles and reveal pixel art!_\C\L

Correctly fill in the grid according to the clues. Set all spaces correctly to win and reveal the pixel art!

The numbers to the left of a row are the clue for that row, and the numbers above a column are the clues for that column. Each number in a clue represents a connected series of blocks. There must be at least one gap between the blocks.

Turning on "Guides" in the options menu will tint the selected row/column and show the width or height of the group of blocks the cursor is hovering over, on the right/bottom.

There are also yellow lines every 5 squares to help you count.

Move the blue input square with the d-pad. Press A to toggle spaces as filled. Press B to mark which spaces are empty. Press START to reset the counter (top-left, below the coordinates). Press SELECT to return to the level selection screen and save your progress.

None of the puzzles in pi-cross require guessing in order to solve. The solution can always be logically deduced from the clues, and every puzzle has a single unique solution.
43 changes: 43 additions & 0 deletions assets/texts/manual/super_swadge_land.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# \c540Super Swadge Land\C

\lC\c505_16 levels of conventional 2D platforming action!_\C\L

Make your way across Swadge Land's 16 distinct areas, each full of secrets and danger! Do it with style and see if you can rack up a high score! Seek out the power of Music and Gaming and you might just become unstoppable!

The green LEDs underneath your hands indicate your Hit Points:

Bottom LEDs: 1 HP
Middle LEDs: 2 HP
Top LEDs: 3 (MAX) HP

If you touch an enemy without stomping them from above, you will lose 1 HP. Lose all HP, or fall off the bottom of the screen, and you'll lose a life.

Watch that timer, denoted by "T" in the top right corner of the screen. You guessed it! Lose a life when it reaches 0.

Every level has a Checkpoint Flag. Touch it and you will restart from its location whenever you lose a life.

The shining red Container Blocks hide useful items. Hit them from any direction to release their contents!

Find a "Gaming" or "Music" power-up to increase your HP.

Touch a Warp Vortex and you'll be taken either to a bonus room or to the next part of the level.

Some Container Blocks may be invisible until activated. But you might just uncover a 1UP Heart for finding one...

Coins will grant an extra life for each 100 coins collected. Your current coin count is denoted by "C" in the top of the screen.

Brick Blocks can contain anything a Container Block can, but otherwise can be broken from the underside.

Bounce Blocks are just that; they will bounce you forcefully in the opposite direction that you touch them. Hold A while landing on top of them to bounce higher.

When you have max HP, you can press B to fire Squarewave Bolts. They're slightly unwieldy, but can get you out of a bind!

Game over? You can use the "Level Select" option on the title menu to continue from the highest level you've reached.

There are 3 types of enemies that seek your destruction! Each type appears in 3 color variants of varying viciousness.

All enemy types can be defeated by stomping on them from above, zapping them with a Squarewave Bolt, or bumping a Container/Brick/Bounce Block into them.

Most actions you take will advance the score multiplier. Keep the multiplier alive by chaining actions together. This is key to getting a high score.

At the end of each level is a grassy field marked with lines and letter grades. Go for big points at the end of every level by jumping and landing on the area with the best letter grade! Grades range from D (smallest bonus) to A, then Star (huge bonus).
17 changes: 17 additions & 0 deletions assets/texts/manual/swadge_bros.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# \c235Games\C

---

# \c540Swadge Bros\C

\lC\c505_MAGFest's All-Stars in an all-out Brawl!_\C\L

Swadge Bros has three main modes: Multiplayer (wireless or wired), VS. CPU, and Home Run Contest.

The controls are the same for all modes. The Directional Buttons move the fighter, the A button jumps, and the B button attacks. The direction of the Directional Buttons influences the attack which is performed. There are five attacks on the ground: neutral, forward tilt, dash, up tilt, and down tilt. There are five more attacks in the air: neutral air, forward air, back air, up air, and down air. During recovery, if a fighter has no jumps left, they will get a bonus 'ledge jump.'

In the multiplayer modes, either hold two Swadges close to each other to pair wirelessly, or connect two with a USB C-C cable. Once connected, select your fighter. One Swadge, randomly chosen, will select the stage. Duke it out until one fighter is left standing! Records are kept for multiplayer matches.

In VS. CPU, practice against a CPU opponent. You get to pick your fighter, the CPU fighter, and the stage. Records are not kept for VS. CPU matches.

In Home Run Contest, try to whack the Sandbag as far off to the right as you can. Rack up tons of damage and give it a good hit after the stage barrier has dropped! Records are kept for the Home Run Contest.
11 changes: 11 additions & 0 deletions assets/texts/manual/techno_slide_whistle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# \c540TechnoSlideWhistle\C

\lC\c505_We put a synth. a slide whistle. and fun rhythms in a blender!_\C\L

To make music, tilt your Swadge left and right like a steering wheel or pirate ship wheel and press A. It'll play notes as long as A is held down. You can also touch the Touchpad to play notes instead of tilting and pressing A!

If you press and hold B while playing something, the base note will be held until you release B. Use this to jump from one note or octave to another.

Once you get the hang of it, give some rhythms a try. These play as long as A or the Touchpad is held. Some of them are even arpeggiated.

Cycle through the different musical scales and tempos too, and see what you can create!
5 changes: 5 additions & 0 deletions assets/texts/manual/tiltrads_color.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# \c540Tiltrads Color\C

\lC\c505_A motion-controlled spin on a classic puzzle game!_\C\L

Fill rows to clear them by aligning falling tetrads. Clear up to 4 rows simultaneously for score bonuses. Tilting the Swadge left and right moves the active tetrad left and right. Pressing A/B rotates the active tetrad. Pressing Down soft-drops the active tetrad, increasing its fall speed. Pressing Up immediately hard-drops and locks in the active tetrad. Soft-dropping and hard-dropping tetrads provide score bonuses. The speed of falling tetrads increases over time. If the board fills up to the point that no new tetrad can be placed, the game is over. Compete for the highest score and last as long as you can!
19 changes: 19 additions & 0 deletions assets/texts/manual/tunernome.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# \c235Music\C

---

# \c540Tunernome: Tuner\C

\lC\c505_A full chromatic tuner, right on your Swadge!_\C\L

The first screen you'll see upon entering Tunernome is the instrument tuner. This can be used to tune a 6-string acoustic guitar, 4-string violin, 4-string ukulele, and 5-string banjo, all in their standard tunings. It can also tune to any of the 12 semitone notes on the chromatic scale individually, or display the most prominent note it can hear.

The notes on the screen correspond to the strings of the guitar, starting from the lowest string at the bottom left and moving clockwise to the highest string. Their positions are matched to the positions of the LEDs, which will light up blue if the associated note is flat, red if the note is sharp, and white if the note is in tune.

# \c540Tunernome: Metronome\C

\lC\c505_"Rhythm is just a *click* away!" - osu!_\C\L

Tunernome also helps you keep an accurate tempo and look awesome doing it! This will display the current tempo in BPM (beats per minute) along with the number of beats in a measure.

Every LED flash indicates a single beat (quarter note), with each green LED flash indicating the first beat of each new measure.
2 changes: 2 additions & 0 deletions emu/src/emu_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
#include "mode_jukebox.h"
#include "mode_diceroller.h"
#include "mode_copypasta.h"
#include "mode_manual.h"

//Make it so we don't need to include any other C files in our build.
#define CNFG_IMPLEMENTATION
Expand Down Expand Up @@ -93,6 +94,7 @@ swadgeMode * allModes[] =
&modeDiceRoller,
&modeJukebox,
&modeCopyPasta,
&modeManual,
};

//==============================================================================
Expand Down
3 changes: 3 additions & 0 deletions main/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ idf_component_register(
"display/bresenham.c"
"display/cndraw.c"
"display/display.c"
"display/font.c"
"display/palette.c"
"meleeMenu.c"
"modes/fighter/aabb_utils.c"
Expand All @@ -28,6 +29,7 @@ idf_component_register(
"modes/mode_gamepad.c"
"modes/mode_jukebox.c"
"modes/mode_main_menu.c"
"modes/mode_manual.c"
"modes/mode_nvs_manager.c"
"modes/mode_slide_whistle.c"
"modes/mode_test.c"
Expand Down Expand Up @@ -61,6 +63,7 @@ idf_component_register(
"swadge_esp32.c"
"swadge_util.c"
"utils/linked_list.c"
"utils/markdown_parser.c"
"utils/text_entry.c"
INCLUDE_DIRS
"."
Expand Down
Loading