User:AF/ClassExtrapolation: Difference between revisions

From sc2k-reverse
Jump to navigationJump to search
AF (talk | contribs)
No edit summary
AF (talk | contribs)
Line 87: Line 87:


<pre>
<pre>
struct CSound
struct __unaligned __declspec(align(2)) CSound
{
{
   HWND *dwSNDhWnd;
   HWND *dwSNDhWnd;
   DWORD dwSNDPlaySound;
   BOOL bSNDPlaySound;
   int iSNDCurrSoundID;
   int iSNDCurrSoundID;
   DWORD dwSNDfour;
   CString dwSNDSoundString;
  DWORD dwSNDfive;
  DWORD dwSNDsix;
   void *dwSNDBufferOne;
   void *dwSNDBufferOne;
   int iSNDCurrentSound;
   int iSNDCurrentSound;
   void *dwSNDBufferTwo;
   void *dwSNDBufferTwo;
   DWORD dwSNDten;
   BOOL bSNDWasPlaying;
   int iSNDSoundID;
   int iSNDSoundID;
   void *dwSNDBufferFive;
   void *dwSNDBufferFive;
   void *dwSNDBufferThree;
   void *dwSNDBufferThree;
   void *dwSNDBufferFour;
   void *dwSNDBufferFour;
   DWORD dwSNDfifteen;
   int iSNDNextSoundID;
   DWORD dwSNDsixteen;
   DWORD dwSNDUnknownOne;
  WORD dwSNDseventeen[2];
   WORD wSNDMCIDevID;
   WORD dwSNDeighteen[2];
   DWORD dwSNDMCIError;
  WORD dwSNDnineteen[2];
   DWORD dwSNDUnknownTwo;
  DWORD dwSNDtwenty;
   CString dwSNDMusicString;
  DWORD dwSNDtwentyone;
  DWORD dwSNDtwentytwo;
  DWORD dwSNDtwentythree;
  DWORD dwSNDtwentyfour;
  DWORD dwSNDtwentyfive;
  DWORD dwSNDtwentysix;
  DWORD dwSNDtwentyseven;
  DWORD dwSNDtwentyeight;
  DWORD dwSNDtwentynine;
  DWORD dwSNDthirty;
  DWORD dwSNDthirtyone;
  DWORD dwSNDthirtytwo;
  DWORD dwSNDthirtythree;
  DWORD dwSNDthirtyfour;
  DWORD dwSNDthirtyfive;
  DWORD dwSNDthirtysix;
  DWORD dwSNDthirtyseven;
  DWORD dwSNDthirtyeight;
  DWORD dwSNDthirtynine;
  DWORD dwSNDforty;
  DWORD dwSNDfortyone;
  DWORD dwSNDfortytwo;
  DWORD dwSNDfortythree;
  DWORD dwSNDfortyfour;
  DWORD dwSNDfortyfive;
  DWORD dwSNDfortysix;
  DWORD dwSNDfortyseven;
  DWORD dwSNDfortyeight;
  DWORD dwSNDfortynine;
  DWORD dwSNDfifty;
  DWORD dwSNDfiftyone;
  DWORD dwSNDfiftytwo;
  DWORD dwSNDfiftythree;
  DWORD dwSNDfiftyfour;
  DWORD dwSNDfiftyfive;
  DWORD dwSNDfiftysix;
  DWORD dwSNDfiftyseven;
  DWORD dwSNDfiftyeight;
   DWORD dwSNDfiftynine;
   DWORD dwSNDsixty;
   DWORD dwSNDsixtyone;
  DWORD dwSNDsixtytwo;
  DWORD dwSNDsixtythree;
  DWORD dwSNDsixtyfour;
  DWORD dwSNDsixtyfive;
  DWORD dwSNDsixtysix;
  DWORD dwSNDsixtyseven;
  DWORD dwSNDsixtyeight;
  DWORD dwSNDsixtynine;
  DWORD dwSNDseventy;
  DWORD dwSNDseventyone;
  DWORD dwSNDseventytwo;
  DWORD dwSNDseventythree;
  DWORD dwSNDseventyfour;
  DWORD dwSNDseventyfive;
  DWORD dwSNDseventysix;
  DWORD dwSNDseventyseven;
  DWORD dwSNDseventyeight;
  DWORD dwSNDseventynine;
  DWORD dwSNDeighty;
  DWORD dwSNDeightyone;
  DWORD dwSNDeightytwo;
  DWORD dwSNDeightythree;
  DWORD dwSNDeightyfour;
  DWORD dwSNDeightyfive;
  DWORD dwSNDeightysix;
  DWORD dwSNDeightyseven;
  DWORD dwSNDeightyeight;
  DWORD dwSNDeightynine;
  DWORD dwSNDninety;
  DWORD dwSNDninetyone;
  DWORD dwSNDninetytwo;
  DWORD dwSNDninetythree;
  DWORD dwSNDninetyfour;
  DWORD dwSNDninetyfive;
  DWORD dwSNDninetysix;
  DWORD dwSNDninetyseven;
  DWORD dwSNDninetyeight;
  DWORD dwSNDninetynine;
  DWORD dwSNDonehundred;
};
};
</pre>
</pre>

