|
Digimon World 3 decomp
The European version, SLES_039.36
|
#include "debug/vibration_test.h"#include "shared/update_scene.inc.c"#include "shared/start.inc.c"Go to the source code of this file.
Macros | |
| #define | SCENE_TASK Task |
| #define | SCENE_CHILD Task |
| #define | SCENE_CREATE OVL_NAME(createLoader) |
| #define | SCENE_PRIM_BUFFERS 0x5000 |
| #define | SCENE_OT_SHIFT 1 |
Functions | |
| 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), 1 for the one being edited (0 and 6-9, 11) | |
| s32 | SHOCKTST_selectPattern (ShockTest *task, ShockTestWindows *win) |
| Picks the pattern with up and down: 1 on cross, -1 on triangle. | |
| void | SHOCKTST_showPattern (ShockTest *task, ShockTestWindows *win, s32 pattern) |
| Shows a pattern's number and each motor's time and power. | |
| void | SHOCKTST_showTimers (ShockTest *task, ShockTestWindows *win, s32 pattern) |
| Shows each motor's power and the time it has left. | |
| 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. | |
| 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 both motors stop, and returns 1 after the last. | |
| 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 value, -1 when it picks the play row, 2 on circle. | |
| 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 toggle is set: 1 on cross, -1 on triangle. | |
| 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 or off); 1 once done. | |
| 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 them all, circle checks the memory card); when killed, frees them and stops the motors. | |
| void | SHOCKTST_loadPatterns (ShockTest *task, ShockFile *file) |
| Copies the pattern file's times and powers into the editor. | |
| ShockTest * | SHOCKTST_createEditor (s32 count) |
| Creates the editor, with room for count patterns. | |
| void | SHOCKTST_convertText (ShockLoader *task) |
| Turns DLSKDATA.TXT (the count, then a tab-separated row per pattern, of which type 1 holds the motors' times and powers) into the pattern file, and writes it to the PC as DLSKDATA.BIN. | |
| 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 editor on it; START goes back to the stage select (MODE_STAGE_SELECT) | |
| Task * | SHOCKTST_createLoader (void) |
| Creates the loader. | |
Variables | |
| ShockTestRow | SHOCKTST_menuRows [4] |
| char | SHOCKTST_numberFormats [3][0x40] |
| The strings of the pattern, time and power windows (setString), in font codes: the label, icon 7 (01 07), then control code 5 (02 05 01), which inserts work buffer 1, where setNumber writes the value. | |
| char * | SHOCKTST_motorNames [2] |
| The names of the motors: "こうそく" (fast) and "ていそく" (slow) | |
| char * | SHOCKTST_textPath = "sim:C:\\DEVELOP\\DLSKDATA.TXT" |
| const char | SHOCKTST_STR_START_BACK [20] |
| "START:もどる" (START: back), padded to a word: the USA file's padding isn't zeros but what the assembler left there; the size leaves out the closing NUL | |
| #define SCENE_TASK Task |
Definition at line 19 of file vibration_test.c.
| #define SCENE_CHILD Task |
Definition at line 20 of file vibration_test.c.
| #define SCENE_CREATE OVL_NAME(createLoader) |
Definition at line 21 of file vibration_test.c.
| #define SCENE_PRIM_BUFFERS 0x5000 |
Definition at line 22 of file vibration_test.c.
| #define SCENE_OT_SHIFT 1 |
Definition at line 23 of file vibration_test.c.
| 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), 1 for the one being edited (0 and 6-9, 11)
< a light blue: what is highlighted or current
< a light blue: what is highlighted or current
< a light blue: what is highlighted or current
< a light blue: what is highlighted or current
< a light blue: what is highlighted or current
< a light blue: what is highlighted or current
Definition at line 29 of file vibration_test.c.
Referenced by SHOCKTST_moveCursor().
| s32 SHOCKTST_selectPattern | ( | ShockTest * | task, |
| ShockTestWindows * | win | ||
| ) |
Picks the pattern with up and down: 1 on cross, -1 on triangle.
Definition at line 79 of file vibration_test.c.
Referenced by SHOCKTST_editRow().
| void SHOCKTST_showPattern | ( | ShockTest * | task, |
| ShockTestWindows * | win, | ||
| s32 | pattern | ||
| ) |
Shows a pattern's number and each motor's time and power.
Definition at line 101 of file vibration_test.c.
Referenced by SHOCKTST_editValue(), SHOCKTST_playAllPatterns(), SHOCKTST_playPattern(), and SHOCKTST_selectPattern().
| void SHOCKTST_showTimers | ( | ShockTest * | task, |
| ShockTestWindows * | win, | ||
| s32 | pattern | ||
| ) |
Shows each motor's power and the time it has left.
Definition at line 112 of file vibration_test.c.
Referenced by SHOCKTST_playAllPatterns(), and SHOCKTST_playPattern().
| 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.
Definition at line 123 of file vibration_test.c.
Referenced by SHOCKTST_playAllPatterns(), and SHOCKTST_updateEditor().
| 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 both motors stop, and returns 1 after the last.
The match depends on the reset being written in both branches.
Definition at line 161 of file vibration_test.c.
Referenced by SHOCKTST_updateEditor().
| 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 value, -1 when it picks the play row, 2 on circle.
Definition at line 184 of file vibration_test.c.
Referenced by SHOCKTST_updateEditor().
| 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 toggle is set: 1 on cross, -1 on triangle.
Definition at line 227 of file vibration_test.c.
Referenced by SHOCKTST_editRow().
| 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 or off); 1 once done.
Definition at line 253 of file vibration_test.c.
Referenced by SHOCKTST_updateEditor().
| 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 them all, circle checks the memory card); when killed, frees them and stops the motors.
Definition at line 290 of file vibration_test.c.
Referenced by SHOCKTST_createEditor().
Copies the pattern file's times and powers into the editor.
Definition at line 374 of file vibration_test.c.
Referenced by SHOCKTST_updateLoader().
Creates the editor, with room for count patterns.
Definition at line 391 of file vibration_test.c.
Referenced by SHOCKTST_updateLoader().
| void SHOCKTST_convertText | ( | ShockLoader * | task | ) |
Turns DLSKDATA.TXT (the count, then a tab-separated row per pattern, of which type 1 holds the motors' times and powers) into the pattern file, and writes it to the PC as DLSKDATA.BIN.
Definition at line 405 of file vibration_test.c.
Referenced by SHOCKTST_updateLoader().
| 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 editor on it; START goes back to the stage select (MODE_STAGE_SELECT)
< STAGSLCT, the debug stage select
Definition at line 496 of file vibration_test.c.
Referenced by SHOCKTST_createLoader().
| Task * SHOCKTST_createLoader | ( | void | ) |
Creates the loader.
Definition at line 550 of file vibration_test.c.
| ShockTestRow SHOCKTST_menuRows[4] |
Definition at line 3 of file vibration_test.c.
Referenced by SHOCKTST_moveCursor().
| char SHOCKTST_numberFormats[3][0x40] |
The strings of the pattern, time and power windows (setString), in font codes: the label, icon 7 (01 07), then control code 5 (02 05 01), which inserts work buffer 1, where setNumber writes the value.
Definition at line 13 of file vibration_test.c.
Referenced by SHOCKTST_updateEditor().
| char* SHOCKTST_motorNames[2] |
The names of the motors: "こうそく" (fast) and "ていそく" (slow)
Definition at line 282 of file vibration_test.c.
Referenced by SHOCKTST_updateEditor().
| char* SHOCKTST_textPath = "sim:C:\\DEVELOP\\DLSKDATA.TXT" |
Definition at line 400 of file vibration_test.c.
Referenced by SHOCKTST_updateLoader().
| const char SHOCKTST_STR_START_BACK[20] |
"START:もどる" (START: back), padded to a word: the USA file's padding isn't zeros but what the assembler left there; the size leaves out the closing NUL
Definition at line 557 of file vibration_test.c.
Referenced by SHOCKTST_updateLoader().