diff options
author | Sergeanur <s.anureev@yandex.ua> | 2020-04-26 21:03:15 +0200 |
---|---|---|
committer | Sergeanur <s.anureev@yandex.ua> | 2020-04-26 21:03:15 +0200 |
commit | f0890b11122291a22d6a65f349281cf1aed49bd0 (patch) | |
tree | 3b418b522c5fd097abac916693e59808ea4f5b4f /src/render/Sprite2d.cpp | |
parent | More japanese (diff) | |
parent | Remove little hack (diff) | |
download | re3-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 '')
-rw-r--r-- | src/render/Sprite2d.cpp | 50 |
1 files changed, 8 insertions, 42 deletions
diff --git a/src/render/Sprite2d.cpp b/src/render/Sprite2d.cpp index 3f21516a..52b85018 100644 --- a/src/render/Sprite2d.cpp +++ b/src/render/Sprite2d.cpp @@ -1,17 +1,17 @@ #include "common.h" -#include "patcher.h" + #include "main.h" #include "Draw.h" #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[8]; +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) @@ -474,37 +474,3 @@ void CSprite2d::Draw2DPolygon(float x1, float y1, float x2, float y2, float x3, RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, (void*)TRUE); RwRenderStateSet(rwRENDERSTATESHADEMODE, (void*)rwSHADEMODEGOURAUD); } - -STARTPATCHES -#define C4 const CRGBA&, const CRGBA&, const CRGBA&, const CRGBA& -#define F8 float, float, float, float, float, float, float, float - - InjectHook(0x51EA20, CSprite2d::SetRecipNearClip, PATCH_JUMP); - InjectHook(0x51EAE0, CSprite2d::InitPerFrame, PATCH_JUMP); - InjectHook(0x51EB70, CSprite2d::GetBank, PATCH_JUMP); - InjectHook(0x51EBC0, CSprite2d::AddSpriteToBank, PATCH_JUMP); - InjectHook(0x51EC50, CSprite2d::DrawBank, PATCH_JUMP); - - InjectHook(0x51EA00, &CSprite2d::Delete, PATCH_JUMP); - InjectHook(0x51F950, &CSprite2d::SetRenderState, PATCH_JUMP); - InjectHook(0x51EA40, (void (CSprite2d::*)(const char*))&CSprite2d::SetTexture, PATCH_JUMP); - InjectHook(0x51EA70, (void (CSprite2d::*)(const char*,const char*))&CSprite2d::SetTexture, PATCH_JUMP); - InjectHook(0x51EAA0, &CSprite2d::SetAddressing, PATCH_JUMP); - - InjectHook(0x51EE90, (void (*)(const CRect&, C4, uint32))CSprite2d::SetVertices, PATCH_JUMP); - InjectHook(0x51F220, (void (*)(const CRect&, C4, F8))CSprite2d::SetVertices, PATCH_JUMP); - InjectHook(0x51F070, (void (*)(F8, C4))CSprite2d::SetVertices, PATCH_JUMP); - InjectHook(0x51F3E0, (void (*)(int, float*, float*, const CRGBA&))CSprite2d::SetVertices, PATCH_JUMP); - InjectHook(0x51F490, CSprite2d::SetMaskVertices, PATCH_JUMP); - InjectHook(0x51F720, (void (*)(RwIm2DVertex*, const CRect&, C4, F8))CSprite2d::SetVertices, PATCH_JUMP); - - InjectHook(0x51ECE0, (void (CSprite2d::*)(float, float, float, float, const CRGBA &))&CSprite2d::Draw, PATCH_JUMP); - InjectHook(0x51ED50, (void (CSprite2d::*)(const CRect &, const CRGBA &))&CSprite2d::Draw, PATCH_JUMP); - InjectHook(0x51ED90, (void (CSprite2d::*)(const CRect &, const CRGBA &, F8))&CSprite2d::Draw, PATCH_JUMP); - InjectHook(0x51EDF0, (void (CSprite2d::*)(const CRect &, C4))&CSprite2d::Draw, PATCH_JUMP); - InjectHook(0x51EE40, (void (CSprite2d::*)(F8, const CRGBA &))&CSprite2d::Draw, PATCH_JUMP); - - InjectHook(0x51F970, (void (*)(const CRect&, const CRGBA&))CSprite2d::DrawRect, PATCH_JUMP); - InjectHook(0x51FA00, (void (*)(const CRect&, C4))CSprite2d::DrawRect, PATCH_JUMP); - InjectHook(0x51FA80, CSprite2d::DrawRectXLU, PATCH_JUMP); -ENDPATCHES |