@@ -271,57 +271,27 @@ void mostrarpergamino (SDL_Surface *ventana, int *pergamino) {
271
271
272
272
SDL_Surface * pergamin = NULL ;
273
273
SDL_Surface * temp = NULL ;
274
- TTF_Font * fuente = NULL ;
275
- SDL_Surface * marcador = NULL ;
276
- SDL_Color fgcolor = {0 ,0 ,0 };
277
- SDL_Rect desmarcador = {0 ,0 ,0 ,0 };
278
- int alto = 0 ;
279
- int ancho = 0 ;
280
- char renglon1 [18 ];
281
- char renglon2 [20 ];
282
-
283
- fuente = TTF_OpenFont (RUTA_FON_VENICE_CLASSIC , 18 );
284
- temp = IMG_Load (RUTA_GRA_PERGAMINO );
285
- pergamin = SDL_DisplayFormat (temp );
286
- SDL_FreeSurface (temp );
287
-
288
- SDL_BlitSurface (pergamin , NULL , ventana , NULL );
289
- SDL_FreeSurface (pergamin );
290
274
291
275
switch (* pergamino ) {
292
- case 3 : sprintf (renglon1 , "Twelve crosses" );
293
- sprintf (renglon2 , "against the devil" );
276
+ case 3 : temp = IMG_Load (RUTA_GRA_PERGAMINO1 );
294
277
break ;
295
- case 8 : sprintf (renglon1 , "Twelve brothers" );
296
- sprintf (renglon2 , "hid and died here" );
278
+ case 8 : temp = IMG_Load (RUTA_GRA_PERGAMINO2 );
297
279
break ;
298
- case 12 : sprintf (renglon1 , "Four brothers" );
299
- sprintf (renglon2 , "changed their faith" );
280
+ case 12 : temp = IMG_Load (RUTA_GRA_PERGAMINO3 );
300
281
break ;
301
- case 14 : sprintf (renglon1 , "An invisible path" );
302
- sprintf (renglon2 , "over a wood bridge" );
282
+ case 14 : temp = IMG_Load (RUTA_GRA_PERGAMINO4 );
303
283
break ;
304
- case 16 : sprintf (renglon1 , "Jump to death" );
305
- sprintf (renglon2 , "and prove your faith" );
284
+ case 16 : temp = IMG_Load (RUTA_GRA_PERGAMINO5 );
306
285
break ;
307
- case 21 : sprintf (renglon1 , "Glide through" );
308
- sprintf (renglon2 , "the beast cage" );
286
+ case 21 : temp = IMG_Load (RUTA_GRA_PERGAMINO6 );
309
287
break ;
310
288
}
311
289
312
- marcador = TTF_RenderText_Blended (fuente , renglon1 , fgcolor );
313
- TTF_SizeText (fuente , renglon1 , & ancho , & alto );
314
- desmarcador .x = 127 - (ancho / 2 );
315
- desmarcador .y = 81 - alto ;
316
- SDL_BlitSurface (marcador , NULL , ventana , & desmarcador );
317
- SDL_FreeSurface (marcador );
318
- marcador = TTF_RenderText_Blended (fuente , renglon2 , fgcolor );
319
- TTF_SizeText (fuente , renglon2 , & ancho , & alto );
320
- desmarcador .x = 127 - (ancho / 2 );
321
- desmarcador .y = 85 ;
322
- SDL_BlitSurface (marcador , NULL , ventana , & desmarcador );
323
- SDL_FreeSurface (marcador );
324
- TTF_CloseFont (fuente );
290
+ pergamin = SDL_DisplayFormat (temp );
291
+ SDL_FreeSurface (temp );
292
+
293
+ SDL_BlitSurface (pergamin , NULL , ventana , NULL );
294
+ SDL_FreeSurface (pergamin );
325
295
326
296
}
327
297
0 commit comments