parent
ad6bc13dc2
commit
8ad15c0ef7
|
@ -125,7 +125,7 @@ object/motion/motiontoto.cpp
|
||||||
object/motion/motionvehicle.cpp
|
object/motion/motionvehicle.cpp
|
||||||
object/motion/motionworm.cpp
|
object/motion/motionworm.cpp
|
||||||
object/object.cpp
|
object/object.cpp
|
||||||
# object/robotmain.cpp
|
object/robotmain.cpp
|
||||||
object/task/task.cpp
|
object/task/task.cpp
|
||||||
object/task/taskadvance.cpp
|
object/task/taskadvance.cpp
|
||||||
object/task/taskbuild.cpp
|
object/task/taskbuild.cpp
|
||||||
|
@ -167,7 +167,7 @@ ui/interface.cpp
|
||||||
ui/key.cpp
|
ui/key.cpp
|
||||||
ui/label.cpp
|
ui/label.cpp
|
||||||
ui/list.cpp
|
ui/list.cpp
|
||||||
# ui/maindialog.cpp
|
ui/maindialog.cpp
|
||||||
ui/mainmap.cpp
|
ui/mainmap.cpp
|
||||||
ui/mainshort.cpp
|
ui/mainshort.cpp
|
||||||
ui/map.cpp
|
ui/map.cpp
|
||||||
|
|
|
@ -189,7 +189,7 @@ char GetToLower(char letter)
|
||||||
|
|
||||||
// Converting time to string.
|
// Converting time to string.
|
||||||
|
|
||||||
void GimeToAscii(time_t time, char *buffer)
|
void TimeToAscii(time_t time, char *buffer)
|
||||||
{
|
{
|
||||||
struct tm when;
|
struct tm when;
|
||||||
int year;
|
int year;
|
||||||
|
|
|
@ -1175,10 +1175,10 @@ bool CRobotMain::EventProcess(const Event &event)
|
||||||
|
|
||||||
if (event.type == EVENT_KEY_DOWN)
|
if (event.type == EVENT_KEY_DOWN)
|
||||||
{
|
{
|
||||||
if (event.key.key == m_app->GetKey(KEYRANK_HELP, 0) ||
|
if (event.key.key == m_app->GetInputBinding(INPUT_SLOT_HELP).key /* TODO: joystick
|
||||||
event.key.key == m_app->GetKey(KEYRANK_HELP, 1) ||
|
|| event.key.key == m_app->GetInputBinding(INPUT_SLOT_HELP).joy */ ||
|
||||||
event.key.key == m_app->GetKey(KEYRANK_PROG, 0) ||
|
event.key.key == m_app->GetInputBinding(INPUT_SLOT_PROG).key /* TODO: joystick
|
||||||
event.key.key == m_app->GetKey(KEYRANK_PROG, 1) ||
|
|| event.key.key == m_app->GetInputBinding(INPUT_SLOT_PROG).joy */ ||
|
||||||
event.key.key == KEY(ESCAPE))
|
event.key.key == KEY(ESCAPE))
|
||||||
{
|
{
|
||||||
StopDisplayInfo();
|
StopDisplayInfo();
|
||||||
|
@ -1213,14 +1213,14 @@ bool CRobotMain::EventProcess(const Event &event)
|
||||||
}
|
}
|
||||||
if (m_editLock) // current edition?
|
if (m_editLock) // current edition?
|
||||||
{
|
{
|
||||||
if (event.key.key == m_app->GetKey(KEYRANK_HELP, 0) ||
|
if (event.key.key == m_app->GetInputBinding(INPUT_SLOT_HELP).key /* TODO: joystick
|
||||||
event.key.key == m_app->GetKey(KEYRANK_HELP, 1))
|
|| event.key.key == m_app->GetInputBinding(INPUT_SLOT_HELP).joy*/ )
|
||||||
{
|
{
|
||||||
StartDisplayInfo(SATCOM_HUSTON, false);
|
StartDisplayInfo(SATCOM_HUSTON, false);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (event.key.key == m_app->GetKey(KEYRANK_PROG, 0) ||
|
if (event.key.key == m_app->GetInputBinding(INPUT_SLOT_PROG).key /* TODO: joystick
|
||||||
event.key.key == m_app->GetKey(KEYRANK_PROG, 1))
|
|| event.key.key == m_app->GetInputBinding(INPUT_SLOT_PROG).joy*/)
|
||||||
{
|
{
|
||||||
StartDisplayInfo(SATCOM_PROG, false);
|
StartDisplayInfo(SATCOM_PROG, false);
|
||||||
return false;
|
return false;
|
||||||
|
@ -1229,8 +1229,8 @@ bool CRobotMain::EventProcess(const Event &event)
|
||||||
}
|
}
|
||||||
if (m_movieLock) // current movie?
|
if (m_movieLock) // current movie?
|
||||||
{
|
{
|
||||||
if (event.key.key == m_app->GetKey(KEYRANK_QUIT, 0) ||
|
if (event.key.key == m_app->GetInputBinding(INPUT_SLOT_QUIT).key /* TODO: joystick
|
||||||
event.key.key == m_app->GetKey(KEYRANK_QUIT, 1) ||
|
|| event.key.key == m_app->GetInputBinding(INPUT_SLOT_QUIT).joy */ ||
|
||||||
event.key.key == KEY(ESCAPE))
|
event.key.key == KEY(ESCAPE))
|
||||||
{
|
{
|
||||||
AbortMovie();
|
AbortMovie();
|
||||||
|
@ -1239,21 +1239,21 @@ bool CRobotMain::EventProcess(const Event &event)
|
||||||
}
|
}
|
||||||
if (m_camera->GetType() == Gfx::CAM_TYPE_VISIT)
|
if (m_camera->GetType() == Gfx::CAM_TYPE_VISIT)
|
||||||
{
|
{
|
||||||
if (event.key.key == m_app->GetKey(KEYRANK_VISIT, 0) ||
|
if (event.key.key == m_app->GetInputBinding(INPUT_SLOT_VISIT).key /* TODO: joystick
|
||||||
event.key.key == m_app->GetKey(KEYRANK_VISIT, 1))
|
|| event.key.key == m_app->GetInputBinding(INPUT_SLOT_VISIT).joy*/)
|
||||||
{
|
{
|
||||||
StartDisplayVisit(EVENT_NULL);
|
StartDisplayVisit(EVENT_NULL);
|
||||||
}
|
}
|
||||||
if (event.key.key == m_app->GetKey(KEYRANK_QUIT, 0) ||
|
if (event.key.key == m_app->GetInputBinding(INPUT_SLOT_QUIT).key /* TODO: joystick
|
||||||
event.key.key == m_app->GetKey(KEYRANK_QUIT, 1) ||
|
|| event.key.key == m_app->GetInputBinding(INPUT_SLOT_QUIT).joy */ ||
|
||||||
event.key.key == KEY(ESCAPE))
|
event.key.key == KEY(ESCAPE))
|
||||||
{
|
{
|
||||||
StopDisplayVisit();
|
StopDisplayVisit();
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (event.key.key == m_app->GetKey(KEYRANK_QUIT, 0) ||
|
if (event.key.key == m_app->GetInputBinding(INPUT_SLOT_QUIT).key /* TODO: joystick
|
||||||
event.key.key == m_app->GetKey(KEYRANK_QUIT, 1))
|
|| event.key.key == m_app->GetInputBinding(INPUT_SLOT_QUIT).joy*/)
|
||||||
{
|
{
|
||||||
if (m_movie->IsExist())
|
if (m_movie->IsExist())
|
||||||
StartDisplayInfo(SATCOM_HUSTON, false);
|
StartDisplayInfo(SATCOM_HUSTON, false);
|
||||||
|
@ -1273,55 +1273,55 @@ bool CRobotMain::EventProcess(const Event &event)
|
||||||
ChangePause(!m_engine->GetPause());
|
ChangePause(!m_engine->GetPause());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (event.key.key == m_app->GetKey(KEYRANK_CAMERA, 0) ||
|
if (event.key.key == m_app->GetInputBinding(INPUT_SLOT_CAMERA).key /* TODO: joystick
|
||||||
event.key.key == m_app->GetKey(KEYRANK_CAMERA, 1))
|
|| event.key.key == m_app->GetInputBinding(INPUT_SLOT_CAMERA).joy*/)
|
||||||
{
|
{
|
||||||
ChangeCamera();
|
ChangeCamera();
|
||||||
}
|
}
|
||||||
if (event.key.key == m_app->GetKey(KEYRANK_DESEL, 0) ||
|
if (event.key.key == m_app->GetInputBinding(INPUT_SLOT_DESEL).key /* TODO: joystick
|
||||||
event.key.key == m_app->GetKey(KEYRANK_DESEL, 1))
|
|| event.key.key == m_app->GetInputBinding(INPUT_SLOT_DESEL).joy*/)
|
||||||
{
|
{
|
||||||
if (m_shortCut)
|
if (m_shortCut)
|
||||||
DeselectObject();
|
DeselectObject();
|
||||||
}
|
}
|
||||||
if (event.key.key == m_app->GetKey(KEYRANK_HUMAN, 0) ||
|
if (event.key.key == m_app->GetInputBinding(INPUT_SLOT_HUMAN).key /* TODO: joystick
|
||||||
event.key.key == m_app->GetKey(KEYRANK_HUMAN, 1))
|
|| event.key.key == m_app->GetInputBinding(INPUT_SLOT_HUMAN).joy*/)
|
||||||
{
|
{
|
||||||
SelectHuman();
|
SelectHuman();
|
||||||
}
|
}
|
||||||
if (event.key.key == m_app->GetKey(KEYRANK_NEXT, 0) ||
|
if (event.key.key == m_app->GetInputBinding(INPUT_SLOT_NEXT).key /* TODO: joystick
|
||||||
event.key.key == m_app->GetKey(KEYRANK_NEXT, 1))
|
|| event.key.key == m_app->GetInputBinding(INPUT_SLOT_NEXT).joy*/)
|
||||||
{
|
{
|
||||||
if (m_shortCut)
|
if (m_shortCut)
|
||||||
m_short->SelectNext();
|
m_short->SelectNext();
|
||||||
}
|
}
|
||||||
if (event.key.key == m_app->GetKey(KEYRANK_HELP, 0) ||
|
if (event.key.key == m_app->GetInputBinding(INPUT_SLOT_HELP).key /* TODO: joystick
|
||||||
event.key.key == m_app->GetKey(KEYRANK_HELP, 1))
|
|| event.key.key == m_app->GetInputBinding(INPUT_SLOT_HELP).joy*/)
|
||||||
{
|
{
|
||||||
StartDisplayInfo(SATCOM_HUSTON, true);
|
StartDisplayInfo(SATCOM_HUSTON, true);
|
||||||
}
|
}
|
||||||
if (event.key.key == m_app->GetKey(KEYRANK_PROG, 0) ||
|
if (event.key.key == m_app->GetInputBinding(INPUT_SLOT_PROG).key /* TODO: joystick
|
||||||
event.key.key == m_app->GetKey(KEYRANK_PROG, 1))
|
|| event.key.key == m_app->GetInputBinding(INPUT_SLOT_PROG).joy*/)
|
||||||
{
|
{
|
||||||
StartDisplayInfo(SATCOM_PROG, true);
|
StartDisplayInfo(SATCOM_PROG, true);
|
||||||
}
|
}
|
||||||
if (event.key.key == m_app->GetKey(KEYRANK_VISIT, 0) ||
|
if (event.key.key == m_app->GetInputBinding(INPUT_SLOT_VISIT).key /* TODO: joystick
|
||||||
event.key.key == m_app->GetKey(KEYRANK_VISIT, 1))
|
|| event.key.key == m_app->GetInputBinding(INPUT_SLOT_VISIT).joy*/)
|
||||||
{
|
{
|
||||||
StartDisplayVisit(EVENT_NULL);
|
StartDisplayVisit(EVENT_NULL);
|
||||||
}
|
}
|
||||||
if (event.key.key == m_app->GetKey(KEYRANK_SPEED10, 0) ||
|
if (event.key.key == m_app->GetInputBinding(INPUT_SLOT_SPEED10).key /* TODO: joystick
|
||||||
event.key.key == m_app->GetKey(KEYRANK_SPEED10, 1))
|
|| event.key.key == m_app->GetInputBinding(INPUT_SLOT_SPEED10).joy*/)
|
||||||
{
|
{
|
||||||
SetSpeed(1.0f);
|
SetSpeed(1.0f);
|
||||||
}
|
}
|
||||||
if (event.key.key == m_app->GetKey(KEYRANK_SPEED15, 0) ||
|
if (event.key.key == m_app->GetInputBinding(INPUT_SLOT_SPEED15).key /* TODO: joystick
|
||||||
event.key.key == m_app->GetKey(KEYRANK_SPEED15, 1))
|
|| event.key.key == m_app->GetInputBinding(INPUT_SLOT_SPEED15).joy*/)
|
||||||
{
|
{
|
||||||
SetSpeed(1.5f);
|
SetSpeed(1.5f);
|
||||||
}
|
}
|
||||||
if (event.key.key == m_app->GetKey(KEYRANK_SPEED20, 0) ||
|
if (event.key.key == m_app->GetInputBinding(INPUT_SLOT_SPEED20).key /* TODO: joystick
|
||||||
event.key.key == m_app->GetKey(KEYRANK_SPEED20, 1))
|
|| event.key.key == m_app->GetInputBinding(INPUT_SLOT_SPEED20).joy*/)
|
||||||
{
|
{
|
||||||
SetSpeed(2.0f);
|
SetSpeed(2.0f);
|
||||||
}
|
}
|
||||||
|
@ -2694,12 +2694,11 @@ void CRobotMain::HiliteObject(Math::Point pos)
|
||||||
|
|
||||||
CObject* obj = m_short->DetectShort(pos);
|
CObject* obj = m_short->DetectShort(pos);
|
||||||
|
|
||||||
char name[100];
|
std::string nameStr;
|
||||||
|
if (m_dialog->GetTooltip() && m_interface->GetTooltip(pos, nameStr))
|
||||||
if (m_dialog->GetTooltip() && m_interface->GetTooltip(pos, name))
|
|
||||||
{
|
{
|
||||||
m_tooltipPos = pos;
|
m_tooltipPos = pos;
|
||||||
strcpy(m_tooltipName, name);
|
strcpy(m_tooltipName, nameStr.c_str());
|
||||||
m_tooltipTime = 0.0f;
|
m_tooltipTime = 0.0f;
|
||||||
if (obj == nullptr) return;
|
if (obj == nullptr) return;
|
||||||
}
|
}
|
||||||
|
@ -2722,6 +2721,7 @@ void CRobotMain::HiliteObject(Math::Point pos)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
char name[100];
|
||||||
if (obj != nullptr)
|
if (obj != nullptr)
|
||||||
{
|
{
|
||||||
if (m_dialog->GetTooltip() && obj->GetTooltipName(name))
|
if (m_dialog->GetTooltip() && obj->GetTooltipName(name))
|
||||||
|
@ -2734,8 +2734,8 @@ void CRobotMain::HiliteObject(Math::Point pos)
|
||||||
if (IsSelectable(obj))
|
if (IsSelectable(obj))
|
||||||
{
|
{
|
||||||
obj->SetHilite(true);
|
obj->SetHilite(true);
|
||||||
m_map->SetHilite(obj);
|
m_map->SetHighlight(obj);
|
||||||
m_short->SetHilite(obj);
|
m_short->SetHighlight(obj);
|
||||||
m_hilite = true;
|
m_hilite = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2903,26 +2903,26 @@ void CRobotMain::KeyCamera(EventType type, long key)
|
||||||
|
|
||||||
if (type == EVENT_KEY_UP)
|
if (type == EVENT_KEY_UP)
|
||||||
{
|
{
|
||||||
if (key == m_app->GetKey(KEYRANK_LEFT, 0) ||
|
if (key == m_app->GetInputBinding(INPUT_SLOT_LEFT).key /* TODO: joystick
|
||||||
key == m_app->GetKey(KEYRANK_LEFT, 1))
|
|| key == m_app->GetInputBinding(INPUT_SLOT_LEFT).joy*/)
|
||||||
{
|
{
|
||||||
m_cameraPan = 0.0f;
|
m_cameraPan = 0.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (key == m_app->GetKey(KEYRANK_RIGHT, 0) ||
|
if (key == m_app->GetInputBinding(INPUT_SLOT_RIGHT).key /* TODO: joystick
|
||||||
key == m_app->GetKey(KEYRANK_RIGHT, 1))
|
|| key == m_app->GetInputBinding(INPUT_SLOT_RIGHT).joy*/)
|
||||||
{
|
{
|
||||||
m_cameraPan = 0.0f;
|
m_cameraPan = 0.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (key == m_app->GetKey(KEYRANK_UP, 0) ||
|
if (key == m_app->GetInputBinding(INPUT_SLOT_UP).key /* TODO: joystick
|
||||||
key == m_app->GetKey(KEYRANK_UP, 1))
|
|| key == m_app->GetInputBinding(INPUT_SLOT_UP).joy*/ )
|
||||||
{
|
{
|
||||||
m_cameraZoom = 0.0f;
|
m_cameraZoom = 0.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (key == m_app->GetKey(KEYRANK_DOWN, 0) ||
|
if (key == m_app->GetInputBinding(INPUT_SLOT_DOWN).key /* TODO: joystick
|
||||||
key == m_app->GetKey(KEYRANK_DOWN, 1))
|
|| key == m_app->GetInputBinding(INPUT_SLOT_DOWN).joy*/ )
|
||||||
{
|
{
|
||||||
m_cameraZoom = 0.0f;
|
m_cameraZoom = 0.0f;
|
||||||
}
|
}
|
||||||
|
@ -2938,26 +2938,26 @@ void CRobotMain::KeyCamera(EventType type, long key)
|
||||||
|
|
||||||
if (type == EVENT_KEY_DOWN)
|
if (type == EVENT_KEY_DOWN)
|
||||||
{
|
{
|
||||||
if (key == m_app->GetKey(KEYRANK_LEFT, 0) ||
|
if (key == m_app->GetInputBinding(INPUT_SLOT_LEFT).key /* TODO: joystick
|
||||||
key == m_app->GetKey(KEYRANK_LEFT, 1))
|
|| key == m_app->GetInputBinding(INPUT_SLOT_LEFT).joy*/)
|
||||||
{
|
{
|
||||||
m_cameraPan = -1.0f;
|
m_cameraPan = -1.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (key == m_app->GetKey(KEYRANK_RIGHT, 0) ||
|
if (key == m_app->GetInputBinding(INPUT_SLOT_RIGHT).key /* TODO: joystick
|
||||||
key == m_app->GetKey(KEYRANK_RIGHT, 1))
|
|| key == m_app->GetInputBinding(INPUT_SLOT_RIGHT).joy*/)
|
||||||
{
|
{
|
||||||
m_cameraPan = 1.0f;
|
m_cameraPan = 1.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (key == m_app->GetKey(KEYRANK_UP, 0) ||
|
if (key == m_app->GetInputBinding(INPUT_SLOT_UP).key /* TODO: joystick
|
||||||
key == m_app->GetKey(KEYRANK_UP, 1))
|
|| key == m_app->GetInputBinding(INPUT_SLOT_UP).joy*/)
|
||||||
{
|
{
|
||||||
m_cameraZoom = -1.0f;
|
m_cameraZoom = -1.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (key == m_app->GetKey(KEYRANK_DOWN, 0) ||
|
if (key == m_app->GetInputBinding(INPUT_SLOT_DOWN).key /* TODO: joystick
|
||||||
key == m_app->GetKey(KEYRANK_DOWN, 1))
|
|| key == m_app->GetInputBinding(INPUT_SLOT_DOWN).joy*/)
|
||||||
{
|
{
|
||||||
m_cameraZoom = 1.0f;
|
m_cameraZoom = 1.0f;
|
||||||
}
|
}
|
||||||
|
@ -3588,15 +3588,16 @@ void CRobotMain::CreateScene(bool soluce, bool fixScene, bool resetObject)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sprintf(op, "Title.%c", GetLanguageLetter());
|
// TODO: language letters
|
||||||
|
sprintf(op, "Title.%c", 'E' /*GetLanguageLetter()*/);
|
||||||
if (Cmd(line, op) && !resetObject)
|
if (Cmd(line, op) && !resetObject)
|
||||||
OpString(line, "text", m_title);
|
OpString(line, "text", m_title);
|
||||||
|
|
||||||
sprintf(op, "Resume.%c", GetLanguageLetter());
|
sprintf(op, "Resume.%c", 'E' /*GetLanguageLetter()*/);
|
||||||
if (Cmd(line, op) && !resetObject)
|
if (Cmd(line, op) && !resetObject)
|
||||||
OpString(line, "text", m_resume);
|
OpString(line, "text", m_resume);
|
||||||
|
|
||||||
sprintf(op, "ScriptName.%c", GetLanguageLetter());
|
sprintf(op, "ScriptName.%c", 'E' /*GetLanguageLetter()*/);
|
||||||
if (Cmd(line, op) && !resetObject)
|
if (Cmd(line, op) && !resetObject)
|
||||||
OpString(line, "text", m_scriptName);
|
OpString(line, "text", m_scriptName);
|
||||||
|
|
||||||
|
@ -4266,7 +4267,7 @@ void CRobotMain::CreateScene(bool soluce, bool fixScene, bool resetObject)
|
||||||
CreateShortcuts();
|
CreateShortcuts();
|
||||||
m_map->UpdateMap();
|
m_map->UpdateMap();
|
||||||
// TODO: m_engine->TimeInit(); ??
|
// TODO: m_engine->TimeInit(); ??
|
||||||
m_app->FlushPressKey();
|
m_app->ResetKeyStates();
|
||||||
m_time = 0.0f;
|
m_time = 0.0f;
|
||||||
m_gameTime = 0.0f;
|
m_gameTime = 0.0f;
|
||||||
m_checkEndTime = 0.0f;
|
m_checkEndTime = 0.0f;
|
||||||
|
@ -6416,7 +6417,7 @@ void CRobotMain::SetSpeed(float speed)
|
||||||
|
|
||||||
float CRobotMain::GetSpeed()
|
float CRobotMain::GetSpeed()
|
||||||
{
|
{
|
||||||
return m_engine->GetSpeed();
|
return m_app->GetSimulationSpeed();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -6486,7 +6487,7 @@ void CRobotMain::SetEditLock(bool lock, bool edit)
|
||||||
m_map->ShowMap(!m_editLock && m_mapShow);
|
m_map->ShowMap(!m_editLock && m_mapShow);
|
||||||
|
|
||||||
m_displayText->HideText(lock);
|
m_displayText->HideText(lock);
|
||||||
m_app->FlushPressKey();
|
m_app->ResetKeyStates();
|
||||||
|
|
||||||
if (m_editLock)
|
if (m_editLock)
|
||||||
HiliteClear();
|
HiliteClear();
|
||||||
|
|
|
@ -309,7 +309,7 @@ protected:
|
||||||
void HiliteClear();
|
void HiliteClear();
|
||||||
void HiliteObject(Math::Point pos);
|
void HiliteObject(Math::Point pos);
|
||||||
void HiliteFrame(float rTime);
|
void HiliteFrame(float rTime);
|
||||||
void CreateTooltip(Math::Point pos, char* text);
|
void CreateTooltip(Math::Point pos, const char* text);
|
||||||
void ClearTooltip();
|
void ClearTooltip();
|
||||||
CObject* DetectObject(Math::Point pos);
|
CObject* DetectObject(Math::Point pos);
|
||||||
void ChangeCamera();
|
void ChangeCamera();
|
||||||
|
|
|
@ -175,45 +175,45 @@ class CSoundInterface : public CPluginInterface
|
||||||
*/
|
*/
|
||||||
virtual bool Cache(Sound bSound, std::string bFile) = 0;
|
virtual bool Cache(Sound bSound, std::string bFile) = 0;
|
||||||
|
|
||||||
/** Return if plugin is enabled
|
/** Geturn if plugin is enabled
|
||||||
* @return return true if plugin is enabled
|
* @return return true if plugin is enabled
|
||||||
*/
|
*/
|
||||||
virtual bool RetEnable() = 0;
|
virtual bool GetEnable() = 0;
|
||||||
|
|
||||||
/** Change sound mode to 2D/3D
|
/** Change sound mode to 2D/3D
|
||||||
* @param bool bMode - true to enable 3D sound
|
* @param bool bMode - true to enable 3D sound
|
||||||
*/
|
*/
|
||||||
virtual void SetSound3D(bool bMode) = 0;
|
virtual void SetSound3D(bool bMode) = 0;
|
||||||
|
|
||||||
/** Return if we use 3D sound
|
/** Geturn if we use 3D sound
|
||||||
* @return true if we have 3D sound enabled
|
* @return true if we have 3D sound enabled
|
||||||
*/
|
*/
|
||||||
virtual bool RetSound3D() = 0;
|
virtual bool GetSound3D() = 0;
|
||||||
|
|
||||||
/** Return if we have 3D sound capable card
|
/** Geturn if we have 3D sound capable card
|
||||||
* @return true for 3D sound support
|
* @return true for 3D sound support
|
||||||
*/
|
*/
|
||||||
virtual bool RetSound3DCap() = 0;
|
virtual bool GetSound3DCap() = 0;
|
||||||
|
|
||||||
/** Change global sound volume
|
/** Change global sound volume
|
||||||
* @param int volume - range from 0 to MAXVOLUME
|
* @param int volume - range from 0 to MAXVOLUME
|
||||||
*/
|
*/
|
||||||
virtual void SetAudioVolume(int volume) = 0;
|
virtual void SetAudioVolume(int volume) = 0;
|
||||||
|
|
||||||
/** Return global sound volume
|
/** Geturn global sound volume
|
||||||
* @return global volume as int in range from 0 to MAXVOLUME
|
* @return global volume as int in range from 0 to MAXVOLUME
|
||||||
*/
|
*/
|
||||||
virtual int RetAudioVolume() = 0;
|
virtual int GetAudioVolume() = 0;
|
||||||
|
|
||||||
/** Set music volume
|
/** Set music volume
|
||||||
* @param int volume - range from 0 to MAXVOLUME
|
* @param int volume - range from 0 to MAXVOLUME
|
||||||
*/
|
*/
|
||||||
virtual void SetMusicVolume(int volume) = 0;
|
virtual void SetMusicVolume(int volume) = 0;
|
||||||
|
|
||||||
/** Return music volume
|
/** Geturn music volume
|
||||||
* @return music volume as int in range from 0 to MAXVOLUME
|
* @return music volume as int in range from 0 to MAXVOLUME
|
||||||
*/
|
*/
|
||||||
virtual int RetMusicVolume() = 0;
|
virtual int GetMusicVolume() = 0;
|
||||||
|
|
||||||
/** Set listener position
|
/** Set listener position
|
||||||
* @param Math::Vector eye - position of listener
|
* @param Math::Vector eye - position of listener
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -19,22 +19,32 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
|
||||||
|
#include "graphics/core/color.h"
|
||||||
#include "object/robotmain.h"
|
#include "object/robotmain.h"
|
||||||
|
|
||||||
|
|
||||||
class CInstanceManager;
|
class CInstanceManager;
|
||||||
class CEvent;
|
class CEventQueue;
|
||||||
class CD3DEngine;
|
class CSoundInterface;
|
||||||
|
|
||||||
|
namespace Gfx
|
||||||
|
{
|
||||||
|
class CEngine;
|
||||||
|
class CParticle;
|
||||||
|
};
|
||||||
|
|
||||||
|
namespace Ui
|
||||||
|
{
|
||||||
|
|
||||||
class CInterface;
|
class CInterface;
|
||||||
class CWindow;
|
class CWindow;
|
||||||
class CControl;
|
class CControl;
|
||||||
class CParticule;
|
|
||||||
class CSound;
|
|
||||||
|
|
||||||
|
|
||||||
const int USERLISTMAX = 100;
|
const int USERLISTMAX = 100;
|
||||||
const int MAXSCENE = 1000;
|
const int MAXSCENE = 1000;
|
||||||
|
|
||||||
|
const int MAX_FNAME = 255; // TODO: remove after rewrite to std::string
|
||||||
|
|
||||||
struct SceneInfo
|
struct SceneInfo
|
||||||
{
|
{
|
||||||
char numTry;
|
char numTry;
|
||||||
|
@ -45,9 +55,9 @@ struct GamerPerso
|
||||||
{
|
{
|
||||||
int face; // face
|
int face; // face
|
||||||
int glasses; // glasses
|
int glasses; // glasses
|
||||||
D3DCOLORVALUE colorHair; // hair color
|
Gfx::Color colorHair; // hair color
|
||||||
D3DCOLORVALUE colorCombi; // spacesuit volor
|
Gfx::Color colorCombi; // spacesuit volor
|
||||||
D3DCOLORVALUE colorBand; // strips color
|
Gfx::Color colorBand; // strips color
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -65,26 +75,26 @@ public:
|
||||||
void SetStackRead(char* name);
|
void SetStackRead(char* name);
|
||||||
void SetSceneName(char* name);
|
void SetSceneName(char* name);
|
||||||
void SetSceneRank(int rank);
|
void SetSceneRank(int rank);
|
||||||
char* RetSceneRead();
|
char* GetSceneRead();
|
||||||
char* RetStackRead();
|
char* GetStackRead();
|
||||||
char* RetSceneName();
|
char* GetSceneName();
|
||||||
int RetSceneRank();
|
int GetSceneRank();
|
||||||
char* RetSceneDir();
|
char* GetSceneDir();
|
||||||
bool RetSceneSoluce();
|
bool GetSceneSoluce();
|
||||||
char* RetSavegameDir();
|
char* GetSavegameDir();
|
||||||
char* RetPublicDir();
|
char* GetPublicDir();
|
||||||
|
|
||||||
bool RetTooltip();
|
bool GetTooltip();
|
||||||
bool RetGlint();
|
bool GetGlint();
|
||||||
bool RetSoluce4();
|
bool GetSoluce4();
|
||||||
bool RetMovies();
|
bool GetMovies();
|
||||||
bool RetNiceReset();
|
bool GetNiceReset();
|
||||||
bool RetHimselfDamage();
|
bool GetHimselfDamage();
|
||||||
|
|
||||||
void SetUserDir(char *base, int rank);
|
void SetUserDir(char *base, int rank);
|
||||||
void BuildSceneName(char *filename, char *base, int rank);
|
void BuildSceneName(char *filename, char *base, int rank);
|
||||||
void BuildResumeName(char *filename, char *base, int rank);
|
void BuildResumeName(char *filename, char *base, int rank);
|
||||||
char* RetFilesDir();
|
char* GetFilesDir();
|
||||||
|
|
||||||
void StartAbort();
|
void StartAbort();
|
||||||
void StartDeleteObject();
|
void StartDeleteObject();
|
||||||
|
@ -104,30 +114,30 @@ public:
|
||||||
bool ReadGamerInfo();
|
bool ReadGamerInfo();
|
||||||
bool WriteGamerInfo();
|
bool WriteGamerInfo();
|
||||||
void SetGamerInfoTry(int rank, int numTry);
|
void SetGamerInfoTry(int rank, int numTry);
|
||||||
int RetGamerInfoTry(int rank);
|
int GetGamerInfoTry(int rank);
|
||||||
void SetGamerInfoPassed(int rank, bool bPassed);
|
void SetGamerInfoPassed(int rank, bool bPassed);
|
||||||
bool RetGamerInfoPassed(int rank);
|
bool GetGamerInfoPassed(int rank);
|
||||||
bool NextMission();
|
bool NextMission();
|
||||||
|
|
||||||
void WriteGamerPerso(char *gamer);
|
void WriteGamerPerso(char *gamer);
|
||||||
void ReadGamerPerso(char *gamer);
|
void ReadGamerPerso(char *gamer);
|
||||||
void SetGamerFace(char *gamer, int face);
|
void SetGamerFace(char *gamer, int face);
|
||||||
int RetGamerFace(char *gamer);
|
int GetGamerFace(char *gamer);
|
||||||
int RetGamerFace();
|
int GetGamerFace();
|
||||||
int RetGamerGlasses();
|
int GetGamerGlasses();
|
||||||
bool RetGamerOnlyHead();
|
bool GetGamerOnlyHead();
|
||||||
float RetPersoAngle();
|
float GetPersoAngle();
|
||||||
D3DCOLORVALUE RetGamerColorHair();
|
Gfx::Color GetGamerColorHair();
|
||||||
D3DCOLORVALUE RetGamerColorCombi();
|
Gfx::Color GetGamerColorCombi();
|
||||||
D3DCOLORVALUE RetGamerColorBand();
|
Gfx::Color GetGamerColorBand();
|
||||||
|
|
||||||
void AllMissionUpdate();
|
void AllMissionUpdate();
|
||||||
void ShowSoluceUpdate();
|
void ShowSoluceUpdate();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void GlintMove();
|
void GlintMove();
|
||||||
void FrameParticule(float rTime);
|
void FrameParticle(float rTime);
|
||||||
void NiceParticule(Math::Point mouse, bool bPress);
|
void NiceParticle(Math::Point mouse, bool bPress);
|
||||||
void ReadNameList();
|
void ReadNameList();
|
||||||
void UpdateNameList();
|
void UpdateNameList();
|
||||||
void UpdateNameEdit();
|
void UpdateNameEdit();
|
||||||
|
@ -148,7 +158,7 @@ protected:
|
||||||
void IODeleteScene();
|
void IODeleteScene();
|
||||||
bool IOWriteScene();
|
bool IOWriteScene();
|
||||||
bool IOReadScene();
|
bool IOReadScene();
|
||||||
int RetChapPassed();
|
int GetChapPassed();
|
||||||
void UpdateSceneChap(int &chap);
|
void UpdateSceneChap(int &chap);
|
||||||
void UpdateSceneList(int chap, int &sel);
|
void UpdateSceneList(int chap, int &sel);
|
||||||
void UpdateSceneResume(int rank);
|
void UpdateSceneResume(int rank);
|
||||||
|
@ -160,17 +170,18 @@ protected:
|
||||||
void ChangeSetupButtons();
|
void ChangeSetupButtons();
|
||||||
void ChangeSetupQuality(int quality);
|
void ChangeSetupQuality(int quality);
|
||||||
void UpdateKey();
|
void UpdateKey();
|
||||||
void ChangeKey(EventMsg event);
|
void ChangeKey(EventType event);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
CInstanceManager* m_iMan;
|
CInstanceManager* m_iMan;
|
||||||
CRobotMain* m_main;
|
CApplication* m_app;
|
||||||
CEvent* m_event;
|
CRobotMain* m_main;
|
||||||
CD3DEngine* m_engine;
|
CEventQueue* m_eventQueue;
|
||||||
CInterface* m_interface;
|
Gfx::CEngine* m_engine;
|
||||||
CParticule* m_particule;
|
CInterface* m_interface;
|
||||||
CCamera* m_camera;
|
Gfx::CParticle* m_particle;
|
||||||
CSound* m_sound;
|
Gfx::CCamera* m_camera;
|
||||||
|
CSoundInterface* m_sound;
|
||||||
|
|
||||||
Phase m_phase; // copy of CRobotMain
|
Phase m_phase; // copy of CRobotMain
|
||||||
Phase m_phaseSetup; // tab selected
|
Phase m_phaseSetup; // tab selected
|
||||||
|
@ -182,11 +193,11 @@ protected:
|
||||||
int m_persoTab; // perso: tab selected
|
int m_persoTab; // perso: tab selected
|
||||||
float m_persoAngle; // perso: angle of presentation
|
float m_persoAngle; // perso: angle of presentation
|
||||||
|
|
||||||
char m_sceneDir[_MAX_FNAME]; // scene folder
|
char m_sceneDir[MAX_FNAME]; // scene folder
|
||||||
char m_savegameDir[_MAX_FNAME]; // savegame folder
|
char m_savegameDir[MAX_FNAME]; // savegame folder
|
||||||
char m_publicDir[_MAX_FNAME]; // program folder
|
char m_publicDir[MAX_FNAME]; // program folder
|
||||||
char m_userDir[_MAX_FNAME]; // user folder
|
char m_userDir[MAX_FNAME]; // user folder
|
||||||
char m_filesDir[_MAX_FNAME]; // case files
|
char m_filesDir[MAX_FNAME]; // case files
|
||||||
|
|
||||||
int m_index; // 0..4
|
int m_index; // 0..4
|
||||||
int m_chap[10]; // selected chapter (0..8)
|
int m_chap[10]; // selected chapter (0..8)
|
||||||
|
@ -239,7 +250,7 @@ protected:
|
||||||
float m_dialogParti;
|
float m_dialogParti;
|
||||||
float m_dialogTime;
|
float m_dialogTime;
|
||||||
bool m_bInitPause;
|
bool m_bInitPause;
|
||||||
CameraType m_initCamera;
|
Gfx::CameraType m_initCamera;
|
||||||
|
|
||||||
int m_partiPhase[10];
|
int m_partiPhase[10];
|
||||||
float m_partiTime[10];
|
float m_partiTime[10];
|
||||||
|
@ -248,4 +259,4 @@ protected:
|
||||||
SceneInfo m_sceneInfo[MAXSCENE];
|
SceneInfo m_sceneInfo[MAXSCENE];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
} // namespace Ui
|
||||||
|
|
Loading…
Reference in New Issue