Skip to content

Commit 0f0a63d

Browse files
committed
rel: Skip logo on load
1 parent ebaacb0 commit 0f0a63d

File tree

6 files changed

+117
-5
lines changed

6 files changed

+117
-5
lines changed

ttyd-tools/rel/include/ttyd.eu.lst

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,15 @@
6868
80010e28:dispReInit
6969
80010e34:dispInit
7070

71+
// seqdrv.o
72+
8002e2cc:seqCheckSeq
73+
8002e2e8:seqGetNextSeq
74+
8002e2f0:seqGetPrevSeq
75+
8002e2f8:seqGetSeq
76+
8002e300:seqSetSeq
77+
8002e310:seqMain
78+
8002e3ec:seqInit_MARIOSTORY
79+
7180
// memory.o
7281
// unused:smartGetWorkPtr
7382
8002f424:smartTexObj
@@ -148,6 +157,16 @@
148157
80078e98:fontmgrTexSetup
149158
80078ec4:fontmgrInit
150159

160+
// seq_logo.o
161+
// 80086d4c:progDisp
162+
// unused:arcLoad
163+
// unused:arcPreLoad
164+
// 8008726c:dummy_draw
165+
// 80087324:logoDisp
166+
80088118:seq_logoMain
167+
80088818:seq_logoExit
168+
8008885c:seq_logoInit
169+
151170
// printf.o
152171
8026deac:sprintf
153172
// unused:snprintf

ttyd-tools/rel/include/ttyd.jp.lst

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,15 @@
6868
80010ab8:dispReInit
6969
80010ac4:dispInit
7070

71+
// seqdrv.o
72+
8002dbc0:seqCheckSeq
73+
8002dbdc:seqGetNextSeq
74+
8002dbe4:seqGetPrevSeq
75+
8002dbec:seqGetSeq
76+
8002dbf4:seqSetSeq
77+
8002dc04:seqMain
78+
8002dce0:seqInit_MARIOSTORY
79+
7180
// memory.o
7281
// unused:smartGetWorkPtr
7382
8002ed18:smartTexObj
@@ -146,6 +155,16 @@
146155
80076e98:fontmgrTexSetup
147156
8007711c:fontmgrInit
148157

158+
// seq_logo.o
159+
80084a6c:progDisp
160+
// unused:arcLoad
161+
// unused:arcPreLoad
162+
80084f84:dummy_draw
163+
8008503c:logoDisp
164+
80085998:seq_logoMain
165+
80085f50:seq_logoExit
166+
80085f94:seq_logoInit
167+
149168
// printf.o
150169
80264108:sprintf
151170
// unused:snprintf

ttyd-tools/rel/include/ttyd.us.lst

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,15 @@
6868
80010c64:dispReInit
6969
80010c70:dispInit
7070

71+
// seqdrv.o
72+
8002e1e4:seqCheckSeq
73+
8002e200:seqGetNextSeq
74+
8002e208:seqGetPrevSeq
75+
8002e210:seqGetSeq
76+
8002e218:seqSetSeq
77+
8002e228:seqMain
78+
8002e304:seqInit_MARIOSTORY
79+
7180
// memory.o
7281
// unused:smartGetWorkPtr
7382
8002f33c:smartTexObj
@@ -148,6 +157,16 @@
148157
80077bdc:fontmgrTexSetup
149158
80077c08:fontmgrInit
150159

160+
// seq_logo.o
161+
800859f8:progDisp
162+
// unused:arcLoad
163+
// unused:arcPreLoad
164+
80085f28:dummy_draw
165+
80085fe0:logoDisp
166+
80086d6c:seq_logoMain
167+
8008746c:seq_logoExit
168+
800874b0:seq_logoInit
169+
151170
// printf.c
152171
8026a0b8:sprintf
153172
// unused:snprintf
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#pragma once
2+
3+
#include "seqdrv.h"
4+
5+
#include <cstdint>
6+
7+
namespace ttyd::seq_logo {
8+
9+
extern "C" {
10+
11+
void seq_logoInit(seqdrv::SeqInfo *info);
12+
void seq_logoExit(seqdrv::SeqInfo *info);
13+
void seq_logoMain(seqdrv::SeqInfo *info);
14+
15+
}
16+
17+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#pragma once
2+
3+
#include <cstdint>
4+
5+
namespace ttyd::seqdrv {
6+
7+
struct SeqInfo
8+
{
9+
uint32_t seq;
10+
uint32_t state;
11+
const char *map;
12+
const char *bero;
13+
uint32_t counter;
14+
uint32_t unk_14;
15+
uint32_t unk_18;
16+
uint32_t unk_1c;
17+
} __attribute__((__packed__));
18+
19+
extern "C" {
20+
21+
void seqInit_MARIOSTORY();
22+
void seqMain();
23+
void seqSetSeq(uint32_t seq, const char *mapName, const char *beroName);
24+
uint32_t seqGetSeq();
25+
uint32_t seqGetPrevSeq();
26+
uint32_t seqGetNextSeq();
27+
bool seqCheckSeq();
28+
29+
}
30+
31+
}

ttyd-tools/rel/source/mod.cpp

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
#include <ttyd/mariost.h>
55
#include <ttyd/fontmgr.h>
66
#include <ttyd/dispdrv.h>
7+
#include <ttyd/seqdrv.h>
8+
#include <ttyd/seq_logo.h>
79

810
#include "patch.h"
911

@@ -36,6 +38,12 @@ void Mod::init()
3638
// Initialize typesetting early
3739
ttyd::fontmgr::fontmgrTexSetup();
3840
patch::hookFunction(ttyd::fontmgr::fontmgrTexSetup, [](){});
41+
42+
// Skip the logo
43+
patch::hookFunction(ttyd::seq_logo::seq_logoMain, [](ttyd::seqdrv::SeqInfo *)
44+
{
45+
ttyd::seqdrv::seqSetSeq(1, nullptr, nullptr);
46+
});
3947
}
4048

4149
void Mod::updateEarly()
@@ -81,13 +89,12 @@ void Mod::draw()
8189
#else
8290
#error Mario position and velocity not implemented for this version
8391
#endif
84-
8592

8693
sprintf(mDisplayBuffer,
87-
"Pos: %.2f %.2f %.2f\r\nSpdY: %.2f\r\nPST: %lu",
88-
marioPos[0], marioPos[1], marioPos[2],
89-
marioVel[0],
90-
mPalaceSkipTimer.getValue());
94+
"Pos: %.2f %.2f %.2f\r\nSpdY: %.2f\r\nPST: %lu",
95+
marioPos[0], marioPos[1], marioPos[2],
96+
marioVel[0],
97+
mPalaceSkipTimer.getValue());
9198
ttyd::fontmgr::FontDrawStart();
9299
uint32_t color = 0xFFFFFFFF;
93100
ttyd::fontmgr::FontDrawColor(reinterpret_cast<uint8_t *>(&color));

0 commit comments

Comments
 (0)