added printing of error message when initializing sound, fixed font spacing the millionth time

main
Martin Felis (berta) 2010-11-15 22:49:35 +01:00
parent e981f68a9c
commit 652367b824
5 changed files with 2328 additions and 3 deletions

View File

@ -556,6 +556,7 @@ void View::DrawUiHighscore() {
unsigned int entry_length = 32;
float char_width, height;
DrawGLStringMeasure ("M", &char_width, &height);
height = fabsf(height);
float entry_width = fabsf(char_width * entry_length);
float x = screen_right * 0.5 - entry_width * 0.5;
float y = screen_bottom * 0.5 - 8 - 128;
@ -580,7 +581,7 @@ void View::DrawUiHighscore() {
DrawHighscoreEntry ( x, y, entry_width, highscore_iter->name, highscore_iter->points);
// go down one line
y += 20;
y += height * 1.3;
i++;
highscore_iter++;

View File

@ -2,4 +2,5 @@
# <Type> <player?> <xpos> <ypos> <zpos> <zrot> <yrot> <xrot> <xvel> <yvel> <zvel> <rotvel>
GameEntityTypeShip 1 0 0 0 0 90 0 0 0 0 0
GameEntityTypeAsteroid 0 7 0 -3 0 0 0 0.6 0 -0.1 -10
GameEntityTypeAsteroid 0 -5 0 1 0 0 0 0.3 0 0.4 5
GameEntityTypeAsteroid 0 -5 0 1 0 0 0 0.3 0 0.4 5
GameEntityTypeAsteroid 0 -2 0 3 0 0 3 0.1 0 0.7 5

View File

@ -52,7 +52,7 @@ int SoundBase::OnInit(int argc, char* argv[]) {
LogDebug("Sound Init");
if (Mix_OpenAudio (audio_rate, audio_format, audio_channels, audio_buffers)) {
LogError ("Unable to initialize the sound system!");
LogError ("Unable to initialize the sound system! Error message: %s", SDL_GetError());
}
Mix_QuerySpec (&audio_rate, &audio_format, &audio_channels);

View File

@ -7,6 +7,8 @@ Set( CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/CMake )
FIND_PACKAGE( OpenGL REQUIRED )
FIND_PACKAGE( FreeType2 REQUIRED )
INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/liboglft)
IF( ENABLE_QT )
FIND_PACKAGE( QT REQUIRED )
IF( DESIRED_QT_VERSION EQUAL 3 )

File diff suppressed because it is too large Load Diff