diff options
author | Sergeanur <s.anureev@yandex.ua> | 2020-04-16 14:30:47 +0200 |
---|---|---|
committer | Sergeanur <s.anureev@yandex.ua> | 2020-04-16 14:30:47 +0200 |
commit | 83cbe4e39ede4853e0d352e55aeddbd481b39948 (patch) | |
tree | 982648ce860ac1c50233df806798a8b9412819fe /src/render | |
parent | add textures in correct order (diff) | |
download | re3-83cbe4e39ede4853e0d352e55aeddbd481b39948.tar re3-83cbe4e39ede4853e0d352e55aeddbd481b39948.tar.gz re3-83cbe4e39ede4853e0d352e55aeddbd481b39948.tar.bz2 re3-83cbe4e39ede4853e0d352e55aeddbd481b39948.tar.lz re3-83cbe4e39ede4853e0d352e55aeddbd481b39948.tar.xz re3-83cbe4e39ede4853e0d352e55aeddbd481b39948.tar.zst re3-83cbe4e39ede4853e0d352e55aeddbd481b39948.zip |
Diffstat (limited to 'src/render')
-rw-r--r-- | src/render/Instance.cpp | 20 | ||||
-rw-r--r-- | src/render/Instance.h | 14 | ||||
-rw-r--r-- | src/render/Sprite2d.cpp | 14 | ||||
-rw-r--r-- | src/render/Sprite2d.h | 14 |
4 files changed, 48 insertions, 14 deletions
diff --git a/src/render/Instance.cpp b/src/render/Instance.cpp new file mode 100644 index 00000000..775341be --- /dev/null +++ b/src/render/Instance.cpp @@ -0,0 +1,20 @@ +#include "common.h" +#include "patcher.h" +#include "Instance.h" + +void +CInstance::Shutdown() +{ + GetMatrix().Detach(); +} + +class CInstance_ : public CInstance +{ +public: + void dtor() { CInstance::~CInstance(); } +}; + +STARTPATCHES + InjectHook(0x50BE90, &CInstance_::dtor, PATCH_JUMP); + InjectHook(0x50B850, &CInstance::Shutdown, PATCH_JUMP); +ENDPATCHES diff --git a/src/render/Instance.h b/src/render/Instance.h new file mode 100644 index 00000000..01dfb6a2 --- /dev/null +++ b/src/render/Instance.h @@ -0,0 +1,14 @@ +#pragma once + +#include "Placeable.h" + +// unused + +class CInstance : public CPlaceable +{ +public: + int m_modelIndex; +public: + ~CInstance() = default; + void Shutdown(); +}; diff --git a/src/render/Sprite2d.cpp b/src/render/Sprite2d.cpp index 3f21516a..1fe70121 100644 --- a/src/render/Sprite2d.cpp +++ b/src/render/Sprite2d.cpp @@ -5,13 +5,13 @@ #include "Camera.h" #include "Sprite2d.h" -RwIm2DVertex *CSprite2d::maVertices = (RwIm2DVertex*)0x6E9168; -float &CSprite2d::RecipNearClip = *(float*)0x880DB4; -int32 &CSprite2d::mCurrentBank = *(int32*)0x8F1AF4; -RwTexture **CSprite2d::mpBankTextures = (RwTexture**)0x774DC0; -int32 *CSprite2d::mCurrentSprite = (int32*)0x6F4500; -int32 *CSprite2d::mBankStart = (int32*)0x774BE8; -RwIm2DVertex *CSprite2d::maBankVertices = (RwIm2DVertex*)0x8429F8; +RwIm2DVertex CSprite2d::maVertices[4]; +float CSprite2d::RecipNearClip; +int32 CSprite2d::mCurrentBank; +RwTexture *CSprite2d::mpBankTextures[10]; +int32 CSprite2d::mCurrentSprite[10]; +int32 CSprite2d::mBankStart[10]; +RwIm2DVertex CSprite2d::maBankVertices[500]; void CSprite2d::SetRecipNearClip(void) diff --git a/src/render/Sprite2d.h b/src/render/Sprite2d.h index 268c7d2b..0b073557 100644 --- a/src/render/Sprite2d.h +++ b/src/render/Sprite2d.h @@ -2,13 +2,13 @@ class CSprite2d { - static float &RecipNearClip; - static int32 &mCurrentBank; - static RwTexture **mpBankTextures; //[10]; - static int32 *mCurrentSprite; //[10]; - static int32 *mBankStart; //[10]; - static RwIm2DVertex *maBankVertices; //[500]; - static RwIm2DVertex *maVertices; //[4]; + static float RecipNearClip; + static int32 mCurrentBank; + static RwTexture *mpBankTextures[10]; + static int32 mCurrentSprite[10]; + static int32 mBankStart[10]; + static RwIm2DVertex maBankVertices[500]; + static RwIm2DVertex maVertices[4]; public: RwTexture *m_pTexture; |