Compare commits

8 Commits
Author SHA1 Message Date
weirdbeardgame 23e46e9421 Add Cdvd, keeping it disabled for now due to several rodata related issues
Upload Objdiff Progress Report Artifacts / upload (map[game_id:SLUS_210.07 language:us]) (push) Canceled after 0s
2026-09-25 19:57:36 -05:00
Piccio23 d178f42037 update report.json 2026-09-21 16:07:28 -05:00
Piccio23 11edf2c36a update KuonMsg.h 2026-09-21 15:34:30 -05:00
Piccio23 a12e3bc31e update Camera.h 2026-09-21 15:34:30 -05:00
Piccio23 aeee7ce000 update Event0001.h 2026-09-21 15:34:30 -05:00
Piccio23 ec0fe4249a match Event0001 2026-09-21 15:34:30 -05:00
Piccio23 687af5ace6 update Event.h 2026-09-21 15:34:30 -05:00
Piccio23 1c1cba91cd update kuon.yaml 2026-09-21 15:34:30 -05:00
10 changed files with 621 additions and 53 deletions
+5 -5
View File
@@ -235,8 +235,8 @@ segments:
- [0x032110, asmtu, cs4/Seimei/src/Camera] - [0x032110, asmtu, cs4/Seimei/src/Camera]
- [0x034930, asmtu, cs4/Seimei/src/Debug] - [0x034930, asmtu, cs4/Seimei/src/Debug]
- [0x034D10, asmtu, cs4/Seimei/src/Draw] - [0x034D10, asmtu, cs4/Seimei/src/Draw]
- [0x038710, c, cs4/Seimei/src/File] - [0x038710, c, cs4/Seimei/src/File]
- [0x038D00, c, cs4/Seimei/src/Game] - [0x038D00, c, cs4/Seimei/src/Game]
- [0x039A00, asmtu, cs4/Seimei/src/Load] - [0x039A00, asmtu, cs4/Seimei/src/Load]
- [0x03A380, asmtu, cs4/Seimei/src/Main] - [0x03A380, asmtu, cs4/Seimei/src/Main]
- [0x03AFE0, asmtu, cs4/Seimei/src/MathUtil] - [0x03AFE0, asmtu, cs4/Seimei/src/MathUtil]
@@ -254,7 +254,7 @@ segments:
- [0x047A20, asmtu, cs4/Seimei/fslib/lib/fslibsd] - [0x047A20, asmtu, cs4/Seimei/fslib/lib/fslibsd]
- [0x0484C0, asmtu, cs4/Seimei/fslib/lib/fslibsdsynth] - [0x0484C0, asmtu, cs4/Seimei/fslib/lib/fslibsdsynth]
- [0x04AA50, asmtu, cs4/Seimei/fslib/lib/fslibvu0] - [0x04AA50, asmtu, cs4/Seimei/fslib/lib/fslibvu0]
- [0x04ABC0, c, cs4/Seimei/src/Memory] - [0x04ABC0, c, cs4/Seimei/src/Memory]
- [0x04B150, asmtu, cs4/Seimei/src/Map] - [0x04B150, asmtu, cs4/Seimei/src/Map]
- [0x04FBC0, asmtu, cs4/Seimei/src/String] - [0x04FBC0, asmtu, cs4/Seimei/src/String]
- [0x04FD50, asmtu, cs4/Seimei/src/My] - [0x04FD50, asmtu, cs4/Seimei/src/My]
@@ -407,7 +407,7 @@ segments:
- [0x105150, asmtu, cs4/Seimei/src/E044Act] - [0x105150, asmtu, cs4/Seimei/src/E044Act]
- [0x105560, asmtu, cs4/Seimei/src/sfx/SfxFog] - [0x105560, asmtu, cs4/Seimei/src/sfx/SfxFog]
- [0x105A00, asmtu, cs4/Seimei/fslib/lib/fsspummng] - [0x105A00, asmtu, cs4/Seimei/fslib/lib/fsspummng]
- [0x106520, c, cs4/Seimei/src/Event] - [0x106520, c, cs4/Seimei/src/Event]
- [0x106A90, asmtu, cs4/Seimei/src/Event0031] - [0x106A90, asmtu, cs4/Seimei/src/Event0031]
- [0x107380, asmtu, cs4/Seimei/src/Event0051] - [0x107380, asmtu, cs4/Seimei/src/Event0051]
- [0x107E90, asmtu, cs4/Seimei/src/MiniGame/sgh/sgh] - [0x107E90, asmtu, cs4/Seimei/src/MiniGame/sgh/sgh]
@@ -440,7 +440,7 @@ segments:
- [0x115080, asmtu, cs4/Seimei/src/sfx/SfxScriptIF] - [0x115080, asmtu, cs4/Seimei/src/sfx/SfxScriptIF]
- [0x115300, asmtu, cs4/Seimei/src/Event0032] - [0x115300, asmtu, cs4/Seimei/src/Event0032]
- [0x115610, asmtu, cs4/Seimei/src/E023Act] - [0x115610, asmtu, cs4/Seimei/src/E023Act]
- [0x115620, asmtu, cs4/Seimei/src/Event0001] - [0x115620, c, cs4/Seimei/src/Event0001]
- [0x1157F0, asmtu, cs4/Seimei/src/P036Act] - [0x1157F0, asmtu, cs4/Seimei/src/P036Act]
- [0x115910, asmtu, cs4/Seimei/src/Event0085] - [0x115910, asmtu, cs4/Seimei/src/Event0085]
- [0x115B70, asmtu, unklib_00215AF0] - [0x115B70, asmtu, unklib_00215AF0]
+63 -27
View File
@@ -1,21 +1,21 @@
{ {
"measures": { "measures": {
"fuzzy_match_percent": 1.3313618, "fuzzy_match_percent": 1.5786248,
"total_code": "956924", "total_code": "956924",
"matched_code": "11948", "matched_code": "14132",
"matched_code_percent": 1.248584, "matched_code_percent": 1.4768152,
"total_data": "8579152", "total_data": "8579152",
"matched_data": "511092", "matched_data": "596084",
"matched_data_percent": 5.957372, "matched_data_percent": 6.9480524,
"total_functions": 2901, "total_functions": 2901,
"matched_functions": 56, "matched_functions": 67,
"matched_functions_percent": 1.9303689, "matched_functions_percent": 2.3095484,
"complete_code": "7444", "complete_code": "7876",
"complete_code_percent": 0.7779092, "complete_code_percent": 0.8230539,
"complete_data": "62500", "complete_data": "62532",
"complete_data_percent": 0.7285102, "complete_data_percent": 0.7288832,
"total_units": 215, "total_units": 215,
"complete_units": 4 "complete_units": 5
}, },
"units": [ "units": [
{ {
@@ -4284,7 +4284,7 @@
{ {
"name": ".sdata", "name": ".sdata",
"size": "8", "size": "8",
"fuzzy_match_percent": 66.66667, "fuzzy_match_percent": 31.25,
"metadata": {} "metadata": {}
}, },
{ {
@@ -8183,15 +8183,23 @@
{ {
"name": "cs4/Seimei/src/Cdvd", "name": "cs4/Seimei/src/Cdvd",
"measures": { "measures": {
"fuzzy_match_percent": 99.287476,
"total_code": "1948", "total_code": "1948",
"matched_code": "1752",
"matched_code_percent": 89.93839,
"total_data": "85120", "total_data": "85120",
"matched_data": "84992",
"matched_data_percent": 99.849625,
"total_functions": 8, "total_functions": 8,
"matched_functions": 7,
"matched_functions_percent": 87.5,
"total_units": 1 "total_units": 1
}, },
"sections": [ "sections": [
{ {
"name": ".text", "name": ".text",
"size": "2000", "size": "2000",
"fuzzy_match_percent": 99.287476,
"metadata": {} "metadata": {}
}, },
{ {
@@ -8201,16 +8209,19 @@
{ {
"name": ".bss", "name": ".bss",
"size": "84992", "size": "84992",
"fuzzy_match_percent": 100.0,
"metadata": {} "metadata": {}
}, },
{ {
"name": ".rodata", "name": ".rodata",
"size": "112", "size": "112",
"fuzzy_match_percent": 11.363636,
"metadata": {} "metadata": {}
}, },
{ {
"name": ".sdata", "name": ".sdata",
"size": "16", "size": "16",
"fuzzy_match_percent": 75.0,
"metadata": {} "metadata": {}
} }
], ],
@@ -8218,41 +8229,49 @@
{ {
"name": "CdvdCheckAsyncBusy", "name": "CdvdCheckAsyncBusy",
"size": "16", "size": "16",
"fuzzy_match_percent": 100.0,
"metadata": {} "metadata": {}
}, },
{ {
"name": "CdvdAsync", "name": "CdvdAsync",
"size": "948", "size": "948",
"fuzzy_match_percent": 100.0,
"metadata": {} "metadata": {}
}, },
{ {
"name": "CdvdBackReadProc", "name": "CdvdBackReadProc",
"size": "8", "size": "8",
"fuzzy_match_percent": 100.0,
"metadata": {} "metadata": {}
}, },
{ {
"name": "CdvdAsyncProc", "name": "CdvdAsyncProc",
"size": "196", "size": "196",
"fuzzy_match_percent": 92.918365,
"metadata": {} "metadata": {}
}, },
{ {
"name": "CdvdRead", "name": "CdvdRead",
"size": "668", "size": "668",
"fuzzy_match_percent": 100.0,
"metadata": {} "metadata": {}
}, },
{ {
"name": "MakeCdvdSearchPath", "name": "MakeCdvdSearchPath",
"size": "16", "size": "16",
"fuzzy_match_percent": 100.0,
"metadata": {} "metadata": {}
}, },
{ {
"name": "MakeCdvdReadPath", "name": "MakeCdvdReadPath",
"size": "24", "size": "24",
"fuzzy_match_percent": 100.0,
"metadata": {} "metadata": {}
}, },
{ {
"name": "InitCdvdRead", "name": "InitCdvdRead",
"size": "72", "size": "72",
"fuzzy_match_percent": 100.0,
"metadata": {} "metadata": {}
} }
], ],
@@ -22432,24 +22451,37 @@
{ {
"name": "cs4/Seimei/src/Event0001", "name": "cs4/Seimei/src/Event0001",
"measures": { "measures": {
"fuzzy_match_percent": 100.0,
"total_code": "432", "total_code": "432",
"matched_code": "432",
"matched_code_percent": 100.0,
"total_data": "32", "total_data": "32",
"total_functions": 4, "total_functions": 4,
"total_units": 1 "matched_functions": 4,
"matched_functions_percent": 100.0,
"complete_code": "432",
"complete_code_percent": 100.0,
"complete_data": "32",
"complete_data_percent": 100.0,
"total_units": 1,
"complete_units": 1
}, },
"sections": [ "sections": [
{ {
"name": ".text", "name": ".text",
"size": "464", "size": "464",
"fuzzy_match_percent": 100.0,
"metadata": {} "metadata": {}
}, },
{ {
"name": ".data", "name": ".data",
"size": "32", "size": "32",
"fuzzy_match_percent": 66.66667,
"metadata": {} "metadata": {}
}, },
{ {
"name": ".bss", "name": ".bss",
"fuzzy_match_percent": 100.0,
"metadata": {} "metadata": {}
} }
], ],
@@ -22457,26 +22489,30 @@
{ {
"name": "ActiS0001Event000", "name": "ActiS0001Event000",
"size": "168", "size": "168",
"fuzzy_match_percent": 100.0,
"metadata": {} "metadata": {}
}, },
{ {
"name": "PlayS0001Event000", "name": "PlayS0001Event000",
"size": "92", "size": "92",
"fuzzy_match_percent": 100.0,
"metadata": {} "metadata": {}
}, },
{ {
"name": "InitS0001Event000", "name": "InitS0001Event000",
"size": "120", "size": "120",
"fuzzy_match_percent": 100.0,
"metadata": {} "metadata": {}
}, },
{ {
"name": "SetEventFuncS0001", "name": "SetEventFuncS0001",
"size": "52", "size": "52",
"fuzzy_match_percent": 100.0,
"metadata": {} "metadata": {}
} }
], ],
"metadata": { "metadata": {
"complete": false, "complete": true,
"source_path": "../src/cs4/Seimei/src/Event0001.c", "source_path": "../src/cs4/Seimei/src/Event0001.c",
"progress_categories": [ "progress_categories": [
"" ""
@@ -22997,22 +23033,22 @@
{ {
"name": "Kuon", "name": "Kuon",
"measures": { "measures": {
"fuzzy_match_percent": 1.3313618, "fuzzy_match_percent": 1.5786248,
"total_code": "956924", "total_code": "956924",
"matched_code": "11948", "matched_code": "14132",
"matched_code_percent": 1.248584, "matched_code_percent": 1.4768152,
"total_data": "8579152", "total_data": "8579152",
"matched_data": "511092", "matched_data": "596084",
"matched_data_percent": 5.957372, "matched_data_percent": 6.9480524,
"total_functions": 2901, "total_functions": 2901,
"matched_functions": 56, "matched_functions": 67,
"matched_functions_percent": 1.9303689, "matched_functions_percent": 2.3095484,
"complete_code": "7444", "complete_code": "7876",
"complete_code_percent": 0.7779092, "complete_code_percent": 0.8230539,
"complete_data": "62500", "complete_data": "62532",
"complete_data_percent": 0.7285102, "complete_data_percent": 0.7288832,
"total_units": 215, "total_units": 215,
"complete_units": 4 "complete_units": 5
} }
} }
] ]
+5
View File
@@ -18,4 +18,9 @@ void SetCamEnv(CAMINFO * CAMINFO, int Index);
CAMINFO * GetGameCamInfo(); CAMINFO * GetGameCamInfo();
void InitCamera(); void InitCamera();
void SetCamCtrlMode(u_int mode);
void SetCameraPos(float* pos);
void SetCameraAng(float* ang);
#endif // CAMERA_H #endif // CAMERA_H
+461 -8
View File
@@ -1,17 +1,470 @@
#include "common.h" #include "common.h"
#include "Cdvd.h"
#include "ee/eeregs.h"
#include "Memory.h"
INCLUDE_ASM("config/asm/nonmatchings/cs4/Seimei/src/Cdvd", CdvdCheckAsyncBusy); static u_int CdvdAsync(void);
INCLUDE_ASM("config/asm/nonmatchings/cs4/Seimei/src/Cdvd", CdvdAsync);
INCLUDE_ASM("config/asm/nonmatchings/cs4/Seimei/src/Cdvd", CdvdBackReadProc);
INCLUDE_ASM("config/asm/nonmatchings/cs4/Seimei/src/Cdvd", CdvdAsyncProc);
INCLUDE_ASM("config/asm/nonmatchings/cs4/Seimei/src/Cdvd", CdvdRead); /*? fsmfstrm_AllocStreamBuffer(?, u8*, s32, ?);
s32 fsmfstrm_AttachSector(?, u32, s32, ?);
s32 fsmfstrm_DmaReadSyncBlock(?, ?);
? fsmfstrm_SetReadStart(?, ?);*/
INCLUDE_ASM("config/asm/nonmatchings/cs4/Seimei/src/Cdvd", MakeCdvdSearchPath);
INCLUDE_ASM("config/asm/nonmatchings/cs4/Seimei/src/Cdvd", MakeCdvdReadPath); #define SECTOR_SIZE (2048)
INCLUDE_ASM("config/asm/nonmatchings/cs4/Seimei/src/Cdvd", InitCdvdRead);
void InitCdvdRead(void) {
memset(CdvdReadSt, 0, sizeof(CdvdReadSt));
lpSetCdvd = (LPSETCDVD* ) CdvdReadSt;
lpLastCdvd = (LPLASTCDVD* ) CdvdReadSt;
lpCdvdRead = (LPCDVDREAD* ) CdvdReadSt;
AioInit(0x14);
}
void MakeCdvdReadPath(s8* full, s8* root, s8* fname) {
sprintf(full, "%s%s;1", root, fname);
}
void MakeCdvdSearchPath(s8* full, s8* fname) {
sprintf(full, "\\%s;1", fname);
}
int CdvdRead(char * filename, int size, u_char * * lpBuf, u_char bSynch, int index, int filetype, u_int align)
{
char TmpStr[128]; if (lpSetCdvd->state != 0) return -1;
strcpy(TmpStr, filename);
StringCorrectPath4Disc(TmpStr, 0);
strcpy(lpSetCdvd->fname, SearchFileName(TmpStr));
lpSetCdvd->lplpAddr = lpBuf;
lpSetCdvd->size = size;
lpSetCdvd->index = index;
lpSetCdvd->fileType = filetype;
lpSetCdvd->align = align;
lpSetCdvd->retry = 0;
lpSetCdvd->lpDmyData = NULL;
if (lpSetCdvd->fileType < 0x80) *lpSetCdvd->lplpAddr = NULL;
if (lpSetCdvd->align == 0) lpSetCdvd->align = 0x10;
if (bSynch) {
GetAllBindInfo(lpSetCdvd->fname, &lpSetCdvd->cdlfile.lsn, &lpSetCdvd->cdlfile.size);
if (lpSetCdvd->cdlfile.size == 0) return 0;
if (lpSetCdvd->size <= 0) lpSetCdvd->size = lpSetCdvd->cdlfile.size;
lpCdvdRead->sector = (lpCdvdRead->size + SECTOR_SIZE - 1) / SECTOR_SIZE;
if (lpSetCdvd->fileType < 0x80)
*lpSetCdvd->lplpAddr = MemAllocAlignReal(lpSetCdvd->sector << 0xB, 0x40U, (char*)__FUNCTION__, "");
fsmfstrm_SetReadStart(0, 0);
if (fsmfstrm_AttachSector(0, lpSetCdvd->cdlfile.lsn, lpSetCdvd->size, 0x30) == 0) {
MemFree(*lpSetCdvd->lplpAddr);
return 0;
}
fsmfstrm_AllocStreamBuffer(0, *lpSetCdvd->lplpAddr, lpSetCdvd->sector << 0xB, 1);
fsmfstrm_SetReadStart(0, 1);
fsmfstrm_DmaReadSyncBlock(0, 1);
FlushCache(0);
return lpSetCdvd->size;
}
lpSetCdvd->state = 1;
lpLastCdvd = (LPLASTCDVD* ) lpSetCdvd;
if (lpSetCdvd < (LPSETCDVD *) &CdvdReadSt[0xFF]) lpSetCdvd++;
else lpSetCdvd = (LPSETCDVD* ) CdvdReadSt;
return 1;
}
u_int CdvdAsyncProc(int bDraw /* r16 */) {
GlobalLoadTimer = 0;
while (1)
{
if (lpLastCdvd->state == 0) break;
if (bDraw != 0) {
FontDrawBegin(1);
FontPrintXY(350.0f, 430.0f, "Now Loading...[%d]\n", GlobalLoadTimer++);
FontDrawEnd();
while ((*D1_CHCR & D_CHCR_STR_M) != 0 || (*D2_CHCR & D_CHCR_STR_M) != 0) {}
DrawSynch();
FlushCache(0);
}
CdvdAsync();
}
return 0;
}
void CdvdBackReadProc(void) {
CdvdAsync();
}
static u_int CdvdAsync(void) {
int aiocmd = 0; /* r29+0x1C */
int aiores = 0; /* r29+0x18 */
int size;
if ((void*)lpCdvdRead == (void*)lpSetCdvd) return 0;
switch (lpCdvdRead->state) {
case 1:
if (lpCdvdRead->size <= 0) {
GetAllBindInfo(lpCdvdRead->fname, &lpCdvdRead->cdlfile.lsn, &lpCdvdRead->cdlfile.size);
size = lpCdvdRead->cdlfile.size;
if (size == 0) break;
lpCdvdRead->size = size;
lpCdvdRead->sector = (lpCdvdRead->size + SECTOR_SIZE - 1) / SECTOR_SIZE;
lpCdvdRead->state = 4;
} else {
lpCdvdRead->sector = (lpCdvdRead->size + SECTOR_SIZE - 1) / SECTOR_SIZE;
lpCdvdRead->state = 4;
}
return 1;
case 2:
if (AioCdSearchFile(lpCdvdRead->sname, &lpCdvdRead->cdlfile) != 0) {
break;
}
lpCdvdRead->state = 3;
return 0;
case 3:
if (AioCmdSync(1, &aiocmd, &aiores) != 0) {
if (aiores < 0) {
break;
}
lpCdvdRead->size = (s32) lpCdvdRead->cdlfile.size;
lpCdvdRead->sector = (lpCdvdRead->size + SECTOR_SIZE - 1) / SECTOR_SIZE;
lpCdvdRead->state = 4;
return 1;
}
return 0;
case 4:
if (lpCdvdRead->fileType < 0x80) {
*lpCdvdRead->lplpAddr = MemAllocAlignReal(lpCdvdRead->sector * SECTOR_SIZE, 0x40, (char *)__FUNCTION__, "");
}
fsmfstrm_SetReadStart(0, 0);
if (fsmfstrm_AttachSector(0, lpCdvdRead->cdlfile.lsn, lpCdvdRead->size, 0x30) == 0) {
MemFree(*lpCdvdRead->lplpAddr);
break;
}
fsmfstrm_AllocStreamBuffer(0, *lpCdvdRead->lplpAddr, lpCdvdRead->sector * SECTOR_SIZE, 1);
fsmfstrm_SetReadStart(0, 1);
lpCdvdRead->state = 5;
return 0;
case 5:
if (fsmfstrm_DmaReadSyncBlock(0, 0) == 0) {
AfterFileReadFunc(*lpCdvdRead->lplpAddr, lpCdvdRead->index, lpCdvdRead->fileType, lpCdvdRead->size);
if ((SND_SqPrepareStatus() == 1) || !(fssdsynthTransBankStatus() & 0xFF)) {
lpCdvdRead->state = 6;
return 0;
}
lpCdvdRead->state = 0;
if (lpCdvdRead < (LPCDVDREAD* )&CdvdReadSt[0xFF]) lpCdvdRead += 1;
else lpCdvdRead = (LPCDVDREAD* ) CdvdReadSt;
FlushCache(0);
}
return 0;
case 6:
if ((SND_SqPrepareStatus() == 0) && (fssdsynthTransBankStatus() & 0xFF)) {
lpCdvdRead->state = 0;
if (lpCdvdRead < (LPCDVDREAD* )&CdvdReadSt[0xFF]) lpCdvdRead += 1;
else lpCdvdRead = (LPCDVDREAD* ) CdvdReadSt;
FlushCache(0);
SND_ReleaseBunk();
}
return 0;
}
lpCdvdRead->state = 0;
if (lpCdvdRead < (LPCDVDREAD* )&CdvdReadSt[0xFF]) lpCdvdRead += 1;
else lpCdvdRead = (LPCDVDREAD* ) CdvdReadSt;
return 0;
}
static inline char* foo() {
printf("\\%s;1");
}
int CdvdCheckAsyncBusy(void) { return lpLastCdvd->state != 0;
}
+13 -3
View File
@@ -1,6 +1,7 @@
#ifndef CDVD_H #ifndef CDVD_H
#define CDVD_H #define CDVD_H
#include "common.h"
#define SECTOR_SIZE (2048)
typedef struct /* @anon4 */ { typedef struct /* @anon4 */ {
// Members // Members
@@ -116,8 +117,17 @@ typedef struct /* @anon3 */ {
} LPCDVD; // size: 0x4, address: 0x257528 } LPCDVD; // size: 0x4, address: 0x257528
extern unsigned int GlobalLoadTimer; // size: 0x4, address: 0x257894 extern unsigned int GlobalLoadTimer; // size: 0x4, address: 0x257894
static CDVDREADST CdvdReadSt[256];
static LPSETCDVD* lpSetCdvd = (LPSETCDVD* )CdvdReadSt;
static LPLASTCDVD* lpLastCdvd = (LPLASTCDVD* )CdvdReadSt;
static LPCDVDREAD* lpCdvdRead = (LPCDVDREAD* )CdvdReadSt;
signed int CdvdRead(char * filename /* r4 */, signed int size /* r20 */, unsigned char * * lpBuf /* r19 */, unsigned char bSynch /* r18 */, signed int index /* r17 */, signed int filetype /* r16 */, unsigned int align /* r21 */); void InitCdvdRead(void);
void MakeCdvdReadPath(s8* full, s8* root, s8* fname);
void MakeCdvdSearchPath(s8* full, s8* fname);
int CdvdRead(char * filename, int size, u_char * * lpBuf, u_char bSynch, int index, int filetype, u_int align);
u_int CdvdAsyncProc(int bDraw);
void CdvdBackReadProc(void);
int CdvdCheckAsyncBusy(void);
#endif // CDVD_H #endif // CDVD_H
+2 -2
View File
@@ -11,9 +11,9 @@ typedef struct _EVENT {
void (* InitFunc)(); // offset 0x0, size 0x4 void (* InitFunc)(); // offset 0x0, size 0x4
void (* PlayFunc)(); // offset 0x4, size 0x4 void (* PlayFunc)(); // offset 0x4, size 0x4
void (* ActiFunc)(); // offset 0x8, size 0x4 void (* ActiFunc)(); // offset 0x8, size 0x4
int State[10] __attribute__ ((aligned(16))); // offset 0xC, size 0x28 int State[10]; // offset 0xC, size 0x28
MDLMNG* lpMdl[10]; // offset 0x34, size 0x28 MDLMNG* lpMdl[10]; // offset 0x34, size 0x28
} EVENT; }__attribute__ ((aligned(16))) EVENT;
void SetEventModelDrawAndHit(MDLMNG* lpMdl, u_char OnOff); void SetEventModelDrawAndHit(MDLMNG* lpMdl, u_char OnOff);
void EventEneHitCheck(MDLMNG* lpEne); void EventEneHitCheck(MDLMNG* lpEne);
+62 -5
View File
@@ -1,9 +1,66 @@
#include "common.h" #include "Event0001.h"
#include "Camera.h"
#include "KuonMsg.h"
#include "Game.h"
#include "Script.h"
INCLUDE_ASM("config/asm/nonmatchings/cs4/Seimei/src/Event0001", ActiS0001Event000); static void InitS0001Event000(EVENT* lpEvent);
static void PlayS0001Event000(EVENT* lpEvent);
static void ActiS0001Event000(EVENT* lpEvent, u_int Id);
INCLUDE_ASM("config/asm/nonmatchings/cs4/Seimei/src/Event0001", PlayS0001Event000); void SetEventFuncS0001(void) {
EventMngSt->InitFunc = InitS0001Event000;
EventMngSt->PlayFunc = PlayS0001Event000;
EventMngSt->ActiFunc = ActiS0001Event000;
}
INCLUDE_ASM("config/asm/nonmatchings/cs4/Seimei/src/Event0001", InitS0001Event000); static void InitS0001Event000(EVENT* lpEvent) {
INCLUDE_ASM("config/asm/nonmatchings/cs4/Seimei/src/Event0001", SetEventFuncS0001); if (GameSt.PlayerId != 0 || CheckEventFlag(0x6D6)) {
SetEventFlag(0x6D6);
lpEvent->State[0] = 2;
}
else if (!CheckEventFlag(0x7A)) {
lpEvent->State[0] = 2;
} else {
lpEvent->State[0] = 0;
}
}
static void PlayS0001Event000(EVENT* lpEvent) {
if (lpEvent->State[0] != 1) return;
if (++lpEvent->State[1] < 0x3C) return;
lpEvent->State[0] = 2;
lpEvent->State[1] = 0;
SetEventFlag(0x6D6);
SetCamCtrlMode(0);
}
static void ActiS0001Event000(EVENT* lpEvent, u_int Id) {
switch (Id) {
case 1:
if (lpEvent->State[0] == 0) {
EasyEneAppear(1);
lpEvent->State[0] = 1;
lpEvent->State[1] = 0;
SetCamCtrlMode(1);
SetCameraPos((float[]){-11.7f, -2.8f, 9.6999998f, 1.0f});
SetCameraAng((float[]){-0.26174998f, -0.087249994f, 0.0f, 0.0f});
}
else {
KnMsgMng_SendMsg(0x61ACD);
}
}
}
+4
View File
@@ -2,7 +2,11 @@
#define EVENT0001_H #define EVENT0001_H
#include "typedefs.h" #include "typedefs.h"
#include "Event.h"
void ActiS0001Event000(EVENT* lpEvent, u_int Id);
void PlayS0001Event000(EVENT* lpEvent);
void InitS0001Event000(EVENT* lpEvent);
void SetEventFuncS0001(void); void SetEventFuncS0001(void);
#endif // EVENT0001_H #endif // EVENT0001_H
-1
View File
@@ -14,7 +14,6 @@
unsigned char RootPath[128]; // size: 0x80, address: 0x325530 unsigned char RootPath[128]; // size: 0x80, address: 0x325530
unsigned char ScePath[128]; // size: 0x80, address: 0x3254B0 unsigned char ScePath[128]; // size: 0x80, address: 0x3254B0
// Belongs in CDVD.c
unsigned int GlobalLoadTimer; unsigned int GlobalLoadTimer;
void InitFileSystem() { void InitFileSystem() {
+4
View File
@@ -1,5 +1,6 @@
#ifndef KUON_MSG_H #ifndef KUON_MSG_H
#define KUON_MSG_H #define KUON_MSG_H
#include "common.h" #include "common.h"
int KnMsgMng_Update(); int KnMsgMng_Update();
@@ -7,4 +8,7 @@ int KnMsgMng_Draw();
u_short * * KnMsgMng_GetMapNameMsg(); u_short * * KnMsgMng_GetMapNameMsg();
u_short * KnMsgMng_GetMsgStr(int msg_id /* r16 */); u_short * KnMsgMng_GetMsgStr(int msg_id /* r16 */);
int KnMsgMng_MsgAllClear(); int KnMsgMng_MsgAllClear();
int KnMsgMng_SendMsg(int id);
#endif // KUON_MSG_H #endif // KUON_MSG_H