- wrapped the entire DSBarInfo class in a container and completely decoupled it from DBaseStatusBar.
The idea is, when status bars are moved to ZScript that only this small wrapper class needs to be dealt with and the implementation can be left alone. SBARINFO is far too complex to be scriptified, but having it inherit directly from DBaseStatusBar and access its member variables severely limits the options of dealing with the status bar code. This way, it only accesses some globally visible functions in DBaseStatusBar and no variables. - renamed the global ST_X and ST_Y variables because it is far too confusing and error-prone to have the same names inside and outside DBaseStatusBar.
This commit is contained in:
parent
f3159af211
commit
f5421491ec
12 changed files with 213 additions and 92 deletions
|
|
@ -1059,7 +1059,7 @@ static void AM_findMinMaxBoundaries ()
|
|||
static void AM_calcMinMaxMtoF()
|
||||
{
|
||||
double a = SCREENWIDTH / max_w;
|
||||
double b = ::ST_Y / max_h;
|
||||
double b = gST_Y / max_h;
|
||||
|
||||
min_scale_mtof = a < b ? a : b;
|
||||
max_scale_mtof = SCREENHEIGHT / (2*PLAYERRADIUS);
|
||||
|
|
@ -1417,7 +1417,7 @@ void AM_NewResolution()
|
|||
else if (scale_mtof > max_scale_mtof)
|
||||
AM_maxOutWindowScale();
|
||||
f_w = screen->GetWidth();
|
||||
f_h = ST_Y;
|
||||
f_h = gST_Y;
|
||||
AM_activateNewScale();
|
||||
}
|
||||
|
||||
|
|
@ -3066,7 +3066,7 @@ void AM_Drawer ()
|
|||
// and view size adjustments.
|
||||
f_x = f_y = 0;
|
||||
f_w = screen->GetWidth ();
|
||||
f_h = ST_Y;
|
||||
f_h = gST_Y;
|
||||
f_p = screen->GetPitch ();
|
||||
|
||||
AM_clearFB(AMColors[AMColors.Background]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue