1
0
Fork 0
mirror of https://git.rip/DMCA_FUCKER/re3.git synced 2024-12-23 06:00:00 +00:00

small fixes

This commit is contained in:
aap 2020-08-20 12:55:41 +02:00
parent bd30d0a796
commit 517e2ee9a5
4 changed files with 10 additions and 14 deletions

View file

@ -20,6 +20,9 @@ extern bool gbShowTimebars;
class CSprite2d; class CSprite2d;
bool DoRWStuffStartOfFrame(int16 TopRed, int16 TopGreen, int16 TopBlue, int16 BottomRed, int16 BottomGreen, int16 BottomBlue, int16 Alpha);
bool DoRWStuffStartOfFrame_Horizon(int16 TopRed, int16 TopGreen, int16 TopBlue, int16 BottomRed, int16 BottomGreen, int16 BottomBlue, int16 Alpha);
void DoRWStuffEndOfFrame(void);
void InitialiseGame(void); void InitialiseGame(void);
void LoadingScreen(const char *str1, const char *str2, const char *splashscreen); void LoadingScreen(const char *str1, const char *str2, const char *splashscreen);
void LoadingIslandScreen(const char *levelName); void LoadingIslandScreen(const char *levelName);

View file

@ -50,8 +50,8 @@ NodeNameStreamWrite(RwStream *stream, RwInt32 binaryLength, const void *object,
RwInt32 RwInt32
NodeNameStreamGetSize(const void *object, RwInt32 offsetInObject, RwInt32 sizeInObject) NodeNameStreamGetSize(const void *object, RwInt32 offsetInObject, RwInt32 sizeInObject)
{ {
// game checks for null pointer on node name extension but that really happen char *name = NODENAMEEXT(object); // can't be nil
return (RwInt32)rwstrlen(NODENAMEEXT(object)); return name ? (RwInt32)rwstrlen(name) : 0;
} }
bool bool

View file

@ -202,9 +202,6 @@ WriteVideoCardCapsFile(void)
} }
} }
bool DoRWStuffStartOfFrame(int16 TopRed, int16 TopGreen, int16 TopBlue, int16 BottomRed, int16 BottomGreen, int16 BottomBlue, int16 Alpha);
void DoRWStuffEndOfFrame(void);
void void
ConvertingTexturesScreen(uint32 num, uint32 count, const char *text) ConvertingTexturesScreen(uint32 num, uint32 count, const char *text)
{ {

View file

@ -58,11 +58,10 @@ CTxdStore::RemoveTxdSlot(int slot)
int int
CTxdStore::FindTxdSlot(const char *name) CTxdStore::FindTxdSlot(const char *name)
{ {
char *defname;
int size = ms_pTxdPool->GetSize(); int size = ms_pTxdPool->GetSize();
for(int i = 0; i < size; i++){ for(int i = 0; i < size; i++){
defname = GetTxdName(i); TxdDef *def = GetSlot(i);
if(defname && !CGeneral::faststricmp(defname, name)) if(def && !CGeneral::faststricmp(def->name, name))
return i; return i;
} }
return -1; return -1;
@ -71,8 +70,7 @@ CTxdStore::FindTxdSlot(const char *name)
char* char*
CTxdStore::GetTxdName(int slot) CTxdStore::GetTxdName(int slot)
{ {
TxdDef *def = GetSlot(slot); return GetSlot(slot)->name;
return def ? def->name : nil;
} }
void void
@ -91,9 +89,7 @@ CTxdStore::PopCurrentTxd(void)
void void
CTxdStore::SetCurrentTxd(int slot) CTxdStore::SetCurrentTxd(int slot)
{ {
TxdDef *def = GetSlot(slot); RwTexDictionarySetCurrent(GetSlot(slot)->texDict);
if(def)
RwTexDictionarySetCurrent(def->texDict);
} }
void void
@ -118,7 +114,7 @@ void
CTxdStore::RemoveRef(int slot) CTxdStore::RemoveRef(int slot)
{ {
if(--GetSlot(slot)->refCount <= 0) if(--GetSlot(slot)->refCount <= 0)
CStreaming::RemoveModel(slot + STREAM_OFFSET_TXD); CStreaming::RemoveTxd(slot);
} }
void void