Merge part of PR #756
commit
6216daedb3
|
@ -283,9 +283,9 @@ void InitializeRestext()
|
||||||
stringsEvent[EVENT_INTERFACE_PCGb] = TR("Green");
|
stringsEvent[EVENT_INTERFACE_PCGb] = TR("Green");
|
||||||
stringsEvent[EVENT_INTERFACE_PCBb] = TR("Blue");
|
stringsEvent[EVENT_INTERFACE_PCBb] = TR("Blue");
|
||||||
stringsEvent[EVENT_INTERFACE_PFACE1] = TR("\\Face 1");
|
stringsEvent[EVENT_INTERFACE_PFACE1] = TR("\\Face 1");
|
||||||
stringsEvent[EVENT_INTERFACE_PFACE2] = TR("\\Face 4");
|
stringsEvent[EVENT_INTERFACE_PFACE2] = TR("\\Face 2");
|
||||||
stringsEvent[EVENT_INTERFACE_PFACE3] = TR("\\Face 3");
|
stringsEvent[EVENT_INTERFACE_PFACE3] = TR("\\Face 3");
|
||||||
stringsEvent[EVENT_INTERFACE_PFACE4] = TR("\\Face 2");
|
stringsEvent[EVENT_INTERFACE_PFACE4] = TR("\\Face 4");
|
||||||
stringsEvent[EVENT_INTERFACE_PGLASS0] = TR("\\No eyeglasses");
|
stringsEvent[EVENT_INTERFACE_PGLASS0] = TR("\\No eyeglasses");
|
||||||
stringsEvent[EVENT_INTERFACE_PGLASS1] = TR("\\Eyeglasses 1");
|
stringsEvent[EVENT_INTERFACE_PGLASS1] = TR("\\Eyeglasses 1");
|
||||||
stringsEvent[EVENT_INTERFACE_PGLASS2] = TR("\\Eyeglasses 2");
|
stringsEvent[EVENT_INTERFACE_PGLASS2] = TR("\\Eyeglasses 2");
|
||||||
|
|
|
@ -38,9 +38,9 @@ void PlayerApperance::DefPerso()
|
||||||
this->colorCombi.r = 206.0f/256.0f;
|
this->colorCombi.r = 206.0f/256.0f;
|
||||||
this->colorCombi.g = 206.0f/256.0f;
|
this->colorCombi.g = 206.0f/256.0f;
|
||||||
this->colorCombi.b = 204.0f/256.0f; // ~white
|
this->colorCombi.b = 204.0f/256.0f; // ~white
|
||||||
this->colorBand.r = 255.0f/256.0f;
|
this->colorBand.r = 255.0f / 256.0f;
|
||||||
this->colorBand.g = 132.0f/256.0f;
|
this->colorBand.g = 132.0f / 256.0f;
|
||||||
this->colorBand.b = 1.0f/256.0f; // orange
|
this->colorBand.b = 1.0f / 256.0f; // orange
|
||||||
|
|
||||||
if ( this->face == 0 ) // normal ?
|
if ( this->face == 0 ) // normal ?
|
||||||
{
|
{
|
||||||
|
@ -52,23 +52,23 @@ void PlayerApperance::DefPerso()
|
||||||
if ( this->face == 1 ) // bald ?
|
if ( this->face == 1 ) // bald ?
|
||||||
{
|
{
|
||||||
this->glasses = 0;
|
this->glasses = 0;
|
||||||
this->colorHair.r = 83.0f/256.0f;
|
this->colorHair.r = 74.0f / 256.0f;
|
||||||
this->colorHair.g = 64.0f/256.0f;
|
this->colorHair.g = 58.0f / 256.0f;
|
||||||
this->colorHair.b = 51.0f/256.0f; // brown
|
this->colorHair.b = 46.0f / 256.0f; // brown
|
||||||
}
|
}
|
||||||
if ( this->face == 2 ) // carlos ?
|
if ( this->face == 2 ) // carlos ?
|
||||||
{
|
{
|
||||||
this->glasses = 1;
|
this->glasses = 1;
|
||||||
this->colorHair.r = 85.0f/256.0f;
|
this->colorHair.r = 70.0f / 256.0f;
|
||||||
this->colorHair.g = 48.0f/256.0f;
|
this->colorHair.g = 40.0f / 256.0f;
|
||||||
this->colorHair.b = 9.0f/256.0f; // brown
|
this->colorHair.b = 9.0f/256.0f; // brown
|
||||||
}
|
}
|
||||||
if ( this->face == 3 ) // blond ?
|
if ( this->face == 3 ) // blond ? -> ginger ?
|
||||||
{
|
{
|
||||||
this->glasses = 4;
|
this->glasses = 4;
|
||||||
this->colorHair.r = 255.0f/256.0f;
|
this->colorHair.r = 74.0f / 256.0f;
|
||||||
this->colorHair.g = 255.0f/256.0f;
|
this->colorHair.g = 16.0f / 256.0f;
|
||||||
this->colorHair.b = 181.0f/256.0f; // yellow
|
this->colorHair.b = 0.0f / 256.0f; // yellow, changed to ginger
|
||||||
}
|
}
|
||||||
|
|
||||||
this->colorHair.a = 0.0f;
|
this->colorHair.a = 0.0f;
|
||||||
|
@ -76,6 +76,37 @@ void PlayerApperance::DefPerso()
|
||||||
this->colorBand.a = 0.0f;
|
this->colorBand.a = 0.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void PlayerApperance::DefHairColor()
|
||||||
|
{
|
||||||
|
if (this->face == 0) // normal ?
|
||||||
|
{
|
||||||
|
this->colorHair.r = 90.0f / 256.0f;
|
||||||
|
this->colorHair.g = 95.0f / 256.0f;
|
||||||
|
this->colorHair.b = 85.0f / 256.0f; // black
|
||||||
|
}
|
||||||
|
if (this->face == 1) // bald ?
|
||||||
|
{
|
||||||
|
this->colorHair.r = 74.0f / 256.0f;
|
||||||
|
this->colorHair.g = 58.0f / 256.0f;
|
||||||
|
this->colorHair.b = 46.0f / 256.0f; // brown
|
||||||
|
}
|
||||||
|
if (this->face == 2) // carlos ?
|
||||||
|
{
|
||||||
|
this->colorHair.r = 70.0f / 256.0f;
|
||||||
|
this->colorHair.g = 40.0f / 256.0f;
|
||||||
|
this->colorHair.b = 9.0f / 256.0f; // brown
|
||||||
|
}
|
||||||
|
if (this->face == 3) // blond ? -> ginger ?
|
||||||
|
{
|
||||||
|
this->colorHair.r = 74.0f / 256.0f;
|
||||||
|
this->colorHair.g = 16.0f / 256.0f;
|
||||||
|
this->colorHair.b = 0.0f / 256.0f; // yellow, changed to ginger
|
||||||
|
}
|
||||||
|
|
||||||
|
this->colorHair.a = 0.0f;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
CPlayerProfile::CPlayerProfile(std::string playerName)
|
CPlayerProfile::CPlayerProfile(std::string playerName)
|
||||||
{
|
{
|
||||||
m_playerName = playerName;
|
m_playerName = playerName;
|
||||||
|
|
|
@ -42,6 +42,7 @@ struct PlayerApperance
|
||||||
Gfx::Color colorBand; // strips color
|
Gfx::Color colorBand; // strips color
|
||||||
|
|
||||||
void DefPerso();
|
void DefPerso();
|
||||||
|
void DefHairColor();
|
||||||
};
|
};
|
||||||
|
|
||||||
struct SavedScene
|
struct SavedScene
|
||||||
|
|
|
@ -2270,7 +2270,9 @@ void CRobotMain::ChangeCamera()
|
||||||
ObjectType oType = obj->GetType();
|
ObjectType oType = obj->GetType();
|
||||||
Gfx::CameraType type = controllableObj->GetCameraType();
|
Gfx::CameraType type = controllableObj->GetCameraType();
|
||||||
|
|
||||||
if ( oType != OBJECT_MOBILEfa &&
|
if ( oType != OBJECT_HUMAN &&
|
||||||
|
oType != OBJECT_TECH &&
|
||||||
|
oType != OBJECT_MOBILEfa &&
|
||||||
oType != OBJECT_MOBILEta &&
|
oType != OBJECT_MOBILEta &&
|
||||||
oType != OBJECT_MOBILEwa &&
|
oType != OBJECT_MOBILEwa &&
|
||||||
oType != OBJECT_MOBILEia &&
|
oType != OBJECT_MOBILEia &&
|
||||||
|
|
|
@ -1302,8 +1302,9 @@ bool CObjectInterface::CreateInterface(bool bSelect)
|
||||||
pw->CreateButton(pos, ddim, 19, EVENT_OBJECT_HELP);
|
pw->CreateButton(pos, ddim, 19, EVENT_OBJECT_HELP);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( type != OBJECT_HUMAN &&
|
//camera button no more disabled for humans
|
||||||
type != OBJECT_TECH &&
|
if ( //type != OBJECT_HUMAN &&
|
||||||
|
//type != OBJECT_TECH &&
|
||||||
!m_object->GetCameraLock() )
|
!m_object->GetCameraLock() )
|
||||||
{
|
{
|
||||||
//? if ( m_main->GetShowMap() )
|
//? if ( m_main->GetShowMap() )
|
||||||
|
@ -1396,29 +1397,33 @@ bool CObjectInterface::CreateInterface(bool bSelect)
|
||||||
pt->ClearState(STATE_GLINT);
|
pt->ClearState(STATE_GLINT);
|
||||||
}
|
}
|
||||||
|
|
||||||
ddim.x = 64.0f/640.0f;
|
if (type != OBJECT_HUMAN &&
|
||||||
ddim.y = 64.0f/480.0f;
|
type != OBJECT_TECH)
|
||||||
pos.x = 30.0f/640.0f;
|
{
|
||||||
pos.y = 430.0f/480.0f-ddim.y;
|
ddim.x = 64.0f / 640.0f;
|
||||||
pw->CreateGroup(pos, ddim, 13, EVENT_OBJECT_CORNERul);
|
ddim.y = 64.0f / 480.0f;
|
||||||
|
pos.x = 30.0f / 640.0f;
|
||||||
|
pos.y = 430.0f / 480.0f - ddim.y;
|
||||||
|
pw->CreateGroup(pos, ddim, 13, EVENT_OBJECT_CORNERul);
|
||||||
|
|
||||||
ddim.x = 64.0f/640.0f;
|
ddim.x = 64.0f / 640.0f;
|
||||||
ddim.y = 64.0f/480.0f;
|
ddim.y = 64.0f / 480.0f;
|
||||||
pos.x = 610.0f/640.0f-ddim.x;
|
pos.x = 610.0f / 640.0f - ddim.x;
|
||||||
pos.y = 430.0f/480.0f-ddim.y;
|
pos.y = 430.0f / 480.0f - ddim.y;
|
||||||
pw->CreateGroup(pos, ddim, 14, EVENT_OBJECT_CORNERur);
|
pw->CreateGroup(pos, ddim, 14, EVENT_OBJECT_CORNERur);
|
||||||
|
|
||||||
ddim.x = 64.0f/640.0f;
|
ddim.x = 64.0f / 640.0f;
|
||||||
ddim.y = 64.0f/480.0f;
|
ddim.y = 64.0f / 480.0f;
|
||||||
pos.x = 30.0f/640.0f;
|
pos.x = 30.0f / 640.0f;
|
||||||
pos.y = 110.0f/480.0f;
|
pos.y = 110.0f / 480.0f;
|
||||||
pw->CreateGroup(pos, ddim, 15, EVENT_OBJECT_CORNERdl);
|
pw->CreateGroup(pos, ddim, 15, EVENT_OBJECT_CORNERdl);
|
||||||
|
|
||||||
ddim.x = 64.0f/640.0f;
|
ddim.x = 64.0f / 640.0f;
|
||||||
ddim.y = 64.0f/480.0f;
|
ddim.y = 64.0f / 480.0f;
|
||||||
pos.x = 610.0f/640.0f-ddim.x;
|
pos.x = 610.0f / 640.0f - ddim.x;
|
||||||
pos.y = 110.0f/480.0f;
|
pos.y = 110.0f / 480.0f;
|
||||||
pw->CreateGroup(pos, ddim, 16, EVENT_OBJECT_CORNERdr);
|
pw->CreateGroup(pos, ddim, 16, EVENT_OBJECT_CORNERdr);
|
||||||
|
}
|
||||||
|
|
||||||
UpdateInterface();
|
UpdateInterface();
|
||||||
m_lastUpdateTime = 0.0f;
|
m_lastUpdateTime = 0.0f;
|
||||||
|
|
|
@ -164,13 +164,13 @@ void CScreenApperance::CreateInterface()
|
||||||
pb = pw->CreateButton(pos, ddim, 43, EVENT_INTERFACE_PFACE1);
|
pb = pw->CreateButton(pos, ddim, 43, EVENT_INTERFACE_PFACE1);
|
||||||
pb->SetState(STATE_SHADOW);
|
pb->SetState(STATE_SHADOW);
|
||||||
pos.x += 50.0f/640.0f;
|
pos.x += 50.0f/640.0f;
|
||||||
pb = pw->CreateButton(pos, ddim, 46, EVENT_INTERFACE_PFACE4);
|
pb = pw->CreateButton(pos, ddim, 44, EVENT_INTERFACE_PFACE2);
|
||||||
pb->SetState(STATE_SHADOW);
|
pb->SetState(STATE_SHADOW);
|
||||||
pos.x += 50.0f/640.0f;
|
pos.x += 50.0f/640.0f;
|
||||||
pb = pw->CreateButton(pos, ddim, 45, EVENT_INTERFACE_PFACE3);
|
pb = pw->CreateButton(pos, ddim, 45, EVENT_INTERFACE_PFACE3);
|
||||||
pb->SetState(STATE_SHADOW);
|
pb->SetState(STATE_SHADOW);
|
||||||
pos.x += 50.0f/640.0f;
|
pos.x += 50.0f/640.0f;
|
||||||
pb = pw->CreateButton(pos, ddim, 44, EVENT_INTERFACE_PFACE2);
|
pb = pw->CreateButton(pos, ddim, 46, EVENT_INTERFACE_PFACE4);
|
||||||
pb->SetState(STATE_SHADOW);
|
pb->SetState(STATE_SHADOW);
|
||||||
|
|
||||||
// Glasses
|
// Glasses
|
||||||
|
@ -349,6 +349,7 @@ bool CScreenApperance::EventProcess(const Event &event)
|
||||||
case EVENT_INTERFACE_PFACE3:
|
case EVENT_INTERFACE_PFACE3:
|
||||||
case EVENT_INTERFACE_PFACE4:
|
case EVENT_INTERFACE_PFACE4:
|
||||||
apperance.face = event.type-EVENT_INTERFACE_PFACE1;
|
apperance.face = event.type-EVENT_INTERFACE_PFACE1;
|
||||||
|
apperance.DefHairColor();
|
||||||
UpdatePerso();
|
UpdatePerso();
|
||||||
m_main->ScenePerso();
|
m_main->ScenePerso();
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue