1
0
mirror of https://github.com/blupi-games/planetblupi synced 2024-12-30 10:15:36 +01:00

Rename windows types to something else

This commit is contained in:
Mathieu Schroeter 2017-08-21 22:08:25 +02:00
parent 967ac2c24e
commit 8cd1cacb89
33 changed files with 522 additions and 523 deletions

View File

@ -2733,7 +2733,7 @@ static const DescAction action_table[] =
bool bool
Action ( Action (
Sint16 action, Sint16 direct, Sint16 & phase, Sint16 & step, Sint16 & channel, Sint16 action, Sint16 direct, Sint16 & phase, Sint16 & step, Sint16 & channel,
Sint16 & icon, POINT & pos, Sint16 & posZ, Sounds & sound) Sint16 & icon, Point & pos, Sint16 & posZ, Sounds & sound)
{ {
const auto * pTable = action_table; const auto * pTable = action_table;
Sint16 nbIcon, nbPhase, nbMove, nbSound, i; Sint16 nbIcon, nbPhase, nbMove, nbSound, i;

View File

@ -25,7 +25,7 @@
extern bool Action ( extern bool Action (
Sint16 action, Sint16 direct, Sint16 & phase, Sint16 & step, Sint16 & channel, Sint16 action, Sint16 direct, Sint16 & phase, Sint16 & step, Sint16 & channel,
Sint16 & icon, POINT & pos, Sint16 & posZ, Sounds & sound); Sint16 & icon, Point & pos, Sint16 & posZ, Sounds & sound);
bool Rotate (Sint16 & icon, Sint16 direct); bool Rotate (Sint16 & icon, Sint16 direct);
Sint32 GetIconDirect (Sint16 icon); Sint32 GetIconDirect (Sint16 icon);
Sint32 GetAmplitude (Sint16 action); Sint32 GetAmplitude (Sint16 action);

View File

@ -166,9 +166,9 @@ ReadConfig ()
static void static void
UpdateFrame (void) UpdateFrame (void)
{ {
RECT clip, rcRect; Rect clip, rcRect;
Uint32 phase; Uint32 phase;
POINT posMouse; Point posMouse;
Sint32 i, term, speed; Sint32 i, term, speed;
posMouse = g_pEvent->GetLastMousePos (); posMouse = g_pEvent->GetLastMousePos ();
@ -300,7 +300,7 @@ FinishObjects (void)
static void static void
HandleEvent (const SDL_Event & event) HandleEvent (const SDL_Event & event)
{ {
POINT totalDim, iconDim; Point totalDim, iconDim;
if (!g_pause && g_pEvent != nullptr && g_pEvent->TreatEvent (event)) if (!g_pause && g_pEvent != nullptr && g_pEvent->TreatEvent (event))
return; return;
@ -605,8 +605,8 @@ DoInit (int argc, char * argv[], bool & exit)
if (exit) if (exit)
return rc; return rc;
POINT totalDim, iconDim; Point totalDim, iconDim;
RECT rcRect; Rect rcRect;
bool bOK; bool bOK;
bOK = ReadConfig (); // lit le fichier config.json bOK = ReadConfig (); // lit le fichier config.json

View File

@ -31,19 +31,19 @@ extern bool g_bFullScreen;
extern bool g_restoreBugs; extern bool g_restoreBugs;
extern bool g_enableRecorder; extern bool g_enableRecorder;
struct POINT { struct Point {
Sint32 x; Sint32 x;
Sint32 y; Sint32 y;
}; };
struct RECT { struct Rect {
Sint32 left; Sint32 left;
Sint32 top; Sint32 top;
Sint32 right; Sint32 right;
Sint32 bottom; Sint32 bottom;
}; };
typedef Uint32 COLORREF; typedef Uint32 ColorRef;
#if defined(_WIN64) #if defined(_WIN64)
typedef unsigned __int64 WPARAM; typedef unsigned __int64 WPARAM;

View File

@ -56,10 +56,10 @@ CButton::~CButton ()
bool bool
CButton::Create ( CButton::Create (
CPixmap * pPixmap, CSound * pSound, POINT pos, Sint32 type, Sint32 * pMenu, CPixmap * pPixmap, CSound * pSound, Point pos, Sint32 type, Sint32 * pMenu,
Sint32 nbMenu, const char ** pToolTips, Sint32 region, Uint32 message) Sint32 nbMenu, const char ** pToolTips, Sint32 region, Uint32 message)
{ {
POINT iconDim; Point iconDim;
Sint32 i, icon; Sint32 i, icon;
static Sint32 ttypes[] = { static Sint32 ttypes[] = {
@ -146,8 +146,8 @@ void
CButton::Draw () CButton::Draw ()
{ {
Sint32 i; Sint32 i;
POINT pos; Point pos;
RECT rect; Rect rect;
if (m_bHide) // bouton caché ? if (m_bHide) // bouton caché ?
{ {
@ -240,7 +240,7 @@ CButton::SetHide (bool bHide)
bool bool
CButton::TreatEvent (const SDL_Event & event) CButton::TreatEvent (const SDL_Event & event)
{ {
POINT pos; Point pos;
if (m_bHide || !m_bEnable) if (m_bHide || !m_bEnable)
return false; return false;
@ -289,7 +289,7 @@ CButton::TreatEvent (const SDL_Event & event)
// Indique si la souris est sur ce bouton. // Indique si la souris est sur ce bouton.
bool bool
CButton::MouseOnButton (POINT pos) CButton::MouseOnButton (Point pos)
{ {
return Detect (pos); return Detect (pos);
} }
@ -298,7 +298,7 @@ CButton::MouseOnButton (POINT pos)
// de la position de la souris. // de la position de la souris.
const char * const char *
CButton::GetToolTips (POINT pos) CButton::GetToolTips (Point pos)
{ {
Sint32 width = m_dim.x; Sint32 width = m_dim.x;
Sint32 rank; Sint32 rank;
@ -334,7 +334,7 @@ CButton::GetToolTips (POINT pos)
// Détecte si la souris est dans le bouton. // Détecte si la souris est dans le bouton.
bool bool
CButton::Detect (POINT pos) CButton::Detect (Point pos)
{ {
Sint32 width = m_dim.x; Sint32 width = m_dim.x;
@ -355,7 +355,7 @@ CButton::Detect (POINT pos)
// Bouton de la souris pressé. // Bouton de la souris pressé.
bool bool
CButton::MouseDown (POINT pos) CButton::MouseDown (Point pos)
{ {
if (!Detect (pos)) if (!Detect (pos))
return false; return false;
@ -372,7 +372,7 @@ CButton::MouseDown (POINT pos)
// Souris déplacés. // Souris déplacés.
bool bool
CButton::MouseMove (POINT pos) CButton::MouseMove (Point pos)
{ {
bool bDetect; bool bDetect;
Sint32 iState, iMenu; Sint32 iState, iMenu;
@ -415,7 +415,7 @@ CButton::MouseMove (POINT pos)
// Bouton de la souris relâché. // Bouton de la souris relâché.
bool bool
CButton::MouseUp (POINT pos) CButton::MouseUp (Point pos)
{ {
bool bDetect; bool bDetect;

View File

@ -35,7 +35,7 @@ public:
~CButton (); ~CButton ();
bool Create ( bool Create (
CPixmap * pPixmap, CSound * pSound, POINT pos, Sint32 type, Sint32 * pMenu, CPixmap * pPixmap, CSound * pSound, Point pos, Sint32 type, Sint32 * pMenu,
Sint32 nbMenu, const char ** pToolTips, Sint32 region, Uint32 message); Sint32 nbMenu, const char ** pToolTips, Sint32 region, Uint32 message);
void Draw (); void Draw ();
@ -52,15 +52,15 @@ public:
void SetHide (bool bHide); void SetHide (bool bHide);
bool TreatEvent (const SDL_Event & event); bool TreatEvent (const SDL_Event & event);
bool MouseOnButton (POINT pos); bool MouseOnButton (Point pos);
const char * GetToolTips (POINT pos); const char * GetToolTips (Point pos);
protected: protected:
bool Detect (POINT pos); bool Detect (Point pos);
bool MouseDown (POINT pos); bool MouseDown (Point pos);
bool MouseMove (POINT pos); bool MouseMove (Point pos);
bool MouseUp (POINT pos); bool MouseUp (Point pos);
protected: protected:
CPixmap * m_pPixmap; CPixmap * m_pPixmap;
@ -71,8 +71,8 @@ protected:
bool m_bEnable; // true si bouton actif bool m_bEnable; // true si bouton actif
bool m_bHide; // true si bouton caché bool m_bHide; // true si bouton caché
Uint32 m_message; // message envoyé si bouton actionné Uint32 m_message; // message envoyé si bouton actionné
POINT m_pos; // coin sup/gauche Point m_pos; // coin sup/gauche
POINT m_dim; // dimensions Point m_dim; // dimensions
Sint32 m_state; // 0=relâché, 1=pressé, +2=survollé Sint32 m_state; // 0=relâché, 1=pressé, +2=survollé
Sint32 m_mouseState; // 0=relâché, 1=pressé, +2=survollé Sint32 m_mouseState; // 0=relâché, 1=pressé, +2=survollé
Sint32 m_iconMenu[20]; // icônes du sous-menu Sint32 m_iconMenu[20]; // icônes du sous-menu

View File

@ -58,7 +58,7 @@ CDecor::BlupiFlush ()
Sint32 Sint32
CDecor::BlupiCreate ( CDecor::BlupiCreate (
POINT cel, Sint32 action, Sint32 direct, Sint32 perso, Sint32 energy) Point cel, Sint32 action, Sint32 direct, Sint32 perso, Sint32 energy)
{ {
Sint32 rank; Sint32 rank;
@ -161,7 +161,7 @@ CDecor::BlupiCreate (
// Si perso >= 0, supprime seulement ce personnage. // Si perso >= 0, supprime seulement ce personnage.
bool bool
CDecor::BlupiDelete (POINT cel, Sint32 perso) CDecor::BlupiDelete (Point cel, Sint32 perso)
{ {
Sint32 rank; Sint32 rank;
@ -216,7 +216,7 @@ CDecor::BlupiDelete (Sint32 rank)
// type=1 -> électro // type=1 -> électro
void void
CDecor::BlupiKill (Sint32 exRank, POINT cel, Sint32 type) CDecor::BlupiKill (Sint32 exRank, Point cel, Sint32 type)
{ {
Sint32 rank, action, x, y, icon; Sint32 rank, action, x, y, icon;
@ -426,7 +426,7 @@ CDecor::BlupiAdaptIcon (Sint32 rank)
// à ce blupi (rank), si nécessaire. // à ce blupi (rank), si nécessaire.
void void
CDecor::BlupiSound (Sint32 rank, Sounds sound, POINT pos, bool bStop) CDecor::BlupiSound (Sint32 rank, Sounds sound, Point pos, bool bStop)
{ {
Sounds newSound; Sounds newSound;
@ -487,7 +487,7 @@ static const struct {
void void
CDecor::BlupiInitAction (Sint32 rank, Sint32 action, Sint32 direct) CDecor::BlupiInitAction (Sint32 rank, Sint32 action, Sint32 direct)
{ {
POINT pos; Point pos;
Sint32 rand; Sint32 rand;
for (size_t i = 0; i < countof (tableSound); ++i) for (size_t i = 0; i < countof (tableSound); ++i)
@ -791,7 +791,7 @@ CDecor::ListFlush (Sint32 rank)
// Retourne le paramètre associé à une action. // Retourne le paramètre associé à une action.
Sint32 Sint32
CDecor::ListGetParam (Sint32 rank, Buttons button, POINT cel) CDecor::ListGetParam (Sint32 rank, Buttons button, Point cel)
{ {
Sint32 icon; Sint32 icon;
@ -816,7 +816,7 @@ CDecor::ListGetParam (Sint32 rank, Buttons button, POINT cel)
// Ajoute une action dans la liste. // Ajoute une action dans la liste.
bool bool
CDecor::ListPut (Sint32 rank, Buttons button, POINT cel, POINT cMem) CDecor::ListPut (Sint32 rank, Buttons button, Point cel, Point cMem)
{ {
Sint32 i, last; Sint32 i, last;
@ -883,7 +883,7 @@ CDecor::ListRemove (Sint32 rank)
Sint32 Sint32
CDecor::ListSearch ( CDecor::ListSearch (
Sint32 rank, Buttons button, POINT cel, const char *& textForButton) Sint32 rank, Buttons button, Point cel, const char *& textForButton)
{ {
Sint32 i, j, param, nb; Sint32 i, j, param, nb;
@ -989,11 +989,11 @@ CDecor::ListSearch (
bool bool
CDecor::RepeatAdjust ( CDecor::RepeatAdjust (
Sint32 rank, Sint32 button, POINT & cel, POINT & cMem, Sint32 param, Sint32 rank, Sint32 button, Point & cel, Point & cMem, Sint32 param,
Sint32 list) Sint32 list)
{ {
Sint32 i, channel, icon, icon1, icon2, flags; Sint32 i, channel, icon, icon1, icon2, flags;
POINT test; Point test;
static Sint32 table_object[] = { static Sint32 table_object[] = {
BUTTON_ABAT, BUTTON_ABAT,
@ -1172,7 +1172,7 @@ ok:
// Démarre une action. // Démarre une action.
void void
CDecor::GoalStart (Sint32 rank, Sint32 action, POINT cel) CDecor::GoalStart (Sint32 rank, Sint32 action, Point cel)
{ {
m_blupi[rank].goalHili = cel; m_blupi[rank].goalHili = cel;
m_blupi[rank].goalAction = action; m_blupi[rank].goalAction = action;
@ -1274,7 +1274,7 @@ term:
void void
CDecor::GoalInitPassCel (Sint32 rank) CDecor::GoalInitPassCel (Sint32 rank)
{ {
POINT cel; Point cel;
Sint32 channel, icon; Sint32 channel, icon;
cel.x = (m_blupi[rank].goalCel.x / 2) * 2; cel.x = (m_blupi[rank].goalCel.x / 2) * 2;
@ -1353,7 +1353,7 @@ CDecor::GoalNextOp (Sint32 rank, Sint16 * pTable)
Sint32 total, step, delai, first, last, first2, last2, flag, i; Sint32 total, step, delai, first, last, first2, last2, flag, i;
Sint32 param; Sint32 param;
Buttons button; Buttons button;
POINT pos, cel, cMem, destCel; Point pos, cel, cMem, destCel;
bool bOK, bError = true; bool bOK, bError = true;
pos = ConvCelToPos (m_blupi[rank].cel); pos = ConvCelToPos (m_blupi[rank].cel);
@ -2170,7 +2170,7 @@ CDecor::GoalUnwork (Sint32 rank)
void void
CDecor::GoalStop (Sint32 rank, bool bError, bool bSound) CDecor::GoalStop (Sint32 rank, bool bError, bool bSound)
{ {
POINT pos; Point pos;
static Sounds table_sound_term[] = { static Sounds table_sound_term[] = {
SOUND_TERM1, SOUND_TERM2, SOUND_TERM3, SOUND_TERM1, SOUND_TERM2, SOUND_TERM3,
@ -2234,7 +2234,7 @@ CDecor::GoalStop (Sint32 rank, bool bError, bool bSound)
// n'importe quel blupi. // n'importe quel blupi.
bool bool
CDecor::BlupiIsGoalUsed (POINT cel) CDecor::BlupiIsGoalUsed (Point cel)
{ {
Sint32 rank; Sint32 rank;
@ -2252,10 +2252,10 @@ CDecor::BlupiIsGoalUsed (POINT cel)
// Démarre ou stoppe un rayon entre deux tours. // Démarre ou stoppe un rayon entre deux tours.
void void
CDecor::BlupiStartStopRayon (Sint32 rank, POINT startCel, POINT endCel) CDecor::BlupiStartStopRayon (Sint32 rank, Point startCel, Point endCel)
{ {
Sint32 i, icon, icon2; Sint32 i, icon, icon2;
POINT cel, cel2, vector, pos; Point cel, cel2, vector, pos;
if ( if (
m_blupi[rank].perso == 1 || // araignée ? m_blupi[rank].perso == 1 || // araignée ?
@ -2329,7 +2329,7 @@ CDecor::BlupiRotate (Sint32 rank)
{ {
Sint32 aDirect, sDirect, ip, in, sens = 0; Sint32 aDirect, sDirect, ip, in, sens = 0;
bool bOK; bool bOK;
POINT pos; Point pos;
aDirect = m_blupi[rank].aDirect; aDirect = m_blupi[rank].aDirect;
sDirect = m_blupi[rank].sDirect; sDirect = m_blupi[rank].sDirect;
@ -2453,7 +2453,7 @@ bool
CDecor::BlupiNextAction (Sint32 rank) CDecor::BlupiNextAction (Sint32 rank)
{ {
bool bOK; bool bOK;
POINT pos, iCel; Point pos, iCel;
Sint32 a, min; Sint32 a, min;
Sounds sound; Sounds sound;
@ -2679,7 +2679,7 @@ void
CDecor::BlupiNextGoal (Sint32 rank) CDecor::BlupiNextGoal (Sint32 rank)
{ {
Sint32 direct, action, channel, icon, min, lg, fRank, i; Sint32 direct, action, channel, icon, min, lg, fRank, i;
POINT pos, cel, vector; Point pos, cel, vector;
if (!m_blupi[rank].bExist) if (!m_blupi[rank].bExist)
return; return;
@ -3186,7 +3186,7 @@ void
CDecor::BlupiDestCel (Sint32 rank) CDecor::BlupiDestCel (Sint32 rank)
{ {
Sint32 a; Sint32 a;
POINT vector; Point vector;
m_blupi[rank].destCel = m_blupi[rank].cel; m_blupi[rank].destCel = m_blupi[rank].cel;
@ -3252,9 +3252,9 @@ CDecor::BlupiStep (bool bFirst)
// pour les sélections (pas exact). // pour les sélections (pas exact).
void void
CDecor::BlupiGetRect (Sint32 rank, RECT & rect) CDecor::BlupiGetRect (Sint32 rank, Rect & rect)
{ {
POINT pos; Point pos;
pos = ConvCelToPos (m_blupi[rank].cel); pos = ConvCelToPos (m_blupi[rank].cel);
pos.x += m_blupi[rank].pos.x; pos.x += m_blupi[rank].pos.x;
@ -3269,10 +3269,10 @@ CDecor::BlupiGetRect (Sint32 rank, RECT & rect)
// Retourne le blupi visé par la souris. // Retourne le blupi visé par la souris.
Sint32 Sint32
CDecor::GetTargetBlupi (POINT pos) CDecor::GetTargetBlupi (Point pos)
{ {
Sint32 rank, found, prof; Sint32 rank, found, prof;
POINT test, rel, cel; Point test, rel, cel;
cel = ConvPosToCel (pos); cel = ConvPosToCel (pos);
@ -3389,7 +3389,7 @@ CDecor::InitOutlineRect ()
// Sélectionne un blupi lorsque le bouton est pressé. // Sélectionne un blupi lorsque le bouton est pressé.
void void
CDecor::BlupiHiliDown (POINT pos, bool bAdd) CDecor::BlupiHiliDown (Point pos, bool bAdd)
{ {
if (MapMove (pos)) if (MapMove (pos))
return; return;
@ -3408,7 +3408,7 @@ CDecor::BlupiHiliDown (POINT pos, bool bAdd)
// Sélectionne un blupi lorsque la souris est déplacée. // Sélectionne un blupi lorsque la souris est déplacée.
void void
CDecor::BlupiHiliMove (POINT pos) CDecor::BlupiHiliMove (Point pos)
{ {
if (m_bHiliRect) // rectangle de sélection existe ? if (m_bHiliRect) // rectangle de sélection existe ?
{ {
@ -3421,12 +3421,12 @@ CDecor::BlupiHiliMove (POINT pos)
// Retourne false si la sélection n'a pas changé ! // Retourne false si la sélection n'a pas changé !
void void
CDecor::BlupiHiliUp (POINT pos) CDecor::BlupiHiliUp (Point pos)
{ {
Sint32 rank, r, nb; Sint32 rank, r, nb;
Sounds sound; Sounds sound;
bool bEnerve = false; bool bEnerve = false;
POINT c1, c2; Point c1, c2;
static Sounds table_sound_ok[] = { static Sounds table_sound_ok[] = {
SOUND_OK1, SOUND_OK2, SOUND_OK3, SOUND_OK4, SOUND_OK5, SOUND_OK6, SOUND_OK1, SOUND_OK2, SOUND_OK3, SOUND_OK4, SOUND_OK5, SOUND_OK6,
@ -3548,10 +3548,10 @@ CDecor::BlupiHiliUp (POINT pos)
void void
CDecor::BlupiDrawHili () CDecor::BlupiDrawHili ()
{ {
POINT c1, c2, cc; Point c1, c2, cc;
POINT p1, p2, p3, p4; Point p1, p2, p3, p4;
POINT start, pos; Point start, pos;
RECT rect; Rect rect;
Sint32 shift; Sint32 shift;
if (!m_bHiliRect) if (!m_bHiliRect)
@ -3699,11 +3699,11 @@ CDecor::BlupiDrawHili ()
// avec le bouton de droite. // avec le bouton de droite.
Buttons Buttons
CDecor::GetDefButton (POINT cel) CDecor::GetDefButton (Point cel)
{ {
Buttons button; Buttons button;
Sint32 rank, channel, icon; Sint32 rank, channel, icon;
POINT iCel; Point iCel;
iCel = cel; iCel = cel;
cel.x = (cel.x / 2) * 2; cel.x = (cel.x / 2) * 2;
@ -3799,9 +3799,9 @@ CDecor::GetDefButton (POINT cel)
// Indique un but visé à Sint32 terme, pour un blupi donné. // Indique un but visé à Sint32 terme, pour un blupi donné.
bool bool
CDecor::BlupiGoal (Sint32 rank, Buttons button, POINT cel, POINT cMem) CDecor::BlupiGoal (Sint32 rank, Buttons button, Point cel, Point cMem)
{ {
POINT goalHili, goalHili2, goal, test; Point goalHili, goalHili2, goal, test;
Sint32 i, action, channel, icon, error, direct, step; Sint32 i, action, channel, icon, error, direct, step;
bool bRepeat = false; bool bRepeat = false;
@ -4063,9 +4063,9 @@ CDecor::BlupiGoal (Sint32 rank, Buttons button, POINT cel, POINT cMem)
// sélectionnés. // sélectionnés.
void void
CDecor::BlupiGoal (POINT cel, Buttons button) CDecor::BlupiGoal (Point cel, Buttons button)
{ {
POINT bPos, avg; Point bPos, avg;
Sint32 rank, nb, nbHili; Sint32 rank, nb, nbHili;
static Sounds table_sound_go[] = { static Sounds table_sound_go[] = {
@ -4143,7 +4143,7 @@ CDecor::BlupiGoal (POINT cel, Buttons button)
// (personnage invisible). // (personnage invisible).
bool bool
CDecor::IsTracksHere (POINT cel, bool bSkipInMove) CDecor::IsTracksHere (Point cel, bool bSkipInMove)
{ {
Sint32 rank; Sint32 rank;
@ -4183,7 +4183,7 @@ CDecor::IsTracksHere (POINT cel, bool bSkipInMove)
// Le blupi donné dans exRank est ignoré ! // Le blupi donné dans exRank est ignoré !
bool bool
CDecor::IsBlupiHereEx (POINT cel1, POINT cel2, Sint32 exRank, bool bSkipInMove) CDecor::IsBlupiHereEx (Point cel1, Point cel2, Sint32 exRank, bool bSkipInMove)
{ {
Sint32 rank; Sint32 rank;
@ -4228,7 +4228,7 @@ CDecor::IsBlupiHereEx (POINT cel1, POINT cel2, Sint32 exRank, bool bSkipInMove)
// Le blupi donné dans exRank est ignoré ! // Le blupi donné dans exRank est ignoré !
bool bool
CDecor::IsBlupiHereEx (POINT cel, Sint32 exRank, bool bSkipInMove) CDecor::IsBlupiHereEx (Point cel, Sint32 exRank, bool bSkipInMove)
{ {
Sint32 rank; Sint32 rank;
@ -4265,7 +4265,7 @@ CDecor::IsBlupiHereEx (POINT cel, Sint32 exRank, bool bSkipInMove)
// Indique si une cellule est occupée par un blupi. // Indique si une cellule est occupée par un blupi.
bool bool
CDecor::IsBlupiHere (POINT cel, bool bSkipInMove) CDecor::IsBlupiHere (Point cel, bool bSkipInMove)
{ {
return IsBlupiHereEx (cel, -1, bSkipInMove); return IsBlupiHereEx (cel, -1, bSkipInMove);
} }
@ -4274,9 +4274,9 @@ CDecor::IsBlupiHere (POINT cel, bool bSkipInMove)
// est déjà occupée par un blupi. // est déjà occupée par un blupi.
bool bool
CDecor::IsBlupiHere (POINT cel, Sint32 direct, bool bSkipInMove) CDecor::IsBlupiHere (Point cel, Sint32 direct, bool bSkipInMove)
{ {
POINT vector; Point vector;
vector = GetVector (direct); vector = GetVector (direct);
@ -4336,12 +4336,12 @@ CDecor::IsWorkBlupi (Sint32 rank)
void void
CDecor::BlupiGetButtons ( CDecor::BlupiGetButtons (
POINT pos, Sint32 & nb, Buttons * pButtons, Errors * pErrors, Point pos, Sint32 & nb, Buttons * pButtons, Errors * pErrors,
std::unordered_map<Sint32, const char *> & texts, Sint32 & perso) std::unordered_map<Sint32, const char *> & texts, Sint32 & perso)
{ {
Buttons * pB = pButtons; Buttons * pB = pButtons;
Errors * pE = pErrors; Errors * pE = pErrors;
POINT cel, cel2; Point cel, cel2;
Sint32 i, rank, channel, icon; Sint32 i, rank, channel, icon;
Errors error; Errors error;
Buttons button; Buttons button;
@ -4557,7 +4557,7 @@ Sint32
CDecor::IsTerminated () CDecor::IsTerminated ()
{ {
Sint32 nb, count, out; Sint32 nb, count, out;
POINT pos; Point pos;
pos.x = LXIMAGE / 2; pos.x = LXIMAGE / 2;
pos.y = LYIMAGE / 2; pos.y = LYIMAGE / 2;

View File

@ -32,7 +32,7 @@ typedef struct {
Sint32 nbMove; Sint32 nbMove;
Sint32 lgMove; Sint32 lgMove;
Sint16 reserve1[100]; Sint16 reserve1[100];
POINT celCoin; Point celCoin;
Sint16 world; Sint16 world;
Sint32 time; Sint32 time;
char buttonExist[MAXBUTTON]; char buttonExist[MAXBUTTON];
@ -41,7 +41,7 @@ typedef struct {
Sint16 region; Sint16 region;
Sint32 totalTime; Sint32 totalTime;
Sint16 skill; Sint16 skill;
POINT memoPos[4]; Point memoPos[4];
Sint16 reserve2[29]; Sint16 reserve2[29];
} DescFile; } DescFile;
@ -53,18 +53,18 @@ typedef struct {
Sint16 goalAction; // action (Sint32 terme) Sint16 goalAction; // action (Sint32 terme)
Sint16 goalPhase; // phase (Sint32 terme) Sint16 goalPhase; // phase (Sint32 terme)
POINT goalCel; // cellule visée (Sint32 terme) Point goalCel; // cellule visée (Sint32 terme)
POINT passCel; // cellule tranversante Point passCel; // cellule tranversante
Sint16 energy; // énergie restante Sint16 energy; // énergie restante
POINT cel; // cellule actuelle Point cel; // cellule actuelle
POINT destCel; // cellule destination Point destCel; // cellule destination
Sint16 action; // action en cours Sint16 action; // action en cours
Sint16 aDirect; // direction actuelle Sint16 aDirect; // direction actuelle
Sint16 sDirect; // direction souhaitée Sint16 sDirect; // direction souhaitée
POINT pos; // position relative à partir de la cellule Point pos; // position relative à partir de la cellule
Sint16 posZ; // déplacement z Sint16 posZ; // déplacement z
Sint16 channel; Sint16 channel;
Sint16 lastIcon; Sint16 lastIcon;
@ -76,13 +76,13 @@ typedef struct {
Sint32 nbUsed; // nb de points déjà visités Sint32 nbUsed; // nb de points déjà visités
char nextRankUsed; char nextRankUsed;
POINT posUsed[MAXUSED]; Point posUsed[MAXUSED];
char rankUsed[MAXUSED]; char rankUsed[MAXUSED];
Sint16 takeChannel; // objet transporté Sint16 takeChannel; // objet transporté
Sint16 takeIcon; Sint16 takeIcon;
POINT fix; // point fixe (cultive, pont) Point fix; // point fixe (cultive, pont)
Sint16 jaugePhase; Sint16 jaugePhase;
Sint16 jaugeMax; Sint16 jaugeMax;
@ -92,7 +92,7 @@ typedef struct {
Sint16 nLoop; // nb de boucles pour GOAL_OTHERLOOP Sint16 nLoop; // nb de boucles pour GOAL_OTHERLOOP
Sint16 cLoop; // boucle en cours Sint16 cLoop; // boucle en cours
Sint16 vIcon; // icône variable Sint16 vIcon; // icône variable
POINT goalHili; // but visé Point goalHili; // but visé
Sint16 bMalade; // true -> blupi malade Sint16 bMalade; // true -> blupi malade
Sint16 bCache; // true -> caché (pas dessiné) Sint16 bCache; // true -> caché (pas dessiné)
Sint16 vehicule; // véhicule utilisé par blupi, voir (**) Sint16 vehicule; // véhicule utilisé par blupi, voir (**)
@ -170,7 +170,7 @@ CDecor::Write (Sint32 rank, bool bUser, Sint32 world, Sint32 time, Sint32 total)
if (nb < MAXMOVE) if (nb < MAXMOVE)
goto error; goto error;
nb = fwrite (m_lastDrapeau, sizeof (POINT), MAXLASTDRAPEAU, file); nb = fwrite (m_lastDrapeau, sizeof (Point), MAXLASTDRAPEAU, file);
if (nb < MAXLASTDRAPEAU) if (nb < MAXLASTDRAPEAU)
goto error; goto error;
@ -306,7 +306,7 @@ CDecor::Read (
if (nb < MAXMOVE) if (nb < MAXMOVE)
goto error; goto error;
nb = fread (m_lastDrapeau, sizeof (POINT), MAXLASTDRAPEAU, file); nb = fread (m_lastDrapeau, sizeof (Point), MAXLASTDRAPEAU, file);
if (nb < MAXLASTDRAPEAU) if (nb < MAXLASTDRAPEAU)
InitDrapeau (); InitDrapeau ();

View File

@ -109,10 +109,10 @@ CDecor::MapInitColors ()
// COnversion d'un cellule en point dans la carte. // COnversion d'un cellule en point dans la carte.
POINT Point
CDecor::ConvCelToMap (POINT cel) CDecor::ConvCelToMap (Point cel)
{ {
POINT pos; Point pos;
pos.x = (cel.x - m_celCoin.x) - (cel.y - m_celCoin.y); pos.x = (cel.x - m_celCoin.x) - (cel.y - m_celCoin.y);
pos.y = ((cel.x - m_celCoin.x) + (cel.y - m_celCoin.y)) / 2; pos.y = ((cel.x - m_celCoin.x) + (cel.y - m_celCoin.y)) / 2;
@ -125,10 +125,10 @@ CDecor::ConvCelToMap (POINT cel)
// Conversion d'un point dans la carte en cellule. // Conversion d'un point dans la carte en cellule.
POINT Point
CDecor::ConvMapToCel (POINT pos) CDecor::ConvMapToCel (Point pos)
{ {
POINT cel; Point cel;
pos.x -= ((DIMMAPX - MAPCADREX) / 4) * 2; pos.x -= ((DIMMAPX - MAPCADREX) / 4) * 2;
pos.y -= ((DIMMAPY - MAPCADREY) / 4) * 2; pos.y -= ((DIMMAPY - MAPCADREY) / 4) * 2;
@ -145,9 +145,9 @@ CDecor::ConvMapToCel (POINT pos)
// Déplace le décor suite à un clic dans la carte. // Déplace le décor suite à un clic dans la carte.
bool bool
CDecor::MapMove (POINT pos) CDecor::MapMove (Point pos)
{ {
POINT cel; Point cel;
if ( if (
pos.x >= POSMAPX && pos.x < POSMAPX + DIMMAPX && pos.y >= POSMAPY && pos.x >= POSMAPX && pos.x < POSMAPX + DIMMAPX && pos.y >= POSMAPY &&
@ -425,9 +425,9 @@ static char color_fire[4] = {
// (sol, objets et brouillard). // (sol, objets et brouillard).
void void
CDecor::MapPutCel (POINT pos) CDecor::MapPutCel (Point pos)
{ {
POINT cel, fogCel; Point cel, fogCel;
Sint32 icon, i; Sint32 icon, i;
char * pColors; char * pColors;
@ -500,17 +500,17 @@ color:
bool bool
CDecor::GenerateMap () CDecor::GenerateMap ()
{ {
POINT pos, cel; Point pos, cel;
Sint32 dx, rank, i; Sint32 dx, rank, i;
auto DrawMap = [&]() -> bool { auto DrawMap = [&]() -> bool {
if (!m_SurfaceMap) if (!m_SurfaceMap)
return true; return true;
POINT dim = {DIMMAPX, DIMMAPY}; Point dim = {DIMMAPX, DIMMAPY};
m_pPixmap->Cache (CHMAP, m_SurfaceMap, dim); m_pPixmap->Cache (CHMAP, m_SurfaceMap, dim);
POINT pos = {POSMAPX, POSMAPY}; Point pos = {POSMAPX, POSMAPY};
m_pPixmap->DrawIcon (-1, CHMAP, 0, pos); m_pPixmap->DrawIcon (-1, CHMAP, 0, pos);
return true; return true;

View File

@ -908,7 +908,7 @@ CDecor::MoveFixInit ()
*/ */
bool bool
CDecor::MoveCreate ( CDecor::MoveCreate (
POINT cel, Sint32 rankBlupi, bool bFloor, Sint32 channel, Sint32 icon, Point cel, Sint32 rankBlupi, bool bFloor, Sint32 channel, Sint32 icon,
Sint32 maskChannel, Sint32 maskIcon, Sint32 total, Sint32 delai, Sint32 stepY, Sint32 maskChannel, Sint32 maskIcon, Sint32 total, Sint32 delai, Sint32 stepY,
bool bMisc, bool bNotIfExist) bool bMisc, bool bNotIfExist)
{ {
@ -964,7 +964,7 @@ create:
// Ajoute un mouvement. // Ajoute un mouvement.
bool bool
CDecor::MoveAddMoves (POINT cel, Sint32 rankMoves) CDecor::MoveAddMoves (Point cel, Sint32 rankMoves)
{ {
Sint32 rank; Sint32 rank;
@ -987,7 +987,7 @@ CDecor::MoveAddMoves (POINT cel, Sint32 rankMoves)
// Ajoute un mouvement. // Ajoute un mouvement.
bool bool
CDecor::MoveAddIcons (POINT cel, Sint32 rankIcons, bool bContinue) CDecor::MoveAddIcons (Point cel, Sint32 rankIcons, bool bContinue)
{ {
Sint32 rank; Sint32 rank;
@ -1018,7 +1018,7 @@ CDecor::MoveAddIcons (POINT cel, Sint32 rankIcons, bool bContinue)
* \returns true if possible. * \returns true if possible.
*/ */
bool bool
CDecor::MoveStartFire (POINT cel) CDecor::MoveStartFire (Point cel)
{ {
Sint32 channel, icon; Sint32 channel, icon;
@ -1073,7 +1073,7 @@ CDecor::MoveStartFire (POINT cel)
// Démarre le feu si c'est possible par proximité. // Démarre le feu si c'est possible par proximité.
void void
CDecor::MoveProxiFire (POINT cel) CDecor::MoveProxiFire (Point cel)
{ {
Sint32 cx, cy, xx, yy, x, y, channel, icon; Sint32 cx, cy, xx, yy, x, y, channel, icon;
@ -1143,7 +1143,7 @@ void
CDecor::MoveFire (Sint32 rank) CDecor::MoveFire (Sint32 rank)
{ {
Sint32 x, y, icon, newIcon; Sint32 x, y, icon, newIcon;
POINT pos; Point pos;
x = (m_move[rank].cel.x / 2) * 2; x = (m_move[rank].cel.x / 2) * 2;
y = (m_move[rank].cel.y / 2) * 2; y = (m_move[rank].cel.y / 2) * 2;
@ -1334,7 +1334,7 @@ CDecor::MoveStep (bool bFirst)
// Termine un mouvement pour une cellule donnée. // Termine un mouvement pour une cellule donnée.
void void
CDecor::MoveFinish (POINT cel) CDecor::MoveFinish (Point cel)
{ {
Sint32 rank; Sint32 rank;
@ -1375,7 +1375,7 @@ CDecor::MoveFinish (Sint32 rankBlupi)
// Vérifie si une cellule est déjà utilisée. // Vérifie si une cellule est déjà utilisée.
bool bool
CDecor::MoveIsUsed (POINT cel) CDecor::MoveIsUsed (Point cel)
{ {
Sint32 rank; Sint32 rank;
@ -1393,7 +1393,7 @@ CDecor::MoveIsUsed (POINT cel)
// Retourne l'objet en construction à un endroit donné. // Retourne l'objet en construction à un endroit donné.
bool bool
CDecor::MoveGetObject (POINT cel, Sint32 & channel, Sint32 & icon) CDecor::MoveGetObject (Point cel, Sint32 & channel, Sint32 & icon)
{ {
Sint32 rank; Sint32 rank;
@ -1415,7 +1415,7 @@ CDecor::MoveGetObject (POINT cel, Sint32 & channel, Sint32 & icon)
// Modifie un objet en construction à un endroit donné. // Modifie un objet en construction à un endroit donné.
bool bool
CDecor::MovePutObject (POINT cel, Sint32 channel, Sint32 icon) CDecor::MovePutObject (Point cel, Sint32 channel, Sint32 icon)
{ {
Sint32 rank; Sint32 rank;

View File

@ -35,10 +35,10 @@
#define TEXTDELAY 10 // délai avant apparition tooltips #define TEXTDELAY 10 // délai avant apparition tooltips
POINT Point
GetCel (Sint32 x, Sint32 y) GetCel (Sint32 x, Sint32 y)
{ {
POINT cel; Point cel;
cel.x = x; cel.x = x;
cel.y = y; cel.y = y;
@ -46,8 +46,8 @@ GetCel (Sint32 x, Sint32 y)
return cel; return cel;
} }
POINT Point
GetCel (POINT cel, Sint32 x, Sint32 y) GetCel (Point cel, Sint32 x, Sint32 y)
{ {
cel.x += x; cel.x += x;
cel.y += y; cel.y += y;
@ -61,7 +61,7 @@ GetCel (POINT cel, Sint32 x, Sint32 y)
// jusque dans les bords ! // jusque dans les bords !
bool bool
IsValid (POINT cel) IsValid (Point cel)
{ {
if (cel.x < 2 || cel.x >= MAXCELX - 2 || cel.y < 2 || cel.y >= MAXCELX - 2) if (cel.x < 2 || cel.x >= MAXCELX - 2 || cel.y < 2 || cel.y >= MAXCELX - 2)
return false; return false;
@ -70,10 +70,10 @@ IsValid (POINT cel)
// Retourne un vecteur orienté dans une direction donnée. // Retourne un vecteur orienté dans une direction donnée.
POINT Point
GetVector (Sint32 direct) GetVector (Sint32 direct)
{ {
POINT vector; Point vector;
vector.x = 0; vector.x = 0;
vector.y = 0; vector.y = 0;
@ -236,7 +236,7 @@ CDecor::ResetHili ()
bool bool
CDecor::LoadImages () CDecor::LoadImages ()
{ {
POINT totalDim, iconDim; Point totalDim, iconDim;
char filename[50]; char filename[50];
if (m_region == m_lastRegion) if (m_region == m_lastRegion)
@ -374,7 +374,7 @@ CDecor::FlipOutline ()
// Initialise un sol dans une cellule. // Initialise un sol dans une cellule.
bool bool
CDecor::PutFloor (POINT cel, Sint32 channel, Sint32 icon) CDecor::PutFloor (Point cel, Sint32 channel, Sint32 icon)
{ {
if (cel.x < 0 || cel.x >= MAXCELX || cel.y < 0 || cel.y >= MAXCELY) if (cel.x < 0 || cel.x >= MAXCELX || cel.y < 0 || cel.y >= MAXCELY)
return false; return false;
@ -392,7 +392,7 @@ CDecor::PutFloor (POINT cel, Sint32 channel, Sint32 icon)
// Initialise un objet dans une cellule. // Initialise un objet dans une cellule.
bool bool
CDecor::PutObject (POINT cel, Sint32 channel, Sint32 icon) CDecor::PutObject (Point cel, Sint32 channel, Sint32 icon)
{ {
if (cel.x < 0 || cel.x >= MAXCELX || cel.y < 0 || cel.y >= MAXCELY) if (cel.x < 0 || cel.x >= MAXCELX || cel.y < 0 || cel.y >= MAXCELY)
return false; return false;
@ -411,7 +411,7 @@ CDecor::PutObject (POINT cel, Sint32 channel, Sint32 icon)
// Retourne un sol dans une cellule. // Retourne un sol dans une cellule.
bool bool
CDecor::GetFloor (POINT cel, Sint32 & channel, Sint32 & icon) CDecor::GetFloor (Point cel, Sint32 & channel, Sint32 & icon)
{ {
if (cel.x < 0 || cel.x >= MAXCELX || cel.y < 0 || cel.y >= MAXCELY) if (cel.x < 0 || cel.x >= MAXCELX || cel.y < 0 || cel.y >= MAXCELY)
return false; return false;
@ -425,7 +425,7 @@ CDecor::GetFloor (POINT cel, Sint32 & channel, Sint32 & icon)
// Retourne une objet dans une cellule. // Retourne une objet dans une cellule.
bool bool
CDecor::GetObject (POINT cel, Sint32 & channel, Sint32 & icon) CDecor::GetObject (Point cel, Sint32 & channel, Sint32 & icon)
{ {
if (cel.x < 0 || cel.x >= MAXCELX || cel.y < 0 || cel.y >= MAXCELY) if (cel.x < 0 || cel.x >= MAXCELX || cel.y < 0 || cel.y >= MAXCELY)
return false; return false;
@ -439,7 +439,7 @@ CDecor::GetObject (POINT cel, Sint32 & channel, Sint32 & icon)
// Modifie le feu pour une cellule. // Modifie le feu pour une cellule.
bool bool
CDecor::SetFire (POINT cel, bool bFire) CDecor::SetFire (Point cel, bool bFire)
{ {
if (cel.x < 0 || cel.x >= MAXCELX || cel.y < 0 || cel.y >= MAXCELY) if (cel.x < 0 || cel.x >= MAXCELX || cel.y < 0 || cel.y >= MAXCELY)
return false; return false;
@ -452,7 +452,7 @@ CDecor::SetFire (POINT cel, bool bFire)
// Modifie l'offset pour le shift. // Modifie l'offset pour le shift.
void void
CDecor::SetShiftOffset (POINT offset) CDecor::SetShiftOffset (Point offset)
{ {
m_shiftOffset = offset; m_shiftOffset = offset;
m_bGroundRedraw = true; m_bGroundRedraw = true;
@ -460,10 +460,10 @@ CDecor::SetShiftOffset (POINT offset)
// Convertit la position d'une cellule en coordonnée graphique. // Convertit la position d'une cellule en coordonnée graphique.
POINT Point
CDecor::ConvCelToPos (POINT cel) CDecor::ConvCelToPos (Point cel)
{ {
POINT pos; Point pos;
pos.x = ((cel.x - m_celCoin.x) - (cel.y - m_celCoin.y)) * (DIMCELX / 2); pos.x = ((cel.x - m_celCoin.x) - (cel.y - m_celCoin.y)) * (DIMCELX / 2);
pos.y = ((cel.x - m_celCoin.x) + (cel.y - m_celCoin.y)) * (DIMCELY / 2); pos.y = ((cel.x - m_celCoin.x) + (cel.y - m_celCoin.y)) * (DIMCELY / 2);
@ -476,10 +476,10 @@ CDecor::ConvCelToPos (POINT cel)
// Convertit une coordonnée graphique en cellule. // Convertit une coordonnée graphique en cellule.
POINT Point
CDecor::ConvPosToCel (POINT pos, bool bMap) CDecor::ConvPosToCel (Point pos, bool bMap)
{ {
POINT cel; Point cel;
if ( if (
bMap && pos.x >= POSMAPX && pos.x < POSMAPX + DIMMAPX && pos.y >= POSMAPY && bMap && pos.x >= POSMAPX && pos.x < POSMAPX + DIMMAPX && pos.y >= POSMAPY &&
@ -508,10 +508,10 @@ CDecor::ConvPosToCel (POINT pos, bool bMap)
// Convertit une coordonnée graphique en grande cellule (2x2). // Convertit une coordonnée graphique en grande cellule (2x2).
POINT Point
CDecor::ConvPosToCel2 (POINT pos) CDecor::ConvPosToCel2 (Point pos)
{ {
POINT cel; Point cel;
pos.x -= POSDRAWX + DIMCELX / 2; pos.x -= POSDRAWX + DIMCELX / 2;
pos.y -= POSDRAWY; pos.y -= POSDRAWY;
@ -554,7 +554,7 @@ void
CDecor::BuildPutBlupi () CDecor::BuildPutBlupi ()
{ {
Sint32 x, y, dx, dy, xMin, yMin, rank, clipLeft; Sint32 x, y, dx, dy, xMin, yMin, rank, clipLeft;
POINT pos; Point pos;
for (rank = 0; rank < MAXBLUPI; rank++) for (rank = 0; rank < MAXBLUPI; rank++)
{ {
@ -671,7 +671,7 @@ CDecor::BuildPutBlupi ()
// Dessine une cellule du décor contenant un sol animé. // Dessine une cellule du décor contenant un sol animé.
void void
CDecor::BuildMoveFloor (Sint32 x, Sint32 y, POINT pos, Sint32 rank) CDecor::BuildMoveFloor (Sint32 x, Sint32 y, Point pos, Sint32 rank)
{ {
Sint32 icon, nb; Sint32 icon, nb;
Sint16 * pTable; Sint16 * pTable;
@ -710,7 +710,7 @@ CDecor::BuildMoveFloor (Sint32 x, Sint32 y, POINT pos, Sint32 rank)
// Dessine une cellule du décor contenant un objet animé. // Dessine une cellule du décor contenant un objet animé.
void void
CDecor::BuildMoveObject (Sint32 x, Sint32 y, POINT pos, Sint32 rank) CDecor::BuildMoveObject (Sint32 x, Sint32 y, Point pos, Sint32 rank)
{ {
Sint32 hBuild, offset, startY, endY; Sint32 hBuild, offset, startY, endY;
Sint32 channel, icon, nb; Sint32 channel, icon, nb;
@ -732,7 +732,7 @@ CDecor::BuildMoveObject (Sint32 x, Sint32 y, POINT pos, Sint32 rank)
// Dessine un chiffre par-dessus // Dessine un chiffre par-dessus
if (m_move[rank].icon >= MOVEICONNB && m_move[rank].icon <= MOVEICONNB + 100) if (m_move[rank].icon >= MOVEICONNB && m_move[rank].icon <= MOVEICONNB + 100)
{ {
POINT textPos; Point textPos;
char string[20]; char string[20];
m_pPixmap->DrawIcon ( m_pPixmap->DrawIcon (
@ -820,7 +820,7 @@ CDecor::BuildMoveObject (Sint32 x, Sint32 y, POINT pos, Sint32 rank)
// Déplace l'objet transporté par blupi. // Déplace l'objet transporté par blupi.
void void
BuildMoveTransport (Sint32 icon, POINT & pos) BuildMoveTransport (Sint32 icon, Point & pos)
{ {
pos.x -= DIMCELX / 2; pos.x -= DIMCELX / 2;
pos.y -= 96; pos.y -= 96;
@ -917,11 +917,11 @@ BuildMoveTransport (Sint32 icon, POINT & pos)
// Construit tous les sols fixes dans CHGROUND. // Construit tous les sols fixes dans CHGROUND.
void void
CDecor::BuildGround (RECT clip) CDecor::BuildGround (Rect clip)
{ {
//? OutputDebug("BuildGround\n"); //? OutputDebug("BuildGround\n");
Sint32 x, y, i, j, nbx, nby, width, height, channel, icon; Sint32 x, y, i, j, nbx, nby, width, height, channel, icon;
POINT iCel, mCel, iPos, mPos, cPos, pos; Point iCel, mCel, iPos, mPos, cPos, pos;
width = clip.right - clip.left; width = clip.right - clip.left;
height = clip.bottom - clip.top; height = clip.bottom - clip.top;
@ -1042,11 +1042,11 @@ CDecor::BuildGround (RECT clip)
// Construit le décor dans un pixmap. // Construit le décor dans un pixmap.
void void
CDecor::Build (RECT clip, POINT posMouse) CDecor::Build (Rect clip, Point posMouse)
{ {
Sint32 x, y, i, j, nbx, nby, width, height, rank, icon, channel, n; Sint32 x, y, i, j, nbx, nby, width, height, rank, icon, channel, n;
POINT iCel, mCel, cel, iPos, mPos, cPos, pos, tPos; Point iCel, mCel, cel, iPos, mPos, cPos, pos, tPos;
RECT oldClip, clipRect; Rect oldClip, clipRect;
static Sint32 table_eau[6] = {70, 68, 14, 69, 14, 68}; static Sint32 table_eau[6] = {70, 68, 14, 69, 14, 68};
static Sint32 table_random_x[10] = {2, 5, 1, 9, 4, 0, 6, 3, 8, 7}; static Sint32 table_random_x[10] = {2, 5, 1, 9, 4, 0, 6, 3, 8, 7};
@ -1608,8 +1608,8 @@ CDecor::CountFloor (Sint32 channel, Sint32 icon)
Errors Errors
CDecor::CelOkForAction ( CDecor::CelOkForAction (
POINT cel, Sint32 action, Sint32 rank, Sint32 icons[4][4], Point cel, Sint32 action, Sint32 rank, Sint32 icons[4][4],
POINT & celOutline1, POINT & celOutline2) Point & celOutline1, Point & celOutline2)
{ {
Sint32 x, y, i, j, channel, icon, nb, start, direct; Sint32 x, y, i, j, channel, icon, nb, start, direct;
Errors error = Errors::NONE; Errors error = Errors::NONE;
@ -1617,7 +1617,7 @@ CDecor::CelOkForAction (
bool bTransport = false; bool bTransport = false;
bool bVehicule = false; bool bVehicule = false;
bool bVehiculeA = false; bool bVehiculeA = false;
POINT vector; Point vector;
for (x = 0; x < 4; x++) for (x = 0; x < 4; x++)
{ {
@ -2078,7 +2078,7 @@ CDecor::CelOkForAction (
if (action == EV_ACTION_BRIDGEE) if (action == EV_ACTION_BRIDGEE)
{ {
POINT test; Point test;
if (cel.x % 2 != 1 || cel.y % 2 != 1) if (cel.x % 2 != 1 || cel.y % 2 != 1)
{ {
@ -2451,7 +2451,7 @@ CDecor::CelOkForAction (
if (action == EV_ACTION_BOATE) if (action == EV_ACTION_BOATE)
{ {
POINT test; Point test;
if (cel.x % 2 != 1 || cel.y % 2 != 1) if (cel.x % 2 != 1 || cel.y % 2 != 1)
{ {
@ -2746,10 +2746,10 @@ CDecor::CelOkForAction (
// Le rang du blupi qui effectuera le travail est donnée dans rank. // Le rang du blupi qui effectuera le travail est donnée dans rank.
Errors Errors
CDecor::CelOkForAction (POINT cel, Sint32 action, Sint32 rank) CDecor::CelOkForAction (Point cel, Sint32 action, Sint32 rank)
{ {
Sint32 icons[4][4]; Sint32 icons[4][4];
POINT celOutline1, celOutline2; Point celOutline1, celOutline2;
return CelOkForAction (cel, action, rank, icons, celOutline1, celOutline2); return CelOkForAction (cel, action, rank, icons, celOutline1, celOutline2);
} }
@ -2789,10 +2789,10 @@ CDecor::GetHiliRankBlupi (Sint32 nb)
// 2 construction d'une cellule 2x2 // 2 construction d'une cellule 2x2
void void
CDecor::CelHili (POINT pos, Sint32 action) CDecor::CelHili (Point pos, Sint32 action)
{ {
Sint32 x, y, i, channel, icon, rank, nb; Sint32 x, y, i, channel, icon, rank, nb;
POINT cel; Point cel;
for (x = 0; x < 4; x++) for (x = 0; x < 4; x++)
{ {
@ -2893,9 +2893,9 @@ CDecor::CelHili (POINT pos, Sint32 action)
// Marque la cellule visée par la souris pour un bouton donné. // Marque la cellule visée par la souris pour un bouton donné.
void void
CDecor::CelHiliButton (POINT cel, Sint32 button) CDecor::CelHiliButton (Point cel, Sint32 button)
{ {
POINT celOutline1, celOutline2; Point celOutline1, celOutline2;
CelOkForAction ( CelOkForAction (
cel, table_actions[button], m_rankBlupiHili, m_iconHili, celOutline1, cel, table_actions[button], m_rankBlupiHili, m_iconHili, celOutline1,
@ -2928,7 +2928,7 @@ void
CDecor::CelHiliRepeat (Sint32 list) CDecor::CelHiliRepeat (Sint32 list)
{ {
Sint32 rank, button, x, y, i; Sint32 rank, button, x, y, i;
POINT cel; Point cel;
for (x = 0; x < 4; x++) for (x = 0; x < 4; x++)
{ {
@ -2981,7 +2981,7 @@ CDecor::CelHiliRepeat (Sint32 list)
// l'objet ou au blupi visé par la souris. // l'objet ou au blupi visé par la souris.
const char * const char *
CDecor::GetResHili (POINT posMouse) CDecor::GetResHili (Point posMouse)
{ {
Sint32 icon; Sint32 icon;
@ -3261,7 +3261,7 @@ CDecor::HideTooltips (bool bHide)
// Modifie l'origine supérieure/gauche du décor. // Modifie l'origine supérieure/gauche du décor.
void void
CDecor::SetCoin (POINT coin, bool bCenter) CDecor::SetCoin (Point coin, bool bCenter)
{ {
if (bCenter) if (bCenter)
{ {
@ -3284,13 +3284,13 @@ CDecor::SetCoin (POINT coin, bool bCenter)
m_textLastPos.x = -1; // tooltips plus lavable ! m_textLastPos.x = -1; // tooltips plus lavable !
} }
POINT Point
CDecor::GetCoin () CDecor::GetCoin ()
{ {
return m_celCoin; return m_celCoin;
} }
POINT Point
CDecor::GetHome () CDecor::GetHome ()
{ {
return m_celHome; return m_celHome;
@ -3301,7 +3301,7 @@ CDecor::GetHome ()
void void
CDecor::MemoPos (Sint32 rank, bool bRecord) CDecor::MemoPos (Sint32 rank, bool bRecord)
{ {
POINT pos; Point pos;
pos.x = LXIMAGE / 2; pos.x = LXIMAGE / 2;
pos.y = LYIMAGE / 2; pos.y = LYIMAGE / 2;

View File

@ -65,18 +65,18 @@ typedef struct {
Sint16 goalAction; // action (Sint32 terme) Sint16 goalAction; // action (Sint32 terme)
Sint16 goalPhase; // phase (Sint32 terme) Sint16 goalPhase; // phase (Sint32 terme)
POINT goalCel; // cellule visée (Sint32 terme) Point goalCel; // cellule visée (Sint32 terme)
POINT passCel; // cellule tranversante Point passCel; // cellule tranversante
Sint16 energy; // énergie restante Sint16 energy; // énergie restante
POINT cel; // cellule actuelle Point cel; // cellule actuelle
POINT destCel; // cellule destination Point destCel; // cellule destination
Sint16 action; // action en cours Sint16 action; // action en cours
Sint16 aDirect; // direction actuelle Sint16 aDirect; // direction actuelle
Sint16 sDirect; // direction souhaitée Sint16 sDirect; // direction souhaitée
POINT pos; // position relative à partir de la cellule Point pos; // position relative à partir de la cellule
Sint16 posZ; // déplacement z Sint16 posZ; // déplacement z
Sint16 channel; Sint16 channel;
Sint16 lastIcon; Sint16 lastIcon;
@ -88,13 +88,13 @@ typedef struct {
Sint32 nbUsed; // nb de points déjà visités Sint32 nbUsed; // nb de points déjà visités
char nextRankUsed; char nextRankUsed;
POINT posUsed[MAXUSED]; Point posUsed[MAXUSED];
char rankUsed[MAXUSED]; char rankUsed[MAXUSED];
Sint16 takeChannel; // objet transporté Sint16 takeChannel; // objet transporté
Sint16 takeIcon; Sint16 takeIcon;
POINT fix; // point fixe (cultive, pont) Point fix; // point fixe (cultive, pont)
Sint16 jaugePhase; Sint16 jaugePhase;
Sint16 jaugeMax; Sint16 jaugeMax;
@ -104,7 +104,7 @@ typedef struct {
Sint16 nLoop; // nb de boucles pour GOAL_OTHERLOOP Sint16 nLoop; // nb de boucles pour GOAL_OTHERLOOP
Sint16 cLoop; // boucle en cours Sint16 cLoop; // boucle en cours
Sint16 vIcon; // icône variable Sint16 vIcon; // icône variable
POINT goalHili; // but visé Point goalHili; // but visé
Sint16 bMalade; // true -> blupi malade Sint16 bMalade; // true -> blupi malade
Sint16 bCache; // true -> caché (pas dessiné) Sint16 bCache; // true -> caché (pas dessiné)
Sint16 vehicule; // véhicule utilisé par blupi, voir (**) Sint16 vehicule; // véhicule utilisé par blupi, voir (**)
@ -114,7 +114,7 @@ typedef struct {
char clicDelay; char clicDelay;
char reserve2[2]; char reserve2[2];
Sint16 listButton[MAXLIST]; Sint16 listButton[MAXLIST];
POINT listCel[MAXLIST]; Point listCel[MAXLIST];
Sint16 listParam[MAXLIST]; Sint16 listParam[MAXLIST];
Sint16 repeatLevelHope; Sint16 repeatLevelHope;
Sint16 repeatLevel; Sint16 repeatLevel;
@ -145,7 +145,7 @@ typedef struct {
typedef struct { typedef struct {
Sint32 bExist; // true -> utilisé Sint32 bExist; // true -> utilisé
POINT cel; // cellule du décor Point cel; // cellule du décor
Sint16 rankBlupi; // blupi travaillant ici Sint16 rankBlupi; // blupi travaillant ici
Sint32 bFloor; // true -> floor, false -> object Sint32 bFloor; // true -> floor, false -> object
@ -174,110 +174,110 @@ public:
~CDecor (); ~CDecor ();
// Arrange.cpp // Arrange.cpp
void ArrangeFloor (POINT cel); void ArrangeFloor (Point cel);
void ArrangeMur (POINT cel, Sint32 & icon, Sint32 index); void ArrangeMur (Point cel, Sint32 & icon, Sint32 index);
void ArrangeBuild (POINT cel, Sint32 & channel, Sint32 & icon); void ArrangeBuild (Point cel, Sint32 & channel, Sint32 & icon);
void ArrangeObject (POINT cel); void ArrangeObject (Point cel);
bool ArrangeFillTestFloor (POINT cel1, POINT cel2); bool ArrangeFillTestFloor (Point cel1, Point cel2);
bool ArrangeFillTest (POINT pos); bool ArrangeFillTest (Point pos);
void ArrangeFillPut (POINT pos, Sint32 channel, Sint32 icon); void ArrangeFillPut (Point pos, Sint32 channel, Sint32 icon);
void ArrangeFillSearch (POINT pos); void ArrangeFillSearch (Point pos);
void ArrangeFill (POINT pos, Sint32 channel, Sint32 icon, bool bFloor); void ArrangeFill (Point pos, Sint32 channel, Sint32 icon, bool bFloor);
void ArrangeBlupi (); void ArrangeBlupi ();
// Obstacle.cpp // Obstacle.cpp
void SearchFloor (Sint32 rank, Sint32 icon, POINT cel, Sint32 * pBits); void SearchFloor (Sint32 rank, Sint32 icon, Point cel, Sint32 * pBits);
void SearchObject (Sint32 rank, Sint32 icon, POINT cel, Sint32 * pBits); void SearchObject (Sint32 rank, Sint32 icon, Point cel, Sint32 * pBits);
void AjustFloor (Sint32 rank, Sint32 icon, POINT cel, Sint32 * pBits); void AjustFloor (Sint32 rank, Sint32 icon, Point cel, Sint32 * pBits);
void AjustObject (Sint32 rank, Sint32 icon, POINT cel, Sint32 * pBits); void AjustObject (Sint32 rank, Sint32 icon, Point cel, Sint32 * pBits);
bool IsFreeDirect (POINT cel, Sint32 direct, Sint32 rank); bool IsFreeDirect (Point cel, Sint32 direct, Sint32 rank);
bool IsFreeCelObstacle (POINT cel); bool IsFreeCelObstacle (Point cel);
bool IsFreeCelFloor (POINT cel, Sint32 rank); bool IsFreeCelFloor (Point cel, Sint32 rank);
bool IsFreeCelGo (POINT cel, Sint32 rank); bool IsFreeCelGo (Point cel, Sint32 rank);
bool IsFreeCelHili (POINT cel, Sint32 rank); bool IsFreeCelHili (Point cel, Sint32 rank);
bool IsFreeCel (POINT cel, Sint32 rank); bool IsFreeCel (Point cel, Sint32 rank);
bool IsFreeCelDepose (POINT cel, Sint32 rank); bool IsFreeCelDepose (Point cel, Sint32 rank);
bool bool
IsFreeCelEmbarque (POINT cel, Sint32 rank, Sint32 & action, POINT & limit); IsFreeCelEmbarque (Point cel, Sint32 rank, Sint32 & action, Point & limit);
bool bool
IsFreeCelDebarque (POINT cel, Sint32 rank, Sint32 & action, POINT & limit); IsFreeCelDebarque (Point cel, Sint32 rank, Sint32 & action, Point & limit);
bool IsFreeJump (POINT cel, Sint32 direct, Sint32 rank, Sint32 & action); bool IsFreeJump (Point cel, Sint32 direct, Sint32 rank, Sint32 & action);
bool IsFreeGlisse (POINT cel, Sint32 direct, Sint32 rank, Sint32 & action); bool IsFreeGlisse (Point cel, Sint32 direct, Sint32 rank, Sint32 & action);
Sint32 DirectSearch (POINT cel, POINT goal); Sint32 DirectSearch (Point cel, Point goal);
void FlushUsed (Sint32 rank); void FlushUsed (Sint32 rank);
void AddUsedPos (Sint32 rank, POINT pos); void AddUsedPos (Sint32 rank, Point pos);
bool IsUsedPos (Sint32 rank, POINT pos); bool IsUsedPos (Sint32 rank, Point pos);
bool SearchBestBase ( bool SearchBestBase (
Sint32 rank, Sint32 & action, POINT & newCel, Sint32 & direct); Sint32 rank, Sint32 & action, Point & newCel, Sint32 & direct);
bool SearchBestPass (Sint32 rank, Sint32 & action); bool SearchBestPass (Sint32 rank, Sint32 & action);
bool IsWorkableObject (POINT cel, Sint32 rank); bool IsWorkableObject (Point cel, Sint32 rank);
bool SearchOtherObject ( bool SearchOtherObject (
Sint32 rank, POINT initCel, Sint32 action, Sint32 distMax, Sint32 channel, Sint32 rank, Point initCel, Sint32 action, Sint32 distMax, Sint32 channel,
Sint32 firstIcon1, Sint32 lastIcon1, Sint32 firstIcon2, Sint32 lastIcon2, Sint32 firstIcon1, Sint32 lastIcon1, Sint32 firstIcon2, Sint32 lastIcon2,
POINT & foundCel, Sint32 & foundIcon); Point & foundCel, Sint32 & foundIcon);
bool SearchOtherDrapeau ( bool SearchOtherDrapeau (
Sint32 rank, POINT initCel, Sint32 distMax, POINT & foundCel, Sint32 rank, Point initCel, Sint32 distMax, Point & foundCel,
Sint32 & foundIcon); Sint32 & foundIcon);
bool SearchOtherBateau ( bool SearchOtherBateau (
Sint32 rank, POINT initCel, Sint32 distMax, POINT & foundCel, Sint32 rank, Point initCel, Sint32 distMax, Point & foundCel,
Sint32 & foundIcon); Sint32 & foundIcon);
bool IsSpiderObject (Sint32 icon); bool IsSpiderObject (Sint32 icon);
bool SearchSpiderObject ( bool SearchSpiderObject (
Sint32 rank, POINT initCel, Sint32 distMax, POINT & foundCel, Sint32 rank, Point initCel, Sint32 distMax, Point & foundCel,
Sint32 & foundIcon); Sint32 & foundIcon);
bool IsTracksObject (Sint32 icon); bool IsTracksObject (Sint32 icon);
bool SearchTracksObject ( bool SearchTracksObject (
Sint32 rank, POINT initCel, Sint32 distMax, POINT & foundCel, Sint32 rank, Point initCel, Sint32 distMax, Point & foundCel,
Sint32 & foundIcon); Sint32 & foundIcon);
bool IsRobotObject (Sint32 icon); bool IsRobotObject (Sint32 icon);
bool SearchRobotObject ( bool SearchRobotObject (
Sint32 rank, POINT initCel, Sint32 distMax, POINT & foundCel, Sint32 rank, Point initCel, Sint32 distMax, Point & foundCel,
Sint32 & foundIcon, Sint32 & foundAction); Sint32 & foundIcon, Sint32 & foundAction);
bool IsBombeObject (Sint32 icon); bool IsBombeObject (Sint32 icon);
bool SearchBombeObject ( bool SearchBombeObject (
Sint32 rank, POINT initCel, Sint32 distMax, POINT & foundCel, Sint32 rank, Point initCel, Sint32 distMax, Point & foundCel,
Sint32 & foundIcon); Sint32 & foundIcon);
bool SearchElectroObject ( bool SearchElectroObject (
Sint32 rank, POINT initCel, Sint32 distMax, POINT & foundCel, Sint32 rank, Point initCel, Sint32 distMax, Point & foundCel,
Sint32 & foundIcon); Sint32 & foundIcon);
bool IsUsineBuild (Sint32 rank, POINT cel); bool IsUsineBuild (Sint32 rank, Point cel);
bool IsUsineFree (Sint32 rank, POINT cel); bool IsUsineFree (Sint32 rank, Point cel);
bool IsFireCel (POINT cel); bool IsFireCel (Point cel);
bool IsVirusCel (POINT cel); bool IsVirusCel (Point cel);
Errors IsBuildPont (POINT & cel, Sint32 & iconBuild); Errors IsBuildPont (Point & cel, Sint32 & iconBuild);
bool IsBuildBateau (POINT cel, Sint32 & direct); bool IsBuildBateau (Point cel, Sint32 & direct);
void InitDrapeau (); void InitDrapeau ();
void AddDrapeau (POINT cel); void AddDrapeau (Point cel);
void SubDrapeau (POINT cel); void SubDrapeau (Point cel);
bool TestDrapeau (POINT cel); bool TestDrapeau (Point cel);
// DecBlupi.cpp // DecBlupi.cpp
void BlupiFlush (); void BlupiFlush ();
Sint32 BlupiCreate ( Sint32 BlupiCreate (
POINT cel, Sint32 action, Sint32 direct, Sint32 perso, Sint32 energy); Point cel, Sint32 action, Sint32 direct, Sint32 perso, Sint32 energy);
bool BlupiDelete (POINT cel, Sint32 perso = -1); bool BlupiDelete (Point cel, Sint32 perso = -1);
void BlupiDelete (Sint32 rank); void BlupiDelete (Sint32 rank);
void BlupiKill (Sint32 exRank, POINT cel, Sint32 type); void BlupiKill (Sint32 exRank, Point cel, Sint32 type);
bool BlupiIfExist (Sint32 rank); bool BlupiIfExist (Sint32 rank);
void BlupiCheat (Sint32 cheat); void BlupiCheat (Sint32 cheat);
void BlupiActualise (Sint32 rank); void BlupiActualise (Sint32 rank);
void BlupiAdaptIcon (Sint32 rank); void BlupiAdaptIcon (Sint32 rank);
void BlupiPushFog (Sint32 rank); void BlupiPushFog (Sint32 rank);
void BlupiSound (Sint32 rank, Sounds sound, POINT pos, bool bStop = false); void BlupiSound (Sint32 rank, Sounds sound, Point pos, bool bStop = false);
void BlupiInitAction (Sint32 rank, Sint32 action, Sint32 direct = -1); void BlupiInitAction (Sint32 rank, Sint32 action, Sint32 direct = -1);
void BlupiChangeAction (Sint32 rank, Sint32 action, Sint32 direct = -1); void BlupiChangeAction (Sint32 rank, Sint32 action, Sint32 direct = -1);
void ListFlush (Sint32 rank); void ListFlush (Sint32 rank);
Sint32 ListGetParam (Sint32 rank, Buttons button, POINT cel); Sint32 ListGetParam (Sint32 rank, Buttons button, Point cel);
bool ListPut (Sint32 rank, Buttons button, POINT cel, POINT cMem); bool ListPut (Sint32 rank, Buttons button, Point cel, Point cMem);
void ListRemove (Sint32 rank); void ListRemove (Sint32 rank);
Sint32 ListSearch ( Sint32 ListSearch (
Sint32 rank, Buttons button, POINT cel, const char *& textForButton); Sint32 rank, Buttons button, Point cel, const char *& textForButton);
bool RepeatAdjust ( bool RepeatAdjust (
Sint32 rank, Sint32 button, POINT & cel, POINT & cMem, Sint32 param, Sint32 rank, Sint32 button, Point & cel, Point & cMem, Sint32 param,
Sint32 list); Sint32 list);
void GoalStart (Sint32 rank, Sint32 action, POINT cel); void GoalStart (Sint32 rank, Sint32 action, Point cel);
bool GoalNextPhase (Sint32 rank); bool GoalNextPhase (Sint32 rank);
void SetTotalTime (Sint32 total); void SetTotalTime (Sint32 total);
Sint32 GetTotalTime (); Sint32 GetTotalTime ();
@ -287,35 +287,35 @@ public:
bool GoalNextOp (Sint32 rank, Sint16 * pTable); bool GoalNextOp (Sint32 rank, Sint16 * pTable);
void GoalUnwork (Sint32 rank); void GoalUnwork (Sint32 rank);
void GoalStop (Sint32 rank, bool bError = false, bool bSound = true); void GoalStop (Sint32 rank, bool bError = false, bool bSound = true);
bool BlupiIsGoalUsed (POINT cel); bool BlupiIsGoalUsed (Point cel);
void BlupiStartStopRayon (Sint32 rank, POINT startCel, POINT endCel); void BlupiStartStopRayon (Sint32 rank, Point startCel, Point endCel);
bool BlupiRotate (Sint32 rank); bool BlupiRotate (Sint32 rank);
bool BlupiNextAction (Sint32 rank); bool BlupiNextAction (Sint32 rank);
void BlupiNextGoal (Sint32 rank); void BlupiNextGoal (Sint32 rank);
void BlupiStep (bool bFirst); void BlupiStep (bool bFirst);
void BlupiGetRect (Sint32 rank, RECT & rect); void BlupiGetRect (Sint32 rank, Rect & rect);
Sint32 GetTargetBlupi (POINT pos); Sint32 GetTargetBlupi (Point pos);
void BlupiDeselect (); void BlupiDeselect ();
void BlupiDeselect (Sint32 rank); void BlupiDeselect (Sint32 rank);
void BlupiSetArrow (Sint32 rank, bool bArrow); void BlupiSetArrow (Sint32 rank, bool bArrow);
void InitOutlineRect (); void InitOutlineRect ();
void BlupiHiliDown (POINT pos, bool bAdd = false); void BlupiHiliDown (Point pos, bool bAdd = false);
void BlupiHiliMove (POINT pos); void BlupiHiliMove (Point pos);
void BlupiHiliUp (POINT pos); void BlupiHiliUp (Point pos);
void BlupiDrawHili (); void BlupiDrawHili ();
Buttons GetDefButton (POINT cel); Buttons GetDefButton (Point cel);
bool BlupiGoal (Sint32 rank, Buttons button, POINT cel, POINT cMem); bool BlupiGoal (Sint32 rank, Buttons button, Point cel, Point cMem);
void BlupiGoal (POINT cel, Buttons button); void BlupiGoal (Point cel, Buttons button);
void BlupiDestCel (Sint32 rank); void BlupiDestCel (Sint32 rank);
bool IsTracksHere (POINT cel, bool bSkipInMove); bool IsTracksHere (Point cel, bool bSkipInMove);
bool IsBlupiHereEx (POINT cel1, POINT cel2, Sint32 exRank, bool bSkipInMove); bool IsBlupiHereEx (Point cel1, Point cel2, Sint32 exRank, bool bSkipInMove);
bool IsBlupiHereEx (POINT cel, Sint32 exRank, bool bSkipInMove); bool IsBlupiHereEx (Point cel, Sint32 exRank, bool bSkipInMove);
bool IsBlupiHere (POINT cel, bool bSkipInMove); bool IsBlupiHere (Point cel, bool bSkipInMove);
bool IsBlupiHere (POINT cel, Sint32 direct, bool bSkipInMove); bool IsBlupiHere (Point cel, Sint32 direct, bool bSkipInMove);
void GetLevelJauge (Sint32 * pLevels, Sint32 * pTypes); void GetLevelJauge (Sint32 * pLevels, Sint32 * pTypes);
bool IsWorkBlupi (Sint32 rank); bool IsWorkBlupi (Sint32 rank);
void BlupiGetButtons ( void BlupiGetButtons (
POINT pos, Sint32 & nb, Buttons * pButtons, Errors * pErrors, Point pos, Sint32 & nb, Buttons * pButtons, Errors * pErrors,
std::unordered_map<Sint32, const char *> & texts, Sint32 & perso); std::unordered_map<Sint32, const char *> & texts, Sint32 & perso);
void TerminatedInit (); void TerminatedInit ();
Sint32 IsTerminated (); Sint32 IsTerminated ();
@ -326,20 +326,20 @@ public:
Sint32 MoveMaxFire (); Sint32 MoveMaxFire ();
void MoveFixInit (); void MoveFixInit ();
bool MoveCreate ( bool MoveCreate (
POINT cel, Sint32 rankBlupi, bool bFloor, Sint32 channel, Sint32 icon, Point cel, Sint32 rankBlupi, bool bFloor, Sint32 channel, Sint32 icon,
Sint32 maskChannel, Sint32 maskIcon, Sint32 total, Sint32 delai, Sint32 maskChannel, Sint32 maskIcon, Sint32 total, Sint32 delai,
Sint32 stepY, bool bMisc = false, bool bNotIfExist = false); Sint32 stepY, bool bMisc = false, bool bNotIfExist = false);
bool MoveAddMoves (POINT cel, Sint32 rankMoves); bool MoveAddMoves (Point cel, Sint32 rankMoves);
bool MoveAddIcons (POINT cel, Sint32 rankIcons, bool bContinue = false); bool MoveAddIcons (Point cel, Sint32 rankIcons, bool bContinue = false);
bool MoveStartFire (POINT cel); bool MoveStartFire (Point cel);
void MoveProxiFire (POINT cel); void MoveProxiFire (Point cel);
void MoveFire (Sint32 rank); void MoveFire (Sint32 rank);
void MoveStep (bool bFirst); void MoveStep (bool bFirst);
void MoveFinish (POINT cel); void MoveFinish (Point cel);
void MoveFinish (Sint32 rankBlupi); void MoveFinish (Sint32 rankBlupi);
bool MoveIsUsed (POINT cel); bool MoveIsUsed (Point cel);
bool MoveGetObject (POINT cel, Sint32 & channel, Sint32 & icon); bool MoveGetObject (Point cel, Sint32 & channel, Sint32 & icon);
bool MovePutObject (POINT cel, Sint32 channel, Sint32 icon); bool MovePutObject (Point cel, Sint32 channel, Sint32 icon);
// DecIO.cpp // DecIO.cpp
bool Write (Sint32 rank, bool bUser, Sint32 world, Sint32 time, Sint32 total); bool Write (Sint32 rank, bool bUser, Sint32 world, Sint32 time, Sint32 total);
@ -351,10 +351,10 @@ public:
// DecMap.cpp // DecMap.cpp
void MapInitColors (); void MapInitColors ();
POINT ConvCelToMap (POINT cel); Point ConvCelToMap (Point cel);
POINT ConvMapToCel (POINT pos); Point ConvMapToCel (Point pos);
bool MapMove (POINT pos); bool MapMove (Point pos);
void MapPutCel (POINT pos); void MapPutCel (Point pos);
bool GenerateMap (); bool GenerateMap ();
// DecStat.cpp // DecStat.cpp
@ -364,27 +364,27 @@ public:
Sint32 StatisticGetFire (); Sint32 StatisticGetFire ();
void StatisticDraw (); void StatisticDraw ();
void GenerateStatictic (); void GenerateStatictic ();
bool StatisticDown (POINT pos); bool StatisticDown (Point pos);
bool StatisticMove (POINT pos); bool StatisticMove (Point pos);
bool StatisticUp (POINT pos); bool StatisticUp (Point pos);
Sint32 StatisticDetect (POINT pos); Sint32 StatisticDetect (Point pos);
// Chemin.cpp // Chemin.cpp
void CheminMemPos (Sint32 exRank); void CheminMemPos (Sint32 exRank);
bool CheminTestPos (POINT pos, Sint32 & rank); bool CheminTestPos (Point pos, Sint32 & rank);
Sint32 CheminARebours (Sint32 rank); Sint32 CheminARebours (Sint32 rank);
void CheminFillTerrain (Sint32 rank); void CheminFillTerrain (Sint32 rank);
bool CheminTestDirection ( bool CheminTestDirection (
Sint32 rank, Sint32 pos, Sint32 dir, Sint32 & next, Sint32 & ampli, Sint32 rank, Sint32 pos, Sint32 dir, Sint32 & next, Sint32 & ampli,
Sint32 & cout, Sint32 & action); Sint32 & cout, Sint32 & action);
bool CheminCherche (Sint32 rank, Sint32 & action); bool CheminCherche (Sint32 rank, Sint32 & action);
bool IsCheminFree (Sint32 rank, POINT dest, Sint32 button); bool IsCheminFree (Sint32 rank, Point dest, Sint32 button);
// Decor.cpp // Decor.cpp
void SetShiftOffset (POINT offset); void SetShiftOffset (Point offset);
POINT ConvCelToPos (POINT cel); Point ConvCelToPos (Point cel);
POINT ConvPosToCel (POINT pos, bool bMap = false); Point ConvPosToCel (Point pos, bool bMap = false);
POINT ConvPosToCel2 (POINT pos); Point ConvPosToCel2 (Point pos);
void Create (CSound * pSound, CPixmap * pPixmap); void Create (CSound * pSound, CPixmap * pPixmap);
void Init (Sint32 channel, Sint32 icon); void Init (Sint32 channel, Sint32 icon);
@ -400,15 +400,15 @@ public:
bool GetSuper (); bool GetSuper ();
void SetSuper (bool bSuper); void SetSuper (bool bSuper);
void FlipOutline (); void FlipOutline ();
bool PutFloor (POINT cel, Sint32 channel, Sint32 icon); bool PutFloor (Point cel, Sint32 channel, Sint32 icon);
bool PutObject (POINT cel, Sint32 channel, Sint32 icon); bool PutObject (Point cel, Sint32 channel, Sint32 icon);
bool GetFloor (POINT cel, Sint32 & channel, Sint32 & icon); bool GetFloor (Point cel, Sint32 & channel, Sint32 & icon);
bool GetObject (POINT cel, Sint32 & channel, Sint32 & icon); bool GetObject (Point cel, Sint32 & channel, Sint32 & icon);
bool SetFire (POINT cel, bool bFire); bool SetFire (Point cel, bool bFire);
void SetCoin (POINT coin, bool bCenter = false); void SetCoin (Point coin, bool bCenter = false);
POINT GetCoin (); Point GetCoin ();
POINT GetHome (); Point GetHome ();
void MemoPos (Sint32 rank, bool bRecord); void MemoPos (Sint32 rank, bool bRecord);
void SetTime (Sint32 time); void SetTime (Sint32 time);
@ -431,22 +431,22 @@ public:
char * GetButtonExist (); char * GetButtonExist ();
void BuildPutBlupi (); void BuildPutBlupi ();
void BuildMoveFloor (Sint32 x, Sint32 y, POINT pos, Sint32 rank); void BuildMoveFloor (Sint32 x, Sint32 y, Point pos, Sint32 rank);
void BuildMoveObject (Sint32 x, Sint32 y, POINT pos, Sint32 rank); void BuildMoveObject (Sint32 x, Sint32 y, Point pos, Sint32 rank);
void BuildGround (RECT clip); void BuildGround (Rect clip);
void Build (RECT clip, POINT posMouse); void Build (Rect clip, Point posMouse);
void NextPhase (Sint32 mode); void NextPhase (Sint32 mode);
Sint32 CountFloor (Sint32 channel, Sint32 icon); Sint32 CountFloor (Sint32 channel, Sint32 icon);
Errors CelOkForAction ( Errors CelOkForAction (
POINT cel, Sint32 action, Sint32 rank, Sint32 icons[4][4], Point cel, Sint32 action, Sint32 rank, Sint32 icons[4][4],
POINT & celOutline1, POINT & celOutline2); Point & celOutline1, Point & celOutline2);
Errors CelOkForAction (POINT cel, Sint32 action, Sint32 rank); Errors CelOkForAction (Point cel, Sint32 action, Sint32 rank);
Sint32 GetHiliRankBlupi (Sint32 nb); Sint32 GetHiliRankBlupi (Sint32 nb);
void CelHili (POINT pos, Sint32 action); void CelHili (Point pos, Sint32 action);
void CelHiliButton (POINT cel, Sint32 button); void CelHiliButton (Point cel, Sint32 button);
void CelHiliRepeat (Sint32 list); void CelHiliRepeat (Sint32 list);
const char * GetResHili (POINT posMouse); const char * GetResHili (Point posMouse);
void HideTooltips (bool bHide); void HideTooltips (bool bHide);
void UndoOpen (); void UndoOpen ();
@ -456,7 +456,7 @@ public:
bool IsUndo (); bool IsUndo ();
protected: protected:
bool GetSeeBits (POINT cel, char * pBits, Sint32 index); bool GetSeeBits (Point cel, char * pBits, Sint32 index);
Sint32 GetSeeIcon (char * pBits, Sint32 index); Sint32 GetSeeIcon (char * pBits, Sint32 index);
protected: protected:
@ -467,17 +467,17 @@ protected:
Sint16 m_rankBlupi[MAXCELX][MAXCELY]; Sint16 m_rankBlupi[MAXCELX][MAXCELY];
Blupi m_blupi[MAXBLUPI]; Blupi m_blupi[MAXBLUPI];
Move m_move[MAXMOVE]; Move m_move[MAXMOVE];
POINT m_celCoin; // cellule sup/gauche Point m_celCoin; // cellule sup/gauche
POINT m_celHome; // pour touche Home Point m_celHome; // pour touche Home
POINT m_celHili; Point m_celHili;
POINT m_celOutline1; Point m_celOutline1;
POINT m_celOutline2; Point m_celOutline2;
POINT m_shiftOffset; Point m_shiftOffset;
Sint32 m_iconHili[4][4]; Sint32 m_iconHili[4][4];
Sint32 m_rankHili; // rang du blupi visé Sint32 m_rankHili; // rang du blupi visé
bool m_bHiliRect; bool m_bHiliRect;
POINT m_p1Hili; // coins rectangle de sélection Point m_p1Hili; // coins rectangle de sélection
POINT m_p2Hili; Point m_p2Hili;
Sint32 m_shiftHili; Sint32 m_shiftHili;
Sint32 m_nbBlupiHili; // nb de blupi sélectionnés Sint32 m_nbBlupiHili; // nb de blupi sélectionnés
Sint32 m_rankBlupiHili; // rang blupi sélectionné Sint32 m_rankBlupiHili; // rang blupi sélectionné
@ -491,7 +491,7 @@ protected:
Sint32 m_timeFlipOutline; // temps quand basculer mode outline Sint32 m_timeFlipOutline; // temps quand basculer mode outline
Sint32 m_totalTime; // temps total passé sur une partie Sint32 m_totalTime; // temps total passé sur une partie
Sint32 m_phase; // phase pour la carte Sint32 m_phase; // phase pour la carte
POINT m_celArrow; // cellule avec flèche Point m_celArrow; // cellule avec flèche
bool m_bOutline; bool m_bOutline;
bool m_bGroundRedraw; bool m_bGroundRedraw;
char m_buttonExist[MAXBUTTON]; char m_buttonExist[MAXBUTTON];
@ -524,19 +524,19 @@ protected:
Sint32 m_region; // numéro région (*) Sint32 m_region; // numéro région (*)
Sint32 m_lastRegion; // numéro dernière région Sint32 m_lastRegion; // numéro dernière région
Sint32 m_blupiHere; Sint32 m_blupiHere;
POINT m_lastDrapeau[MAXLASTDRAPEAU]; Point m_lastDrapeau[MAXLASTDRAPEAU];
bool m_bHideTooltips; // true -> menu présent bool m_bHideTooltips; // true -> menu présent
char m_text[50]; char m_text[50];
POINT m_textLastPos; Point m_textLastPos;
Sint32 m_textCount; Sint32 m_textCount;
Sint32 m_skill; Sint32 m_skill;
bool m_bInfo; bool m_bInfo;
Sint32 m_infoHeight; Sint32 m_infoHeight;
POINT m_memoPos[4]; Point m_memoPos[4];
Uint8 m_cheminWork[MAXCELX * MAXCELY]; Uint8 m_cheminWork[MAXCELX * MAXCELY];
Sint32 m_cheminNbPos; Sint32 m_cheminNbPos;
POINT m_cheminPos[MAXBLUPI * 2]; Point m_cheminPos[MAXBLUPI * 2];
Sint32 m_cheminRank[MAXBLUPI * 2]; Sint32 m_cheminRank[MAXBLUPI * 2];
bool m_bFillFloor; bool m_bFillFloor;
@ -557,10 +557,10 @@ protected:
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
POINT GetCel (Sint32 x, Sint32 y); Point GetCel (Sint32 x, Sint32 y);
POINT GetCel (POINT cel, Sint32 x, Sint32 y); Point GetCel (Point cel, Sint32 x, Sint32 y);
bool IsValid (POINT cel); bool IsValid (Point cel);
POINT GetVector (Sint32 direct); Point GetVector (Sint32 direct);
extern Sint32 table_multi_goal[]; extern Sint32 table_multi_goal[];
extern const Sint16 table_actions[]; extern const Sint16 table_actions[];

View File

@ -643,8 +643,8 @@ CDecor::StatisticGetFire ()
void void
CDecor::StatisticDraw () CDecor::StatisticDraw ()
{ {
POINT pos; Point pos;
RECT rect; Rect rect;
Sint32 rank, icon, nb; Sint32 rank, icon, nb;
Statistic * pStatistic; Statistic * pStatistic;
char text[50]; char text[50];
@ -779,10 +779,10 @@ CDecor::GenerateStatictic ()
// Bouton pressé dans les statistiques. // Bouton pressé dans les statistiques.
bool bool
CDecor::StatisticDown (POINT pos) CDecor::StatisticDown (Point pos)
{ {
Sint32 hili, rank, x, y, show, icon; Sint32 hili, rank, x, y, show, icon;
POINT cel; Point cel;
Statistic * pStatistic; Statistic * pStatistic;
StatisticUpdate (); StatisticUpdate ();
@ -964,7 +964,7 @@ select:
// Souris déplacée dans les statistiques. // Souris déplacée dans les statistiques.
bool bool
CDecor::StatisticMove (POINT pos) CDecor::StatisticMove (Point pos)
{ {
Sint32 rank; Sint32 rank;
@ -979,7 +979,7 @@ CDecor::StatisticMove (POINT pos)
// Bouton relâché dans les statistiques. // Bouton relâché dans les statistiques.
bool bool
CDecor::StatisticUp (POINT pos) CDecor::StatisticUp (Point pos)
{ {
return false; return false;
} }
@ -987,7 +987,7 @@ CDecor::StatisticUp (POINT pos)
// Détecte dans quelle statistique est la souris. // Détecte dans quelle statistique est la souris.
Sint32 Sint32
CDecor::StatisticDetect (POINT pos) CDecor::StatisticDetect (Point pos)
{ {
Sint32 rank; Sint32 rank;

View File

@ -1605,10 +1605,10 @@ CEvent::~CEvent ()
// Retourne la position de la souris. // Retourne la position de la souris.
POINT Point
CEvent::GetMousePos () CEvent::GetMousePos ()
{ {
POINT pos; Point pos;
Sint32 x, y; Sint32 x, y;
SDL_GetMouseState (&x, &y); SDL_GetMouseState (&x, &y);
@ -1697,7 +1697,7 @@ void
CEvent::Create ( CEvent::Create (
CPixmap * pPixmap, CDecor * pDecor, CSound * pSound, CMovie * pMovie) CPixmap * pPixmap, CDecor * pDecor, CSound * pSound, CMovie * pMovie)
{ {
POINT pos; Point pos;
m_pPixmap = pPixmap; m_pPixmap = pPixmap;
m_pDecor = pDecor; m_pDecor = pDecor;
@ -1836,7 +1836,7 @@ bool
CEvent::CreateButtons () CEvent::CreateButtons ()
{ {
Sint32 i = 0, message; Sint32 i = 0, message;
POINT pos; Point pos;
if (m_index < 0) if (m_index < 0)
return false; return false;
@ -1901,7 +1901,7 @@ CEvent::SetUpdateVersion (const std::string & version)
void void
CEvent::DrawTextCenter (const char * text, Sint32 x, Sint32 y, Sint32 font) CEvent::DrawTextCenter (const char * text, Sint32 x, Sint32 y, Sint32 font)
{ {
POINT pos; Point pos;
pos.x = x; pos.x = x;
pos.y = y; pos.y = y;
::DrawTextCenter (m_pPixmap, pos, text, font); ::DrawTextCenter (m_pPixmap, pos, text, font);
@ -1918,8 +1918,8 @@ CEvent::DrawButtons ()
Sint32 world, time, lg, button, volume, pente, icon; Sint32 world, time, lg, button, volume, pente, icon;
char res[100]; char res[100];
char text[100]; char text[100];
POINT pos; Point pos;
RECT rect; Rect rect;
bool bEnable; bool bEnable;
if ( if (
@ -2573,7 +2573,7 @@ CEvent::DrawButtons ()
// Retourne le lutin à utiliser à une position donnée. // Retourne le lutin à utiliser à une position donnée.
MouseSprites MouseSprites
CEvent::MousePosToSprite (POINT pos) CEvent::MousePosToSprite (Point pos)
{ {
MouseSprites sprite; MouseSprites sprite;
bool bUp = false, bDown = false, bLeft = false, bRight = false; bool bUp = false, bDown = false, bLeft = false, bRight = false;
@ -2645,7 +2645,7 @@ CEvent::MousePosToSprite (POINT pos)
// Gère le lutin de la souris. // Gère le lutin de la souris.
void void
CEvent::MouseSprite (POINT pos) CEvent::MouseSprite (Point pos)
{ {
m_mouseSprite = MousePosToSprite (pos); m_mouseSprite = MousePosToSprite (pos);
m_pPixmap->ChangeSprite (m_mouseSprite); m_pPixmap->ChangeSprite (m_mouseSprite);
@ -2691,9 +2691,9 @@ CEvent::HideMouse (bool bHide)
// Traite les événements pour tous les boutons. // Traite les événements pour tous les boutons.
bool bool
CEvent::EventButtons (const SDL_Event & event, POINT pos) CEvent::EventButtons (const SDL_Event & event, Point pos)
{ {
POINT test; Point test;
Sint32 lg; Sint32 lg;
Sounds sound; Sounds sound;
@ -2852,7 +2852,7 @@ CEvent::EventButtons (const SDL_Event & event, POINT pos)
// Indique si la souris est sur un bouton. // Indique si la souris est sur un bouton.
bool bool
CEvent::MouseOnButton (POINT pos) CEvent::MouseOnButton (Point pos)
{ {
Sint32 i; Sint32 i;
@ -2947,7 +2947,7 @@ bool
CEvent::ChangePhase (Uint32 phase) CEvent::ChangePhase (Uint32 phase)
{ {
Sint32 index, world, time, total, music, i, max; Sint32 index, world, time, total, music, i, max;
POINT totalDim, iconDim; Point totalDim, iconDim;
std::string filename; std::string filename;
char * pButtonExist; char * pButtonExist;
bool bEnable, bHide; bool bEnable, bHide;
@ -3335,7 +3335,7 @@ CEvent::MovieToStart ()
void void
CEvent::DecorShift (Sint32 dx, Sint32 dy) CEvent::DecorShift (Sint32 dx, Sint32 dy)
{ {
POINT coin; Point coin;
if (m_phase != EV_PHASE_PLAY && m_phase != EV_PHASE_BUILD) if (m_phase != EV_PHASE_PLAY && m_phase != EV_PHASE_BUILD)
return; return;
@ -3355,7 +3355,7 @@ void
CEvent::DecorAutoShift () CEvent::DecorAutoShift ()
{ {
Sint32 max; Sint32 max;
POINT offset; Point offset;
m_bShift = false; m_bShift = false;
@ -3469,13 +3469,13 @@ CEvent::IsShift ()
// Modifie le décor lorsque le bouton de la souris est pressé. // Modifie le décor lorsque le bouton de la souris est pressé.
bool bool
CEvent::PlayDown (POINT pos, const SDL_Event & event) CEvent::PlayDown (Point pos, const SDL_Event & event)
{ {
bool bDecor = false; bool bDecor = false;
bool bMap = false; bool bMap = false;
Sint32 rank, h; Sint32 rank, h;
Buttons button; Buttons button;
POINT cel; Point cel;
m_pDecor->BlupiSetArrow (0, false); // enlève toutes les flèches m_pDecor->BlupiSetArrow (0, false); // enlève toutes les flèches
@ -3542,7 +3542,7 @@ CEvent::PlayDown (POINT pos, const SDL_Event & event)
// Modifie le décor lorsque la souris est déplacée. // Modifie le décor lorsque la souris est déplacée.
bool bool
CEvent::PlayMove (POINT pos) CEvent::PlayMove (Point pos)
{ {
if (m_bMenu) if (m_bMenu)
{ {
@ -3573,7 +3573,7 @@ CEvent::PlayMove (POINT pos)
// Modifie le décor lorsque le bouton de la souris est relâché. // Modifie le décor lorsque le bouton de la souris est relâché.
bool bool
CEvent::PlayUp (POINT pos) CEvent::PlayUp (Point pos)
{ {
static Sounds table_sound_boing[] = { static Sounds table_sound_boing[] = {
SOUND_BOING1, SOUND_BOING2, SOUND_BOING3, SOUND_BOING1, SOUND_BOING2, SOUND_BOING3,
@ -3859,7 +3859,7 @@ CEvent::ChangeButtons (Sint32 message)
// Met un sol si nécessaire sous un objet. // Met un sol si nécessaire sous un objet.
void void
CEvent::BuildFloor (POINT cel, Sint32 insIcon) CEvent::BuildFloor (Point cel, Sint32 insIcon)
{ {
Sint32 iFloor, channel, icon; Sint32 iFloor, channel, icon;
@ -3913,7 +3913,7 @@ CEvent::BuildFloor (POINT cel, Sint32 insIcon)
// Enlève si nécessaire un objet sur l'eau. // Enlève si nécessaire un objet sur l'eau.
void void
CEvent::BuildWater (POINT cel, Sint32 insIcon) CEvent::BuildWater (Point cel, Sint32 insIcon)
{ {
Sint32 channel, icon; Sint32 channel, icon;
@ -3966,9 +3966,9 @@ static Sint32 tableHome[] = {
// Modifie le décor lorsque le bouton de la souris est pressé. // Modifie le décor lorsque le bouton de la souris est pressé.
bool bool
CEvent::BuildDown (POINT pos, Uint16 mod, bool bMix) CEvent::BuildDown (Point pos, Uint16 mod, bool bMix)
{ {
POINT cel; Point cel;
Sint32 menu, channel, icon; Sint32 menu, channel, icon;
if (bMix && m_pDecor->MapMove (pos)) if (bMix && m_pDecor->MapMove (pos))
@ -4126,7 +4126,7 @@ CEvent::BuildDown (POINT pos, Uint16 mod, bool bMix)
// Modifie le décor lorsque la souris est déplacée. // Modifie le décor lorsque la souris est déplacée.
bool bool
CEvent::BuildMove (POINT pos, Uint16 mod, const SDL_Event & event) CEvent::BuildMove (Point pos, Uint16 mod, const SDL_Event & event)
{ {
if (event.motion.state & SDL_BUTTON (SDL_BUTTON_LEFT)) // bouton souris pressé if (event.motion.state & SDL_BUTTON (SDL_BUTTON_LEFT)) // bouton souris pressé
// ? // ?
@ -4145,7 +4145,7 @@ CEvent::BuildMove (POINT pos, Uint16 mod, const SDL_Event & event)
bool bool
CEvent::StartMovie (const std::string & pFilename) CEvent::StartMovie (const std::string & pFilename)
{ {
RECT rect; Rect rect;
if (!m_pMovie->GetEnable ()) if (!m_pMovie->GetEnable ())
return false; return false;
@ -4829,7 +4829,7 @@ CEvent::DemoStep ()
if (message == EV_MOUSEMOVE || event.type == SDL_MOUSEMOTION) if (message == EV_MOUSEMOVE || event.type == SDL_MOUSEMOTION)
{ {
POINT pos; Point pos;
if (m_pDemoBuffer) if (m_pDemoBuffer)
pos = ConvLongToPos (lParam); pos = ConvLongToPos (lParam);
@ -4907,7 +4907,7 @@ CEvent::DemoRecEvent (const SDL_Event & event)
// Retourne la dernière position de la souris. // Retourne la dernière position de la souris.
POINT Point
CEvent::GetLastMousePos () CEvent::GetLastMousePos ()
{ {
return m_oldMousePos; return m_oldMousePos;
@ -4940,7 +4940,7 @@ CEvent::TreatEvent (const SDL_Event & event)
bool bool
CEvent::TreatEventBase (const SDL_Event & event) CEvent::TreatEventBase (const SDL_Event & event)
{ {
POINT pos; Point pos;
Sint32 i; Sint32 i;
Sounds sound; Sounds sound;
char c; char c;

View File

@ -88,7 +88,7 @@ public:
CEvent (); CEvent ();
~CEvent (); ~CEvent ();
POINT GetMousePos (); Point GetMousePos ();
void void
Create (CPixmap * pPixmap, CDecor * pDecor, CSound * pSound, CMovie * pMovie); Create (CPixmap * pPixmap, CDecor * pDecor, CSound * pSound, CMovie * pMovie);
void SetFullScreen (bool bFullScreen); void SetFullScreen (bool bFullScreen);
@ -112,11 +112,11 @@ public:
void SetMenu (Sint32 button, Sint32 menu); void SetMenu (Sint32 button, Sint32 menu);
bool DrawButtons (); bool DrawButtons ();
MouseSprites MousePosToSprite (POINT pos); MouseSprites MousePosToSprite (Point pos);
void MouseSprite (POINT pos); void MouseSprite (Point pos);
void WaitMouse (bool bWait); void WaitMouse (bool bWait);
void HideMouse (bool bHide); void HideMouse (bool bHide);
POINT GetLastMousePos (); Point GetLastMousePos ();
bool TreatEvent (const SDL_Event & event); bool TreatEvent (const SDL_Event & event);
bool TreatEventBase (const SDL_Event & event); bool TreatEventBase (const SDL_Event & event);
@ -146,24 +146,24 @@ public:
protected: protected:
void DrawTextCenter (const char * text, Sint32 x, Sint32 y, Sint32 font = 0); void DrawTextCenter (const char * text, Sint32 x, Sint32 y, Sint32 font = 0);
bool CreateButtons (); bool CreateButtons ();
bool EventButtons (const SDL_Event & event, POINT pos); bool EventButtons (const SDL_Event & event, Point pos);
bool MouseOnButton (POINT pos); bool MouseOnButton (Point pos);
Sint32 SearchPhase (Uint32 phase); Sint32 SearchPhase (Uint32 phase);
void DecorShift (Sint32 dx, Sint32 dy); void DecorShift (Sint32 dx, Sint32 dy);
bool PlayDown (POINT pos, const SDL_Event & event); bool PlayDown (Point pos, const SDL_Event & event);
bool PlayMove (POINT pos); bool PlayMove (Point pos);
bool PlayUp (POINT pos); bool PlayUp (Point pos);
void SetLanguage (); void SetLanguage ();
void SetWindowSize (Uint8 prevScale, Uint8 newScale); void SetWindowSize (Uint8 prevScale, Uint8 newScale);
void ChangeButtons (Sint32 message); void ChangeButtons (Sint32 message);
void BuildFloor (POINT cel, Sint32 insIcon); void BuildFloor (Point cel, Sint32 insIcon);
void BuildWater (POINT cel, Sint32 insIcon); void BuildWater (Point cel, Sint32 insIcon);
bool BuildDown (POINT pos, Uint16 mod, bool bMix = true); bool BuildDown (Point pos, Uint16 mod, bool bMix = true);
bool BuildMove (POINT pos, Uint16 mod, const SDL_Event & event); bool BuildMove (Point pos, Uint16 mod, const SDL_Event & event);
void PrivateLibelle (); void PrivateLibelle ();
bool ReadLibelle (Sint32 world, bool bSchool, bool bHelp); bool ReadLibelle (Sint32 world, bool bSchool, bool bHelp);
@ -208,19 +208,19 @@ protected:
CJauge m_jauges[2]; CJauge m_jauges[2];
CMenu m_menu; CMenu m_menu;
bool m_bMenu; bool m_bMenu;
POINT m_menuPos; Point m_menuPos;
Sint32 m_menuNb; Sint32 m_menuNb;
Buttons m_menuButtons[MAXBUTTON]; Buttons m_menuButtons[MAXBUTTON];
Errors m_menuErrors[MAXBUTTON]; Errors m_menuErrors[MAXBUTTON];
std::unordered_map<Sint32, const char *> m_menuTexts; std::unordered_map<Sint32, const char *> m_menuTexts;
Sint32 m_menuPerso; Sint32 m_menuPerso;
POINT m_menuCel; Point m_menuCel;
POINT m_oldMousePos; Point m_oldMousePos;
bool m_bMouseDown; bool m_bMouseDown;
bool m_bHili; bool m_bHili;
Sint32 m_fileWorld[10]; Sint32 m_fileWorld[10];
Sint32 m_fileTime[10]; Sint32 m_fileTime[10];
POINT m_posToolTips; Point m_posToolTips;
char m_textToolTips[50]; char m_textToolTips[50];
MouseSprites m_mouseSprite; MouseSprites m_mouseSprite;
bool m_bFillMouse; bool m_bFillMouse;
@ -237,13 +237,13 @@ protected:
bool m_bPause; bool m_bPause;
bool m_bShift; bool m_bShift;
Sint32 m_shiftPhase; Sint32 m_shiftPhase;
POINT m_shiftVector; Point m_shiftVector;
POINT m_shiftOffset; Point m_shiftOffset;
char m_libelle[1000]; char m_libelle[1000];
Sint32 m_tryPhase; Sint32 m_tryPhase;
Sint32 m_tryInsertCount; Sint32 m_tryInsertCount;
POINT m_posInfoButton; Point m_posInfoButton;
POINT m_posHelpButton; Point m_posHelpButton;
bool m_bHiliInfoButton; bool m_bHiliInfoButton;
bool m_bHiliHelpButton; bool m_bHiliHelpButton;
bool m_bInfoHelp; bool m_bInfoHelp;
@ -257,7 +257,7 @@ protected:
size_t m_demoEnd; size_t m_demoEnd;
Sint32 m_demoNumber; Sint32 m_demoNumber;
Uint16 m_keymod; Uint16 m_keymod;
POINT m_debugPos; Point m_debugPos;
Sint32 m_introTime; Sint32 m_introTime;
Sint32 m_updateBlinking; Sint32 m_updateBlinking;
std::string m_updateVersion; std::string m_updateVersion;

View File

@ -69,7 +69,7 @@ static const char tableDark[13 * 4] =
// Retourne les bits contenant de l'eau. // Retourne les bits contenant de l'eau.
bool bool
CDecor::GetSeeBits (POINT cel, char * pBits, Sint32 index) CDecor::GetSeeBits (Point cel, char * pBits, Sint32 index)
{ {
Sint32 icon; Sint32 icon;
@ -208,9 +208,9 @@ CDecor::GetSeeIcon (char * pBits, Sint32 index)
// Arrange le sol après une modification. // Arrange le sol après une modification.
void void
CDecor::ArrangeFloor (POINT cel) CDecor::ArrangeFloor (Point cel)
{ {
POINT test; Point test;
Sint32 max, index, icon; Sint32 max, index, icon;
char here[4], bits[4], init[4]; char here[4], bits[4], init[4];
bool bModif = false; bool bModif = false;
@ -424,7 +424,7 @@ static const Sint16 tableMurDir[4 * 2] =
// index=2 si barrière (106..112) // index=2 si barrière (106..112)
void void
CDecor::ArrangeMur (POINT cel, Sint32 & icon, Sint32 index) CDecor::ArrangeMur (Point cel, Sint32 & icon, Sint32 index)
{ {
Sint32 i, x, y, channel; Sint32 i, x, y, channel;
Sint32 first, last, matiere; Sint32 first, last, matiere;
@ -494,7 +494,7 @@ CDecor::ArrangeMur (POINT cel, Sint32 & icon, Sint32 index)
// Arrange les objets avant une construction. // Arrange les objets avant une construction.
void void
CDecor::ArrangeBuild (POINT cel, Sint32 & channel, Sint32 & icon) CDecor::ArrangeBuild (Point cel, Sint32 & channel, Sint32 & icon)
{ {
Sint32 index, i, x, y; Sint32 index, i, x, y;
Sint32 first, last, matiere; Sint32 first, last, matiere;
@ -570,12 +570,12 @@ CDecor::ArrangeBuild (POINT cel, Sint32 & channel, Sint32 & icon)
// Arrange les objets après une modification. // Arrange les objets après une modification.
void void
CDecor::ArrangeObject (POINT cel) CDecor::ArrangeObject (Point cel)
{ {
Sint32 channel, icon; Sint32 channel, icon;
Sint32 first, last; Sint32 first, last;
Sint32 index, i, j, k, x, y; Sint32 index, i, j, k, x, y;
POINT vector, test, pos; Point vector, test, pos;
bool bTour; bool bTour;
for (index = 0; index < 3; index++) for (index = 0; index < 3; index++)
@ -705,9 +705,9 @@ CDecor::ArrangeObject (POINT cel)
// Test s'il faut remplir le sol ici. // Test s'il faut remplir le sol ici.
bool bool
CDecor::ArrangeFillTestFloor (POINT cel1, POINT cel2) CDecor::ArrangeFillTestFloor (Point cel1, Point cel2)
{ {
POINT cel; Point cel;
Sint32 icon1, icon2; Sint32 icon1, icon2;
icon1 = m_fillSearchIcon; icon1 = m_fillSearchIcon;
@ -760,9 +760,9 @@ CDecor::ArrangeFillTestFloor (POINT cel1, POINT cel2)
// Test s'il faut remplir ici. // Test s'il faut remplir ici.
bool bool
CDecor::ArrangeFillTest (POINT pos) CDecor::ArrangeFillTest (Point pos)
{ {
POINT cel1, cel2; Point cel1, cel2;
if (m_pFillMap[(pos.x / 2) + (pos.y / 2) * (MAXCELX / 2)] == 1) if (m_pFillMap[(pos.x / 2) + (pos.y / 2) * (MAXCELX / 2)] == 1)
return false; return false;
@ -800,7 +800,7 @@ CDecor::ArrangeFillTest (POINT pos)
// Modifie le décor lors d'un remplissage. // Modifie le décor lors d'un remplissage.
void void
CDecor::ArrangeFillPut (POINT pos, Sint32 channel, Sint32 icon) CDecor::ArrangeFillPut (Point pos, Sint32 channel, Sint32 icon)
{ {
if (m_bFillFloor) if (m_bFillFloor)
{ {
@ -823,7 +823,7 @@ CDecor::ArrangeFillPut (POINT pos, Sint32 channel, Sint32 icon)
// Rempli un sol à partir d'une position donnée. // Rempli un sol à partir d'une position donnée.
void void
CDecor::ArrangeFillSearch (POINT pos) CDecor::ArrangeFillSearch (Point pos)
{ {
Sint32 startX, endX; Sint32 startX, endX;
@ -897,7 +897,7 @@ CDecor::ArrangeFillSearch (POINT pos)
// Rempli un sol à partir d'une position donnée. // Rempli un sol à partir d'une position donnée.
void void
CDecor::ArrangeFill (POINT pos, Sint32 channel, Sint32 icon, bool bFloor) CDecor::ArrangeFill (Point pos, Sint32 channel, Sint32 icon, bool bFloor)
{ {
m_bFillFloor = bFloor; m_bFillFloor = bFloor;

View File

@ -115,7 +115,7 @@ void
CDecor::BlupiPushFog (Sint32 rank) CDecor::BlupiPushFog (Sint32 rank)
{ {
Sint32 x, y, i; Sint32 x, y, i;
POINT cel; Point cel;
char cBits[4]; char cBits[4];
char nBits[4]; char nBits[4];

View File

@ -156,7 +156,7 @@ CMenu::~CMenu ()
bool bool
CMenu::Create ( CMenu::Create (
CPixmap * pPixmap, CSound * pSound, CEvent * pEvent, POINT pos, Sint32 nb, CPixmap * pPixmap, CSound * pSound, CEvent * pEvent, Point pos, Sint32 nb,
Buttons * pButtons, Errors * pErrors, Buttons * pButtons, Errors * pErrors,
std::unordered_map<Sint32, const char *> & texts, Sint32 perso) std::unordered_map<Sint32, const char *> & texts, Sint32 perso)
{ {
@ -241,8 +241,8 @@ void
CMenu::Draw () CMenu::Draw ()
{ {
Sint32 i, state, icon; Sint32 i, state, icon;
POINT pos; Point pos;
RECT oldClip, clipRect; Rect oldClip, clipRect;
char text[50]; char text[50];
char * pText; char * pText;
@ -399,7 +399,7 @@ CMenu::IsExist ()
bool bool
CMenu::TreatEvent (const SDL_Event & event) CMenu::TreatEvent (const SDL_Event & event)
{ {
POINT pos; Point pos;
if (m_nbButtons == 0) if (m_nbButtons == 0)
return false; return false;
@ -446,7 +446,7 @@ CMenu::TreatEvent (const SDL_Event & event)
// Détecte dans quel bouton est la souris. // Détecte dans quel bouton est la souris.
Sint32 Sint32
CMenu::Detect (POINT pos) CMenu::Detect (Point pos)
{ {
Sint32 rank; Sint32 rank;
@ -466,7 +466,7 @@ CMenu::Detect (POINT pos)
// Bouton de la souris pressé. // Bouton de la souris pressé.
bool bool
CMenu::MouseDown (POINT pos) CMenu::MouseDown (Point pos)
{ {
return false; return false;
} }
@ -474,7 +474,7 @@ CMenu::MouseDown (POINT pos)
// Souris déplacés. // Souris déplacés.
bool bool
CMenu::MouseMove (POINT pos) CMenu::MouseMove (Point pos)
{ {
m_selRank = Detect (pos); m_selRank = Detect (pos);
@ -493,7 +493,7 @@ CMenu::MouseMove (POINT pos)
// Bouton de la souris relâché. // Bouton de la souris relâché.
bool bool
CMenu::MouseUp (POINT pos) CMenu::MouseUp (Point pos)
{ {
m_selRank = Detect (pos); m_selRank = Detect (pos);

View File

@ -33,7 +33,7 @@ public:
~CMenu (); ~CMenu ();
bool Create ( bool Create (
CPixmap * pPixmap, CSound * pSound, CEvent * pEvent, POINT pos, Sint32 nb, CPixmap * pPixmap, CSound * pSound, CEvent * pEvent, Point pos, Sint32 nb,
Buttons * pButtons, Errors * pErrors, Buttons * pButtons, Errors * pErrors,
std::unordered_map<Sint32, const char *> & texts, Sint32 perso); std::unordered_map<Sint32, const char *> & texts, Sint32 perso);
void Update ( void Update (
@ -50,20 +50,20 @@ public:
bool TreatEvent (const SDL_Event & event); bool TreatEvent (const SDL_Event & event);
protected: protected:
Sint32 Detect (POINT pos); Sint32 Detect (Point pos);
bool MouseDown (POINT pos); bool MouseDown (Point pos);
bool MouseMove (POINT pos); bool MouseMove (Point pos);
bool MouseUp (POINT pos); bool MouseUp (Point pos);
protected: protected:
CPixmap * m_pPixmap; CPixmap * m_pPixmap;
CDecor * m_pDecor; CDecor * m_pDecor;
CSound * m_pSound; CSound * m_pSound;
CEvent * m_pEvent; CEvent * m_pEvent;
POINT m_pos; // coin sup/gauche Point m_pos; // coin sup/gauche
POINT m_dim; // dimensions Point m_dim; // dimensions
Sint32 m_nbButtons; Sint32 m_nbButtons;
POINT m_nbCel; Point m_nbCel;
Sint32 m_perso; Sint32 m_perso;
Sint32 m_buttons[MAXBUTTON]; Sint32 m_buttons[MAXBUTTON];
Errors m_errors[MAXBUTTON]; Errors m_errors[MAXBUTTON];

View File

@ -47,10 +47,10 @@ OutputDebug (const char * pMessage)
// Conversion de la position de la souris. // Conversion de la position de la souris.
POINT Point
ConvLongToPos (LPARAM lParam) ConvLongToPos (LPARAM lParam)
{ {
POINT pos; Point pos;
pos.x = LOWORD (lParam); // horizontal position of cursor pos.x = LOWORD (lParam); // horizontal position of cursor
pos.y = HIWORD (lParam); // vertical position of cursor pos.y = HIWORD (lParam); // vertical position of cursor

View File

@ -28,7 +28,7 @@
extern void OutputDebug (const char * pMessage); extern void OutputDebug (const char * pMessage);
extern POINT ConvLongToPos (LPARAM lParam); extern Point ConvLongToPos (LPARAM lParam);
extern void InitRandom (); extern void InitRandom ();
extern Sint32 Random (Sint32 min, Sint32 max); extern Sint32 Random (Sint32 min, Sint32 max);

View File

@ -90,7 +90,7 @@ CMovie::fileCloseMovie ()
// Sets <m_fMovieOpen> on success. // Sets <m_fMovieOpen> on success.
bool bool
CMovie::fileOpenMovie (RECT rect, const std::string & pFilename) CMovie::fileOpenMovie (Rect rect, const std::string & pFilename)
{ {
const auto path = GetBaseDir () + pFilename; const auto path = GetBaseDir () + pFilename;
@ -207,7 +207,7 @@ CMovie::IsExist (const std::string & pFilename)
// Montre un film avi. // Montre un film avi.
bool bool
CMovie::Play (RECT rect, const std::string & pFilename) CMovie::Play (Rect rect, const std::string & pFilename)
{ {
if (!m_bEnable) if (!m_bEnable)
return false; return false;

View File

@ -38,7 +38,7 @@ public:
bool Create (); bool Create ();
bool GetEnable (); bool GetEnable ();
bool IsExist (const std::string & pFilename); bool IsExist (const std::string & pFilename);
bool Play (RECT rect, const std::string & pFilename); bool Play (Rect rect, const std::string & pFilename);
void Stop (); void Stop ();
void Pause (); void Pause ();
void Resume (); void Resume ();
@ -46,7 +46,7 @@ public:
protected: protected:
void playMovie (); void playMovie ();
bool fileOpenMovie (RECT rect, const std::string & pFilename); bool fileOpenMovie (Rect rect, const std::string & pFilename);
void fileCloseMovie (); void fileCloseMovie ();
void termAVI (); void termAVI ();
bool initAVI (); bool initAVI ();

View File

@ -1286,7 +1286,7 @@ static char tableObstacleObject[] =
// forme d'un tableau de 3x3. // forme d'un tableau de 3x3.
void void
CDecor::SearchFloor (Sint32 rank, Sint32 icon, POINT cel, Sint32 * pBits) CDecor::SearchFloor (Sint32 rank, Sint32 icon, Point cel, Sint32 * pBits)
{ {
char * pTable; char * pTable;
Sint32 first, last; Sint32 first, last;
@ -1336,7 +1336,7 @@ CDecor::SearchFloor (Sint32 rank, Sint32 icon, POINT cel, Sint32 * pBits)
// forme d'un tableau de 3x3. // forme d'un tableau de 3x3.
void void
CDecor::SearchObject (Sint32 rank, Sint32 icon, POINT cel, Sint32 * pBits) CDecor::SearchObject (Sint32 rank, Sint32 icon, Point cel, Sint32 * pBits)
{ {
char * pTable; char * pTable;
Sint32 dx, dy, x, y, i; Sint32 dx, dy, x, y, i;
@ -1371,7 +1371,7 @@ CDecor::SearchObject (Sint32 rank, Sint32 icon, POINT cel, Sint32 * pBits)
// Ajuste un sol en fonction du personnage. // Ajuste un sol en fonction du personnage.
void void
CDecor::AjustFloor (Sint32 rank, Sint32 icon, POINT cel, Sint32 * pBits) CDecor::AjustFloor (Sint32 rank, Sint32 icon, Point cel, Sint32 * pBits)
{ {
Sint32 i; Sint32 i;
@ -1433,7 +1433,7 @@ lock:
// Ajuste un obstacle en fonction du personnage. // Ajuste un obstacle en fonction du personnage.
void void
CDecor::AjustObject (Sint32 rank, Sint32 icon, POINT cel, Sint32 * pBits) CDecor::AjustObject (Sint32 rank, Sint32 icon, Point cel, Sint32 * pBits)
{ {
Sint32 i; Sint32 i;
@ -1596,11 +1596,11 @@ Copy33To99 (Sint32 * pSrc33, Sint32 * pDst99, Sint32 dx, Sint32 dy)
// Indique s'il est possible d'avancer dans une direction donnée. // Indique s'il est possible d'avancer dans une direction donnée.
bool bool
CDecor::IsFreeDirect (POINT cel, Sint32 direct, Sint32 rank) CDecor::IsFreeDirect (Point cel, Sint32 direct, Sint32 rank)
{ {
Sint32 icon, workBlupi; Sint32 icon, workBlupi;
Sint32 bits[3 * 3], obstacles[9 * 9]; Sint32 bits[3 * 3], obstacles[9 * 9];
POINT test, vector; Point test, vector;
vector = GetVector (direct); vector = GetVector (direct);
@ -1679,7 +1679,7 @@ CDecor::IsFreeDirect (POINT cel, Sint32 direct, Sint32 rank)
// si blupi est devant un objet. // si blupi est devant un objet.
bool bool
CDecor::IsFreeCelObstacle (POINT cel) CDecor::IsFreeCelObstacle (Point cel)
{ {
Sint32 icon; Sint32 icon;
Sint32 bits[9]; Sint32 bits[9];
@ -1709,7 +1709,7 @@ CDecor::IsFreeCelObstacle (POINT cel)
// Retourne true si blupi peut y aller ! // Retourne true si blupi peut y aller !
bool bool
CDecor::IsFreeCelFloor (POINT cel, Sint32 rank) CDecor::IsFreeCelFloor (Point cel, Sint32 rank)
{ {
Sint32 icon; Sint32 icon;
Sint32 bits[9]; Sint32 bits[9];
@ -1734,10 +1734,10 @@ CDecor::IsFreeCelFloor (POINT cel, Sint32 rank)
// débarquer en bateau ou monter dans sa jeep. // débarquer en bateau ou monter dans sa jeep.
bool bool
CDecor::IsFreeCelGo (POINT cel, Sint32 rank) CDecor::IsFreeCelGo (Point cel, Sint32 rank)
{ {
bool bOK; bool bOK;
POINT limit; Point limit;
Sint32 action, channel, icon; Sint32 action, channel, icon;
if (rank == -1) if (rank == -1)
@ -1799,10 +1799,10 @@ CDecor::IsFreeCelGo (POINT cel, Sint32 rank)
// à cet endroit. // à cet endroit.
bool bool
CDecor::IsFreeCelHili (POINT cel, Sint32 rank) CDecor::IsFreeCelHili (Point cel, Sint32 rank)
{ {
bool bOK; bool bOK;
POINT limit; Point limit;
Sint32 workBlupi, channel, icon, action; Sint32 workBlupi, channel, icon, action;
if (IsValid (cel)) if (IsValid (cel))
@ -1847,7 +1847,7 @@ CDecor::IsFreeCelHili (POINT cel, Sint32 rank)
// Est utilisé pour savoir si blupi peut venir ici. // Est utilisé pour savoir si blupi peut venir ici.
bool bool
CDecor::IsFreeCel (POINT cel, Sint32 rank) CDecor::IsFreeCel (Point cel, Sint32 rank)
{ {
Sint32 icon, workBlupi; Sint32 icon, workBlupi;
Sint32 bits[9]; Sint32 bits[9];
@ -1886,7 +1886,7 @@ CDecor::IsFreeCel (POINT cel, Sint32 rank)
// Indique si blupi peut déposer un objet ici. // Indique si blupi peut déposer un objet ici.
bool bool
CDecor::IsFreeCelDepose (POINT cel, Sint32 rank) CDecor::IsFreeCelDepose (Point cel, Sint32 rank)
{ {
Sint32 icon; Sint32 icon;
@ -1912,7 +1912,7 @@ CDecor::IsFreeCelDepose (POINT cel, Sint32 rank)
bool bool
CDecor::IsFreeCelEmbarque ( CDecor::IsFreeCelEmbarque (
POINT cel, Sint32 rank, Sint32 & action, POINT & limit) Point cel, Sint32 rank, Sint32 & action, Point & limit)
{ {
bool bOK; bool bOK;
Sint32 channel, icon; Sint32 channel, icon;
@ -1994,7 +1994,7 @@ CDecor::IsFreeCelEmbarque (
bool bool
CDecor::IsFreeCelDebarque ( CDecor::IsFreeCelDebarque (
POINT cel, Sint32 rank, Sint32 & action, POINT & limit) Point cel, Sint32 rank, Sint32 & action, Point & limit)
{ {
bool bOK; bool bOK;
Sint32 channel1, icon1; Sint32 channel1, icon1;
@ -2064,9 +2064,9 @@ CDecor::IsFreeCelDebarque (
// Indique s'il est possible de sauter dans une direction. // Indique s'il est possible de sauter dans une direction.
bool bool
CDecor::IsFreeJump (POINT cel, Sint32 direct, Sint32 rank, Sint32 & action) CDecor::IsFreeJump (Point cel, Sint32 direct, Sint32 rank, Sint32 & action)
{ {
POINT depart, vector; Point depart, vector;
Sint32 i, icon; Sint32 i, icon;
Sint32 bits[3 * 3]; Sint32 bits[3 * 3];
@ -2126,7 +2126,7 @@ CDecor::IsFreeJump (POINT cel, Sint32 direct, Sint32 rank, Sint32 & action)
// Indique s'il est possible de glisser dans une direction. // Indique s'il est possible de glisser dans une direction.
bool bool
CDecor::IsFreeGlisse (POINT cel, Sint32 direct, Sint32 rank, Sint32 & action) CDecor::IsFreeGlisse (Point cel, Sint32 direct, Sint32 rank, Sint32 & action)
{ {
Sint32 channel, icon; Sint32 channel, icon;
@ -2149,9 +2149,9 @@ CDecor::IsFreeGlisse (POINT cel, Sint32 direct, Sint32 rank, Sint32 & action)
// Retourne -1 si on est déjà sur le but. // Retourne -1 si on est déjà sur le but.
Sint32 Sint32
CDecor::DirectSearch (POINT cel, POINT goal) CDecor::DirectSearch (Point cel, Point goal)
{ {
POINT dir; Point dir;
Sint32 direct, tan; Sint32 direct, tan;
dir.x = goal.x - cel.x; dir.x = goal.x - cel.x;
@ -2260,7 +2260,7 @@ CDecor::FlushUsed (Sint32 rank)
// Ajoute une position déjà été essayée. // Ajoute une position déjà été essayée.
void void
CDecor::AddUsedPos (Sint32 rank, POINT pos) CDecor::AddUsedPos (Sint32 rank, Point pos)
{ {
Sint32 i, j, old; Sint32 i, j, old;
@ -2313,7 +2313,7 @@ CDecor::AddUsedPos (Sint32 rank, POINT pos)
// Cherche si une position a déjà été essayée. // Cherche si une position a déjà été essayée.
bool bool
CDecor::IsUsedPos (Sint32 rank, POINT pos) CDecor::IsUsedPos (Sint32 rank, Point pos)
{ {
Sint32 i; Sint32 i;
@ -2332,11 +2332,11 @@ CDecor::IsUsedPos (Sint32 rank, POINT pos)
bool bool
CDecor::SearchBestBase ( CDecor::SearchBestBase (
Sint32 rank, Sint32 & action, POINT & newCel, Sint32 & direct) Sint32 rank, Sint32 & action, Point & newCel, Sint32 & direct)
{ {
Sint32 searchDirect[8] = {0, 1, 7, 2, 6, 5, 3, 4}; Sint32 searchDirect[8] = {0, 1, 7, 2, 6, 5, 3, 4};
Sint32 tryDirect, workBlupi, i, a; Sint32 tryDirect, workBlupi, i, a;
POINT cel, vector; Point cel, vector;
bool bFree; bool bFree;
cel = m_blupi[rank].cel; cel = m_blupi[rank].cel;
@ -2429,7 +2429,7 @@ CDecor::SearchBestPass (Sint32 rank, Sint32 & action)
{ {
Blupi iBlupi; Blupi iBlupi;
Sint32 i, j, direct; Sint32 i, j, direct;
POINT iCel, lCel = {0}, cel; Point iCel, lCel = {0}, cel;
if ( if (
m_blupi[rank].perso == 0 || // blupi ? m_blupi[rank].perso == 0 || // blupi ?
@ -2535,7 +2535,7 @@ CDecor::SearchBestPass (Sint32 rank, Sint32 & action)
// pas y avoir un autre blupi que soi-même. // pas y avoir un autre blupi que soi-même.
bool bool
CDecor::IsWorkableObject (POINT cel, Sint32 rank) CDecor::IsWorkableObject (Point cel, Sint32 rank)
{ {
if ( if (
!IsFreeCelFloor (GetCel (cel, 0, 0), -1) || !IsFreeCelFloor (GetCel (cel, 0, 0), -1) ||
@ -2564,14 +2564,14 @@ CDecor::IsWorkableObject (POINT cel, Sint32 rank)
bool bool
CDecor::SearchOtherObject ( CDecor::SearchOtherObject (
Sint32 rank, POINT initCel, Sint32 action, Sint32 distMax, Sint32 channel, Sint32 rank, Point initCel, Sint32 action, Sint32 distMax, Sint32 channel,
Sint32 firstIcon1, Sint32 lastIcon1, Sint32 firstIcon2, Sint32 lastIcon2, Sint32 firstIcon1, Sint32 lastIcon1, Sint32 firstIcon2, Sint32 lastIcon2,
POINT & foundCel, Sint32 & foundIcon) Point & foundCel, Sint32 & foundIcon)
{ {
Sint32 startx, starty, endx, endy; Sint32 startx, starty, endx, endy;
Sint32 x, y, xx = 0, yy = 0; Sint32 x, y, xx = 0, yy = 0;
Sint32 dist, min = distMax; Sint32 dist, min = distMax;
POINT cel; Point cel;
bool bOK; bool bOK;
if ( if (
@ -2683,13 +2683,13 @@ CDecor::SearchOtherObject (
bool bool
CDecor::SearchOtherDrapeau ( CDecor::SearchOtherDrapeau (
Sint32 rank, POINT initCel, Sint32 distMax, POINT & foundCel, Sint32 rank, Point initCel, Sint32 distMax, Point & foundCel,
Sint32 & foundIcon) Sint32 & foundIcon)
{ {
Sint32 startx, starty, endx, endy, icon; Sint32 startx, starty, endx, endy, icon;
Sint32 x, y; Sint32 x, y;
Sint32 dist, min = distMax; Sint32 dist, min = distMax;
POINT cel; Point cel;
startx = ((initCel.x - distMax / 2) / 2) * 2; startx = ((initCel.x - distMax / 2) / 2) * 2;
endx = ((initCel.x + distMax / 2) / 2) * 2; endx = ((initCel.x + distMax / 2) / 2) * 2;
@ -2746,7 +2746,7 @@ CDecor::SearchOtherDrapeau (
bool bool
CDecor::SearchOtherBateau ( CDecor::SearchOtherBateau (
Sint32 rank, POINT initCel, Sint32 distMax, POINT & foundCel, Sint32 rank, Point initCel, Sint32 distMax, Point & foundCel,
Sint32 & foundIcon) Sint32 & foundIcon)
{ {
Sint32 startx, starty, endx, endy; Sint32 startx, starty, endx, endy;
@ -2805,13 +2805,13 @@ CDecor::IsSpiderObject (Sint32 icon)
bool bool
CDecor::SearchSpiderObject ( CDecor::SearchSpiderObject (
Sint32 rank, POINT initCel, Sint32 distMax, POINT & foundCel, Sint32 rank, Point initCel, Sint32 distMax, Point & foundCel,
Sint32 & foundIcon) Sint32 & foundIcon)
{ {
Sint32 startx, starty, endx, endy; Sint32 startx, starty, endx, endy;
Sint32 x, y; Sint32 x, y;
Sint32 dist, min = distMax; Sint32 dist, min = distMax;
POINT cel; Point cel;
startx = ((initCel.x - distMax / 2) / 2) * 2; startx = ((initCel.x - distMax / 2) / 2) * 2;
endx = ((initCel.x + distMax / 2) / 2) * 2; endx = ((initCel.x + distMax / 2) / 2) * 2;
@ -2887,13 +2887,12 @@ CDecor::IsTracksObject (Sint32 icon)
bool bool
CDecor::SearchTracksObject ( CDecor::SearchTracksObject (
Sint32 rank, POINT initCel, Sint32 distMax, POINT & foundCel, Sint32 rank, Point initCel, Sint32 distMax, Point & foundCel,
Sint32 & foundIcon) Sint32 & foundIcon)
{ {
Sint32 startx, starty, endx, endy, icon; Sint32 startx, starty, endx, endy, icon;
Sint32 x, y; Sint32 x, y;
Sint32 dist, min = distMax; Sint32 dist, min = distMax;
//? POINT cel;
startx = ((initCel.x - distMax / 2) / 2) * 2; startx = ((initCel.x - distMax / 2) / 2) * 2;
endx = ((initCel.x + distMax / 2) / 2) * 2; endx = ((initCel.x + distMax / 2) / 2) * 2;
@ -2986,7 +2985,7 @@ CDecor::IsRobotObject (Sint32 icon)
bool bool
CDecor::SearchRobotObject ( CDecor::SearchRobotObject (
Sint32 rank, POINT initCel, Sint32 distMax, POINT & foundCel, Sint32 rank, Point initCel, Sint32 distMax, Point & foundCel,
Sint32 & foundIcon, Sint32 & foundAction) Sint32 & foundIcon, Sint32 & foundAction)
{ {
Sint32 startx, starty, endx, endy; Sint32 startx, starty, endx, endy;
@ -3282,7 +3281,7 @@ CDecor::SearchRobotObject (
// Teste si un emplacement est ok pour bâtir une usine. // Teste si un emplacement est ok pour bâtir une usine.
bool bool
CDecor::IsUsineBuild (Sint32 rank, POINT cel) CDecor::IsUsineBuild (Sint32 rank, Point cel)
{ {
Sint32 icon, channel; Sint32 icon, channel;
Sint32 x, y; Sint32 x, y;
@ -3311,7 +3310,7 @@ CDecor::IsUsineBuild (Sint32 rank, POINT cel)
// pour l'ennemi qui sera construit). // pour l'ennemi qui sera construit).
bool bool
CDecor::IsUsineFree (Sint32 rank, POINT cel) CDecor::IsUsineFree (Sint32 rank, Point cel)
{ {
Sint32 channel, icon; Sint32 channel, icon;
@ -3353,13 +3352,13 @@ CDecor::IsBombeObject (Sint32 icon)
bool bool
CDecor::SearchBombeObject ( CDecor::SearchBombeObject (
Sint32 rank, POINT initCel, Sint32 distMax, POINT & foundCel, Sint32 rank, Point initCel, Sint32 distMax, Point & foundCel,
Sint32 & foundIcon) Sint32 & foundIcon)
{ {
Sint32 startx, starty, endx, endy; Sint32 startx, starty, endx, endy;
Sint32 x, y; Sint32 x, y;
Sint32 dist, min = distMax; Sint32 dist, min = distMax;
POINT cel; Point cel;
startx = ((initCel.x - distMax / 2) / 2) * 2; startx = ((initCel.x - distMax / 2) / 2) * 2;
endx = ((initCel.x + distMax / 2) / 2) * 2; endx = ((initCel.x + distMax / 2) / 2) * 2;
@ -3414,13 +3413,13 @@ CDecor::SearchBombeObject (
bool bool
CDecor::SearchElectroObject ( CDecor::SearchElectroObject (
Sint32 rank, POINT initCel, Sint32 distMax, POINT & foundCel, Sint32 rank, Point initCel, Sint32 distMax, Point & foundCel,
Sint32 & foundIcon) Sint32 & foundIcon)
{ {
Sint32 startx, starty, endx, endy; Sint32 startx, starty, endx, endy;
Sint32 x, y, i, d, dd, r; Sint32 x, y, i, d, dd, r;
Sint32 dist, min = distMax; Sint32 dist, min = distMax;
POINT cel; Point cel;
startx = ((initCel.x - 10 / 2) / 2) * 2; startx = ((initCel.x - 10 / 2) / 2) * 2;
endx = ((initCel.x + 10 / 2) / 2) * 2; endx = ((initCel.x + 10 / 2) / 2) * 2;
@ -3523,10 +3522,10 @@ CDecor::SearchElectroObject (
// Si oui, retourne true. // Si oui, retourne true.
bool bool
CDecor::IsFireCel (POINT cel) CDecor::IsFireCel (Point cel)
{ {
Sint32 x, y; Sint32 x, y;
POINT test; Point test;
cel.x = (cel.x / 2) * 2; cel.x = (cel.x / 2) * 2;
cel.y = (cel.y / 2) * 2; cel.y = (cel.y / 2) * 2;
@ -3555,7 +3554,7 @@ CDecor::IsFireCel (POINT cel)
// Si oui, retourne true. // Si oui, retourne true.
bool bool
CDecor::IsVirusCel (POINT cel) CDecor::IsVirusCel (Point cel)
{ {
Sint32 rank; Sint32 rank;
@ -3578,9 +3577,9 @@ CDecor::IsVirusCel (POINT cel)
// Retourne 0 si c'est possible, ou une erreur autrement ! // Retourne 0 si c'est possible, ou une erreur autrement !
Errors Errors
CDecor::IsBuildPont (POINT & cel, Sint32 & iconBuild) CDecor::IsBuildPont (Point & cel, Sint32 & iconBuild)
{ {
POINT vector, test; Point vector, test;
Sint32 i, channel, icon, p1, p2, p3, r1, r2, nb, rest; Sint32 i, channel, icon, p1, p2, p3, r1, r2, nb, rest;
Errors error = Errors::MISC; Errors error = Errors::MISC;
@ -3704,7 +3703,7 @@ CDecor::IsBuildPont (POINT & cel, Sint32 & iconBuild)
// d'une cellule donnée (cel). // d'une cellule donnée (cel).
bool bool
CDecor::IsBuildBateau (POINT cel, Sint32 & direct) CDecor::IsBuildBateau (Point cel, Sint32 & direct)
{ {
Sint32 fChannel, fIcon; Sint32 fChannel, fIcon;
Sint32 oChannel, oIcon; Sint32 oChannel, oIcon;
@ -3770,7 +3769,7 @@ CDecor::InitDrapeau ()
// Mémorise une cellule visitée (ne contenant pas de fer). // Mémorise une cellule visitée (ne contenant pas de fer).
void void
CDecor::AddDrapeau (POINT cel) CDecor::AddDrapeau (Point cel)
{ {
Sint32 i; Sint32 i;
@ -3786,7 +3785,7 @@ CDecor::AddDrapeau (POINT cel)
// Supprime une cellule visitée (ne contenant pas de fer). // Supprime une cellule visitée (ne contenant pas de fer).
void void
CDecor::SubDrapeau (POINT cel) CDecor::SubDrapeau (Point cel)
{ {
Sint32 i; Sint32 i;
@ -3803,7 +3802,7 @@ CDecor::SubDrapeau (POINT cel)
// Teste si une cellule a déjà été visitée. // Teste si une cellule a déjà été visitée.
bool bool
CDecor::TestDrapeau (POINT cel) CDecor::TestDrapeau (Point cel)
{ {
Sint32 i; Sint32 i;

View File

@ -59,7 +59,7 @@ CDecor::CheminMemPos (Sint32 exRank)
// Teste si une positiion est occupée par un blupi. // Teste si une positiion est occupée par un blupi.
bool bool
CDecor::CheminTestPos (POINT pos, Sint32 & rank) CDecor::CheminTestPos (Point pos, Sint32 & rank)
{ {
Sint32 i; Sint32 i;
@ -83,7 +83,7 @@ Sint32
CDecor::CheminARebours (Sint32 rank) CDecor::CheminARebours (Sint32 rank)
{ {
Sint32 pos, rebours, last, dir, set; Sint32 pos, rebours, last, dir, set;
POINT v; Point v;
pos = m_blupi[rank].goalCel.y * MAXCELX + m_blupi[rank].goalCel.x; pos = m_blupi[rank].goalCel.y * MAXCELX + m_blupi[rank].goalCel.x;
@ -205,7 +205,7 @@ CDecor::CheminTestDirection (
Sint32 rank, Sint32 pos, Sint32 dir, Sint32 & next, Sint32 & ampli, Sint32 rank, Sint32 pos, Sint32 dir, Sint32 & next, Sint32 & ampli,
Sint32 & cout, Sint32 & action) Sint32 & cout, Sint32 & action)
{ {
POINT cel, vector, newCel; Point cel, vector, newCel;
bool bFree; bool bFree;
Sint32 tryDirect, workBlupi, rankHere; Sint32 tryDirect, workBlupi, rankHere;
@ -333,10 +333,10 @@ CDecor::CheminCherche (Sint32 rank, Sint32 & action)
// Teste s'il est possible de se rendre à un endroit donné. // Teste s'il est possible de se rendre à un endroit donné.
bool bool
CDecor::IsCheminFree (Sint32 rank, POINT dest, Sint32 button) CDecor::IsCheminFree (Sint32 rank, Point dest, Sint32 button)
{ {
Sint32 action, sDirect; Sint32 action, sDirect;
POINT goalCel, passCel, limit; Point goalCel, passCel, limit;
bool bOK; bool bOK;
if (button == BUTTON_STOP) if (button == BUTTON_STOP)

View File

@ -89,7 +89,7 @@ CPixmap::~CPixmap ()
// Retourne false en cas d'erreur. // Retourne false en cas d'erreur.
bool bool
CPixmap::Create (POINT dim) CPixmap::Create (Point dim)
{ {
m_dim = dim; m_dim = dim;
@ -104,7 +104,7 @@ CPixmap::Create (POINT dim)
// Rempli une zone rectangulaire avec une couleur uniforme. // Rempli une zone rectangulaire avec une couleur uniforme.
void void
CPixmap::Fill (RECT rect, COLORREF color) CPixmap::Fill (Rect rect, ColorRef color)
{ {
// � faire si n�cessaire ... // � faire si n�cessaire ...
} }
@ -113,7 +113,7 @@ CPixmap::Fill (RECT rect, COLORREF color)
// Les modes sont 0=transparent, 1=opaque. // Les modes sont 0=transparent, 1=opaque.
Sint32 Sint32
CPixmap::BltFast (Sint32 chDst, size_t channel, POINT dst, RECT rcRect) CPixmap::BltFast (Sint32 chDst, size_t channel, Point dst, Rect rcRect)
{ {
Sint32 res, limit; Sint32 res, limit;
@ -177,7 +177,7 @@ CPixmap::BltFast (Sint32 chDst, size_t channel, POINT dst, RECT rcRect)
Sint32 Sint32
CPixmap::BltFast ( CPixmap::BltFast (
SDL_Texture * lpSDL, size_t channel, POINT dst, RECT rcRect, SDL_Texture * lpSDL, size_t channel, Point dst, Rect rcRect,
SDL_BlendMode mode) SDL_BlendMode mode)
{ {
Sint32 res; Sint32 res;
@ -232,7 +232,7 @@ CPixmap::ReloadTargetTextures ()
bool bool
CPixmap::Cache ( CPixmap::Cache (
size_t channel, const std::string & pFilename, POINT totalDim, POINT iconDim) size_t channel, const std::string & pFilename, Point totalDim, Point iconDim)
{ {
std::string file = GetBaseDir () + pFilename; std::string file = GetBaseDir () + pFilename;
SDL_Surface * surface = IMG_Load (file.c_str ()); SDL_Surface * surface = IMG_Load (file.c_str ());
@ -291,9 +291,9 @@ CPixmap::Cache (
// Cache une image globale. // Cache une image globale.
bool bool
CPixmap::Cache (size_t channel, const std::string & pFilename, POINT totalDim) CPixmap::Cache (size_t channel, const std::string & pFilename, Point totalDim)
{ {
POINT iconDim; Point iconDim;
iconDim.x = 0; iconDim.x = 0;
iconDim.y = 0; iconDim.y = 0;
@ -304,7 +304,7 @@ CPixmap::Cache (size_t channel, const std::string & pFilename, POINT totalDim)
// Cache une image provenant d'un bitmap. // Cache une image provenant d'un bitmap.
bool bool
CPixmap::Cache (size_t channel, SDL_Surface * surface, POINT totalDim) CPixmap::Cache (size_t channel, SDL_Surface * surface, Point totalDim)
{ {
// Create the offscreen surface, by loading our bitmap. // Create the offscreen surface, by loading our bitmap.
if ( if (
@ -327,14 +327,14 @@ CPixmap::Cache (size_t channel, SDL_Surface * surface, POINT totalDim)
// Modifie la r�gion de clipping. // Modifie la r�gion de clipping.
void void
CPixmap::SetClipping (RECT clip) CPixmap::SetClipping (Rect clip)
{ {
m_clipRect = clip; m_clipRect = clip;
} }
// Retourne la r�gion de clipping. // Retourne la r�gion de clipping.
RECT Rect
CPixmap::GetClipping () CPixmap::GetClipping ()
{ {
return m_clipRect; return m_clipRect;
@ -343,7 +343,7 @@ CPixmap::GetClipping ()
// Teste si un point fait partie d'une ic�ne. // Teste si un point fait partie d'une ic�ne.
bool bool
CPixmap::IsIconPixel (size_t channel, Sint32 rank, POINT pos) CPixmap::IsIconPixel (size_t channel, Sint32 rank, Point pos)
{ {
Sint32 nbx, nby; Sint32 nbx, nby;
@ -382,10 +382,10 @@ CPixmap::IsIconPixel (size_t channel, Sint32 rank, POINT pos)
bool bool
CPixmap::DrawIcon ( CPixmap::DrawIcon (
Sint32 chDst, size_t channel, Sint32 rank, POINT pos, bool bMask) Sint32 chDst, size_t channel, Sint32 rank, Point pos, bool bMask)
{ {
Sint32 nbx, nby; Sint32 nbx, nby;
RECT rect; Rect rect;
auto texInfo = m_SDLTextureInfo.find (channel); auto texInfo = m_SDLTextureInfo.find (channel);
if (channel != CHMAP && texInfo == m_SDLTextureInfo.end ()) if (channel != CHMAP && texInfo == m_SDLTextureInfo.end ())
@ -420,10 +420,10 @@ CPixmap::DrawIcon (
bool bool
CPixmap::DrawIconDemi ( CPixmap::DrawIconDemi (
Sint32 chDst, size_t channel, Sint32 rank, POINT pos, bool bMask) Sint32 chDst, size_t channel, Sint32 rank, Point pos, bool bMask)
{ {
Sint32 nbx, nby; Sint32 nbx, nby;
RECT rect; Rect rect;
auto texInfo = m_SDLTextureInfo.find (channel); auto texInfo = m_SDLTextureInfo.find (channel);
if (texInfo == m_SDLTextureInfo.end ()) if (texInfo == m_SDLTextureInfo.end ())
@ -452,11 +452,11 @@ CPixmap::DrawIconDemi (
bool bool
CPixmap::DrawIconPart ( CPixmap::DrawIconPart (
Sint32 chDst, size_t channel, Sint32 rank, POINT pos, Sint32 startY, Sint32 chDst, size_t channel, Sint32 rank, Point pos, Sint32 startY,
Sint32 endY, bool bMask) Sint32 endY, bool bMask)
{ {
Sint32 nbx, nby; Sint32 nbx, nby;
RECT rect; Rect rect;
auto texInfo = m_SDLTextureInfo.find (channel); auto texInfo = m_SDLTextureInfo.find (channel);
if (texInfo == m_SDLTextureInfo.end ()) if (texInfo == m_SDLTextureInfo.end ())
@ -486,7 +486,7 @@ CPixmap::DrawIconPart (
bool bool
CPixmap::DrawPart ( CPixmap::DrawPart (
Sint32 chDst, size_t channel, POINT dest, RECT rect, bool bMask) Sint32 chDst, size_t channel, Point dest, Rect rect, bool bMask)
{ {
if (m_SDLTextureInfo.find (channel) == m_SDLTextureInfo.end ()) if (m_SDLTextureInfo.find (channel) == m_SDLTextureInfo.end ())
return false; return false;
@ -497,9 +497,9 @@ CPixmap::DrawPart (
// Dessine une partie d'image rectangulaire. // Dessine une partie d'image rectangulaire.
bool bool
CPixmap::DrawImage (Sint32 chDst, size_t channel, RECT rect) CPixmap::DrawImage (Sint32 chDst, size_t channel, Rect rect)
{ {
POINT dst; Point dst;
Sint32 res; Sint32 res;
if (m_SDLTextureInfo.find (channel) == m_SDLTextureInfo.end ()) if (m_SDLTextureInfo.find (channel) == m_SDLTextureInfo.end ())
@ -527,8 +527,8 @@ CPixmap::BuildIconMask (
Sint32 rankDst) Sint32 rankDst)
{ {
Sint32 nbx, nby; Sint32 nbx, nby;
POINT posDst, posDstMask; Point posDst, posDstMask;
RECT rect, rectMask; Rect rect, rectMask;
Sint32 res; Sint32 res;
auto texInfo = m_SDLTextureInfo.find (channel); auto texInfo = m_SDLTextureInfo.find (channel);
@ -636,11 +636,11 @@ CPixmap::MouseShow (bool bShow)
// Retourne le rectangle correspondant au sprite // Retourne le rectangle correspondant au sprite
// de la souris dans CHBLUPI. // de la souris dans CHBLUPI.
RECT Rect
CPixmap::MouseRectSprite () CPixmap::MouseRectSprite ()
{ {
Sint32 rank, nbx; Sint32 rank, nbx;
RECT rcRect; Rect rcRect;
rank = 348; rank = 348;
if (m_mouseSprite == SPRITE_ARROW) if (m_mouseSprite == SPRITE_ARROW)

View File

@ -34,8 +34,8 @@ struct TextureInfo {
SDL_Texture * texture; SDL_Texture * texture;
bool target; // can be used as a render target bool target; // can be used as a render target
std::string file; std::string file;
POINT dimTotal; Point dimTotal;
POINT dimIcon; Point dimIcon;
TextureInfo () TextureInfo ()
: texMask (nullptr) : texMask (nullptr)
@ -53,30 +53,30 @@ public:
CPixmap (); CPixmap ();
~CPixmap (); ~CPixmap ();
bool Create (POINT dim); bool Create (Point dim);
void Fill (RECT rect, COLORREF color); void Fill (Rect rect, ColorRef color);
bool ReloadTargetTextures (); bool ReloadTargetTextures ();
bool Cache ( bool Cache (
size_t channel, const std::string & pFilename, POINT totalDim, size_t channel, const std::string & pFilename, Point totalDim,
POINT iconDim); Point iconDim);
bool Cache (size_t channel, const std::string & pFilename, POINT totalDim); bool Cache (size_t channel, const std::string & pFilename, Point totalDim);
bool Cache (size_t channel, SDL_Surface * surface, POINT totalDim); bool Cache (size_t channel, SDL_Surface * surface, Point totalDim);
void SetClipping (RECT clip); void SetClipping (Rect clip);
RECT GetClipping (); Rect GetClipping ();
bool IsIconPixel (size_t channel, Sint32 rank, POINT pos); bool IsIconPixel (size_t channel, Sint32 rank, Point pos);
bool DrawIcon ( bool DrawIcon (
Sint32 chDst, size_t channel, Sint32 rank, POINT pos, bool bMask = false); Sint32 chDst, size_t channel, Sint32 rank, Point pos, bool bMask = false);
bool DrawIconDemi ( bool DrawIconDemi (
Sint32 chDst, size_t channel, Sint32 rank, POINT pos, bool bMask = false); Sint32 chDst, size_t channel, Sint32 rank, Point pos, bool bMask = false);
bool DrawIconPart ( bool DrawIconPart (
Sint32 chDst, size_t channel, Sint32 rank, POINT pos, Sint32 startY, Sint32 chDst, size_t channel, Sint32 rank, Point pos, Sint32 startY,
Sint32 endY, bool bMask = false); Sint32 endY, bool bMask = false);
bool DrawPart ( bool DrawPart (
Sint32 chDst, size_t channel, POINT dest, RECT rect, bool bMask = false); Sint32 chDst, size_t channel, Point dest, Rect rect, bool bMask = false);
bool DrawImage (Sint32 chDst, size_t channel, RECT rect); bool DrawImage (Sint32 chDst, size_t channel, Rect rect);
bool BuildIconMask ( bool BuildIconMask (
size_t channelMask, Sint32 rankMask, size_t channel, Sint32 rankSrc, size_t channelMask, Sint32 rankMask, size_t channel, Sint32 rankSrc,
@ -90,20 +90,20 @@ public:
void ChangeSprite (MouseSprites sprite); void ChangeSprite (MouseSprites sprite);
protected: protected:
Sint32 BltFast (Sint32 chDst, size_t channel, POINT dst, RECT rcRect); Sint32 BltFast (Sint32 chDst, size_t channel, Point dst, Rect rcRect);
Sint32 BltFast ( Sint32 BltFast (
SDL_Texture * lpSDL, size_t channel, POINT dst, RECT rcRect, SDL_Texture * lpSDL, size_t channel, Point dst, Rect rcRect,
SDL_BlendMode = SDL_BLENDMODE_BLEND); SDL_BlendMode = SDL_BLENDMODE_BLEND);
RECT MouseRectSprite (); Rect MouseRectSprite ();
SDL_Point GetCursorHotSpot (MouseSprites sprite); SDL_Point GetCursorHotSpot (MouseSprites sprite);
SDL_Rect GetCursorRect (MouseSprites sprite); SDL_Rect GetCursorRect (MouseSprites sprite);
protected: protected:
bool m_bDebug; bool m_bDebug;
bool m_bPalette; bool m_bPalette;
POINT m_dim; // dimensions totales Point m_dim; // dimensions totales
RECT m_clipRect; // rectangle de clipping Rect m_clipRect; // rectangle de clipping
MouseSprites m_mouseSprite; MouseSprites m_mouseSprite;
bool m_bBackDisplayed; bool m_bBackDisplayed;

View File

@ -44,7 +44,7 @@ CJauge::~CJauge ()
// Crée un nouveau bouton. // Crée un nouveau bouton.
bool bool
CJauge::Create (CPixmap * pPixmap, CSound * pSound, POINT pos, Sint32 type) CJauge::Create (CPixmap * pPixmap, CSound * pSound, Point pos, Sint32 type)
{ {
m_pPixmap = pPixmap; m_pPixmap = pPixmap;
m_pSound = pSound; m_pSound = pSound;
@ -64,7 +64,7 @@ void
CJauge::Draw () CJauge::Draw ()
{ {
Sint32 part; Sint32 part;
RECT rect; Rect rect;
if (m_bHide) // bouton caché ? if (m_bHide) // bouton caché ?
{ {
@ -127,7 +127,7 @@ CJauge::SetHide (bool bHide)
m_bHide = bHide; m_bHide = bHide;
} }
POINT Point
CJauge::GetPos () CJauge::GetPos ()
{ {
return m_pos; return m_pos;

View File

@ -30,7 +30,7 @@ public:
CJauge (); CJauge ();
~CJauge (); ~CJauge ();
bool Create (CPixmap * pPixmap, CSound * pSound, POINT pos, Sint32 type); bool Create (CPixmap * pPixmap, CSound * pSound, Point pos, Sint32 type);
void Draw (); void Draw ();
void SetLevel (Sint32 level); void SetLevel (Sint32 level);
@ -39,15 +39,15 @@ public:
bool GetHide (); bool GetHide ();
void SetHide (bool bHide); void SetHide (bool bHide);
POINT GetPos (); Point GetPos ();
protected: protected:
CPixmap * m_pPixmap; CPixmap * m_pPixmap;
CDecor * m_pDecor; CDecor * m_pDecor;
CSound * m_pSound; CSound * m_pSound;
bool m_bHide; // true si bouton caché bool m_bHide; // true si bouton caché
POINT m_pos; // coin sup/gauche Point m_pos; // coin sup/gauche
POINT m_dim; // dimensions Point m_dim; // dimensions
Sint32 m_type; Sint32 m_type;
Sint32 m_level; Sint32 m_level;
}; };

View File

@ -251,7 +251,7 @@ CSound::Play (Sint32 channel, Sint32 volume, Uint8 panLeft, Uint8 panRight)
// �ventuellement stopper le dernier son en cours ! // �ventuellement stopper le dernier son en cours !
bool bool
CSound::PlayImage (Sounds channel, POINT pos, Sint32 rank) CSound::PlayImage (Sounds channel, Point pos, Sint32 rank)
{ {
Sint32 volumex, volumey, volume; Sint32 volumex, volumey, volume;
Sounds stopCh; Sounds stopCh;

View File

@ -54,7 +54,7 @@ public:
bool Play ( bool Play (
Sint32 channel, Sint32 volume = 0, Uint8 panLeft = 255, Sint32 channel, Sint32 volume = 0, Uint8 panLeft = 255,
Uint8 panRight = 255); Uint8 panRight = 255);
bool PlayImage (Sounds channel, POINT pos, Sint32 rank = -1); bool PlayImage (Sounds channel, Point pos, Sint32 rank = -1);
bool PlayMusic (const std::string & lpszMIDIFilename); bool PlayMusic (const std::string & lpszMIDIFilename);
bool RestartMusic (); bool RestartMusic ();
void SuspendMusic (); void SuspendMusic ();

View File

@ -108,7 +108,7 @@ GetCharWidth (const char *& c, Sint32 font)
* \param[in] font - The font style (little or normal). * \param[in] font - The font style (little or normal).
*/ */
void void
DrawText (CPixmap * pPixmap, POINT pos, const char * pText, Sint32 font) DrawText (CPixmap * pPixmap, Point pos, const char * pText, Sint32 font)
{ {
Sint32 rank; Sint32 rank;
@ -133,7 +133,7 @@ DrawText (CPixmap * pPixmap, POINT pos, const char * pText, Sint32 font)
void void
DrawTextPente ( DrawTextPente (
CPixmap * pPixmap, POINT pos, const char * pText, Sint32 pente, Sint32 font) CPixmap * pPixmap, Point pos, const char * pText, Sint32 pente, Sint32 font)
{ {
Sint32 rank, lg, rel, start; Sint32 rank, lg, rel, start;
@ -160,7 +160,7 @@ DrawTextPente (
void void
DrawTextRect ( DrawTextRect (
CPixmap * pPixmap, POINT pos, char * pText, Sint32 pente, Sint32 font, CPixmap * pPixmap, Point pos, char * pText, Sint32 pente, Sint32 font,
Sint32 part) Sint32 part)
{ {
char text[100]; char text[100];
@ -216,12 +216,12 @@ DrawTextRect (
// contenir plusieurs lignes séparées par des '\n'. // contenir plusieurs lignes séparées par des '\n'.
void void
DrawTextCenter (CPixmap * pPixmap, POINT pos, const char * pText, Sint32 font) DrawTextCenter (CPixmap * pPixmap, Point pos, const char * pText, Sint32 font)
{ {
char text[100]; char text[100];
char * pDest; char * pDest;
Sint32 itl; Sint32 itl;
POINT start; Point start;
if (font == FONTLITTLE) if (font == FONTLITTLE)
itl = DIMLITTLEY; itl = DIMLITTLEY;
@ -337,12 +337,12 @@ GetBignumInfo (Sint32 num, Sint32 & start, Sint32 & lg)
// Affiche un grand nombre. // Affiche un grand nombre.
void void
DrawBignum (CPixmap * pPixmap, POINT pos, Sint32 num) DrawBignum (CPixmap * pPixmap, Point pos, Sint32 num)
{ {
char string[10]; char string[10];
Sint32 i = 0; Sint32 i = 0;
Sint32 start, lg; Sint32 start, lg;
RECT rect; Rect rect;
snprintf (string, sizeof (string), "%d", num); snprintf (string, sizeof (string), "%d", num);

View File

@ -28,20 +28,20 @@
// clang-format on // clang-format on
void void
DrawText (CPixmap * pPixmap, POINT pos, const char * pText, Sint32 font = 0); DrawText (CPixmap * pPixmap, Point pos, const char * pText, Sint32 font = 0);
void DrawTextPente ( void DrawTextPente (
CPixmap * pPixmap, POINT pos, const char * pText, Sint32 pente, CPixmap * pPixmap, Point pos, const char * pText, Sint32 pente,
Sint32 font = 0); Sint32 font = 0);
void DrawTextRect ( void DrawTextRect (
CPixmap * pPixmap, POINT pos, char * pText, Sint32 pente, Sint32 font = 0, CPixmap * pPixmap, Point pos, char * pText, Sint32 pente, Sint32 font = 0,
Sint32 part = -1); Sint32 part = -1);
void DrawTextCenter ( void DrawTextCenter (
CPixmap * pPixmap, POINT pos, const char * pText, Sint32 font = 0); CPixmap * pPixmap, Point pos, const char * pText, Sint32 font = 0);
Sint32 GetTextHeight (char * pText, Sint32 font = 0, Sint32 part = -1); Sint32 GetTextHeight (char * pText, Sint32 font = 0, Sint32 part = -1);
Sint32 GetTextWidth (const char * pText, Sint32 font = 0); Sint32 GetTextWidth (const char * pText, Sint32 font = 0);
void DrawBignum (CPixmap * pPixmap, POINT pos, Sint32 num); void DrawBignum (CPixmap * pPixmap, Point pos, Sint32 num);
Sint32 GetBignumWidth (Sint32 num); Sint32 GetBignumWidth (Sint32 num);