| 26 | } Screen; |
| 27 | |
| 28 | class CRect |
| 29 | { |
| 30 | public: |
| 31 | float m_fLeft; |
| 32 | float m_fBottom; |
| 33 | float m_fRight; |
| 34 | float m_fTop; |
| 35 | |
| 36 | bool operator==(const CRect& rect) |
| 37 | { |
| 38 | return ((*(uint32_t*)&this->m_fLeft == *(uint32_t*)&rect.m_fLeft) && (*(uint32_t*)&this->m_fBottom == *(uint32_t*)&rect.m_fBottom) && |
| 39 | (*(uint32_t*)&this->m_fRight == *(uint32_t*)&rect.m_fRight) && (*(uint32_t*)&this->m_fTop == *(uint32_t*)&rect.m_fTop)); |
| 40 | } |
| 41 | |
| 42 | bool operator==(CRect& rect) |
| 43 | { |
| 44 | return ((*(uint32_t*)&this->m_fLeft == *(uint32_t*)&rect.m_fLeft) && (*(uint32_t*)&this->m_fBottom == *(uint32_t*)&rect.m_fBottom) && |
| 45 | (*(uint32_t*)&this->m_fRight == *(uint32_t*)&rect.m_fRight) && (*(uint32_t*)&this->m_fTop == *(uint32_t*)&rect.m_fTop)); |
| 46 | } |
| 47 | |
| 48 | inline CRect() {} |
| 49 | inline CRect(float a, float b, float c, float d) |
| 50 | : m_fLeft(a), m_fBottom(b), m_fRight(c), m_fTop(d) |
| 51 | {} |
| 52 | inline CRect(uint32_t a, uint32_t b, uint32_t c, uint32_t d) |
| 53 | : m_fLeft(*(float*)&a), m_fBottom(*(float*)&b), m_fRight(*(float*)&c), m_fTop(*(float*)&d) |
| 54 | {} |
| 55 | }; |
| 56 | |
| 57 | void DrawRect(LPDIRECT3DDEVICE8 pDevice, int32_t x, int32_t y, int32_t w, int32_t h, D3DCOLOR color = D3DCOLOR_XRGB(0, 0, 0)) |
| 58 | { |