CExpandingBox::CExpandingBox

This commit is contained in:
krystalgamer 2024-07-14 16:29:25 +02:00
parent 56871a8852
commit df7a991804
5 changed files with 71 additions and 36 deletions

View File

@ -162,9 +162,6 @@ INLINE void Font::unload(void)
}
}
Font::~Font(void)
{}
void validate_Font(void)
{
VALIDATE_SIZE(Font, 0x164);

View File

@ -3,9 +3,10 @@
#ifndef FONTTOOLS_H
#define FONTTOOLS_H
#include "main.h"
#include "export.h"
class Font
class Font : public CClass
{
public:
EXPORT int GetCharMap(void);
@ -14,7 +15,6 @@ class Font
EXPORT char getCharIndex(char);
EXPORT int height(char*);
EXPORT void unload(void);
EXPORT virtual ~Font(void);
EXPORT i32 heightBelowBaseline(char*);
EXPORT i32 heightAboveBaseline(char*);

View File

@ -331,6 +331,7 @@ int main()
validate_CCarnageElectrified();
validate_CConstantLaser();
validate_CShellSymBurn();
validate_CExpandingBox();
puts("[*] Validation done!");

View File

@ -1,5 +1,6 @@
#include "pshell.h"
#include "mess.h"
#include "validate.h"
EXPORT int PShell_DrawMenuBox(int, int, int, int, int, int, int, int){
@ -7,18 +8,28 @@ EXPORT int PShell_DrawMenuBox(int, int, int, int, int, int, int, int){
}
// @SMALLTODO
CExpandingBox::CExpandingBox(int a2,int a3,int a4,int a5,int a6,int a7,int a8,int a9,int a10){
this->unk_7 = a2;
this->unk_8 = a3;
this->unk_3 = a4;
this->unk_4 = a5;
this->unk_1 = a6;
this->unk_2 = a7;
this->unk_5 = a8;
this->unk_6 = a9;
this->unk_9 = a10;
this->unk_11 = 28;
// @Ok
CExpandingBox::CExpandingBox(
int a2,
int a3,
int a4,
int a5,
int a6,
int a7,
int a8,
int a9,
int a10)
{
this->field_1C = a2;
this->field_20 = a3;
this->field_C = a4;
this->field_10 = a5;
this->field_4 = a6;
this->field_8 = a7;
this->field_14 = a8;
this->field_18 = a9;
this->field_24 = a10;
this->field_2C = 28;
}
@ -26,6 +37,7 @@ CExpandingBox::CExpandingBox(int a2,int a3,int a4,int a5,int a6,int a7,int a8,in
// @MEDIUMTODO
int CExpandingBox::Display(){
/*
int unk_3; // ebx
int v2; // eax
int unk_4; // eax
@ -54,17 +66,18 @@ int CExpandingBox::Display(){
this->unk_9,
this->unk_10,
this->unk_11);
*/
return 0x14072024;
}
int expected(){ return 200;}
int not_expected() { return 69; }
// @NotOk
// check
// @BIGTODO
int CExpandingBox::ScrollBarHitTest(int a2, int a3){
/*
int v4; // r11
int v5; // r8
int v6; // r9
@ -112,6 +125,8 @@ int CExpandingBox::ScrollBarHitTest(int a2, int a3){
}
}
return v4;
*/
return 0x14072024;
}
static unsigned char gCheatRelatedOne;
@ -135,8 +150,6 @@ void PShell_BigCheat(void)
gCheatRelatedSeven = 1;
}
CExpandingBox::~CExpandingBox(){}
// @Ok
void PShell_NormalFont(void)
{
@ -168,3 +181,22 @@ void PShell_InstructionalText(void)
Mess_SetRGB(0x45u, 0x3Cu, 0x6Bu, 0);
Mess_SetRGBBottom(0x28u, 35, 62);
}
void validate_CExpandingBox(void)
{
VALIDATE_SIZE(CExpandingBox, 0x34);
VALIDATE(CExpandingBox, field_4, 0x4);
VALIDATE(CExpandingBox, field_8, 0x8);
VALIDATE(CExpandingBox, field_C, 0xC);
VALIDATE(CExpandingBox, field_10, 0x10);
VALIDATE(CExpandingBox, field_14, 0x14);
VALIDATE(CExpandingBox, field_18, 0x18);
VALIDATE(CExpandingBox, field_1C, 0x1C);
VALIDATE(CExpandingBox, field_20, 0x20);
VALIDATE(CExpandingBox, field_24, 0x24);
VALIDATE(CExpandingBox, field_2C, 0x2C);
}

View File

@ -5,23 +5,26 @@
#include "export.h"
#include "ob.h"
#include "main.h"
class CExpandingBox : public CItem {
class CExpandingBox : public CClass
{
public:
EXPORT virtual ~CExpandingBox();
int unk_1;
int unk_2;
int unk_3;
int unk_4;
int unk_5;
int unk_6;
int unk_7;
int unk_8;
int unk_9;
int unk_10;
int unk_11;
int unk_12;
i32 field_4;
i32 field_8;
i32 field_C;
i32 field_10;
i32 field_14;
i32 field_18;
i32 field_1C;
i32 field_20;
i32 field_24;
u8 padAfter24[4];
i32 field_2C;
u8 padBottom[0x34-0x2C-4];
EXPORT CExpandingBox(int a2,int a3,int a4,int a5,int a6,int a7,int a8,int a9,int a10);
EXPORT int Display();
@ -35,4 +38,6 @@ EXPORT void PShell_DefaultText(void);
EXPORT void PShell_SmallFont(void);
EXPORT void PShell_InstructionalText(void);
void validate_CExpandingBox(void);
#endif