1
0
mirror of https://github.com/jummy0/sb2-decomp synced 2025-03-14 20:23:30 +01:00
This commit is contained in:
jummy 2024-09-23 21:12:43 -05:00
commit 05d418f375
9 changed files with 1860 additions and 748 deletions

View File

@ -1,12 +1,106 @@
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by speedyblupi.rc
// Used by Resource.rc
//
#define TX_IONAMEEX 100
#define TX_IOFREE 101
#define TX_OWNMISSION 102
#define TX_TESTMISSION 103
#define TX_BUTTON_JOUER 104
#define TX_BUTTON_APPRENDRE 105
#define TX_BUTTON_QUITTER 106
#define TX_BUTTON_PREVP 107
#define TX_BUTTON_NEXTP 108
#define TX_BUTTON_PLAYP 109
#define TX_BUTTON_BUILDP 110
#define TX_BUTTON_TERM 111
#define TX_BUTTON_READP 112
#define TX_BUTTON_WRITEP 113
#define TX_BUTTON_CANCELP 114
#define TX_BUTTON_CONTP 115
#define TX_BUTTON_REPEAT 116
#define TX_CHOOSEPLAYER 117
#define TX_PLAYERSNAME 118
#define TX_BUTTON_TERMC 119
#define TX_CHOOSESIZE 120
#define TX_BUTTON_HVSCROLL 121
#define TX_BUTTON_ONLYHSSCROLL 122
#define TX_BUTTON_ONLYVSCROLL 123
#define TX_BUTTON_TESTMISSION 124
#define TX_PAUSE 125
#define TX_TINY 126
#define TX_CLEARPLAYER 127
#define TX_SETTINGS 128
#define TX_CHOOSEMUSIC 129
#define TX_BUTTON_SETUP1 130
#define TX_BUTTON_SETUP2 131
#define TX_BUTTON_SETUP3 132
#define TX_BUTTON_SETUP4 133
#define TX_NOMUSIC 134
#define TX_MUSIC1 135
#define TX_MUSIC2 136
#define TX_MUSIC3 137
#define TX_MUSIC4 138
#define TX_MUSIC5 139
#define TX_MUSIC6 140
#define TX_MUSIC7 141
#define TX_MUSIC8 142
#define TX_MUSIC9 143
#define TX_BUTTON_REGION 144
#define TX_DISCARDGAME 145
#define TX_EGGBERT 146
#define TX_DESIGNMISSION 147
#define TX_CHOOSEGAMER 148
#define TX_MUSIC 149
#define TX_TRAININGNUM 150
#define TX_MISSIONNUM 151
#define TX_MISSIONTIME 152
#define TX_SIZE 153
#define TX_BUTTON_SETUP5 154
#define TX_BUTTON_SETUP6 155
#define TX_BUTTON_SETUP7 156
#define TX_BUTTON_SETUP8 157
#define TX_CONFYES 158
#define TX_CONFNO 159
#define TX_SETTING 160
#define TX_SAVECURRENTMISS 161
#define TX_SOUNDVOL 162
#define TX_MUSICVOL 163
#define TX_COLORDEP 164
#define TX_INPUT 165
#define TX_OPENMISS 166
#define TX_READINFO 167
#define TX_PLAYERFREE 168
#define TX_NUMDOOROPEN 169
#define TX_NUMDOORSOPEN 170
#define TX_MUSIC10 171
#define TX_WRITENAME 172
#define TX_NONE 173
#define TX_CONFIRM 174
#define TX_CANCEL 175
#define TX_YES 176
#define TX_NO 177
#define TX_REGION 178
#define TX_SUS 179
#define TX_BUTTON_SETUP 180
#define TX_SAVES 181
#define TX_INSERT 182
#define TX_DELETEMISS 183
#define TX_DELETEMISSION 184
#define TX_NAMEOFMISS 185
#define TX_NAMEOFMISSION 186
#define TX_NONAME 187
#define TX_DESIGN 188
#define TX_MISSNUM 189
#define TX_MISSTIME 190
#define IDI_ICON1 190
#define TX_MISSION2D 191
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 101
#define _APS_NEXT_RESOURCE_VALUE 191
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1001
#define _APS_NEXT_SYMED_VALUE 101

View File

@ -551,7 +551,31 @@ void CDecor::ModifDecor(POINT pos, int icon, BOOL bMulti)
BOOL CDecor::IsRightBorder(POINT pos, POINT offset)
{
return FALSE; // TODO
int icon;
if (pos.x >= 0
&& pos.x < (m_dimDecor.x != 0 ? 100 : 10)
&& pos.y >= 0
&& pos.y < (m_dimDecor.y != 0 ? 100 : 8))
{
icon = m_decor[offset.x][100 * pos.x + pos.y + offset.y].icon;
if (icon >= 386 && icon <= 397 || icon == 400)
{
int icon2 = m_decor[pos.x][pos.y].icon;
return icon2 >= 386 && icon2 <= 397 || icon2 == 400;
}
if (icon >= 250 && icon <= 260)
{
int icon3 = m_decor[pos.x][pos.y].icon;
return icon3 >= 250 && icon <= 260;
}
int num = m_decor[pos.x][pos.y].icon;
switch (num)
{
}
}
}

