mirror of
https://github.com/krystalgamer/spidey-decomp.git
synced 2024-11-26 23:00:30 +00:00
Spool_GetModelChecksum
This commit is contained in:
parent
967a0dbf22
commit
eb9c85d9b3
26
spool.cpp
26
spool.cpp
@ -22,6 +22,12 @@ static const char SuitNames[5][32];
|
||||
static const char SuitNames[5][32] = { 0 };
|
||||
#endif
|
||||
|
||||
// @Ok
|
||||
u32 Spool_GetModelChecksum(CItem *pItem)
|
||||
{
|
||||
return PSXRegion[pItem->mRegion].pModelChecksums[pItem->mModel];
|
||||
}
|
||||
|
||||
// @SMALLTODO
|
||||
CItem* Spool_FindEnviroItem(u32)
|
||||
{
|
||||
@ -185,6 +191,26 @@ Texture *Spool_FindTextureEntry(char *name)
|
||||
return Spool_FindTextureEntry(gTextureEntries[index].Checksum);
|
||||
}
|
||||
|
||||
u32 Spool_FindTextureChecksum(char *name)
|
||||
{
|
||||
char localName[256];
|
||||
strcpy(localName, name);
|
||||
strlwr(localName);
|
||||
|
||||
i32 index;
|
||||
for (index = 0; index < 256; index++)
|
||||
{
|
||||
TextureEntry *currentEntry = &gTextureEntries[index];
|
||||
if (!strcmp(currentEntry->Name, localName) && currentEntry->Active)
|
||||
break;
|
||||
}
|
||||
|
||||
if (index < 256)
|
||||
return gTextureEntries[index].Checksum;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void validate_SPSXRegion(void)
|
||||
{
|
||||
VALIDATE_SIZE(SPSXRegion, 0x44);
|
||||
|
2
spool.h
2
spool.h
@ -78,6 +78,8 @@ EXPORT void Spool_ClearPSX(const char*);
|
||||
EXPORT CItem* Spool_FindEnviroItem(u32);
|
||||
EXPORT Texture* Spool_FindTextureEntry(u32);
|
||||
EXPORT Texture* Spool_FindTextureEntry(char *);
|
||||
EXPORT u32 Spool_FindTextureChecksum(char *);
|
||||
EXPORT u32 Spool_GetModelChecksum(CItem *);
|
||||
|
||||
void validate_SPSXRegion(void);
|
||||
void validate_TextureEntry(void);
|
||||
|
Loading…
Reference in New Issue
Block a user