Bladeren bron

Nicer console output

Thomas Buck 10 jaren geleden
bovenliggende
commit
52dd6cd0af
4 gewijzigde bestanden met toevoegingen van 17 en 23 verwijderingen
  1. 1
    1
      src/Render.cpp
  2. 1
    1
      src/SDLSystem.cpp
  3. 8
    8
      src/Sound.cpp
  4. 7
    13
      src/Texture.cpp

+ 1
- 1
src/Render.cpp Bestand weergeven

@@ -219,7 +219,7 @@ void Render::initTextures(char *textureDir, unsigned int *numLoaded,
219 219
 		mTexture.setFlag(Texture::fUseMipmaps);
220 220
 	}
221 221
 
222
-	printf("Processing textures: ");
222
+	printf("Processing Textures:\n");
223 223
 
224 224
 	color[0] = 0xff;
225 225
 	color[1] = 0xff;

+ 1
- 1
src/SDLSystem.cpp Bestand weergeven

@@ -218,7 +218,7 @@ void SDLSystem::initVideo(unsigned int width, unsigned int height,
218 218
 
219 219
 	// Create GL context
220 220
 	SDL_Init(SDL_INIT_VIDEO);
221
-	printf("@ Created OpenGL Context...\n");
221
+	printf("Created OpenGL Context\n");
222 222
 	atexit(SDL_Quit);
223 223
 
224 224
 	m_width = width;

+ 8
- 8
src/Sound.cpp Bestand weergeven

@@ -79,9 +79,9 @@ int Sound::init()
79 79
 	alutInit(NULL, 0);
80 80
 
81 81
 	mInit = true;
82
-	printf("@Created OpenAL Context...\n");
82
+	printf("Created OpenAL Context\n");
83 83
 #else
84
-	printf("*Couldn't create sound Context...\n");
84
+	printf("Couldn't create sound Context!\n");
85 85
 #endif
86 86
 
87 87
 	return 0;
@@ -124,7 +124,7 @@ int Sound::addFile(char *filename, int *source, unsigned int flags)
124 124
 
125 125
 	if (!mInit || !filename || !source)
126 126
 	{
127
-		printf("Sound::Add> ERROR pre condition assertion failed\n");
127
+		printf("Sound::AddFile> ERROR pre condition assertion failed\n");
128 128
 		return -1000;
129 129
 	}
130 130
 
@@ -137,7 +137,7 @@ int Sound::addFile(char *filename, int *source, unsigned int flags)
137 137
 
138 138
 	if (alGetError() != AL_NO_ERROR)
139 139
    {
140
-		fprintf(stderr, "Sound::Init> alGenBuffers call failed\n");
140
+		fprintf(stderr, "Sound::AddFile> alGenBuffers call failed\n");
141 141
 		return -1;
142 142
 	}
143 143
 
@@ -147,7 +147,7 @@ int Sound::addFile(char *filename, int *source, unsigned int flags)
147 147
 
148 148
 	if (alGetError() != AL_NO_ERROR)
149 149
    {
150
-		fprintf(stderr, "Sound::Init> alGenSources call failed\n");
150
+		fprintf(stderr, "Sound::AddFile> alGenSources call failed\n");
151 151
 		return -2;
152 152
 	}
153 153
 
@@ -192,7 +192,7 @@ int Sound::addWave(unsigned char *wav, unsigned int length, int *source, unsigne
192 192
 
193 193
 	if (!mInit || !wav || !source)
194 194
 	{
195
-		printf("Sound::Add> ERROR pre condition assertion failed\n");
195
+		printf("Sound::AddWave> ERROR pre condition assertion failed\n");
196 196
 		return -1000;
197 197
 	}
198 198
 
@@ -207,7 +207,7 @@ int Sound::addWave(unsigned char *wav, unsigned int length, int *source, unsigne
207 207
 
208 208
 	if (alGetError() != AL_NO_ERROR)
209 209
    {
210
-		fprintf(stderr, "Sound::Init> alGenBuffers call failed\n");
210
+		fprintf(stderr, "Sound::AddWave> alGenBuffers call failed\n");
211 211
 		return -1;
212 212
 	}
213 213
 
@@ -217,7 +217,7 @@ int Sound::addWave(unsigned char *wav, unsigned int length, int *source, unsigne
217 217
 
218 218
 	if (alGetError() != AL_NO_ERROR)
219 219
    {
220
-		fprintf(stderr, "Sound::Init> alGenSources call failed\n");
220
+		fprintf(stderr, "Sound::AddWave> alGenSources call failed\n");
221 221
 		return -2;
222 222
 	}
223 223
 

+ 7
- 13
src/Texture.cpp Bestand weergeven

@@ -196,10 +196,10 @@ void glPrint2d(float x, float y, float scale, char *string)
196 196
 	glTranslatef(x, y, 0);
197 197
 	glScalef(scale, scale, 1);
198 198
 
199
-	/* FIXME:
199
+	/*! \fixme
200 200
 	 * Add utf-8 dencoding of char* string
201 201
 	 *
202
-	 *	Also this string must be preprocessed to have glyph offsets
202
+	 * Also this string must be preprocessed to have glyph offsets
203 203
 	 * instead of ASCII text in it and support counts over 256 */
204 204
 	glListBase(font->drawListBase - font->utf8Offset);
205 205
 	glCallLists(strlen(string), GL_BYTE, string);
@@ -264,7 +264,7 @@ int Texture::loadFontTTF(char *filename,
264 264
 	if (texture)
265 265
 	{
266 266
 #ifdef DUMP_TTF_TGA
267
-		FILE *f = fopen("/tmp/font.tga", "wb");
267
+		FILE *f = fopen("font.tga", "wb");
268 268
 		if (f)
269 269
 		{
270 270
 			mtk_image__tga_save(f, texture->texture, 256, 256, 4);
@@ -272,7 +272,7 @@ int Texture::loadFontTTF(char *filename,
272 272
 		}
273 273
 		else
274 274
 		{
275
-			perror("/tmp/ttf_font.tga");
275
+			perror("ttf_font.tga");
276 276
 		}
277 277
 #endif
278 278
 
@@ -308,7 +308,7 @@ gl_font_t *Texture::generateFont(ttf_texture_t *texture)
308 308
 	if (!texture)
309 309
 		return NULL;
310 310
 
311
-	printf("@ Generating gl font from texture...\n");
311
+	printf("Generating gl font from texture...\n");
312 312
 
313 313
 	font = new gl_font_t;
314 314
 	font->utf8Offset = texture->utf8Offset;
@@ -439,7 +439,7 @@ ttf_texture_t *Texture::generateFontTexture(char *filename, int pointSize,
439 439
 	TTF_SetFontStyle(font, renderStyle);
440 440
 
441 441
 	/* Allocate a new TTF font texture */
442
-	printf("@ Creating font texture from '%s'...\n", filename);
442
+	printf("Creating font texture from '%s'...\n", filename);
443 443
 	texture = new ttf_texture_t;
444 444
 	texture->width = textureWidth;
445 445
 	texture->utf8Offset = utf8Offset;
@@ -557,7 +557,7 @@ void Texture::initSDL_TTF()
557 557
 	{
558 558
 		mFlags |= fUseSDL_TTF;
559 559
 
560
-		printf("@ Started SDL_TTF subsystem...\n");
560
+		printf("Started SDL_TTF subsystem!\n");
561 561
 		atexit(TTF_Quit);
562 562
 	}
563 563
 #endif
@@ -1035,9 +1035,6 @@ int Texture::loadPNG(char *filename)
1035 1035
 								 (type == 4) ? RGBA : RGB,
1036 1036
 								 (type == 4) ? 32 : 24);
1037 1037
 
1038
-			printf("%c", (id == -1) ? 'x' : 'o');
1039
-			fflush(stdout);
1040
-
1041 1038
 			delete [] image;
1042 1039
 		}
1043 1040
 
@@ -1097,9 +1094,6 @@ int Texture::loadTGA(char *filename)
1097 1094
 								 (type == 4) ? RGBA : RGB,
1098 1095
 								 (type == 4) ? 32 : 24);
1099 1096
 
1100
-			printf("%c", (id == -1) ? 'x' : 'o');
1101
-			fflush(stdout);
1102
-
1103 1097
 			delete [] image;
1104 1098
 		}
1105 1099
 

Laden…
Annuleren
Opslaan