View File

@ -18,32 +18,277 @@ void CDecor::GetMissionPath(char* str, int user, int mission, BOOL bUser)
return;
}
BOOL CDecor::DeleteMission(int user, int mission, BOOL bUser)
{
char filename[FILENAME_MAX];
GetMissionPath(filename, user, mission, bUser);
remove(filename);
return TRUE;
}
BOOL CDecor::Write(int gamer, int mission, BOOL bUser)
{
return FALSE; //TODO
char filename[FILENAME_MAX];
DescFile* pBuffer;
FILE* file;
int* blupiDir;
POINT* blupiPos;
int nb;
int i;
GetMissionPath(filename, gamer, mission, bUser);
file = fopen(filename, "wb");
if (file == NULL) goto error;
pBuffer = (DescFile*)malloc(sizeof(DescFile));
if (pBuffer == NULL) goto error;
memset(pBuffer, 0, sizeof(DescFile));
i = 4;
pBuffer->majRev = 1;
pBuffer->minRev = 3;
*pBuffer->reserve1 = 0;
pBuffer->posDecor = m_posDecor;
pBuffer->dimDecor = m_dimDecor;
pBuffer->music = m_music;
pBuffer->region = m_region;
blupiDir = m_blupiStartDir;
strcpy(pBuffer->libelle, m_missionTitle);
blupiPos = m_blupiStartPos;
for (i = 0; i < 4; i++)
{
pBuffer->blupiPos[i] = m_blupiStartPos[i];
}
for (i = 0; i < 4; i++)
{
pBuffer->blupiDir[i] = m_blupiStartDir[i];
}
nb = fwrite(pBuffer, sizeof(DescFile), 1, file);
if (nb < 1) goto error;
nb = fwrite(m_decor, sizeof(Cellule), MAXCELX * MAXCELY / 4, file);
if (nb < MAXCELX * MAXCELY / 4) goto error;
nb = fwrite(m_bigDecor, sizeof(Cellule), MAXCELX * MAXCELY / 4, file);
if (nb < MAXCELX * MAXCELY / 4) goto error;
nb = fwrite(m_moveObject, sizeof(MoveObject), MAXMOVEOBJECT, file);
if (nb < MAXMOVEOBJECT) goto error;
free(pBuffer);
fclose(file);
return TRUE;
error:
if (pBuffer != NULL) free(pBuffer);
if (file != NULL) fclose(file);
return FALSE;
}
BOOL CDecor::Read(int gamer, int mission, BOOL bUser)
{
return FALSE; //TODO
char filename[FILENAME_MAX];
FILE* file;
DescFile* pBuffer;
short majRev, minRev;
short obj;
Cellule(*objects)[100];
POINT* startPos;
POINT* blupiPos;
int nb;
int i = 4;
int x, y;
int* startDir;
int* blupiDir;
pBuffer = 0;
InitDecor();
GetMissionPath(filename, gamer, mission, bUser);
file = fopen(filename, "rb");
if (file == NULL) goto error;
pBuffer = (DescFile*)malloc(sizeof(DescFile));
if (pBuffer == NULL) goto error;
nb = fread(pBuffer, sizeof(DescFile), 1, file);
if (nb < 1) goto error;
majRev = pBuffer->majRev;
minRev = pBuffer->minRev;
m_posDecor = pBuffer->posDecor;
m_dimDecor = pBuffer->dimDecor;
m_music = pBuffer->music;
m_region = pBuffer->region;
if (0 < majRev && minRev > 2)
{
strcpy(m_missionTitle,pBuffer->libelle);
}
startDir = m_blupiStartDir;
blupiDir = pBuffer->blupiDir;
startPos = m_blupiStartPos;
blupiPos = pBuffer->blupiPos;
for (i = 0; i < 4; i++)
{
m_blupiStartPos[i] = pBuffer->blupiPos[i];
}
for (i = 0; i < 4; i++)
{
m_blupiStartDir[i] = pBuffer->blupiDir[i];
}
nb = fread(m_decor, sizeof(Cellule), MAXCELX * MAXCELY / 4, file);
if (nb < MAXCELX * MAXCELY / 4) goto error;
for (x = 0; x < MAXCELX / 2; x++)
{
for (y = 0; y < MAXCELY / 2; y++)
{
if (m_decor[x][y].icon >= 48 &&
m_decor[x][y].icon <= 67)
{
m_decor[x][y].icon -= 128 - 17;
}
}
}
if (majRev == 1 && minRev <= 1)
{
memset(m_moveObject, 0, sizeof(MoveObject));
nb = fread(m_moveObject, sizeof(MoveObject), MAXMOVEOBJECT / 2, file);
if (nb < MAXMOVEOBJECT / 2) goto error;
}
else
{
nb = fread(m_moveObject, sizeof(MoveObject), MAXMOVEOBJECT, file);
if (nb < MAXMOVEOBJECT) goto error;
}
free(pBuffer);
fclose(file);
return TRUE;
error:
if (pBuffer != NULL) free(pBuffer);
if (file != NULL) fclose(file);
InitDecor();
return FALSE;
}
BOOL CDecor::SomethingMissionPath(int gamer, int mission, BOOL bUser)
{
return FALSE; //TODO
return FALSE;
}
BOOL CDecor::MissionStart(int gamer, int mission, BOOL bUser)
{
return FALSE; //TODO
char filename[MAX_PATH];
FILE* file = NULL;
DescFile* pBuffer = NULL;
int nb, i, x, y;
int majRev, minRev;
sprintf(filename, "data\\s%.3d-%.3d.blp", gamer, mission);
AddUserPath(filename);
file = fopen(filename, "wb");
if (file == NULL) goto error;
pBuffer = (DescFile*)malloc(sizeof(DescFile));
if (pBuffer == NULL) goto error;
memset(pBuffer, 0, sizeof(DescFile));
pBuffer->majRev = 1;
pBuffer->minRev = 4;
memcpy(pBuffer->reserve1, m_decor, sizeof(Cellule));
memcpy(pBuffer->reserve1, m_bigDecor, sizeof(m_bigDecor));
memcpy(pBuffer->reserve1, m_balleTraj, sizeof(m_balleTraj));
memcpy(pBuffer->reserve1, m_moveTraj, sizeof(m_moveTraj));
memcpy(pBuffer->reserve1, m_moveObject, sizeof(m_moveObject));
pBuffer->posDecor = m_posDecor;
pBuffer->dimDecor = m_dimDecor;
pBuffer->world = m_mission;
pBuffer->music = m_music;
pBuffer->region = m_region;
pBuffer->blupiPos[2] = m_blupiPos;
pBuffer->blupiPos[3] = m_blupiValidPos;
pBuffer->blupiDir[3] = m_blupiStartDir[3];
pBuffer->libelle[99] = m_missionTitle[99];
if (fwrite(pBuffer, sizeof(DescFile), 1, file) >= 1)
{
free(pBuffer);
fclose(file);
return TRUE;
}
error:
if (pBuffer != NULL) free(pBuffer);
if (file != NULL) fclose(file);
return FALSE;
}
BOOL CDecor::CurrentRead(int gamer, int mission, BOOL *pbMission, BOOL *pbPrivate)
{
return FALSE; //TODO
char filename[MAX_PATH];
FILE* file = NULL;
DescFile* pBuffer = NULL;
int majRev, minRev;
int nb, i, x, y;
sprintf(filename, "data\\s%.3d-%.3d.blp", gamer, mission);
AddUserPath(filename);
file = fopen(filename, "rb");
if (file == NULL) goto error;
pBuffer = (DescFile*)malloc(sizeof(DescFile));
if (pBuffer == NULL) goto error;
nb = fread(pBuffer, sizeof(DescFile), 1, file);
if (nb < 1) goto error;
majRev = pBuffer->majRev;
return TRUE;
error:
if (pBuffer != NULL) free(pBuffer);
if (file != NULL) fclose(file);
return FALSE;
}
BOOL CDecor::CurrentWrite(int gamer, int mission, char* param3)
{
return FALSE; //TODO
char filename[MAX_PATH];
FILE* file = NULL;
DescFile* pBuffer = NULL;
int majRev, minRev;
int nb, i, x, y;
sprintf(filename, "data\\s%.3d-%.3d.blp", gamer, mission);
AddUserPath(filename);
file = fopen(filename, "wb");
if (file == NULL) goto error;
pBuffer = (DescFile*)malloc(sizeof(DescFile));
if (pBuffer == NULL) goto error;
return TRUE;
error:
if (pBuffer != NULL) free(pBuffer);
if (file != NULL) fclose(file);
return FALSE;
}

