532 Change split screen arrangements
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@4693 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: b54538f22a0833a9506e3571b0032172bdc5807b Former-commit-id: 93e19cf9d0aafcb100310f0189928956420288cc
This commit is contained in:
parent
d9b5f8397a
commit
7fb734ca78
2 changed files with 67 additions and 26 deletions
|
@ -56,7 +56,7 @@ int grWinx, grWiny, grWinw, grWinh;
|
|||
|
||||
tgrCarInfo *grCarInfo;
|
||||
ssgContext grContext;
|
||||
cGrScreen *grScreens[GR_NB_MAX_SCREEN] = { 0, 0, 0, 0 };
|
||||
cGrScreen *grScreens[GR_NB_MAX_SCREEN];
|
||||
tdble grLodFactorValue = 1.0;
|
||||
|
||||
// Frame/FPS info.
|
||||
|
@ -135,7 +135,12 @@ grAdaptScreenSize(void)
|
|||
case 2:
|
||||
switch (grNbArrangeScreens) {
|
||||
default:
|
||||
grNbArrangeScreens = 1;
|
||||
grNbArrangeScreens = 0;
|
||||
case 0:
|
||||
// Left & Right half of the window
|
||||
grScreens[0]->activate(grWinx, grWiny, grWinw / 2, grWinh, -0.5);
|
||||
grScreens[1]->activate(grWinx + grWinw / 2, grWiny, grWinw / 2, grWinh, 0.5);
|
||||
break;
|
||||
case 1:
|
||||
// Top & Bottom half of the window
|
||||
grScreens[0]->activate(grWinx, grWiny + grWinh / 2, grWinw, grWinh / 2, 0.0);
|
||||
|
@ -151,11 +156,6 @@ grAdaptScreenSize(void)
|
|||
grScreens[0]->activate(grWinx, grWiny, grWinw * 2/3, grWinh, 0.0);
|
||||
grScreens[1]->activate(grWinx + grWinw * 2/3, grWiny, grWinw / 3, grWinh, 0.0);
|
||||
break;
|
||||
case 0:
|
||||
// Left & Right half of the window
|
||||
grScreens[0]->activate(grWinx, grWiny, grWinw / 2, grWinh, -0.5);
|
||||
grScreens[1]->activate(grWinx + grWinw / 2, grWiny, grWinw / 2, grWinh, 0.5);
|
||||
break;
|
||||
}
|
||||
|
||||
for (i=2; i < GR_NB_MAX_SCREEN; i++)
|
||||
|
@ -164,7 +164,13 @@ grAdaptScreenSize(void)
|
|||
case 3:
|
||||
switch (grNbArrangeScreens) {
|
||||
default:
|
||||
grNbArrangeScreens = 1;
|
||||
grNbArrangeScreens = 0;
|
||||
case 0:
|
||||
// All side by side
|
||||
grScreens[0]->activate(grWinx, grWiny, grWinw / 3, grWinh, -1);
|
||||
grScreens[1]->activate(grWinx + grWinw / 3, grWiny, grWinw / 3, grWinh, 0.0);
|
||||
grScreens[2]->activate(grWinx + grWinw * 2/3, grWiny, grWinw / 3, grWinh, 1);
|
||||
break;
|
||||
case 1:
|
||||
// Left/Right above wide
|
||||
grScreens[0]->activate(grWinx, grWiny + grWinh / 2, grWinw / 2, grWinh / 2, 0.0);
|
||||
|
@ -201,12 +207,6 @@ grAdaptScreenSize(void)
|
|||
grScreens[1]->activate(grWinx + grWinw / 3, grWiny, grWinw * 2/3, grWinh, 0.0);
|
||||
grScreens[2]->activate(grWinx, grWiny, grWinw / 3, grWinh / 2, 0.0);
|
||||
break;
|
||||
case 0:
|
||||
// All side by side
|
||||
grScreens[0]->activate(grWinx, grWiny, grWinw / 3, grWinh, -1);
|
||||
grScreens[1]->activate(grWinx + grWinw / 3, grWiny, grWinw / 3, grWinh, 0.0);
|
||||
grScreens[2]->activate(grWinx + grWinw * 2/3, grWiny, grWinw / 3, grWinh, 1);
|
||||
break;
|
||||
}
|
||||
for (i=3; i < GR_NB_MAX_SCREEN; i++)
|
||||
grScreens[i]->deactivate();
|
||||
|
@ -214,7 +214,14 @@ grAdaptScreenSize(void)
|
|||
case 4:
|
||||
switch (grNbArrangeScreens) {
|
||||
default:
|
||||
grNbArrangeScreens = 1;
|
||||
grNbArrangeScreens = 0;
|
||||
case 0:
|
||||
// All side by side
|
||||
grScreens[0]->activate(grWinx, grWiny, grWinw / 4, grWinh, -1.5);
|
||||
grScreens[1]->activate(grWinx + grWinw / 4, grWiny, grWinw / 4, grWinh, -0.5);
|
||||
grScreens[2]->activate(grWinx + grWinw * 2/4, grWiny, grWinw / 4, grWinh, 0.5);
|
||||
grScreens[3]->activate(grWinx + grWinw * 3/4, grWiny, grWinw / 4, grWinh, 1.5);
|
||||
break;
|
||||
case 1:
|
||||
// Top/Bottom Left/Rigth Quarters
|
||||
grScreens[0]->activate(grWinx, grWiny + grWinh / 2, grWinw / 2, grWinh / 2, 0.0);
|
||||
|
@ -264,19 +271,53 @@ grAdaptScreenSize(void)
|
|||
grScreens[2]->activate(grWinx, grWiny + grWinh / 3 , grWinw / 3, grWinh / 3, 0.0);
|
||||
grScreens[3]->activate(grWinx, grWiny, grWinw / 3, grWinh / 3, 0.0);
|
||||
break;
|
||||
case 0:
|
||||
// All side by side
|
||||
grScreens[0]->activate(grWinx, grWiny, grWinw / 4, grWinh, -1.5);
|
||||
grScreens[1]->activate(grWinx + grWinw / 4, grWiny, grWinw / 4, grWinh, -0.5);
|
||||
grScreens[2]->activate(grWinx + grWinw * 2/4, grWiny, grWinw / 4, grWinh, 0.5);
|
||||
grScreens[3]->activate(grWinx + grWinw * 3/4, grWiny, grWinw / 4, grWinh, 1.5);
|
||||
break;
|
||||
}
|
||||
|
||||
for (i=4; i < GR_NB_MAX_SCREEN; i++)
|
||||
grScreens[i]->deactivate();
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
switch (grNbArrangeScreens) {
|
||||
default:
|
||||
grNbArrangeScreens = 0;
|
||||
case 0:
|
||||
// All side by side
|
||||
grScreens[0]->activate(grWinx, grWiny, grWinw / 5, grWinh, -2.0);
|
||||
grScreens[1]->activate(grWinx + grWinw / 5, grWiny, grWinw / 5, grWinh, -1.0);
|
||||
grScreens[2]->activate(grWinx + grWinw * 2/5, grWiny, grWinw / 5, grWinh, 0.0);
|
||||
grScreens[3]->activate(grWinx + grWinw * 3/5, grWiny, grWinw / 5, grWinh, 1.0);
|
||||
grScreens[4]->activate(grWinx + grWinw * 4/5, grWiny, grWinw / 5, grWinh, 2.0);
|
||||
break;
|
||||
}
|
||||
for (i=5; i < GR_NB_MAX_SCREEN; i++)
|
||||
grScreens[i]->deactivate();
|
||||
break;
|
||||
case 6:
|
||||
switch (grNbArrangeScreens) {
|
||||
default:
|
||||
grNbArrangeScreens = 0;
|
||||
case 0:
|
||||
// All side by side
|
||||
grScreens[0]->activate(grWinx, grWiny, grWinw / 6, grWinh, -2.5);
|
||||
grScreens[1]->activate(grWinx + grWinw / 6, grWiny, grWinw / 6, grWinh, -1.5);
|
||||
grScreens[2]->activate(grWinx + grWinw * 2/6, grWiny, grWinw / 6, grWinh, -0.5);
|
||||
grScreens[3]->activate(grWinx + grWinw * 3/6, grWiny, grWinw / 6, grWinh, 0.5);
|
||||
grScreens[4]->activate(grWinx + grWinw * 4/6, grWiny, grWinw / 6, grWinh, 1.5);
|
||||
grScreens[5]->activate(grWinx + grWinw * 5/6, grWiny, grWinw / 6, grWinh, 2.5);
|
||||
break;
|
||||
case 1:
|
||||
// Top/Bottom Left/Middle/Rigth Matrix
|
||||
grScreens[0]->activate(grWinx, grWiny + grWinh / 2, grWinw / 3, grWinh / 2, 0.0);
|
||||
grScreens[1]->activate(grWinx + grWinw / 3, grWiny + grWinh / 2, grWinw / 3, grWinh / 2, 0.0);
|
||||
grScreens[2]->activate(grWinx + grWinw * 2/3, grWiny + grWinh / 2, grWinw / 3, grWinh / 2, 0.0);
|
||||
grScreens[3]->activate(grWinx, grWiny, grWinw / 3, grWinh / 2, 0.0);
|
||||
grScreens[4]->activate(grWinx + grWinw / 3, grWiny, grWinw / 3, grWinh / 2, 0.0);
|
||||
grScreens[5]->activate(grWinx + grWinw * 2/3, grWiny, grWinw / 3, grWinh / 2, 0.0);
|
||||
break;
|
||||
}
|
||||
for (i=6; i < GR_NB_MAX_SCREEN; i++)
|
||||
grScreens[i]->deactivate();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -81,7 +81,7 @@ extern class cGrScreen* grGetCurrentScreen(void);
|
|||
#define GR_NEXT_SCREEN 0
|
||||
#define GR_PREV_SCREEN 1
|
||||
|
||||
#define GR_NB_MAX_SCREEN 4
|
||||
#define GR_NB_MAX_SCREEN 6
|
||||
|
||||
extern tdble grLodFactorValue;
|
||||
|
||||
|
|
Loading…
Reference in a new issue