Added missing GraphicOptions help text, re-added F4 fullscreen and F5 detail toggles, fixed texel-pixel alignment in Sprite, BitmapText

This commit is contained in:
Chris Danford
2002-11-12 11:11:16 +00:00
parent 5b33869ed8
commit 19244acaf1
4 changed files with 54 additions and 18 deletions
+3 -1
View File
@@ -708,7 +708,9 @@ HiddenSongs=Some songs are only playable during Oni courses and::with roulette.
ShowStats=Display Performance Statistics in the upper right corner::of the screen. FPS = frames per second.::TPF = triangles per frame. DPF = draws per frame.
[ScreenGraphicOptions]
DisplayMode=Chose whether you would like StepMania to run full screen,::or to display in a window on your desktop
DisplayMode=Chose whether you would like StepMania to run full screen,::or to display in a window on your desktop.
DisplayColor=Chose the color depth of the StepMania window.::This option may not take effect in windowed mode.
TextureColor=Chose the color depth of textures.::32 bit texture use more memory, but look nicer.
DisplayResolution=Choose the output resolution. A higher resolution::will show more detail, but requires a faster video card.
TextureResolution=Choose the maximum texture resolution. Setting this::to anything below 1024 will cause some textures to appear blurry,::but may increase your frame rate.
RefreshRate=Controls how many times per second the screen will refresh.::This setting only has an effect when the Display Mode::is set to "full screen".
+7 -4
View File
@@ -194,10 +194,13 @@ void BitmapText::DrawPrimitives()
// Offset so that pixels are aligned to texels
// Offset by -0.5, -0.5 if 640x480
// Offset by -1.0, -1.0 if 320x240
DISPLAY->TranslateLocal(
-0.5f*SCREEN_WIDTH/(float)PREFSMAN->m_iDisplayWidth,
-0.5f*SCREEN_HEIGHT/(float)PREFSMAN->m_iDisplayHeight,
0 );
// 11/12/2002: Why in the world is this not needed with the OpenGL renderer?
// We're using the exact same orthographic projection transform. Anyway, things
// are perfectly aligned without this TranslateLocal
// DISPLAY->TranslateLocal(
// -0.5f*SCREEN_WIDTH/(float)PREFSMAN->m_iDisplayWidth,
// -0.5f*SCREEN_HEIGHT/(float)PREFSMAN->m_iDisplayHeight,
// 0 );
if( m_iNumLines == 0 )
return;
+7 -4
View File
@@ -200,10 +200,13 @@ void Sprite::DrawPrimitives()
// Offset so that pixels are aligned to texels
// Offset by -0.5, -0.5 if 640x480
// Offset by -1.0, -1.0 if 320x240
DISPLAY->TranslateLocal(
-0.5f*SCREEN_WIDTH/(float)PREFSMAN->m_iDisplayWidth,
-0.5f*SCREEN_HEIGHT/(float)PREFSMAN->m_iDisplayHeight,
0 );
// 11/12/2002: Why in the world is this not needed with the OpenGL renderer?
// We're using the exact same orthographic projection transform. Anyway, things
// are perfectly aligned without this TranslateLocal
// DISPLAY->TranslateLocal(
// -0.5f*SCREEN_WIDTH/(float)PREFSMAN->m_iDisplayWidth,
// -0.5f*SCREEN_HEIGHT/(float)PREFSMAN->m_iDisplayHeight,
// 0 );
// use m_temp_* variables to draw the object
RectF quadVerticies;
+37 -9
View File
@@ -460,17 +460,45 @@ int main(int argc, char* argv[])
InputEventType type = ieArray[i].type;
/* ALT-F4 -> quit (better place for this? in ScreenManager perhaps?) */
if(type == IET_FIRST_PRESS &&
DeviceI == DeviceInput(DEVICE_KEYBOARD, DIK_F4) &&
(INPUTMAN->IsBeingPressed( DeviceInput(DEVICE_KEYBOARD, DIK_RMENU)) ||
INPUTMAN->IsBeingPressed( DeviceInput(DEVICE_KEYBOARD, DIK_LMENU)) ) )
/* Nah. this is fine. -Chris */
if(type == IET_FIRST_PRESS && DeviceI == DeviceInput(DEVICE_KEYBOARD, DIK_F4))
{
SDL_Event *event;
event = (SDL_Event *) malloc(sizeof(event));
event->type = SDL_QUIT;
SDL_PushEvent(event);
continue;
if( INPUTMAN->IsBeingPressed( DeviceInput(DEVICE_KEYBOARD, DIK_RMENU)) ||
INPUTMAN->IsBeingPressed( DeviceInput(DEVICE_KEYBOARD, DIK_LMENU)) )
{
// pressed Alt+F4
SDL_Event *event;
event = (SDL_Event *) malloc(sizeof(event));
event->type = SDL_QUIT;
SDL_PushEvent(event);
continue;
}
else
{
// pressed just F4
PREFSMAN->m_bWindowed = !PREFSMAN->m_bWindowed;
ApplyGraphicOptions();
// fall through
}
}
else if( type == IET_FIRST_PRESS && DeviceI == DeviceInput(DEVICE_KEYBOARD, DIK_F5))
{
// pressed F5. Toggle detail.
if(PREFSMAN->m_iDisplayWidth != 640)
{
PREFSMAN->m_iDisplayWidth = 640;
PREFSMAN->m_iDisplayHeight = 480;
ApplyGraphicOptions();
}
else
{
PREFSMAN->m_iDisplayWidth = 320;
PREFSMAN->m_iDisplayHeight = 240;
ApplyGraphicOptions();
}
}
GameInput GameI;
MenuInput MenuI;