41#include "cnfs_image.h"
113 char* title, uint8_t numPoseVariations,
bool stageLeft,
bool drawSprite,
bool drawTextbox);
114void setMidiParams(
cutscene_t* cutscene, uint8_t styleIdx, uint8_t instrument, int8_t octaveOvset, uint16_t noteLength,
cutscene_t * initCutscene(cutsceneCb cbFunc, cnfsFileIdx_t nextIconIdx, uint8_t soundBank)
Required to begin a cutscene.
Definition cutscene.c:38
bool drawTextBox
Set false to draw no textbox.
Definition cutscene.h:77
void addCutsceneLine(cutscene_t *cutscene, uint8_t styleIdx, char *body, bool flipHorizontal, int8_t spriteVariation, cutsceneCb cbFunc)
Adds a dialogue line to the cutscene.
Definition cutscene.c:279
cnfsFileIdx_t textBoxIdx
The file index of the textbox sprite.
Definition cutscene.h:71
char * body
The spoken text displayed on screen.
Definition cutscene.h:55
wsg_t * nextIcon[4]
The nextIcon with a few animation frames.
Definition cutscene.h:98
void setSongPitches(cutscene_t *cutscene, int16_t songPitches[8])
Set the Song Pitches object.
Definition cutscene.c:261
uint16_t noteLength
Increase to have the note decay slower. 250 sounds fairly natural.
Definition cutscene.h:80
int16_t songPitches[8]
Definition cutscene.h:106
bool slowAttack
True to make the note have a slow attack.
Definition cutscene.h:81
paletteColor_t textColor
The color of the text.
Definition cutscene.h:69
int8_t octaveOvset
How many octaves to transpose this character's sound up or down. Zero for no effect.
Definition cutscene.h:79
void removeAllStyles(cutscene_t *cutscene)
Removes all styles. Unlikely to be used by anybody else since you add all your styles at the start of...
Definition cutscene.c:167
midiTimbre_t timbre
Lots of midi params for character sound playback.
Definition cutscene.h:103
uint8_t styleIdx
Index into the list of lineStyle_t.
Definition cutscene.h:56
list_t * styles
A list_t of lineStyle_t.
Definition cutscene.h:91
int8_t nextIconAnimationTimer
Increments and controls the next icon frame.
Definition cutscene.h:99
void deinitCutscene(cutscene_t *cutscene)
Frees data. Required to call where your mode exits or when done with cutscene_t. Remember you may rec...
Definition cutscene.c:555
void drawCutscene(cutscene_t *cutscene, font_t *font)
The draw function of the cutscene must be called regularly from your draw loop. Update should typical...
Definition cutscene.c:493
int8_t spriteVariation
A number that is added to the spriteIdx to display various character poses.
Definition cutscene.h:57
void addCutsceneStyle(cutscene_t *cutscene, paletteColor_t color, cnfsFileIdx_t spriteIdx, cnfsFileIdx_t textBoxIdx, char *title, uint8_t numPoseVariations, bool stageLeft, bool drawSprite, bool drawTextbox)
Adds a cutscene style to an internally managed list.
Definition cutscene.c:190
void updateCutscene(cutscene_t *cutscene, int16_t btnState)
The update function of the cutscene must be called regularly from your game loop.
Definition cutscene.c:358
bool isEnding
True as the character slides out of frame.
Definition cutscene.h:100
void setMidiParams(cutscene_t *cutscene, uint8_t styleIdx, uint8_t instrument, int8_t octaveOvset, uint16_t noteLength, bool slowAttack)
Set the Midi Params object.
Definition cutscene.c:244
bool a_down
True when the a button is held.
Definition cutscene.h:94
uint8_t instrument
Program# of the instrument when A is pressed.
Definition cutscene.h:78
int16_t xOffset
Decrements to slide the character portait in from below.
Definition cutscene.h:95
wsg_t * sprite
The character sprite.
Definition cutscene.h:96
cutsceneCb cbFunc
A callback to fire at the end of this line. Usually used for BackGround Music change.
Definition cutscene.h:59
bool stageLeft
Definition cutscene.h:74
bool flipHorizontal
Draw the character sprite flipped.
Definition cutscene.h:58
bool drawSprite
Set false to draw no sprite.
Definition cutscene.h:76
list_t * lines
A list_t of cutsceneLine_t.
Definition cutscene.h:92
int32_t bgm_headroom
The volume of background music. Fades 33% lower during cutscenes.
Definition cutscene.h:104
int16_t btnState_previousFrame
The btnState of the previous frame.
Definition cutscene.h:105
cnfsFileIdx_t spriteIdx
The file index of the character sprite.
Definition cutscene.h:70
wsg_t * textBox
The textbox rendered over the character sprite.
Definition cutscene.h:97
uint8_t soundBank
Definition cutscene.h:101
uint8_t numSpriteVariations
Definition cutscene.h:72
char * title
The speaker's name displayed on screen.
Definition cutscene.h:68
int8_t blinkTimer
Increments and overflows to make the next graphic blink.
Definition cutscene.h:93
void(* cutsceneCb)()
A callback which is called when this cutscene concludes. Use it to unpause your game loop.
Definition cutscene.h:48
The underlying data for a cutscene line.
Definition cutscene.h:54
Style specifications to draw, and sound a cutsceneLine such as text color, character sprite,...
Definition cutscene.h:67
The underlying data for a cutscene. A cutscene is fundamentally made of a list of cutsceneLine_t....
Definition cutscene.h:89
A font is a collection of font_ch_t for all ASCII characters. Each character has the same height and ...
Definition font.h:66
A doubly linked list with pointers to the first and last nodes.
Definition linked_list.h:87
Defines the sound characteristics of a particular instrument.
Definition midiPlayer.h:506
paletteColor_t
All 216 possible colors, named like cRGB.
Definition palette.h:23
A sprite using paletteColor_t colors that can be drawn to the display.
Definition wsg.h:57