i trying to draw out my tnl bar and cant figure it out after the first level up it does not zero out.
int nextlevel = world->exp_table[world->character->level+1];//same leve up struct as eo
int d = static_cast<double>(world->character->exp) / static_cast<double>(nextlevel) * exp_bar->width; //156 width
rect.x = 0;
rect.y = 36;
rect.w = d;
rect.h = 17;
world->video->Draw(320 - world->video->hpmp_bar->w / 4,36,world->video->hpmp_bar,&rect);
I use the same furmula to draw my hp and mp bars and it seems to work fine .what im looking for is the correct formula to display tnl any help would be appreciated thanks!
Level 0 the empty bar is the tnl meter.
Level 3 fresh level upand the tnl meter is half full.