Skip to content

Commit

Permalink
Scrolling letters now correctly scroll off-screen for high score entry
Browse files Browse the repository at this point in the history
  • Loading branch information
jbanes committed Feb 18, 2019
1 parent 659eded commit b162e1b
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion ipkg/control
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: mrdrillux
Version: 20190217
Version: 20190218
Description: Clone of Mr. Driller game
Section: games
Priority: optional
Expand Down
3 changes: 1 addition & 2 deletions ipkg/home/retrofw/apps/gmenu2x/sections/games/drill.lnk
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
title=Mr. Drillux
description=See how deep you can drill!
exec=/home/retrofw/games/drill/drill.dge
clock=600
exec=/home/retrofw/games/drill/drill.dge
Binary file removed profile/output/dingux/obj/CBmps.gcda
Binary file not shown.
Binary file removed profile/output/dingux/obj/CInput.gcda
Binary file not shown.
Binary file removed profile/output/dingux/obj/CTime.gcda
Binary file not shown.
Binary file removed profile/output/dingux/obj/CWavs.gcda
Binary file not shown.
Binary file modified profile/output/dingux/obj/Cffont.gcda
Binary file not shown.
Binary file modified profile/output/dingux/obj/drill.gcda
Binary file not shown.
9 changes: 7 additions & 2 deletions src/Cffont.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,14 @@ void CffontFree(Cffont *this){

void CffontBlitxy(Cffont *this,char *string,SDL_Surface *surf,int x,int y){
SDL_Rect dest = { x, y, this->width, this->height };

for (; *string; string++) {
SDL_Rect *psrc = &this->fontarea[(unsigned int)*string];
SDL_BlitSurface(this->font, psrc, surf, &dest);
dest.x += (dest.w > psrc->w) ? dest.w : psrc->w;
int width = (dest.w > psrc->w) ? dest.w : psrc->w;

if(dest.x + width > 0) SDL_BlitSurface(this->font, psrc, surf, &dest);
if(dest.w > 0) width = dest.w;

dest.x += width;
}
}

0 comments on commit b162e1b

Please sign in to comment.