diff --git a/Speedy Eggbert 2 Source.vcxproj b/Speedy Eggbert 2 Source.vcxproj
index 195bff0..4f958ed 100644
--- a/Speedy Eggbert 2 Source.vcxproj
+++ b/Speedy Eggbert 2 Source.vcxproj
@@ -17,11 +17,12 @@
Release
x64
+
17.0
Win32Proj
- {07f25327-c838-4acd-adba-be17f75007ef}
+ {e424a3cb-c8b8-447c-be63-41a57e65b449}
SpeedyEggbert2Source
10.0
@@ -52,33 +53,36 @@
true
Unicode
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Level3
true
- WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)
+ WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
true
- Windows
+ Console
true
@@ -88,11 +92,11 @@
true
true
true
- WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)
+ WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
true
- Windows
+ Console
true
true
true
@@ -102,11 +106,11 @@
Level3
true
- _DEBUG;_WINDOWS;%(PreprocessorDefinitions)
+ _DEBUG;_CONSOLE;%(PreprocessorDefinitions)
true
- Windows
+ Console
true
@@ -116,66 +120,19 @@
true
true
true
- NDEBUG;_WINDOWS;%(PreprocessorDefinitions)
+ NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
true
- Windows
+ Console
true
true
true
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
\ No newline at end of file
+
diff --git a/Speedy Eggbert 2 Source.vcxproj.filters b/Speedy Eggbert 2 Source.vcxproj.filters
index 883d3a1..a8a6563 100644
--- a/Speedy Eggbert 2 Source.vcxproj.filters
+++ b/Speedy Eggbert 2 Source.vcxproj.filters
@@ -14,135 +14,4 @@
rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
-
-
- Resource Files
-
-
-
-
- Resource Files
-
-
- Resource Files
-
-
\ No newline at end of file
diff --git a/Speedy Eggbert 2 Source.vcxproj.user b/Speedy Eggbert 2 Source.vcxproj.user
new file mode 100644
index 0000000..88a5509
--- /dev/null
+++ b/Speedy Eggbert 2 Source.vcxproj.user
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/blupi.cpp b/blupi.cpp
index bd33870..a55acef 100644
--- a/blupi.cpp
+++ b/blupi.cpp
@@ -20,6 +20,7 @@
#include "jauge.h"
#include "event.h"
#include "misc.h"
+#include "network.h"
// Define Globals
diff --git a/button.cpp b/button.cpp
index 99c1804..f9264b0 100644
--- a/button.cpp
+++ b/button.cpp
@@ -228,6 +228,16 @@ void CButton::SetEnable(BOOL bEnable)
m_bEnable = bEnable;
}
+void CButton::SetSomething(BOOL bSomething)
+{
+ if (m_bSomething != bSomething)
+ {
+ m_bRedraw = TRUE;
+ }
+
+ m_bSomething = bSomething;
+}
+
/*
// Needed Yet?
diff --git a/button.h b/button.h
index 6caa468..75b4a84 100644
--- a/button.h
+++ b/button.h
@@ -23,6 +23,8 @@ public:
BOOL GetEnable();
void SetEnable(BOOL bEnable);
+ void SetSomething(BOOL bSomething);
+
BOOL GetHide();
void SetHide(BOOL bHide);
diff --git a/event.cpp b/event.cpp
index 4b639d7..e57897f 100644
--- a/event.cpp
+++ b/event.cpp
@@ -1619,6 +1619,16 @@ void CEvent::SetEnable(int button, BOOL bEnable)
m_buttons[index].SetEnable(bEnable);
}
+void CEvent::SetSomething(int button, int bSomething)
+{
+ int index;
+
+ index = GetButtonIndex(button);
+ if (index < 0) return;
+
+ m_buttons[index].SetSomething(bSomething);
+}
+
int CEvent::GetMenu(int button)
{
int index;
@@ -1652,7 +1662,33 @@ void CEvent::RestoreGame()
WaitMouse(FALSE);
}
+void CEvent::SomethingDecor()
+{
+ m_input = 0;
+ m_pDecor->TreatEvent();
+}
+// CNetwork function needs to be implemented
+
+void CEvent::PauseStatus(UINT pause, int multiplayer)
+{
+ UINT m_bPause;
+ m_bPause = pause;
+
+ m_pDecor->SetFieldCCA4(pause);
+
+ if (m_phase == WM_PHASE_PLAY ||
+ m_phase == WM_PHASE_PLAYTEST)
+ {
+ if (m_bPause = 0) {
+ m_pSound->RestartMusic();
+ }
+ else {
+ m_pSound->SuspendMusic();
+ }
+
+ }
+}
void AddCheatCode(char *pDst, char *pSrc)
{
@@ -1723,6 +1759,11 @@ BOOL CEvent::DrawButtons()
AddCheatCode(text, cheat_code[21]);
}
}
+ if (m_phase == WM_PHASE_INIT)
+ {
+ DrawTextNew(m_pPixmap, pos, "Version 2.0", FONTLITTLE);
+ }
+
}
int CEvent::MousePosToSprite(POINT pos)
@@ -1976,6 +2017,23 @@ BOOL CEvent::GetPause()
return m_bPause;
}
+int CEvent::SomethingMissions()
+{
+ int tmp = m_mission;
+
+ if (tmp % 10 == 0 ||
+ tmp == 99)
+ {
+ m_mission = 1;
+ return tmp / 10;
+ }
+ else
+ {
+ m_mission = tmp / 10 * 10;
+ return (tmp < 0);
+ }
+}
+
void CEvent::DemoRecStart()
{
m_pDemoBuffer = (DemoEvent*)malloc(MAXDEMO*sizeof(DemoEvent));
diff --git a/event.h b/event.h
index a645669..ab2a22c 100644
--- a/event.h
+++ b/event.h
@@ -65,16 +65,20 @@ public:
UINT GetPhase();
void TryInsert();
void RestoreGame();
+ int SomethingMissions();
int GetButtonIndex(int button);
int GetState(int button);
void SetState(int button, int state);
BOOL GetEnable(int button);
void SetEnable(int button, BOOL bEnable);
+ void SetSomething(int button, int bSomething);
BOOL GetHide(int button);
void SetHide(int button, BOOL bHide);
int GetMenu(int button);
void SetMenu(int button, int menu);
+ void SomethingDecor();
+ void PauseStatus(UINT pause, int multiplayer);
BOOL DrawButtons();
int MousePosToSprite(POINT pos);
diff --git a/network.cpp b/network.cpp
index 26e24ca..032598e 100644
--- a/network.cpp
+++ b/network.cpp
@@ -23,6 +23,20 @@ CNetwork::CNetwork()
m_field6_0x18;
}
+CNetwork::~CNetwork()
+{
+}
+
+void CNetwork::FreeSessionList()
+{
+ if (m_pSessions != NULL)
+ {
+ free(m_pSessions);
+ }
+ m_pUnkC = NULL;
+ m_pSessions = NULL;
+}
+
void TraceErrorDP(HRESULT hErr, char *sFile, int nLine)
{
char dperr[256];
diff --git a/network.h b/network.h
index e4f35d4..e04ea38 100644
--- a/network.h
+++ b/network.h
@@ -5,6 +5,8 @@ public:
~CNetwork();
BOOL Create();
+ void FreeSessionList();
+
protected:
int m_field0_0x0;
int m_field8_0x20;
diff --git a/resource.h b/resource.h
new file mode 100644
index 0000000..8e685d0
--- /dev/null
+++ b/resource.h
@@ -0,0 +1,282 @@
+//{{NO_DEPENDENCIES}}
+// Microsoft Developer Studio generated include file.
+// Used by Blupi.rc
+//
+#define TX_ACTION_GO 1
+#define TX_ACTION_STOP 2
+#define TX_ACTION_MANGE 3
+#define TX_ACTION_CARRY 4
+#define TX_ACTION_DEPOSE 5
+#define TX_ACTION_ABAT 6
+#define TX_ACTION_ROC 7
+#define TX_ACTION_CULTIVE 8
+#define TX_ACTION_BUILD1 9
+#define TX_ACTION_BUILD2 10
+#define TX_ACTION_BUILD3 11
+#define TX_ACTION_BUILD4 12
+#define TX_ACTION_BUILD5 13
+#define TX_ACTION_BUILD6 14
+#define TX_ACTION_MUR 15
+#define TX_ACTION_PALIS 16
+#define TX_ACTION_ABATn 17
+#define TX_ACTION_ROCn 18
+#define TX_ACTION_PONT 19
+#define TX_ACTION_TOUR 20
+#define TX_ACTION_BOIT 21
+#define TX_ACTION_LABO 22
+#define TX_ACTION_FLEUR 23
+#define TX_ACTION_FLEURn 24
+#define TX_ACTION_DYNAMITE 25
+#define TX_ACTION_BATEAU 26
+#define TX_ACTION_DJEEP 27
+#define TX_ACTION_DRAPEAU 28
+#define TX_ACTION_EXTRAIT 29
+#define TX_ACTION_FABJEEP 30
+#define TX_ACTION_FABMINE 31
+#define TX_ACTION_FABDISC 32
+#define TX_ACTION_REPEAT 33
+#define TX_ACTION_QARMURE 34
+#define TX_ACTION_FABARMURE 35
+#define TX_IONAMEEX 100
+#define TX_IOFREE 101
+#define IDR_MENU 102
+#define TX_TERMMIN 102
+#define TX_TERMMAX 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_BUTTON_BUTTON 117
+#define TX_BUTTON_CTERM 118
+#define TX_BUTTON_TERMC 119
+#define TX_BUTTON_TERMHBLUPI 120
+#define TX_BUTTON_TERMHPLANCHE 121
+#define TX_BUTTON_TERMFIRE 122
+#define TX_BUTTON_TERMDEC 123
+#define TX_BUTTON_TERMINC 124
+#define TX_PAUSE 125
+#define TX_JAUGE1 126
+#define TX_JAUGE2 127
+#define TX_BUTTON_SETUP 128
+#define TX_BUTTON_MUSIC 129
+#define TX_BUTTON_SETUP1 130
+#define TX_BUTTON_SETUP2 131
+#define TX_BUTTON_SETUP3 132
+#define TX_BUTTON_SETUP4 133
+#define TX_BUTTON_MUSIC1 134
+#define TX_BUTTON_MUSIC2 135
+#define TX_BUTTON_MUSIC3 136
+#define TX_BUTTON_MUSIC4 137
+#define TX_BUTTON_MUSIC5 138
+#define TX_BUTTON_MUSIC6 139
+#define TX_BUTTON_MUSIC7 140
+#define TX_BUTTON_MUSIC8 141
+#define TX_BUTTON_MUSIC9 142
+#define TX_BUTTON_MUSIC10 143
+#define TX_BUTTON_REGION 144
+#define TX_BUTTON_TERMMBLUPI 145
+#define TX_BUTTON_TERMKILL 146
+#define TX_TERM 147
+#define TX_BUTTON 148
+#define TX_MUSIC 149
+#define TX_SCHOOL 150
+#define TX_MISSION 151
+#define TX_IONAMEMI 152
+#define TX_BUTTON_TERMHTOMATE 153
+#define TX_BUTTON_SETUP5 154
+#define TX_BUTTON_SETUP6 155
+#define TX_BUTTON_SETUP7 156
+#define TX_BUTTON_SETUP8 157
+#define TX_OUI 158
+#define TX_NON 159
+#define TX_BUTTON_SETUP9 160
+#define TX_BUTTON_SETUP10 161
+#define TX_INFO_SETUP1 162
+#define TX_INFO_SETUP2 163
+#define TX_INFO_SETUP3 164
+#define TX_INFO_SETUP4 165
+#define TX_INFO_SETUP5 166
+#define TX_INFO_SETUP6 167
+#define TX_INFO_SETUP7 168
+#define TX_INFO_SETUP8 169
+#define TX_INFO_SETUP9 170
+#define TX_INFO_SETUP10 171
+#define TX_INFO_SETUP10b 172
+#define TX_INFO_NOSCROLL 173
+#define TX_BUTTON_REGION1 174
+#define TX_BUTTON_REGION2 175
+#define TX_BUTTON_REGION3 176
+#define TX_BUTTON_REGION4 177
+#define TX_REGION 178
+#define TX_BUTTON_PLAY_STOP 179
+#define TX_BUTTON_PLAY_SETUP 180
+#define TX_BUTTON_PLAY_WRITE 181
+#define TX_INSERT 182
+#define TX_BUTTON_PREVH 183
+#define TX_BUTTON_NEXTH 184
+#define TX_BUTTON_TERMHMETAL 185
+#define TX_BUTTON_HELP 186
+#define TX_HELP 187
+#define TX_BUTTON_PRIVE 188
+#define TX_PRIVATE 189
+#define TX_IONAMEPR 190
+#define TX_PRIVATE_HACHBLUPI 191
+#define TX_PRIVATE_HACHPLANCHE 192
+#define TX_PRIVATE_HACHTOMATE 193
+#define TX_PRIVATE_HACHMETAL 194
+#define TX_PRIVATE_STOPFIRE 195
+#define TX_PRIVATE_HOMEBLUPI 196
+#define TX_PRIVATE_KILLROBOTS 197
+#define TX_BUTTON_UNDO 198
+#define TX_DEMO_END1 199
+#define TX_DEMO_END2 200
+#define TX_DEMO_END3 201
+#define TX_DEMO_END4 202
+#define TX_FULL_END1 203
+#define TX_FULL_END2 204
+#define TX_FULL_END3 205
+#define TX_FULL_END4 206
+#define TX_PRIVATE_OBJECTIF 207
+#define TX_PRIVATE_NBBLUPI 208
+#define TX_BUTTON_SKILL 209
+#define TX_SKILL1 210
+#define TX_SKILL2 211
+#define TX_BUTTON_DEMO 212
+#define TX_DEMOREC 213
+#define TX_DEMOPLAY 214
+#define TX_BUTTON_TERMHROBOT 215
+#define TX_PRIVATE_HACHROBOT 216
+#define TX_REPEAT_CULTIVE 500
+#define TX_REPEAT_FLEUR 501
+#define TX_REPEAT_FLEURQ 502
+#define TX_REPEAT_FABMINE 503
+#define TX_REPEAT_FABJEEP 504
+#define TX_REPEAT_PALIS 505
+#define TX_REPEAT_PALISQ 506
+#define TX_REPEAT_PONT 507
+#define TX_REPEAT_PONTQ 508
+#define TX_REPEAT_BATEAU 509
+#define TX_REPEAT_BATEAUQ 510
+#define TX_REPEAT_FABARMURE 511
+#define TX_DIRECT_N 512
+#define TX_DIRECT_S 513
+#define TX_DIRECT_E 514
+#define TX_DIRECT_O 515
+#define IDR_WAVE_BOING 1000
+#define TX_ERROR_MISC 1000
+#define IDR_WAVE_BLOW 1001
+#define TX_ERROR_GROUND 1001
+#define TX_ERROR_FREE 1002
+#define TX_ERROR_PONTOP 1003
+#define TX_ERROR_PONTTERM 1004
+#define TX_ERROR_TOURISOL 1005
+#define TX_ERROR_TOUREAU 1006
+#define TX_ERROR_TELE2 1007
+#define TX_OBJ_BLUPIm 2000
+#define TX_OBJ_BLUPIf 2001
+#define TX_OBJ_BLUPI 2002
+#define TX_OBJ_BATEAU 2003
+#define TX_OBJ_JEEP 2004
+#define TX_OBJ_PIEGE 2005
+#define TX_OBJ_POISON 2006
+#define TX_OBJ_DYNAMITE 2007
+#define TX_OBJ_MINE 2008
+#define TX_OBJ_TOMATE 2009
+#define TX_OBJ_POTION 2010
+#define TX_OBJ_PLANCHE 2011
+#define TX_OBJ_PIERRE 2012
+#define TX_OBJ_DRAPEAU 2013
+#define TX_OBJ_FER 2014
+#define TX_OBJ_FLEUR1 2015
+#define TX_OBJ_FLEUR2 2016
+#define TX_OBJ_FLEUR3 2017
+#define TX_OBJ_CABANE 2018
+#define TX_OBJ_LABO 2019
+#define TX_OBJ_MINEFER 2020
+#define TX_OBJ_USINE 2021
+#define TX_OBJ_TOUR 2022
+#define TX_OBJ_FEU 2023
+#define TX_OBJ_ROBOT 2024
+#define TX_OBJ_TRACKS 2025
+#define TX_OBJ_BOMBE 2026
+#define TX_OBJ_ARAIGNEE 2027
+#define TX_OBJ_VIRUS 2028
+#define TX_OBJ_ELECTRO 2029
+#define TX_OBJ_ARBRE 2030
+#define TX_OBJ_MUR 2031
+#define TX_OBJ_ARBREb 2032
+#define TX_OBJ_ROC 2033
+#define TX_OBJ_OEUF 2034
+#define TX_OBJ_PALISSADE 2035
+#define TX_OBJ_ENNEMIp 2036
+#define TX_OBJ_ENNEMI 2037
+#define TX_OBJ_HERBE 2038
+#define TX_OBJ_MOUSSE 2039
+#define TX_OBJ_TERRE 2040
+#define TX_OBJ_EAU 2041
+#define TX_OBJ_RIVE 2042
+#define TX_OBJ_MIXTE 2043
+#define TX_OBJ_PONT 2044
+#define TX_OBJ_COUVEUSE 2045
+#define TX_OBJ_GLACE 2046
+#define TX_OBJ_MAISON 2047
+#define TX_OBJ_HACHURE 2048
+#define TX_OBJ_MOUSSEb 2049
+#define TX_OBJ_BOUQUET1 2050
+#define TX_OBJ_BOUQUET2 2051
+#define TX_OBJ_BOUQUET3 2052
+#define TX_OBJ_DALLE 2053
+#define TX_OBJ_ENNEMIs 2054
+#define TX_OBJ_DISCIPLE 2055
+#define TX_OBJ_METAL 2056
+#define TX_OBJ_FUSEE 2057
+#define TX_OBJ_TELEPORTE 2058
+#define TX_OBJ_ARMURE 2059
+#define TX_OBJ_DALLESPEC 2060
+#define TX_OBJ_COUVTELE 2061
+#define TX_OBJ_BATIMENT 2062
+#define TX_OBJ_BATENNEMIS 2063
+#define TX_OBJ_MURPAL 2064
+#define TX_OBJ_OBJET 2065
+#define TX_OBJ_ARME 2066
+#define TX_OBJ_VEHICULE 2067
+#define TX_OBJ_STARTFEU 2068
+#define TX_OBJ_DELOBJ 2069
+#define TX_OBJ_DELPERSO 2070
+#define TX_OBJ_DELFEU 2071
+#define TX_OBJ_PLANTE 2072
+#define TX_OBJ_BARENNEMIS 2073
+#define TX_WIN1 3000
+#define TX_WIN2 3001
+#define TX_WIN3 3002
+#define TX_WIN4 3003
+#define TX_WIN5 3004
+#define TX_LOST1 3100
+#define TX_LOST2 3101
+#define TX_LOST3 3102
+#define TX_LOST4 3103
+#define TX_LOST5 3104
+#define TX_LASTWIN1 3200
+#define TX_LASTWIN2 3201
+#define TX_LASTWIN3 3202
+#define IDM_EXIT 40001
+
+// Next default values for new objects
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE 109
+#define _APS_NEXT_COMMAND_VALUE 40001
+#define _APS_NEXT_CONTROL_VALUE 1000
+#define _APS_NEXT_SYMED_VALUE 101
+#endif
+#endif
diff --git a/text.cpp b/text.cpp
index 93b7f45..8e16f74 100644
--- a/text.cpp
+++ b/text.cpp
@@ -103,6 +103,29 @@ void DrawText(CPixmap *pPixmap, POINT pos, char *pText, int font)
}
}
+void DrawTextNew(CPixmap* pPixmap, POINT pos, char* pText, int font)
+{
+ char text;
+
+ text = *pText;
+
+ while (text != '\0')
+ {
+ pText = pText + 1;
+ DrawChar(pPixmap, &pos, text, font);
+ text = *pText;
+ }
+}
+
+void DrawChar(CPixmap* pPixmap, POINT* pos, char c, int font)
+{
+ int width;
+ UINT index;
+
+ index = (UINT)(BYTE)c;
+ pos->y = (int)table_offsets[index].charOffsetY + pos->y;
+}
+
// Affiche un texte pench�.
void DrawTextPente(CPixmap *pPixmap, POINT pos, char *pText,
diff --git a/text.h b/text.h
index 1f3cf60..aa8ebb1 100644
--- a/text.h
+++ b/text.h
@@ -10,6 +10,12 @@
extern
void DrawText(CPixmap *pPixmap, POINT pos, char *pText, int font=0);
+extern
+void DrawTextNew(CPixmap *pPixmap, POINT pos, char* pText, int font = 0);
+
+extern
+void DrawChar(CPixmap* pPixmap, POINT pos, char* pText, int font = 0);
+
extern
void DrawTextPente(CPixmap *pPixmap, POINT pos, char *pText,
int pente, int font=0);