mirror of
https://github.com/dashr9230/SA-MP.git
synced 2024-12-22 22:47:29 +08:00
[saco] Implement few CFontRender member functions
This commit is contained in:
parent
e3430e3719
commit
0e00550b0a
@ -1,19 +1,65 @@
|
||||
|
||||
#include "main.h"
|
||||
#include "fontrender.h"
|
||||
|
||||
//----------------------------------------------------
|
||||
|
||||
CFontRender::CFontRender(IDirect3DDevice9* pD3DDevice)
|
||||
{
|
||||
// TODO: CFontRender::CFontRender() .text:1006BAF0
|
||||
m_pD3DDevice = pD3DDevice;
|
||||
field_0 = NULL;
|
||||
field_4 = NULL;
|
||||
field_8 = NULL;
|
||||
field_C = NULL;
|
||||
field_14 = NULL;
|
||||
field_10 = NULL;
|
||||
|
||||
CreateFonts();
|
||||
}
|
||||
|
||||
CFontRender::~CFontRender()
|
||||
{
|
||||
SAFE_RELEASE(field_0);
|
||||
SAFE_RELEASE(field_4);
|
||||
SAFE_RELEASE(field_8);
|
||||
SAFE_RELEASE(field_C);
|
||||
SAFE_RELEASE(field_14);
|
||||
SAFE_RELEASE(field_10);
|
||||
}
|
||||
|
||||
void CFontRender::CreateFonts()
|
||||
{
|
||||
if(!m_pD3DDevice) return;
|
||||
SAFE_RELEASE(field_0);
|
||||
SAFE_RELEASE(field_4);
|
||||
SAFE_RELEASE(field_8);
|
||||
SAFE_RELEASE(field_C);
|
||||
SAFE_RELEASE(field_14);
|
||||
SAFE_RELEASE(field_10);
|
||||
|
||||
// TODO: CFontRender::CreateFonts
|
||||
|
||||
//D3DXCreateFont();
|
||||
}
|
||||
|
||||
void CFontRender::DeleteDeviceObjects()
|
||||
{
|
||||
// TODO: CFontRender::DeleteDeviceObjects() .text:1006B180
|
||||
field_0->OnLostDevice();
|
||||
field_4->OnLostDevice();
|
||||
field_8->OnLostDevice();
|
||||
field_C->OnLostDevice();
|
||||
field_14->OnLostDevice();
|
||||
field_10->OnLostDevice();
|
||||
}
|
||||
|
||||
void CFontRender::RestoreDeviceObjects()
|
||||
{
|
||||
// TODO: CFontRender::RestoreDeviceObjects() .text:1006B1C0
|
||||
field_0->OnResetDevice();
|
||||
field_4->OnResetDevice();
|
||||
field_8->OnResetDevice();
|
||||
field_C->OnResetDevice();
|
||||
field_14->OnResetDevice();
|
||||
field_10->OnResetDevice();
|
||||
}
|
||||
|
||||
SIZE CFontRender::MeasureText(char * szString, DWORD dwFormat)
|
||||
|
@ -4,10 +4,23 @@
|
||||
class CFontRender // size: 40
|
||||
{
|
||||
private:
|
||||
char _gap0[40];
|
||||
ID3DXFontHook *field_0;
|
||||
ID3DXFontHook *field_4;
|
||||
ID3DXFont *field_8;
|
||||
ID3DXFont *field_C;
|
||||
ID3DXFont *field_10;
|
||||
ID3DXSprite* field_14;
|
||||
IDirect3DDevice9 *m_pD3DDevice;
|
||||
CHAR *field_1C;
|
||||
LONG field_20;
|
||||
LONG field_24;
|
||||
|
||||
public:
|
||||
|
||||
CFontRender(IDirect3DDevice9* pD3DDevice);
|
||||
~CFontRender();
|
||||
|
||||
void CreateFonts();
|
||||
|
||||
void DeleteDeviceObjects();
|
||||
void RestoreDeviceObjects();
|
||||
|
Loading…
Reference in New Issue
Block a user