diff --git a/stepmania/Themes/default/metrics.ini b/stepmania/Themes/default/metrics.ini index cd87f9dc70..4308d27632 100644 --- a/stepmania/Themes/default/metrics.ini +++ b/stepmania/Themes/default/metrics.ini @@ -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". diff --git a/stepmania/src/BitmapText.cpp b/stepmania/src/BitmapText.cpp index 367b64d2da..163a6c7c6e 100644 --- a/stepmania/src/BitmapText.cpp +++ b/stepmania/src/BitmapText.cpp @@ -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; diff --git a/stepmania/src/Sprite.cpp b/stepmania/src/Sprite.cpp index f6ae37955e..e84a81fc1b 100644 --- a/stepmania/src/Sprite.cpp +++ b/stepmania/src/Sprite.cpp @@ -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; diff --git a/stepmania/src/StepMania.cpp b/stepmania/src/StepMania.cpp index 771dd80cbd..a7b787201c 100644 --- a/stepmania/src/StepMania.cpp +++ b/stepmania/src/StepMania.cpp @@ -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;