Skip to content

Commit

Permalink
SLUDGE: complete sprite loading
Browse files Browse the repository at this point in the history
  • Loading branch information
yinsimei authored and sev- committed Jul 13, 2017
1 parent cfe2e63 commit cd42e48
Show file tree
Hide file tree
Showing 3 changed files with 110 additions and 287 deletions.
8 changes: 4 additions & 4 deletions engines/sludge/fonttext.cpp
Expand Up @@ -80,7 +80,7 @@ int stringWidth(char *theText) {

while (theText[a]) {
c = u8_nextchar(theText, &a);
xOff += theFont.sprites[fontInTable(c)].width + fontSpace;
xOff += theFont.sprites[fontInTable(c)].surface.w + fontSpace;
}

return xOff;
Expand All @@ -99,7 +99,7 @@ void pasteString(char *theText, int xOff, int y, spritePalette &thePal) {
c = u8_nextchar(theText, &a);
mySprite = &theFont.sprites[fontInTable(c)];
fontSprite(xOff, y, *mySprite, thePal);
xOff += (int) ((double) (mySprite->width + fontSpace) / cameraZoom);
xOff += (int) ((double) (mySprite->surface.w + fontSpace) / cameraZoom);
}
}

Expand All @@ -117,7 +117,7 @@ void pasteStringToBackdrop(char *theText, int xOff, int y,
c = u8_nextchar(theText, &a);
mySprite = &theFont.sprites[fontInTable(c)];
pasteSpriteToBackDrop(xOff, y, *mySprite, thePal);
xOff += mySprite->width + fontSpace;
xOff += mySprite->surface.w + fontSpace;
}
}

Expand All @@ -135,7 +135,7 @@ void burnStringToBackdrop(char *theText, int xOff, int y,
c = u8_nextchar(theText, &a);
mySprite = &theFont.sprites[fontInTable(c)];
burnSpriteToBackDrop(xOff, y, *mySprite, thePal);
xOff += mySprite->width + fontSpace;
xOff += mySprite->surface.w + fontSpace;
}
}

Expand Down

0 comments on commit cd42e48

Please sign in to comment.