jak-project/game/overlord/common/isocommon.h
Tyler Wilding 5e987cc0e2
jak2: overlord rework (#2544)
Fixes #2545
Fixes #2546
Fixes #2547
Fixes #2548
Fixes #2549
Fixes #2550
Fixes #2551
Fixes #2552
Fixes #2553
Fixes #2554
Fixes #2555
Fixes #2556
Fixes #2557
Fixes #2558
Fixes #2559
Fixes #2560
Fixes #2561
Fixes #2562
Fixes #2563
Fixes #2564
Fixes #2565
Fixes #2567
Fixes #2566
Fixes #2568
Fixes #2569
Fixes #2570
Fixes #2522
Fixes #2571

---------

Co-authored-by: water <awaterford111445@gmail.com>
Co-authored-by: Hat Kid <6624576+Hat-Kid@users.noreply.github.com>
Co-authored-by: ManDude <7569514+ManDude@users.noreply.github.com>
2023-04-29 16:13:57 -04:00

39 lines
1.6 KiB
C++

#pragma once
#include "common/common_types.h"
#include "common/link_types.h"
// was 350 in jak 1, 641 in jak 2, no reason not to go higher
constexpr int MAX_ISO_FILES = 999; // maximum files on FS
// was 16 in jak 1, 32 in jak 2. no reason not to increase for jak 1.
constexpr int MAX_OPEN_FILES = 32; // maximum number of open files at a time.
constexpr u32 CMD_STATUS_READ_ERR = 8; // read encountered a problem or was canceled.
constexpr u32 CMD_STATUS_NULL_CB = 7; // status returned if you don't set a callback
constexpr u32 CMD_STATUS_FAILED_TO_OPEN = 6; // status if file couldn't be opened
constexpr u32 CMD_STATUS_FAILED_TO_QUEUE = 2; // status if we couldn't be queued
constexpr u32 CMD_STATUS_IN_PROGRESS = 0xffffffff; // status if command is running and healthy
constexpr u32 CMD_STATUS_DONE = 0; // status if command is done.
constexpr int LOAD_TO_EE_CMD_ID = 0x100; // command to load file to ee
constexpr int LOAD_TO_IOP_CMD_ID = 0x101; // command to load to iop
constexpr int LOAD_TO_EE_OFFSET_CMD_ID = 0x102; // command to load file to ee with offset.
constexpr int LOAD_DGO_CMD_ID = 0x200; // command to load DGO
struct SoundBank;
/*!
* Record for file. There is one for each file in the FS, and pointers to each FileRecord act as
* an identifier.
* The location/size can't be counted on to be anything meaningful as it depends on the IsoFs
* implementation being used.
*/
struct FileRecord {
char name[12];
uint32_t location;
uint32_t size;
};
void MakeISOName(char* dst, const char* src);