View File

@ -7,7 +7,94 @@
#include "dectables.h"
BOOL CDecor::TestPath(RECT rect, POINT start, POINT end)
{
int num = abs(end.x - start.x);
int num2 = abs(end.y - start.y);
POINT tinyPoint = start;
if (num > num2)
{
RECT rect2;
if (end.x > start.x)
{
for (int i = 0; i <= num; i++)
{
int j = i * (end.y - start.y) / num;
rect2.left = rect.left + i;
rect2.right = rect.right + i;
rect2.top = rect.top + j;
rect2.bottom = rect.bottom + j;
if (DecorDetect(rect2))
{
end = tinyPoint;
return FALSE;
}
tinyPoint.x = start.x + i;
tinyPoint.y = start.y + j;
}
}
if (end.x < start.x)
{
for (int i = 0; i >= -num; i--)
{
int j = i * (start.y - end.y) / num;
rect2.left = rect.left + i;
rect2.right = rect.right + i;
rect2.top = rect.top + j;
rect2.bottom = rect.bottom + j;
if (DecorDetect(rect2))
{
end = tinyPoint;
return FALSE;
}
tinyPoint.x = start.x + i;
tinyPoint.y = start.y + j;
}
}
}
else
{
RECT rect2;
if (end.y > start.y)
{
for (int j = 0; j <= num2; j++)
{
int i = j * (end.x - start.x) / num2;
rect2.left = rect.left + i;
rect2.right = rect.right + i;
rect2.top = rect.top + j;
rect2.bottom = rect.bottom + j;
if (DecorDetect(rect2))
{
end = tinyPoint;
return FALSE;
}
tinyPoint.x = start.x + i;
tinyPoint.y = start.y + j;
}
}
if (end.y < start.y)
{
for (int j = 0; j >= -num2; j--)
{
int i = j * (start.x - end.x) / num2;
rect2.left = rect.left + i;
rect2.right = rect.right + i;
rect2.top = rect.top + j;
rect2.bottom = rect.bottom + j;
if (DecorDetect(rect2))
{
end = tinyPoint;
return FALSE;
}
tinyPoint.x = start.x + i;
tinyPoint.y = start.y + j;
}
}
}
return TRUE;
}
void CDecor::MoveObjectPollution()
@ -124,10 +211,7 @@ BOOL CDecor::IsBalleTraj(POINT pos)
void CDecor::FlushMoveTraj()
{
for (int i = 0; i < 1300; i++)
{
m_moveTraj[i] = 0;
}
memset(m_moveTraj, 0, sizeof(m_moveTraj));
}
void CDecor::SetMoveTraj(POINT pos)
@ -394,7 +478,7 @@ void CDecor::MoveObjectStepLine(int i)
POINT tinyPoint;
BOOL flag = FALSE;
RECT tinyRect;
if (m_moveObject[i].type == 1 || m_moveObject[i].type == TYPE_ASCENSEURs || m_moveObject[i].type == TYPE_ASCENSEURsi && !m_blupiSuspend)
if (m_moveObject[i].type == 1 || m_moveObject[i].type == 47 || m_moveObject[i].type == 48 && !m_blupiSuspend)
{
RECT src;
src.left = m_blupiPos.x + 20;
@ -406,7 +490,7 @@ void CDecor::MoveObjectStepLine(int i)
tinyRect.top = m_moveObject[i].posCurrent.y;
tinyRect.bottom = m_moveObject[i].posCurrent.y + 16;
RECT tinyRect2;
flag = IntersectRect(&tinyRect2, &tinyRect, &src);
flag = IntersectRect(tinyRect2, tinyRect, src);
tinyPoint = m_moveObject[i].posCurrent;
}
POINT posCurrent;
@ -433,7 +517,7 @@ void CDecor::MoveObjectStepLine(int i)
tinyRect.right = posCurrent.x + 60 - 10;
tinyRect.top = posCurrent.y + 10;
tinyRect.bottom = posCurrent.y + 60 - 10;
if (TestPath(tinyRect, m_moveObject[i].posCurrent, &posCurrent))
if (TestPath(tinyRect, m_moveObject[i].posCurrent, posCurrent))
{
m_moveObject[i].posCurrent = posCurrent;
m_moveObject[i].posStart = posCurrent;
@ -530,7 +614,7 @@ void CDecor::MoveObjectStepLine(int i)
m_moveObject[i].type = 0;
}
posCurrent = m_moveObject[i].posCurrent;
if (m_moveObject[i].type == 1 || m_moveObject[i].type == TYPE_ASCENSEURs || m_moveObject[i].type == TYPE_ASCENSEURsi)
if (m_moveObject[i].type == 1 || m_moveObject[i].type == 47 || m_moveObject[i].type == 48)
{
posCurrent.y -= 64;
}
@ -541,11 +625,11 @@ void CDecor::MoveObjectStepLine(int i)
{
m_blupiVector.x = m_moveObject[i].posCurrent.x - tinyPoint.x;
m_blupiVector.y = m_moveObject[i].posCurrent.y - (m_blupiPos.y + 60 - BLUPIFLOOR);
if (m_moveObject[i].type == TYPE_ASCENSEURs)
if (m_moveObject[i].type == 47)
{
m_blupiVector.x = m_blupiVector.x + 2;
}
if (m_moveObject[i].type == TYPE_ASCENSEURsi)
if (m_moveObject[i].type == 48)
{
m_blupiVector.x = m_blupiVector.x - 2;
}
@ -559,11 +643,11 @@ void CDecor::MoveObjectStepLine(int i)
void CDecor::MoveObjectStepIcon(int i)
{
POINT pos;
if (m_moveObject[i].type == TYPE_ASCENSEURs)
if (m_moveObject[i].type == 47)
{
m_moveObject[i].icon = table_chenille[m_moveObject[i].phase / 1 % 6];
}
if (m_moveObject[i].type == TYPE_ASCENSEURsi)
if (m_moveObject[i].type == 48)
{
m_moveObject[i].icon = table_chenillei[m_moveObject[i].phase / 1 % 6];
}
@ -684,27 +768,27 @@ void CDecor::MoveObjectStepIcon(int i)
m_moveObject[i].icon = 29 + m_moveObject[i].phase / 3 % 8;
m_moveObject[i].channel = 10;
}
if (m_moveObject[i].type == TYPE_CLE)
if (m_moveObject[i].type == 21)
{
m_moveObject[i].icon = table_cle[m_moveObject[i].phase / 3 % 12];
m_moveObject[i].channel = 10;
}
if (m_moveObject[i].type == TYPE_CLE1)
if (m_moveObject[i].type == 49)
{
m_moveObject[i].icon = table_cle1[m_moveObject[i].phase / 3 % 12];
m_moveObject[i].channel = 10;
}
if (m_moveObject[i].type == TYPE_CLE2)
if (m_moveObject[i].type == 50)
{
m_moveObject[i].icon = table_cle2[m_moveObject[i].phase / 3 % 12];
m_moveObject[i].channel = 10;
}
if (m_moveObject[i].type == TYPE_CLE3)
if (m_moveObject[i].type == 51)
{
m_moveObject[i].icon = table_cle3[m_moveObject[i].phase / 3 % 12];
m_moveObject[i].channel = 10;
}
if (m_moveObject[i].type == TYPE_SKATE)
if (m_moveObject[i].type == 24)
{
m_moveObject[i].icon = table_skate[m_moveObject[i].phase / 1 % 34];
m_moveObject[i].channel = 10;
@ -1455,7 +1539,7 @@ void CDecor::DynamiteStart(int i, int dx, int dy)
{
if (m_moveObject[i].type == 2 || m_moveObject[i].type == 3 || m_moveObject[i].type == 96 || m_moveObject[i].type == 97 || m_moveObject[i].type == 4 ||
m_moveObject[i].type == 6 || m_moveObject[i].type == 12 || m_moveObject[i].type == 13 || m_moveObject[i].type == 16 || m_moveObject[i].type == 17 ||
m_moveObject[i].type == 19 || m_moveObject[i].type == 20 || m_moveObject[i].type == TYPE_SKATE || m_moveObject[i].type == 25 || m_moveObject[i].type == 26 || m_moveObject[i].type == 28 ||
m_moveObject[i].type == 19 || m_moveObject[i].type == 20 || m_moveObject[i].type == 24 || m_moveObject[i].type == 25 || m_moveObject[i].type == 26 || m_moveObject[i].type == 28 ||
m_moveObject[i].type == 30 || m_moveObject[i].type == 32 || m_moveObject[i].type == 33 || m_moveObject[i].type == 34 || m_moveObject[i].type == 40 || m_moveObject[i].type == 44 ||
m_moveObject[i].type == 46 || m_moveObject[i].type == 52 || m_moveObject[i].type == 54 || m_moveObject[i].type == 200 || m_moveObject[i].type == 201 || m_moveObject[i].type == 202 ||
m_moveObject[i].type == 203)
@ -1466,7 +1550,7 @@ void CDecor::DynamiteStart(int i, int dx, int dy)
src2.top = m_moveObject[i].posCurrent.y;
src2.bottom = m_moveObject[i].posCurrent.y + 20;
RECT tinyRect;
if (IntersectRect(&tinyRect, &src2, &src))
if (IntersectRect(tinyRect, src2, src))
{
if (m_moveObject[i].type == 12)
{
@ -1520,7 +1604,7 @@ int CDecor::AscenseurDetect(RECT rect, POINT oldpos, POINT newpos)
num = abs(num);
for (int i = 0; i < MAXMOVEOBJECT; i++)
{
if (m_moveObject[i].type == 1 || m_moveObject[i].type == TYPE_ASCENSEURs || m_moveObject[i].type == TYPE_ASCENSEURsi)
if (m_moveObject[i].type == 1 || m_moveObject[i].type == 47 || m_moveObject[i].type == 48)
{
RECT src;
src.left = m_moveObject[i].posCurrent.x;
@ -1530,7 +1614,7 @@ int CDecor::AscenseurDetect(RECT rect, POINT oldpos, POINT newpos)
if (num < 30)
{
RECT tinyRect;
if (IntersectRect(&tinyRect, &src, &rect))
if (IntersectRect(tinyRect, src, rect))
{
return i;
}
@ -1543,7 +1627,7 @@ int CDecor::AscenseurDetect(RECT rect, POINT oldpos, POINT newpos)
for (int j = 0; j <= num / 30; j++)
{
RECT tinyRect;
if (IntersectRect(&tinyRect, &src, &src2))
if (IntersectRect(tinyRect, src, src2))
{
return i;
}
@ -1685,7 +1769,7 @@ void CDecor::SearchLinkCaisse(int rank, BOOL bPop)
src2.right = src2.left + 64 + 1;
src2.bottom = src2.top + 64 + 1;
RECT tinyRect;
if (IntersectRect(&tinyRect, &src2, &src) && AddLinkCaisse(num2))
if (IntersectRect(tinyRect, src2, src) && AddLinkCaisse(num2))
{
flag = TRUE;
}
@ -1808,7 +1892,7 @@ int CDecor::MockeryDetect(POINT pos)
src2.top = m_moveObject[i].posCurrent.y + 36;
src2.bottom = m_moveObject[i].posCurrent.y + 60;
RECT tinyRect;
if (IntersectRect(&tinyRect, &src2, &src))
if (IntersectRect(tinyRect, src2, src))
{
if (m_moveObject[i].type == 54)
{
@ -1861,7 +1945,7 @@ BOOL CDecor::BlupiElectro(POINT pos)
src2.top = m_blupiPos.y + 11 - 40;
src2.bottom = m_blupiPos.y + 60 - 2 + 40;
RECT tinyRect;
return IntersectRect(&tinyRect, &src, &src2);
return IntersectRect(tinyRect, src, src2);
}
void CDecor::MoveObjectFollow(POINT pos)
@ -1883,7 +1967,7 @@ void CDecor::MoveObjectFollow(POINT pos)
src2.top = m_moveObject[i].posCurrent.y - 100;
src2.bottom = m_moveObject[i].posCurrent.y + 60 + 100;
RECT tinyRect;
if (IntersectRect(&tinyRect, &src2, &src))
if (IntersectRect(tinyRect, src2, src))
{
m_moveObject[i].type = 97;
PlaySound(92, m_moveObject[i].posCurrent);
@ -1936,7 +2020,7 @@ int CDecor::MoveAscenseurDetect(POINT pos, int height)
src.bottom = pos.y + 60 + height - 1;
for (int i = 0; i < MAXMOVEOBJECT; i++)
{
if (m_moveObject[i].type == 1 || m_moveObject[i].type == TYPE_ASCENSEURs || m_moveObject[i].type == TYPE_ASCENSEURsi)
if (m_moveObject[i].type == 1 || m_moveObject[i].type == 47 || m_moveObject[i].type == 48)
{
RECT src2;
src2.left = m_moveObject[i].posCurrent.x;
@ -1944,7 +2028,7 @@ int CDecor::MoveAscenseurDetect(POINT pos, int height)
src2.top = m_moveObject[i].posCurrent.y;
src2.bottom = m_moveObject[i].posCurrent.y + 16;
RECT tinyRect;
if (IntersectRect(&tinyRect, &src2, &src))
if (IntersectRect(tinyRect, src2, src))
{
return i;
}
@ -1970,7 +2054,7 @@ int CDecor::MoveChargeDetect(POINT pos)
src2.top = m_moveObject[i].posCurrent.y + 36;
src2.bottom = m_moveObject[i].posCurrent.y + 60;
RECT tinyRect;
if (IntersectRect(&tinyRect, &src2, &src))
if (IntersectRect(tinyRect, src2, src))
{
return i;
}
@ -1996,7 +2080,7 @@ int CDecor::MovePersoDetect(POINT pos)
src2.top = m_moveObject[i].posCurrent.y + 36;
src2.bottom = m_moveObject[i].posCurrent.y + 60;
RECT tinyRect;
if (IntersectRect(&tinyRect, &src2, &src))
if (IntersectRect(tinyRect, src2, src))
{
return i;
}

View File

@ -200,4 +200,5 @@ void CDecor::NotifStep()
else {
m_notifTime--;
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -53,6 +53,7 @@ typedef struct
}
DemoEvent;
class CEvent
{
public:
@ -72,16 +73,19 @@ public:
int GetImageWorld();
BOOL IsHelpHide();
BOOL ChangePhase(UINT phase);
BOOL LoadImageFromDisc();
UINT GetPhase();
void MovieToStart();
BOOL NetworkNuggets(int fuck);
void HandleInputs();
void ReadInput();
void TryInsert();
void SomethingUserMissions(LPCSTR lpFileName, LPCSTR thing);
//void SomethingUserMissions(LPCSTR lpFileName, LPCSTR thing);
BOOL OpenMission(char* pMission, char* pFile);
void RestoreGame();
int MissionBack();
void TableSomething();
int PlaceBuildItem(POINT cel, int flags, int currentIcon);
int GetButtonIndex(int button);
int GetState(int button);
@ -185,19 +189,18 @@ protected:
void MouseRelease();
void MouseCapture();
int GameSave(int save);
void DrawMap();
BOOL CheckCDForWorld1();
void NetAdjustLobbyButtons();
BOOL CopyMission(char *srcFileName, char *dstFileName);
BOOL FUN_1fbd0();
protected:
int m_speed;
int m_exercice;
int m_quicksaveIndex;
int m_mission;
char m_gamerName[100];
char m_gamerNameList[10][100];
char m_gamerNameList[8][100];
void* m_somethingJoystick;
int m_menuIndex;
int m_choiceIndex;
@ -205,12 +208,15 @@ protected:
int m_menuDecor[11];
BOOL m_bMouseRelease;
int m_private;
int m_bNamesExist[8];
int m_fileIndex;
int m_maxMission;
int m_phase;
int m_index;
int m_playerIndex;
BOOL m_bSchool;
BOOL m_bPrivate;
BOOL m_bDrawMap;
BOOL m_bMulti;
BOOL m_bBuildOfficialMissions;
BOOL m_bFullScreen;
@ -277,7 +283,6 @@ protected:
BOOL m_bDemoPlay;
DemoEvent* m_pDemoBuffer;
int m_demoTime;
int m_keyPress;
int m_demoIndex;
int m_demoEnd;
int m_demoNumber;
@ -296,14 +301,17 @@ protected:
HINSTANCE m_hInstance;
char m_chatZone[100][5];
char m_text[100];
int m_keyPress;
int m_choicePageOffset;
int m_nbChoices;
int m_0008;
int m_6D30;
BOOL m_b6D34;
//BOOL m_b6D34;
int m_96B4;
int m_nbVies;
public:
int m_input;
};
extern

View File

@ -65,6 +65,8 @@ public:
void SetBenchmarkSuccess(BOOL bSuccess);
void SetTrueColor(BOOL bTrueColor);
void SetTrueColorDecor(BOOL bTrueColorDecor);
BOOL GetTrueColor();
BOOL GetTrueColorDecor();
protected:
HRESULT RestoreAll();
@ -79,7 +81,6 @@ protected:
void MouseBackDebug();
void MouseRectSprite(RECT *rect, POINT *offset);
void MouseHotSpot();
BOOL GetTrueColor();

View File

@ -1,6 +1,6 @@
//{{NO_DEPENDENCIES}}
// Microsoft Developer Studio generated include file.
// Used by Blupi.rc
// Microsoft Visual C++ generated include file.
// Used by Eggbert 2.rc
//
#define TX_ACTION_GO 1
#define TX_ACTION_STOP 2
@ -37,6 +37,7 @@
#define TX_ACTION_REPEAT 33
#define TX_ACTION_QARMURE 34
#define TX_ACTION_FABARMURE 35
<<<<<<<< HEAD:src/resource.h
#define TX_IONAMEEX 100
#define TX_IOFREE 101
#define TX_OWNMISSION 102
@ -116,6 +117,137 @@
#define TX_GAMESAVED 288
#define TX_NOTINDEMO 289
========
#define TX_IONAMEEX 100
#define TX_IOFREE 101
#define TX_OWNMISSION 102
#define TX_TESTMISSION 103
#define TX_BUTTON_JOUER 104
#define TX_BUTTON_APPRENDRE 105
#define TX_BUTTON_QUITTER 106
#define TX_BUTTON_PREVP 107
#define TX_BUTTON_NEXTP 108
#define TX_BUTTON_PLAYP 109
#define TX_BUTTON_BUILDP 110
#define TX_BUTTON_TERM 111
#define TX_BUTTON_READP 112
#define TX_BUTTON_WRITEP 113
#define TX_BUTTON_CANCELP 114
#define TX_BUTTON_CONTP 115
#define TX_BUTTON_REPEAT 116
#define TX_CHOOSEPLAYER 117
#define TX_PLAYERSNAME 118
#define TX_BUTTON_TERMC 119
#define TX_CHOOSESIZE 120
#define TX_BUTTON_HVSCROLL 121
#define TX_BUTTON_ONLYHSCROLL 122
#define TX_BUTTON_ONLYVSCROLL 123
#define TX_BUTTON_TESTMISSION 124
#define TX_PAUSE 125
#define TX_TINY 126
#define TX_CLEARPLAYER 127
#define TX_SETTINGS 128
#define TX_CHOOSEMUSIC 129
#define TX_BUTTON_SETUP1 130
#define TX_BUTTON_SETUP2 131
#define TX_BUTTON_SETUP3 132
#define TX_BUTTON_SETUP4 133
#define TX_NOMUSIC 134
#define TX_MUSIC1 135
#define TX_MUSIC2 136
#define TX_MUSIC3 137
#define TX_MUSIC4 138
#define TX_MUSIC5 139
#define TX_MUSIC6 140
#define TX_MUSIC7 141
#define TX_MUSIC8 142
#define TX_MUSIC9 143
#define TX_BUTTON_REGION 144
#define TX_DISCARDGAME 145
#define TX_EGGBERT 146
#define TX_DESIGNMISSION 147
#define TX_CHOOSEGAMER 148
#define TX_MUSIC 149
#define TX_TRAININGNUM 150
#define TX_MISSIONNUM 151
#define TX_MISSIONTIME 152
#define TX_SIZE 153
#define TX_BUTTON_SETUP5 154
#define TX_BUTTON_SETUP6 155
#define TX_BUTTON_SETUP7 156
#define TX_BUTTON_SETUP8 157
#define TX_CONFYES 158
#define TX_CONFNO 159
#define TX_SETTING 160
#define TX_SAVECURRENTMISS 161
#define TX_SOUNDVOL 162
#define TX_MUSICVOL 163
#define TX_COLORDEP 164
#define TX_INPUT 165
#define TX_OPENMISS 166
#define TX_READINFO 167
#define TX_PLAYERFREE 168
#define TX_NUMDOOROPEN 169
#define TX_NUMDOORSOPEN 170
#define TX_MUSIC10 171
#define TX_WRITENAME 172
#define TX_NONE 173
#define TX_CONFIRM 174
#define TX_CANCEL 175
#define TX_YES 176
#define TX_NO 177
#define TX_REGION 178
#define TX_SUS 179
#define TX_BUTTON_SETUP 180
#define TX_SAVES 181
#define TX_INSERT 182
#define TX_DELETEMISS 183
#define TX_DELETEMISSION 184
#define TX_NAMEOFMISS 185
#define TX_NAMEOFMISSION 186
#define TX_NONAME 187
#define TX_DESIGN 188
#define TX_MISSNUM 189
#define TX_MISSTIME 190
#define TX_MISSION2D 191
#define TX_SHOWNEXT 192
#define TX_SHOWPREV 193
#define TX_CONTENT 194
#define TX_SINGLEPLAYER 195
#define TX_MUTLIPLAYER 196
#define TX_MULTIPLAYER 196
#define TX_GAMEPAUSE 197
#define TX_CANCELLAST 198
#define TX_PLAYDEMO 199
#define TX_HADFUN 200
#define TX_OGCREATION 201
#define TX_WEBSITE 202
#define TX_FULL_END1 203
#define TX_FULL_END2 204
#define TX_FULL_END3 205
#define TX_FULL_END4 206
#define TX_CHOOSECOLOR 207
#define TX_CLICKREADY 208
#define TX_BUTTON_SKILL 209
#define TX_EASY 210
#define TX_HARD 211
#define TX_BUTTON_DEMO 212
#define TX_DEMOREC 213
#define TX_DEMOPLAY 214
#define TX_SHOWCONNECTION 242
#define TX_GAMEJOIN 247
#define TX_CREATE_MULTIGAME 248
#define TX_UPDATELIST 249
#define TX_MULTI_CREATE 250
#define TX_MULTI_GNAME 251
#define TX_OPEN 264
#define TX_HELP 268
#define TX_LOAD_CGAME 269
#define TX_SAVE_CGAME 270
#define TX_MISSIONFREE 272
#define TX_GAMESAVED 288
#define TX_NOTINDEMO 289
>>>>>>>> upstream/Overhaul:resource.h
#define TX_REPEAT_CULTIVE 500
#define TX_REPEAT_FLEUR 501
#define TX_REPEAT_FLEURQ 502
@ -229,14 +361,14 @@
#define TX_LASTWIN1 3200
#define TX_LASTWIN2 3201
#define TX_LASTWIN3 3202
#define TX_BUTTON_CREATE 6900
#define IDM_EXIT 40001
#define TX_BUTTON_CREATE 6900
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 109
#define _APS_NEXT_RESOURCE_VALUE 195
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1000
#define _APS_NEXT_SYMED_VALUE 101