Revision as of 06:52, 22 May 2025

The purposes of this page is to list the extrapolated classes during the reconstruction phase of the 1996 Special Edition.

For the most part this is a brute-force approach. As the classes are refined/trimmed they'll be adjusted over time.

The general methodology in this case is to generate a struct with N number of contained variables (this number can be rather high at times - it doesn't account for internal sub-structs and the like mind you, but there must be a starting place).

Structure Extrapolation

Whether the structural class format is entirely correct based on what was originally present is unclear.

However in order to ease the RE process some of these subclasses have created to reasonably allow for alignment.

NOTE: THIS LIST IS HEAVILY SUBJECT TO CHANGE

CWinApp -> CSimcityApp
CFrameWnd -> CMainFrame
CView -> CSimcityView
CWnd -> CSimcityWnd (This one appears to deal with some general sub-classing, this one needs more investigating and clarification)
CScrollView -> CSimcityScrollViewOne
CScrollView -> CSimcityScrollViewTwo
CScrollView -> CSimcityScrollViewThree
CDocument -> CSimcityDoc
CDocument -> CEngine
CDocument -> CSimGraphData
CMDIChildWnd -> CMyMDIChildWnd
CControlBar -> CMyToolBar
CMyToolBar -> CCityToolBar
CMyToolBar -> CMapToolBar
CDialog -> CAboutDialog
CDialog -> CMovieDialog
CDialog -> CGameDialog
CGameDialog -> CBridgeSelectDialog
CGameDialog -> CBudgetAdvisorDialog
CGameDialog -> CBudgetEducationDialog
CGameDialog -> CBudgetFireDialog
CGameDialog -> CBudgetFundDialog
CGameDialog -> CBudgetHealthDialog
CGameDialog -> CBudgetInformationDialog
CGameDialog -> CBudgetMainDialog
CGameDialog -> CBudgetOrdinanceDialog
CGameDialog -> CBudgetPoliceDialog
CGameDialog -> CBudgetTransportDialog
CGameDialog -> CBudgetZoneTaxSubDialog
CGameDialog -> CCityIndustryDialog
CGameDialog -> CCityMapDialog
CGameDialog -> CEventDialog
CGameDialog -> CGeneralInfoDialog
CGameDialog -> CInflightDialog
CGameDialog -> CInitialDialog
CGameDialog -> CNeighbourDialog
CGameDialog -> CNewGameDialog
CGameDialog -> CNewspaperDialog
CGameDialog -> COwnerInfoDialog
CGameDialog -> CPopulationDialog
CGameDialog -> CPowerPlantDialog
CGameDialog -> CQueryGeneralDialog
CGameDialog -> CQuerySpecificDialog
CGameDialog -> CScenarioDialog
CGameDialog -> CSelectArcologyDialog
CGameDialog -> CSimGraphDialog
CDockBar -> CStatusControlBar
CGraphics
CSound

CGraphics

struct CGraphics
{
  HGDIOBJ dwGRGdiObjOne;
  HBITMAP dwGRHBitmapOne;
  DWORD dwGRthree;
  CPalette *dwGRPaletteOne;
  tagRECT dwGRRectOne;
  tagBITMAPINFO *dwGRBitmapInfoOne;
  DWORD dwGRten;
  BITMAPINFO *dwGRBitmapInfoTwo;
  DWORD dwGRtwelve;
};

CSound

This deals with both the Music and Sound.

struct __unaligned __declspec(align(2)) CSound
{
  HWND *dwSNDhWnd;
  BOOL bSNDPlaySound;
  int iSNDCurrSoundID;
  CString dwSNDSoundString;
  void *dwSNDBufferOne;
  int iSNDCurrentSound;
  void *dwSNDBufferTwo;
  BOOL bSNDWasPlaying;
  int iSNDSoundID;
  void *dwSNDBufferFive;
  void *dwSNDBufferThree;
  void *dwSNDBufferFour;
  int iSNDNextSoundID;
  DWORD dwSNDUnknownOne;
  WORD wSNDMCIDevID;
  DWORD dwSNDMCIError;
  DWORD dwSNDUnknownTwo;
  CString dwSNDMusicString;
};