// CMessageBox - [2020-04-13 11:57:46]
#ifndef _CMESSAGEBOX_H_
#define _CMESSAGEBOX_H_

#include "common.h"
#include "XMATH.h"

/*
00120F80 CMessageBox::Init(EMessageBoxType,wchar_t const*,wchar_t *,int,int,int,int,bool,bool,bool,CMessageBoxHandler_func,void *)
001217AC CMessageBox::FillUnlimitedEnergyOpt(int)
00121888 CMessageBox::GetOptionHeight()
001218A0 CMessageBox::UpdateText()
00121978 CMessageBox::SetText(wchar_t const*)
00121990 CMessageBox::Process()
00121B10 CMessageBox::GetOptionRect(int,float &)
00121BAC CMessageBox::RenderStarburst(float,float,float,float,uint,uint)
00121CC8 CMessageBox::RenderBox(float,float,float,float)
00121D8C CMessageBox::RenderPattern(float,float,float,float)
00121ED4 CMessageBox::RenderBorder(float,float,float,float)
00122040 CMessageBox::Render()
001220CC CMessageBox::RenderOptions()
00122228 CMessageBox::RenderExtra()
00122804 CMessageBox::RenderOption(bool,int)
00122A70 CMessageBox::DrawButton(int,TRect const&,bool const&)
00122AE4 CMessageBox::RenderDashAlignedOption(uint,float,TRect,int,float)
00122CD8 CMessageBox::CleanUp()
00122D18 CMessageBox::Exit()
00122D50 CMessageBox::GetType()
00122D54 CMessageBox::Delete()
00122D5C CMessageBox::ShouldDelete()
00122D62 CMessageBox::DisableOption(int)

vptr_CMessageBox_3219F4:
  CMessageBox::Init(EMessageBoxType,wchar_t const*,wchar_t *,int,int,int,int,bool,bool,bool,void (*)(int,void *),void *)
  CMessageBox::Process(void)
  CMessageBox::Render(void)
  CMessageBox::Exit(void)

0x84  00122D6C CMessageBoxHandler::NewMessageBox
*/

typedef void (*CMessageBoxHandler_func)(int, void *);

enum EMessageBoxType {
  EMessageBoxType_0,
  EMessageBoxType_1,
  EMessageBoxType_2,
  EMessageBoxType_3,
  EMessageBoxType_4,
  EMessageBoxType_5,
  EMessageBoxType_6,
  EMessageBoxType_7,
  EMessageBoxType_8,
  EMessageBoxType_9,
  EMessageBoxType_10,
  EMessageBoxType_11,
  EMessageBoxType_12,
  EMessageBoxType_13,
  EMessageBoxType_14,
  EMessageBoxType_15,
  EMessageBoxType_16,
  EMessageBoxType_17,
  EMessageBoxType_18,
  EMessageBoxType_19,
  EMessageBoxType_20,
  EMessageBoxType_21,
  EMessageBoxType_22,
  EMessageBoxType_23,
  EMessageBoxType_24,
};

class CMessageBox {
public:
  // CMessageBox();
  //~CMessageBox();

  virtual void Init(EMessageBoxType eType0,
                    wchar_t const *pWBuf1,
                    wchar_t *pWBuf2,
                    int a3,
                    int a4,
                    int a5,
                    int a6,
                    bool b7,
                    bool b8,
                    bool b9,
                    CMessageBoxHandler_func pFunc10,
                    void *pDat11);  // 00120F80

  virtual int Process();  // 00121990
  virtual void Render();  // 00122040
  virtual void Exit();    // 00122D18

  void FillUnlimitedEnergyOpt(int);                                                                              // 001217AC
  float GetOptionHeight();                                                                                       // 00121888
  int UpdateText();                                                                                              // 001218A0
  void SetText(wchar_t const *);                                                                                 // 00121978
  TRect GetOptionRect(int, float &);                                                                             // 00121B10
  __attribute__((noinline)) __attribute__((used)) void RenderStarburst(float, float, float, float, uint, uint);  // 00121BAC
  __attribute__((noinline)) __attribute__((used)) void RenderBox(float, float, float, float);                    // 00121CC8
  __attribute__((noinline)) __attribute__((used)) void RenderPattern(float, float, float, float);                // 00121D8C
  __attribute__((noinline)) __attribute__((used)) void RenderBorder(float, float, float, float);                 // 00121ED4
  __attribute__((noinline)) __attribute__((used)) void RenderOptions();                                          // 001220CC
  __attribute__((noinline)) __attribute__((used)) void RenderExtra();                                            // 00122228
  __attribute__((noinline)) __attribute__((used)) void RenderOption(bool, int);                                  // 00122804
  void DrawButton(int, TRect const &, bool const &);                                                             // 00122A70
  void RenderDashAlignedOption(uint, float, TRect, int, float);                                                  // 00122AE4
  void CleanUp();                                                                                                // 00122CD8
  void GetType();                                                                                                // 00122D50
  void Delete();                                                                                                 // 00122D54
  void ShouldDelete();                                                                                           // 00122D5C
  void DisableOption(int);                                                                                       // 00122D62

  bool bIsShutDown_4;
  float field_8;
  float field_C;
  float field_10;
  float field_14;
  float field_18;
  float field_1C;
  float field_20;
  float field_24;
  float field_28;
  EMessageBoxType dType_2C;
  wchar_t *Text_30;           //消息文本
  wchar_t *OptionText_34[6];  //按钮上的文本

  int field_4C;
  int field_50;
  int dNumOptions_54;
  uint8 *pUnknowStruct_58;
  int field_5C;
  char bool_60;
  bool Delete_61;
  bool bool_62;
  CMessageBoxHandler_func func_64;
  uchar *pCustomData_68;
  float field_6C;
  float field_70;
  int field_74;
  float field_78;
  float field_7C;
  bool field_80;
  bool field_81;
};

#endif  //_CMESSAGEBOX_H_