Skip to content

Commit fcfec1c

Browse files
committed
A lot of Memory_Z.cpp funcs
1 parent 3c63a1d commit fcfec1c

File tree

11 files changed

+319
-84
lines changed

11 files changed

+319
-84
lines changed

src/Engine/Bitmap_Z.cpp

Lines changed: 29 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,6 @@ void Bitmap_Z::Init() {
3434
m_PrecalculatedSize = 0;
3535
m_PalFormat = PAL_8888;
3636
}
37-
// void Bitmap_Z::Invalidate() {
38-
// //stub
39-
// };
4037

4138
void Bitmap_Z::Reset() {
4239
Invalidate();
@@ -53,8 +50,7 @@ void Bitmap_Z::Reset() {
5350
Init();
5451
}
5552

56-
// far from complete
57-
void Bitmap_Z::InitBmap(S32 i_SizeX, S32 i_SizeY, U8 i_Format, U8* i_Palette, U8* i_Datas)
53+
void Bitmap_Z::InitBmap(S32 i_SizeX, S32 i_SizeY, U8 i_Format, U8* i_Palette, U8* i_Datas) // far from complete
5854
{
5955
int l_PaletteSize;
6056
int l_BytePalleteSize;
@@ -75,34 +71,33 @@ void Bitmap_Z::InitBmap(S32 i_SizeX, S32 i_SizeY, U8 i_Format, U8* i_Palette, U8
7571
Float Bitmap_Z::GetBytePerPixel() {
7672
Float l_Result; // st7
7773

78-
switch ( m_Format )
79-
{
80-
case BM_4:
81-
l_Result = 0.5;
82-
break;
83-
case BM_8:
84-
case BM_I4A4:
85-
l_Result = 1.0;
86-
break;
87-
case BM_5551:
88-
case BM_565:
89-
case BM_4444:
90-
case BM_1555:
91-
l_Result = 2.0;
92-
break;
93-
case BM_8888:
94-
l_Result = 4.0;
95-
break;
96-
case BM_888:
97-
l_Result = 3.0;
98-
break;
99-
case BM_CMPR:
100-
l_Result = 0.0;
101-
break;
102-
default:
103-
ExceptionFonc_Z("FALSE", __FILE__, __LINE__, "Bitmap_Z::GetBytePerPixel", 0, 0, 0, 0, 0, 0);
104-
l_Result = 0.0;
105-
break;
74+
switch (m_Format) {
75+
case BM_4:
76+
l_Result = 0.5;
77+
break;
78+
case BM_8:
79+
case BM_I4A4:
80+
l_Result = 1.0;
81+
break;
82+
case BM_5551:
83+
case BM_565:
84+
case BM_4444:
85+
case BM_1555:
86+
l_Result = 2.0;
87+
break;
88+
case BM_8888:
89+
l_Result = 4.0;
90+
break;
91+
case BM_888:
92+
l_Result = 3.0;
93+
break;
94+
case BM_CMPR:
95+
l_Result = 0.0;
96+
break;
97+
default:
98+
ASSERT_Z(FALSE, "Bitmap_Z::GetBytePerPixel");
99+
l_Result = 0.0;
100+
break;
106101
}
107102
return l_Result;
108103
}
@@ -139,9 +134,8 @@ S32 Bitmap_Z::GetPalSize()
139134
case BM_I4A4:
140135
return 0;
141136
default:
142-
ExceptionFonc_Z("FALSE", __FILE__, __LINE__, "Bitmap_Z::GetPalSize", 0, 0, 0, 0, 0, 0);
137+
ASSERT_Z(FALSE, "Bitmap_Z::GetPalSize");
143138
return 0;
144-
145139
}
146140
}
147141

src/Engine/Fonts_Z.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#include "Fonts_Z.h"
22
#include "Main_Z.h"
3-
4-
extern Globals gData;
3+
#include "Program_Z.h"
54

65
S32 GetUTF8CharBytes(const S8* a1)
76
{

src/Engine/Handle_Z.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
#include "Handle_Z.h"
22
#include "Main_Z.h"
3-
#include "Handle_Z.h"
4-
5-
extern Globals gData;
3+
#include "Program_Z.h"
64

75
BaseObject_ZHdl::operator BaseObject_Z*() const {
86
return GETPTR(*this);

0 commit comments

Comments
 (0)