mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2026-07-06 06:26:50 +00:00
Merge 4080f7fcd5 into 79d6a8bcff
This commit is contained in:
commit
7334d11788
2 changed files with 9 additions and 7 deletions
|
|
@ -63,8 +63,7 @@ const LevelScript level_intro_mario_head_regular[] = {
|
|||
TRANSITION(/*transType*/ WARP_TRANSITION_FADE_FROM_STAR, /*time*/ 20, /*color*/ 0x00, 0x00, 0x00),
|
||||
SLEEP(/*frames*/ 20),
|
||||
CALL_LOOP(/*arg*/ 1, /*func*/ lvl_intro_update),
|
||||
// JUMP_IF(/*op*/ OP_EQ, /*arg*/ 100, script_intro_L1),
|
||||
JUMP_IF(/*op*/ OP_EQ, /*arg*/ 100, script_intro_L4),
|
||||
JUMP_IF(/*op*/ OP_EQ, /*arg*/ 100, script_intro_L1),
|
||||
JUMP_IF(/*op*/ OP_EQ, /*arg*/ 101, script_intro_L2),
|
||||
JUMP(script_intro_L4),
|
||||
};
|
||||
|
|
@ -89,8 +88,7 @@ const LevelScript level_intro_mario_head_dizzy[] = {
|
|||
TRANSITION(/*transType*/ WARP_TRANSITION_FADE_FROM_STAR, /*time*/ 20, /*color*/ 0x00, 0x00, 0x00),
|
||||
SLEEP(/*frames*/ 20),
|
||||
CALL_LOOP(/*arg*/ 2, /*func*/ lvl_intro_update),
|
||||
// JUMP_IF(/*op*/ OP_EQ, /*arg*/ 100, script_intro_L1),
|
||||
JUMP_IF(/*op*/ OP_EQ, /*arg*/ 100, script_intro_L4),
|
||||
JUMP_IF(/*op*/ OP_EQ, /*arg*/ 100, script_intro_L1),
|
||||
JUMP_IF(/*op*/ OP_EQ, /*arg*/ 101, script_intro_L2),
|
||||
JUMP(script_intro_L4),
|
||||
};
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ struct TextLabel {
|
|||
* Stores the text to be rendered on screen
|
||||
* and how they are to be rendered.
|
||||
*/
|
||||
static struct TextLabel sTextLabelStorage[256];
|
||||
struct TextLabel *sTextLabels[256];
|
||||
s16 sTextLabelsCount = 0;
|
||||
|
||||
|
|
@ -178,9 +179,10 @@ void print_text_fmt_int(s32 x, s32 y, const char *str, s32 n) {
|
|||
s32 srcIndex = 0;
|
||||
|
||||
// Don't continue if there is no memory to do so.
|
||||
if ((sTextLabels[sTextLabelsCount] = growing_pool_alloc(gDisplayListHeap, sizeof(struct TextLabel))) == NULL) {
|
||||
if (sTextLabelsCount >= 256) {
|
||||
return;
|
||||
}
|
||||
sTextLabels[sTextLabelsCount] = &sTextLabelStorage[sTextLabelsCount];
|
||||
|
||||
sTextLabels[sTextLabelsCount]->x = x;
|
||||
sTextLabels[sTextLabelsCount]->y = y;
|
||||
|
|
@ -228,9 +230,10 @@ void print_text(s32 x, s32 y, const char *str) {
|
|||
s32 srcIndex = 0;
|
||||
|
||||
// Don't continue if there is no memory to do so.
|
||||
if ((sTextLabels[sTextLabelsCount] = growing_pool_alloc(gDisplayListHeap, sizeof(struct TextLabel))) == NULL) {
|
||||
if (sTextLabelsCount >= 256) {
|
||||
return;
|
||||
}
|
||||
sTextLabels[sTextLabelsCount] = &sTextLabelStorage[sTextLabelsCount];
|
||||
|
||||
sTextLabels[sTextLabelsCount]->x = x;
|
||||
sTextLabels[sTextLabelsCount]->y = y;
|
||||
|
|
@ -260,9 +263,10 @@ void print_text_centered(s32 x, s32 y, const char *str) {
|
|||
s32 srcIndex = 0;
|
||||
|
||||
// Don't continue if there is no memory to do so.
|
||||
if ((sTextLabels[sTextLabelsCount] = growing_pool_alloc(gDisplayListHeap, sizeof(struct TextLabel))) == NULL) {
|
||||
if (sTextLabelsCount >= 256) {
|
||||
return;
|
||||
}
|
||||
sTextLabels[sTextLabelsCount] = &sTextLabelStorage[sTextLabelsCount];
|
||||
|
||||
c = str[srcIndex];
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue