view Mouse.h @ 123:05b2d9653abc

15.11.12
author Ritor1
date Thu, 15 Nov 2012 16:36:30 +0600
parents 8a8dd0164b12
children
line wrap: on
line source

#pragma once
#include "OSAPI.h"

#include "VectorTypes.h"



/*  107 */
#pragma pack(push, 1)
struct ThreadWard
{
  //----- (00438B0B) --------------------------------------------------------
  inline ThreadWard()
  {
    InitializeCriticalSection(&csAsyncMouse);
    InitializeCriticalSection(&cs2);
    InitializeCriticalSection(&cs3);
    InitializeCriticalSection(&csAsyncKeyboard);
  }

  //----- (00438B54) --------------------------------------------------------
  virtual ~ThreadWard()
  {
  ThreadWard *v1; // esi@1

  v1 = this;
  //this->vdestructor_ptr = &ThreadWard_destructors;
  DeleteCriticalSection(&this->csAsyncKeyboard);
  DeleteCriticalSection(&v1->cs3);
  DeleteCriticalSection(&v1->cs2);
  DeleteCriticalSection(&v1->csAsyncMouse);
  }

  void (__thiscall ***vdestructor_ptr)(ThreadWard *, bool);
  _RTL_CRITICAL_SECTION csAsyncMouse;
  _RTL_CRITICAL_SECTION cs2;
  _RTL_CRITICAL_SECTION cs3;
  _RTL_CRITICAL_SECTION csAsyncKeyboard;
};
#pragma pack(pop)

/*  106 */
#pragma pack(push, 1)
struct Mouse
{
  //----- (00467E4E) --------------------------------------------------------
  inline Mouse(ThreadWard *pWard)
  {
    uCursorTextureID = 0;
    uCursorTextureID_2 = 0;
    hWnd = 0;
    pCursorBitmap_sysmem = 0;
    field_34 = 0;
    pCursorBitmap2_sysmem = 0;
    pCursorBitmap3_sysmembits_16bit = 0;
    ptr_90 = 0;
    pWard = pWard;
  }

  void GetClickPos(unsigned int *pX, unsigned int *pY);
  void RemoveHoldingItem();
  void SetCursorBitmapFromItemID(unsigned int uItemID);
  void SetCurrentCursorBitmap();
  void SetCursorBitmap(const char *pName);
  LONG _469AE4();
  void ClearCursor();
  void AllocCursorSystemMem();
  void *DoAllocCursorMem();
  POINT *GetCursorPos(POINT *p);
  void Initialize(HWND hWnd);
  void Deactivate();
  void DrawCursor();
  void _469E1C();
  void _469E24();
  void DrawCursorToTarget();
  void _469EA4();
  void Activate(int bActive);
  void SetMouseClick(int x, int y);


  unsigned int uPointingObjectID;
  unsigned int bActive;
  int field_8;
  int field_C;
  unsigned int bInitialized;
  int field_14;
  int field_18;
  int field_1C;
  int field_20;
  unsigned int uCursorTextureID;
  unsigned int uCursorTextureID_2;
  HWND hWnd;
  unsigned __int16 *pCursorBitmap_sysmem;
  int field_34;
  unsigned __int8 *pCursorBitmap2_sysmem;
  unsigned __int16 *pCursorBitmap3_sysmembits_16bit;
  int field_40;
  int field_44;
  int field_48;
  int field_4C;
  int field_50;
  int field_54;
  int uCursorBitmapPitch;
  int field_5C[13];
  void *ptr_90;
  int field_94;
  int field_98;
  int field_9C;
  int field_A0;
  int field_A4;
  int field_A8;
  int field_AC;
  int field_B0;
  int field_B4;
  int field_B8;
  int field_BC;
  int field_C0;
  Vec2_int_ pCursorBitmapPos;
  int uCursorBitmapWidth;
  int uCursorBitmapHeight;
  int field_D4;
  int field_D8;
  int field_DC;
  int field_E0;
  Vec4_int_ pCursorBitmapRect;
  char field_F4;
  char pCurrentCursorName[11];
  int field_100;
  int field_104;
  unsigned int uMouseClickX;
  unsigned int uMouseClickY;
  ThreadWard *pWard;
};
#pragma pack(pop)


#pragma pack(push, 1)
struct AsyncMouse
{
   AsyncMouse(struct IDirectDrawSurface *);
  ~AsyncMouse();

  char Initialize(LPVOID lpParameter);
  char LoadCursor(const char *pContainer);
  char LoadCursorImage();
  char _46B072();
  char CreateDisrectInputMouse();
  int _46B0ED();
  void Resume();
  void Suspend();
  char _46B1DD();
  bool DrawCursor(struct Texture *a1, struct IDirectDrawSurface4 *a2, int a3);
  bool _46B289(int a2, char a3);
  void SetHotspot(float hotspotx, float hotspoty);
  int UpdateData(int a2);
  char Thread();
  void _46B492(int a2);
  void _46B5D5(int a2);
  void _46B736_consume_click_lists(char a2);
  void _46B76F();
  void _46B879();
  int _46B944();
  char _46B958(int a2, int a3);
  char _46BA8D(int a2, int a3);
  void _46BAEC();
  void _46BB0A();
  void *Clip();
  void dtor_sub_46BC73();
  int _46BCAB();
  int unk_46BCD2(int a2, int a3, int a4);
  void *unk_46BD09(void *a1, void *a2);
  int unk_46BD2D(int a2, void *a3);
  int unk_46BD66(int a1, int a2);

  static void __stdcall AsyncMouseThread(int a1);

  void _409E3D(char a2);
  void Release();
};
#pragma pack(pop)




extern Mouse *pMouse;
extern AsyncMouse *pAsyncMouse;