summaryrefslogtreecommitdiffstats
path: root/src/rw/ClumpRead.cpp
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2020-04-26 21:03:15 +0200
committerSergeanur <s.anureev@yandex.ua>2020-04-26 21:03:15 +0200
commitf0890b11122291a22d6a65f349281cf1aed49bd0 (patch)
tree3b418b522c5fd097abac916693e59808ea4f5b4f /src/rw/ClumpRead.cpp
parentMore japanese (diff)
parentRemove little hack (diff)
downloadre3-f0890b11122291a22d6a65f349281cf1aed49bd0.tar
re3-f0890b11122291a22d6a65f349281cf1aed49bd0.tar.gz
re3-f0890b11122291a22d6a65f349281cf1aed49bd0.tar.bz2
re3-f0890b11122291a22d6a65f349281cf1aed49bd0.tar.lz
re3-f0890b11122291a22d6a65f349281cf1aed49bd0.tar.xz
re3-f0890b11122291a22d6a65f349281cf1aed49bd0.tar.zst
re3-f0890b11122291a22d6a65f349281cf1aed49bd0.zip
Diffstat (limited to 'src/rw/ClumpRead.cpp')
-rw-r--r--src/rw/ClumpRead.cpp14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/rw/ClumpRead.cpp b/src/rw/ClumpRead.cpp
index c9f027e7..5f50f52d 100644
--- a/src/rw/ClumpRead.cpp
+++ b/src/rw/ClumpRead.cpp
@@ -1,5 +1,5 @@
#include "common.h"
-#include "patcher.h"
+
struct rpGeometryList
{
@@ -153,7 +153,7 @@ RpClumpGtaStreamRead1(RwStream *stream)
if(!RwStreamFindChunk(stream, rwID_FRAMELIST, nil, &version))
return false;
- if(_rwFrameListStreamRead(stream, &gFrameList) == nil)
+ if(rwFrameListStreamRead(stream, &gFrameList) == nil)
return false;
if(!RwStreamFindChunk(stream, rwID_GEOMETRYLIST, nil, &version)){
@@ -164,7 +164,7 @@ RpClumpGtaStreamRead1(RwStream *stream)
rwFrameListDeinitialize(&gFrameList);
return false;
}
- streamPosition = stream->Type.memory.position;
+ streamPosition = STREAMPOS(stream);
return true;
}
@@ -180,7 +180,7 @@ RpClumpGtaStreamRead2(RwStream *stream)
if(clump == nil)
return nil;
- RwStreamSkip(stream, streamPosition - stream->Type.memory.position);
+ RwStreamSkip(stream, streamPosition - STREAMPOS(stream));
if(GeometryListStreamRead2(stream, &gGeomList) == nil){
GeometryListDeinitialize(&gGeomList);
@@ -222,9 +222,3 @@ RpClumpGtaCancelStream(void)
rwFrameListDeinitialize(&gFrameList);
gFrameList.numFrames = 0;
}
-
-STARTPATCHES
- InjectHook(0x526060, RpClumpGtaStreamRead1, PATCH_JUMP);
- InjectHook(0x526180, RpClumpGtaStreamRead2, PATCH_JUMP);
- InjectHook(0x5262D0, RpClumpGtaCancelStream, PATCH_JUMP);
-ENDPATCHES