11#define OVL_NAME(name) SHOCKTST_##name
15#if VERSION_US || VERSION_JP
16#define SHOCKTST_FILE 0xC5
18#define SHOCKTST_FILE 0xBE
#define TASK_HEADER(Type)
DLSKDATA.BIN: a header, then the offsets are from its start.
s32 typesOffset
s32 per pattern
s32 count
number of patterns
s32 powersOffset
u8 per motor and pattern
s32 timesOffset
u8 per motor and pattern
The patterns loader: the scene's first task.
s32 pad
never read or written: createTask allocates 0x5C bytes
ShockFile * file
DLSKDATA.BIN being built.
One step of a motor's pattern.
u8 power
the small motor is only on (1) or off (0)
One row of the editor's menu.
s32 highlight[4]
per column: selected, then being edited
The editor's text windows.
TextWindow * pad
never read or written
s32 playing
the pattern being played by "play all"
s32 pad
never read or written: createTask allocates 0x88 bytes
u8 * file
SHOCKTST_FILE, never read.
s32 row
pattern, time, power, play
s32 motors[2]
0: start, 1: vibrating, -1: done
Any task, seen through its header.
A text window (createTextWindow): up to six text buffers (0 is shown, 1-5 are "work" buffers that con...
void SHOCKTST_loadPatterns(ShockTest *task, ShockFile *file)
Copies the pattern file's times and powers into the editor.
s32 SHOCKTST_editValue(ShockTest *task, ShockTestWindows *win, TextWindow **windows, u8 *value, u8 toggle)
Changes a time or power with up and down (by 10 when repeating), or flips it between 0 and 1 when tog...
void SHOCKTST_convertText(ShockLoader *task)
Turns DLSKDATA.TXT (the count, then a tab-separated row per pattern, of which type 1 holds the motors...
const char SHOCKTST_STR_START_BACK[]
"START:もどる" (START: back), padded to a word: the USA file's padding isn't zeros but what the assemble...
void SHOCKTST_showPattern(ShockTest *task, ShockTestWindows *win, s32 pattern)
Shows a pattern's number and each motor's time and power.
void SHOCKTST_updateScene(Task *task, Task **child)
Task * SHOCKTST_createLoader(void)
Creates the loader.
s32 SHOCKTST_moveCursor(ShockTest *task, ShockTestWindows *win)
Moves the editor's cursor over its rows and columns, skipping the empty ones: 1 when cross picks a va...
void SHOCKTST_updateLoader(ShockLoader *task, ShockLoaderWindows *win)
The loader's task: creates the title and help windows, reads DLSKDATA.TXT from the PC and starts the ...
s32 SHOCKTST_editRow(ShockTest *task, ShockTestWindows *win)
Edits what the cursor picked: the pattern, or a motor's time or power (the small motor's is only on o...
s32 SHOCKTST_playPattern(ShockTest *task, ShockTestWindows *win, s32 pattern)
Plays a pattern on both motors, one frame on: 1 once both have stopped or triangle stops them.
void SHOCKTST_showTimers(ShockTest *task, ShockTestWindows *win, s32 pattern)
Shows each motor's power and the time it has left.
ShockTest * SHOCKTST_createEditor(s32 count)
Creates the editor, with room for count patterns.
void SHOCKTST_updateEditor(ShockTest *task, ShockTestWindows *win)
The editor's task: creates its windows, then edits and plays the patterns (play with L1 held plays th...
s32 SHOCKTST_selectPattern(ShockTest *task, ShockTestWindows *win)
Picks the pattern with up and down: 1 on cross, -1 on triangle.
s32 SHOCKTST_playAllPatterns(ShockTest *task, ShockTestWindows *win)
Plays the patterns from task->playing to task->count in turn, the next one once a pattern ends or bot...
void SHOCKTST_highlight(ShockTest *task, ShockTestWindows *win, s32 highlight)
Colors the editor's windows: palette 3 for the one under the cursor (highlight 1-5 and 10),...