mirror of
https://github.com/jmarshall23/CnC_Remastered_Collection.git
synced 2026-08-12 08:00:55 +02:00
Power bar draws on the sidebar correctly.
This commit is contained in:
+7
-7
@@ -135,7 +135,7 @@ void PowerClass::Init_Clear(void)
|
||||
void PowerClass::One_Time(void)
|
||||
{
|
||||
RadarClass::One_Time();
|
||||
PowerButton.X = POWER_X * RESFACTOR;
|
||||
PowerButton.X = ScreenWidth - (640 - (POWER_X * RESFACTOR));
|
||||
PowerButton.Y = POWER_Y * RESFACTOR;
|
||||
PowerButton.Width = (POWER_WIDTH * RESFACTOR)-1;
|
||||
PowerButton.Height = POWER_HEIGHT * RESFACTOR;
|
||||
@@ -166,7 +166,7 @@ void PowerClass::Draw_It(bool complete)
|
||||
0, -1, 0, 1, 0, -1, -2, -1, 0, 1, 2, 1 ,0
|
||||
};
|
||||
|
||||
if (complete || IsToRedraw) {
|
||||
{
|
||||
BStart(BENCH_POWER);
|
||||
|
||||
if (LogicPage->Lock()) {
|
||||
@@ -181,13 +181,13 @@ void PowerClass::Draw_It(bool complete)
|
||||
}
|
||||
|
||||
// LogicPage->Fill_Rect(POWER_X, POWER_Y, POWER_X+POWER_WIDTH-1, POWER_Y+POWER_HEIGHT-1, LTGREY);
|
||||
CC_Draw_Shape(PowerBarShape, 0, 240 * RESFACTOR, 88 * RESFACTOR, WINDOW_MAIN, flags | SHAPE_NORMAL | SHAPE_WIN_REL, remap);
|
||||
CC_Draw_Shape(PowerBarShape, 0, ScreenWidth - (640 - (240 * RESFACTOR)), 88 * RESFACTOR, WINDOW_MAIN, flags | SHAPE_NORMAL | SHAPE_WIN_REL, remap);
|
||||
|
||||
#ifdef WIN32
|
||||
/*
|
||||
** Hires power strip is too big to fit into a shape so it is in two parts
|
||||
*/
|
||||
CC_Draw_Shape(PowerBarShape, 1, 240 * RESFACTOR, (88 * RESFACTOR) + (56*RESFACTOR), WINDOW_MAIN, flags | SHAPE_NORMAL | SHAPE_WIN_REL, remap);
|
||||
CC_Draw_Shape(PowerBarShape, 1, ScreenWidth - (640 - (240 * RESFACTOR)), (88 * RESFACTOR) + (56*RESFACTOR), WINDOW_MAIN, flags | SHAPE_NORMAL | SHAPE_WIN_REL, remap);
|
||||
#endif
|
||||
/*
|
||||
** Determine how much the power production exceeds or falls short
|
||||
@@ -228,14 +228,14 @@ void PowerClass::Draw_It(bool complete)
|
||||
#endif
|
||||
bottom = (175*RESFACTOR)+1;
|
||||
|
||||
LogicPage->Fill_Rect(245*RESFACTOR, bottom-power_height, 245*RESFACTOR+1, bottom, color2);
|
||||
LogicPage->Fill_Rect(246*RESFACTOR, bottom-power_height, 246*RESFACTOR+1, bottom, color1);
|
||||
LogicPage->Fill_Rect(ScreenWidth - (640 - (245*RESFACTOR)), bottom-power_height, 245*RESFACTOR+1, bottom, color2);
|
||||
LogicPage->Fill_Rect(ScreenWidth - (640 - (246*RESFACTOR)), bottom-power_height, 246*RESFACTOR+1, bottom, color1);
|
||||
}
|
||||
|
||||
/*
|
||||
** Draw the power drain threshold marker.
|
||||
*/
|
||||
CC_Draw_Shape(PowerShape, 0, (POWER_X * RESFACTOR)+RESFACTOR, bottom - (drain_height + (2 * RESFACTOR)), WINDOW_MAIN, flags | SHAPE_NORMAL, remap);
|
||||
CC_Draw_Shape(PowerShape, 0, ScreenWidth - (640 - (((POWER_X * RESFACTOR)) +RESFACTOR)), bottom - (drain_height + (2 * RESFACTOR)), WINDOW_MAIN, flags | SHAPE_NORMAL, remap);
|
||||
}
|
||||
LogicPage->Unlock();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user