diff options
author | Mathieu Schroeter <mathieu@schroetersa.ch> | 2017-02-12 00:51:38 +0100 |
---|---|---|
committer | Mathieu Schroeter <mathieu@schroetersa.ch> | 2017-02-12 00:51:38 +0100 |
commit | 59698849e1b274a0d829bbf622ca275103c12dd9 (patch) | |
tree | 66ee55fe65b6614e5ddf219fe5d7131b7328b8f7 /src/menu.h | |
parent | 0e338b45db42b40e41f82056d9e1363f3595c9a6 (diff) |
Use type with explicit length especially for long
The long type on win64 is 32 bits, and 64 bits on linux 64.
Diffstat (limited to 'src/menu.h')
-rw-r--r-- | src/menu.h | 30 |
1 files changed, 15 insertions, 15 deletions
@@ -14,15 +14,15 @@ public: ~CMenu(); bool Create(CPixmap *pPixmap, CSound *pSound, - POINT pos, int nb, int *pButtons, int *pErrors, - std::unordered_map<int, const char *> &texts, - int perso); - void Update(int nb, int *pButtons, int *pErrors, - std::unordered_map<int, const char *> &texts); + POINT pos, Sint32 nb, Sint32 *pButtons, Sint32 *pErrors, + std::unordered_map<Sint32, const char *> &texts, + Sint32 perso); + void Update(Sint32 nb, Sint32 *pButtons, Sint32 *pErrors, + std::unordered_map<Sint32, const char *> &texts); void Delete(); void Draw(); - int GetSel(); - int GetRank(); + Sint32 GetSel(); + Sint32 GetRank(); bool IsError(); bool IsExist(); void Message(); @@ -30,7 +30,7 @@ public: bool TreatEvent(const SDL_Event &event); protected: - int Detect(POINT pos); + Sint32 Detect(POINT pos); bool MouseDown(POINT pos); bool MouseMove(POINT pos); bool MouseUp(POINT pos); @@ -41,14 +41,14 @@ protected: CSound* m_pSound; POINT m_pos; // coin sup/gauche POINT m_dim; // dimensions - int m_nbButtons; + Sint32 m_nbButtons; POINT m_nbCel; - int m_perso; - int m_buttons[MAXBUTTON]; - int m_errors[MAXBUTTON]; - std::unordered_map<int, const char *> m_texts; - unsigned int m_messages[MAXBUTTON]; - int m_selRank; + Sint32 m_perso; + Sint32 m_buttons[MAXBUTTON]; + Sint32 m_errors[MAXBUTTON]; + std::unordered_map<Sint32, const char *> m_texts; + Uint32 m_messages[MAXBUTTON]; + Sint32 m_selRank; }; ///////////////////////////////////////////////////////////////////////////// |