mirror of https://github.com/PrimeDecomp/prime.git
Match and link IObj
This commit is contained in:
parent
b039acfac8
commit
bef91d45de
|
@ -65,6 +65,7 @@ COMPLETE_OBJECTS = [
|
||||||
"Kyoto/Text/CFontImageDef",
|
"Kyoto/Text/CFontImageDef",
|
||||||
"Kyoto/Graphics/DolphinCColor",
|
"Kyoto/Graphics/DolphinCColor",
|
||||||
"Kyoto/Audio/g721",
|
"Kyoto/Audio/g721",
|
||||||
|
"Kyoto/IObj",
|
||||||
"Dolphin/PPCArch",
|
"Dolphin/PPCArch",
|
||||||
"Dolphin/dsp/dsp_debug",
|
"Dolphin/dsp/dsp_debug",
|
||||||
"Dolphin/os/__start",
|
"Dolphin/os/__start",
|
||||||
|
|
|
@ -2,23 +2,9 @@
|
||||||
#define __COBJECTREFERENCE_HPP__
|
#define __COBJECTREFERENCE_HPP__
|
||||||
|
|
||||||
#include <Kyoto/CVParamTransfer.hpp>
|
#include <Kyoto/CVParamTransfer.hpp>
|
||||||
|
#include <Kyoto/SObjectTag.hpp>
|
||||||
#include <rstl/auto_ptr.hpp>
|
#include <rstl/auto_ptr.hpp>
|
||||||
|
|
||||||
|
|
||||||
#define kInvalidAssetId 0xFFFFFFFFu
|
|
||||||
|
|
||||||
typedef uint CAssetId;
|
|
||||||
typedef uint FourCC;
|
|
||||||
|
|
||||||
struct SObjectTag {
|
|
||||||
FourCC type;
|
|
||||||
CAssetId id;
|
|
||||||
|
|
||||||
SObjectTag() {}
|
|
||||||
SObjectTag(FourCC type, CAssetId id) : type(type), id(id) {}
|
|
||||||
SObjectTag(const SObjectTag& other) : type(other.type), id(other.id) {}
|
|
||||||
};
|
|
||||||
|
|
||||||
class IObj;
|
class IObj;
|
||||||
class IObjectStore;
|
class IObjectStore;
|
||||||
class CObjectReference {
|
class CObjectReference {
|
||||||
|
|
|
@ -3,8 +3,11 @@
|
||||||
|
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
|
|
||||||
|
#include "Kyoto/SObjectTag.hpp"
|
||||||
#include "rstl/auto_ptr.hpp"
|
#include "rstl/auto_ptr.hpp"
|
||||||
|
|
||||||
|
extern const SObjectTag gkInvalidObjectTag;
|
||||||
|
|
||||||
class IObj {
|
class IObj {
|
||||||
public:
|
public:
|
||||||
virtual ~IObj() {}
|
virtual ~IObj() {}
|
||||||
|
|
15
libc/ctype.h
15
libc/ctype.h
|
@ -29,21 +29,6 @@ extern unsigned char __upper_map[];
|
||||||
#define __control (__motion_char | __control_char)
|
#define __control (__motion_char | __control_char)
|
||||||
#define __zero_fill(c) ((int)(unsigned char)(c))
|
#define __zero_fill(c) ((int)(unsigned char)(c))
|
||||||
|
|
||||||
int isalnum(int);
|
|
||||||
int isalpha(int);
|
|
||||||
int iscntrl(int);
|
|
||||||
int isdigit(int);
|
|
||||||
int isgraph(int);
|
|
||||||
int islower(int);
|
|
||||||
int isprint(int);
|
|
||||||
int ispunct(int);
|
|
||||||
int isspace(int);
|
|
||||||
int isupper(int);
|
|
||||||
int isxdigit(int);
|
|
||||||
int tolower(int);
|
|
||||||
int toupper(int);
|
|
||||||
int iswblank(int);
|
|
||||||
|
|
||||||
#ifndef _CTYPE_INLINE
|
#ifndef _CTYPE_INLINE
|
||||||
#define _CTYPE_INLINE static inline
|
#define _CTYPE_INLINE static inline
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
#include "Kyoto/IObj.hpp"
|
||||||
|
#include <ctype.h>
|
||||||
|
|
||||||
|
const SObjectTag gkInvalidObjectTag(-1, kInvalidAssetId);
|
||||||
|
|
||||||
|
const char* SObjectTag::Type2Text(FourCC type) {
|
||||||
|
static char text[5];
|
||||||
|
text[0] = toupper((type >> 24) & 0xFF);
|
||||||
|
text[1] = toupper((type >> 16) & 0xFF);
|
||||||
|
text[2] = toupper((type >> 8) & 0xFF);
|
||||||
|
text[3] = toupper(type & 0xFF);
|
||||||
|
text[4] = '\0';
|
||||||
|
|
||||||
|
for (int i = 0; i < 4; ++i) {
|
||||||
|
if (isprint(text[i]) == 0) {
|
||||||
|
text[i] = '-';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return text;
|
||||||
|
}
|
Loading…
Reference in New Issue