mirror of
https://github.com/jummy0/sb2-decomp
synced 2025-03-15 04:24:48 +01:00
Event updates
This commit is contained in:
parent
63dd837384
commit
e3abfb8d61
Binary file not shown.
Binary file not shown.
@ -2,6 +2,6 @@
|
||||
"ExpandedNodes": [
|
||||
""
|
||||
],
|
||||
"SelectedNode": "\\jauge.cpp",
|
||||
"SelectedNode": "\\event.cpp",
|
||||
"PreviewInSolutionExplorer": false
|
||||
}
|
BIN
.vs/slnx.sqlite
BIN
.vs/slnx.sqlite
Binary file not shown.
49
event.cpp
49
event.cpp
@ -32,6 +32,10 @@ typedef struct
|
||||
short reserve1[9];
|
||||
short exercice; // exercice en cours (0..n)
|
||||
short mission; // mission en cours (0..n)
|
||||
short multi;
|
||||
short lives;
|
||||
short bHiliInfoButton;
|
||||
short pPlayerName;
|
||||
short speed;
|
||||
short bMovie;
|
||||
short maxMission; // derni<6E>re mission effectu<74>e (0..n)
|
||||
@ -1476,6 +1480,7 @@ CEvent::CEvent()
|
||||
m_bWaitMouse = FALSE;
|
||||
m_bHideMouse = FALSE;
|
||||
m_bShowMouse = FALSE;
|
||||
m_tryPhase = 0;
|
||||
m_rankCheat = -1;
|
||||
m_posCheat = 0;
|
||||
m_speed = 1;
|
||||
@ -1495,6 +1500,7 @@ CEvent::CEvent()
|
||||
m_pDemoBuffer = NULL;
|
||||
m_demoTime = 0;
|
||||
m_bCtrlDown = FALSE;
|
||||
m_input = 0;
|
||||
|
||||
for ( i=0 ; i<MAXBUTTON ; i++ )
|
||||
{
|
||||
@ -1519,6 +1525,11 @@ CEvent::~CEvent()
|
||||
WriteInfo(); // Read the file "info.blp"
|
||||
}
|
||||
|
||||
void CEvent::OutputNetDebug(char* str)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// Returns the mouse position
|
||||
|
||||
POINT CEvent::GetMousePos()
|
||||
@ -2271,3 +2282,41 @@ POINT CEvent::GetLastMousePos()
|
||||
return m_oldMousePos;
|
||||
}
|
||||
|
||||
BOOL CEvent::WriteInfo()
|
||||
{
|
||||
char filename[MAX_PATH];
|
||||
FILE* file = NULL;
|
||||
DescInfo info;
|
||||
int nb;
|
||||
|
||||
strcpy(filename, "data\\info.blp");
|
||||
AddUserPath(filename);
|
||||
|
||||
file = fopen(filename, "wb");
|
||||
if (file == NULL) goto error;
|
||||
|
||||
info.majRev = 1;
|
||||
info.prive = m_private;
|
||||
info.mission = m_mission;
|
||||
info.multi = m_multi;
|
||||
info.lives = m_lives;
|
||||
info.speed = m_speed;
|
||||
info.bMovie = m_bMovie;
|
||||
info.bHiliInfoButton = m_bHiliInfoButton;
|
||||
info.bAccessBuild = m_bAccessBuild;
|
||||
|
||||
info.skill = m_pDecor->GetSkill();
|
||||
|
||||
info.audioVolume = m_pSound->GetAudioVolume();
|
||||
info.midiVolume = m_pSound->GetMidiVolume();
|
||||
|
||||
nb = fwrite(&info, sizeof(DescInfo), 1, file);
|
||||
if (nb < 1) goto error;
|
||||
|
||||
fclose(file);
|
||||
return TRUE;
|
||||
|
||||
error:
|
||||
if (file != NULL) fclose(file);
|
||||
return FALSE;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user