comparison ppl.c @ 137:f721f9f7838a

Remove toupper() from custom text drawing.
author Matti Hamalainen <ccr@tnsp.org>
date Fri, 05 Oct 2012 05:26:54 +0300
parents 1d7dc7c8745c
children ead759da30b4
comparison
equal deleted inserted replaced
136:8ac24d753304 137:f721f9f7838a
163 const char *ptr = fmt; 163 const char *ptr = fmt;
164 DMUnscaledBlitFunc blit = NULL; 164 DMUnscaledBlitFunc blit = NULL;
165 165
166 while (*ptr) 166 while (*ptr)
167 { 167 {
168 int ch = toupper(*ptr++); 168 int ch = *ptr++;
169 SDL_Surface *glyph; 169 SDL_Surface *glyph;
170 170
171 if (ch == '_') 171 if (ch == '_')
172 { 172 {
173 xc += 4; 173 xc += 4;
606 if (SDL_MUSTLOCK(engine.screen) != 0 && SDL_LockSurface(engine.screen) != 0) 606 if (SDL_MUSTLOCK(engine.screen) != 0 && SDL_LockSurface(engine.screen) != 0)
607 { 607 {
608 dmError("Can't lock surface.\n"); 608 dmError("Can't lock surface.\n");
609 goto error_exit; 609 goto error_exit;
610 } 610 }
611 611
612 #if 1
612 dmDrawBox3D(engine.screen, 0, 0, engine.screen->w - 1, engine.screen->h - 1, 613 dmDrawBox3D(engine.screen, 0, 0, engine.screen->w - 1, engine.screen->h - 1,
613 col.boxBg, col.box1, col.box2); 614 col.boxBg, col.box1, col.box2);
614 615
615 dmDrawBMTextQ(engine.screen, font, DMD_TRANSPARENT, 5, 5, "%s v%s by ccr/TNSP - (c) Copyright 2012 TNSP", dmProgDesc, dmProgVersion); 616 dmDrawBMTextQ(engine.screen, font, DMD_TRANSPARENT, 5, 5, "%s v%s by ccr/TNSP - (c) Copyright 2012 TNSP", dmProgDesc, dmProgVersion);
616 617
625 626
626 dmDisplayPattern(engine.screen, 5, 30, engine.screen->w - 6, engine.screen->h - 10, 627 dmDisplayPattern(engine.screen, 5, 30, engine.screen->w - 6, engine.screen->h - 10,
627 plr->pattern, plr->row, 0); 628 plr->pattern, plr->row, 0);
628 JSS_UNLOCK(plr); 629 JSS_UNLOCK(plr);
629 JSS_UNLOCK(dev); 630 JSS_UNLOCK(dev);
631 #endif
630 632
631 // Flip screen 633 // Flip screen
632 if (SDL_MUSTLOCK(engine.screen) != 0) 634 if (SDL_MUSTLOCK(engine.screen) != 0)
633 SDL_UnlockSurface(engine.screen); 635 SDL_UnlockSurface(engine.screen);
634 636
635 SDL_Flip(engine.screen); 637 SDL_Flip(engine.screen);
636 SDL_Delay(10); 638 SDL_Delay(16);
637 } 639 }
638 640
639 error_exit: 641 error_exit:
640 SDL_PauseAudio(1); 642 SDL_PauseAudio(1);
641 643