Users browsing this thread: 5 Guest(s)
PBG's ADVENTURE! (Yeah!)
#12
Declaring the variables in a list like that only shows that the following variables are all of the same type.

Code:
//I assume that hp and maxhp are whole integer values and that each of these variables are defined
    short hp, maxhp, maxHeartsPerRow;
    short cellPixelWidth, cellPixelHeight;
    short originX, originY;
    short wholeHeartSpriteID, emptyHeartSpriteID;

    //originX and originY are the top left position to begin rendering hearts from.
    short i;
    short posX, posY;
    short cellX, cellY;
Note that I moved "originX" and "originY" to the group of variables that you set yourself, and moved "cellX" and "cellY" to the group of variables that are determined within the loop which you do not set yourself. For the first group, I assume that you have all of these values and can set them. "originX" and "originY" represent the starting position to render the hearts at. "cellPixelWidth" and "cellPixelHeight" represent the size of each heart, though the values can include some padding (be larger than the sprite sizes).
Animations - MFGG TKO (scrapped) - tFR
[Image: QUmE6.gif]
"It feels that time is better spent on original creations" - Konjak
Focus on the performance, the idea, not the technical bits or details - Milt Kahl
Reply
Thanked by:


Messages In This Thread
PBG's ADVENTURE! (Yeah!) - by Joxon - 08-17-2015, 12:12 AM
RE: PBG's ADVENTURE! (Yeah!) - by Joxon - 08-18-2015, 07:18 PM
RE: PBG's ADVENTURE! (Yeah!) - by Joxon - 08-29-2015, 08:38 PM
RE: PBG's ADVENTURE! (Yeah!) - by TheShyGuy - 08-29-2015, 09:55 PM
RE: PBG's ADVENTURE! (Yeah!) - by Joxon - 08-29-2015, 10:12 PM
RE: PBG's ADVENTURE! (Yeah!) - by TheShyGuy - 08-29-2015, 10:56 PM
RE: PBG's ADVENTURE! (Yeah!) - by Joxon - 08-30-2015, 12:36 PM
RE: PBG's ADVENTURE! (Yeah!) - by TheShyGuy - 08-30-2015, 02:28 PM
RE: PBG's ADVENTURE! (Yeah!) - by Joxon - 08-30-2015, 02:47 PM
RE: PBG's ADVENTURE! (Yeah!) - by TheShyGuy - 08-30-2015, 03:16 PM
RE: PBG's ADVENTURE! (Yeah!) - by Joxon - 08-30-2015, 03:23 PM
RE: PBG's ADVENTURE! (Yeah!) - by TheShyGuy - 08-30-2015, 03:36 PM
RE: PBG's ADVENTURE! (Yeah!) - by Joxon - 08-30-2015, 03:38 PM
RE: PBG's ADVENTURE! (Yeah!) - by TheShyGuy - 08-30-2015, 04:08 PM
RE: PBG's ADVENTURE! (Yeah!) - by Joxon - 08-30-2015, 04:18 PM
RE: PBG's ADVENTURE! (Yeah!) - by TheShyGuy - 08-30-2015, 04:43 PM
RE: PBG's ADVENTURE! (Yeah!) - by Joxon - 08-30-2015, 04:55 PM
RE: PBG's ADVENTURE! (Yeah!) - by TheShyGuy - 08-30-2015, 04:57 PM
RE: PBG's ADVENTURE! (Yeah!) - by Joxon - 08-30-2015, 05:30 PM
RE: PBG's ADVENTURE! (Yeah!) - by TheShyGuy - 08-30-2015, 07:49 PM
RE: PBG's ADVENTURE! (Yeah!) - by Joxon - 08-30-2015, 07:52 PM
RE: PBG's ADVENTURE! (Yeah!) - by TheShyGuy - 08-30-2015, 07:59 PM
RE: PBG's ADVENTURE! (Yeah!) - by Joxon - 08-30-2015, 08:05 PM
RE: PBG's ADVENTURE! (Yeah!) - by Silversea - 09-04-2015, 12:20 AM
RE: PBG's ADVENTURE! (Yeah!) - by Joxon - 11-04-2015, 09:27 AM
RE: PBG's ADVENTURE! (Yeah!) - by Joxon - 11-07-2015, 11:14 AM

Forum Jump: