mirror of
https://github.com/perfect-dark-pc-port/perfect_dark.git
synced 2026-10-24 00:02:43 +02:00
portx64: pd-extract setups: a few bug fixes and changed how lists are copied
- moved ptrmarkers out of ext_file_bg to common - function to get ailist length
This commit is contained in:
1 parent
844d6c7ec8
commit
373f08ca3e
4 files changed
+58
-36
No files matched your search
@@ -814,3 +814,19 @@ u32 chraiGetCommandLength(u8 *ailist, u32 aioffset)
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
// used by ext_setup
|
||||
u32 chraiGetAilistLength(u8* list)
|
||||
{
|
||||
if (!list) return 0;
|
||||
|
||||
u8* cmd = list;
|
||||
|
||||
while (true) {
|
||||
u8 type = cmd[1];
|
||||
cmd += chraiGetCommandLength(cmd, 0);
|
||||
if (type == AICMD_END) break;
|
||||
}
|
||||
|
||||
return (u32)(cmd - list);
|
||||
}
|
||||
Reference in new issue
Block a user