Skip to content

Commit 26c4091

Browse files
committed
basic Bitmap_Z, ResourceObject_Z, and BaseObject_Z.
updated flags too. was necessary for vtable rebuilding. they were too small so they got thrown into sdata. might need to come back to the flags later but it is okay right now
1 parent d439a6e commit 26c4091

File tree

6 files changed

+109
-2
lines changed

6 files changed

+109
-2
lines changed

configure.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,8 +212,8 @@
212212
"-sym on",
213213
"-inline off",
214214
"-opt level=4, peep, space",
215-
"-sdata 64",
216-
"-sdata2 64",
215+
"-sdata 32",
216+
"-sdata2 32",
217217
"-i src/Engine/includes",
218218
"-i src/sdk/includes",
219219
"-O4,p"

src/Engine/Bitmap_Z.cpp

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#include "Bitmap_Z.h"
2+
3+
Bitmap_Z::Bitmap_Z()
4+
{
5+
Init();
6+
}
7+
8+
Bitmap_Z::Bitmap_Z(S32 width, S32 height, U8 format, U8* palPointer)
9+
{
10+
Init();
11+
InitBmap(width, height, format, palPointer, 0);
12+
}
13+
14+
Bitmap_Z::~Bitmap_Z()
15+
{
16+
//stub
17+
}
18+
19+
void Bitmap_Z::Init() {
20+
this->flag = 0;
21+
Bitmap_Z::EnableFlag(0x14);
22+
this->dataPointer = 0;
23+
this->palPointer = 0;
24+
this->width = 0;
25+
this->height = 0;
26+
this->formatCopy = 0;
27+
this->unkSetTo4 = 4;
28+
this->texID = -1;
29+
this->transpFormat = -1;
30+
this->mipmapCount = 0;
31+
this->precalculatedSize = 0;
32+
this->paletteFormat = 3;
33+
}
34+

src/Engine/ResourceObject_Z.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
#include "ResourceObject_Z.h"

src/Engine/includes/BaseObject_Z.h

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#ifndef _BASE_OBJECT_Z_H_
2+
#define _BASE_OBJECT_Z_H_
3+
#include "Types_Z.h"
4+
5+
class BaseObject_Z
6+
{
7+
public:
8+
S32 LinkCRC32;
9+
U32 handleID;
10+
BaseObject_Z();
11+
virtual void Init();
12+
~BaseObject_Z();
13+
virtual void Load(void* a1);
14+
virtual void EndLoad();
15+
virtual void AfterEndLoad();
16+
virtual void LoadDone();
17+
virtual void LoadLinks(void* a1);
18+
virtual void EndLoadLinks();
19+
virtual void Clean();
20+
virtual void MarkHandles();
21+
};
22+
#endif

src/Engine/includes/Bitmap_Z.h

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#ifndef _BITMAP_Z_H_
2+
#define _BITMAP_Z_H_
3+
#include "ResourceObject_Z.h"
4+
5+
class Bitmap_Z : public ResourceObject_Z
6+
{
7+
public:
8+
Bitmap_Z();
9+
Bitmap_Z(S32 width, S32 height, U8 format, U8* palPointer);
10+
virtual void Init();
11+
virtual ~Bitmap_Z();
12+
virtual void Load(void* a1);
13+
virtual void Clean();
14+
void InitBmap(S32 width, S32 height, U8 format, U8* palPointer, U8 dataPointer);
15+
void EnableFlag(U16 flag);
16+
private:
17+
void* dataPointer;
18+
void* palPointer;
19+
S16 texID;
20+
U32 width;
21+
U32 height;
22+
U32 precalculatedSize;
23+
U8 format;
24+
U8 formatCopy;
25+
U8 paletteFormat;
26+
U8 transpFormat;
27+
U8 mipmapCount;
28+
U8 unkSetTo4;
29+
U16 flag;
30+
31+
};
32+
#endif
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#ifndef _RESOURCE_OBJECT_Z_H_
2+
#define _RESOURCE_OBJECT_Z_H_
3+
#include "Types_Z.h"
4+
#include "BaseObject_Z.h"
5+
6+
class ResourceObject_Z : public BaseObject_Z
7+
{
8+
public:
9+
ResourceObject_Z();
10+
~ResourceObject_Z();
11+
virtual void Load(void* a1);
12+
virtual void EndLoad();
13+
virtual void LoadLinks(void* a1);
14+
virtual void EndLoadLinks();
15+
virtual void MarkHandles();
16+
char pad_000C[8];
17+
};
18+
#endif

0 commit comments

Comments
 (0)