Fixed some MSVC compiler warnings.
This commit is contained in:
parent
ed63d7a67c
commit
7b66b7726b
|
@ -190,7 +190,7 @@ gui_render_panel(Gui *gui, unsigned int width, unsigned int height, Camera *cam)
|
||||||
void
|
void
|
||||||
gui_log(const char *fmt, ...)
|
gui_log(const char *fmt, ...)
|
||||||
{
|
{
|
||||||
char buffer[log_data.strlen];
|
char buffer[200];
|
||||||
char *new_message;
|
char *new_message;
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
char tstamp[10];
|
char tstamp[10];
|
||||||
|
|
|
@ -39,7 +39,7 @@ static void
|
||||||
eat_flesh(Item *item, Player *player)
|
eat_flesh(Item *item, Player *player)
|
||||||
{
|
{
|
||||||
int original_hp = player->stats.hp;
|
int original_hp = player->stats.hp;
|
||||||
player->stats.hp += item->value;
|
player->stats.hp += (int) item->value;
|
||||||
if (player->stats.hp > player->stats.maxhp)
|
if (player->stats.hp > player->stats.maxhp)
|
||||||
player->stats.hp = player->stats.maxhp;
|
player->stats.hp = player->stats.maxhp;
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ static void
|
||||||
drink_health(Item *item, Player *player)
|
drink_health(Item *item, Player *player)
|
||||||
{
|
{
|
||||||
int original_hp = player->stats.hp;
|
int original_hp = player->stats.hp;
|
||||||
player->stats.hp += item->value;
|
player->stats.hp += (int) item->value;
|
||||||
if (player->stats.hp > player->stats.maxhp)
|
if (player->stats.hp > player->stats.maxhp)
|
||||||
player->stats.hp = player->stats.maxhp;
|
player->stats.hp = player->stats.maxhp;
|
||||||
|
|
||||||
|
@ -91,20 +91,20 @@ create_treasure(void)
|
||||||
SDL_Rect clip = { 0, 0, 16, 16 };
|
SDL_Rect clip = { 0, 0, 16, 16 };
|
||||||
switch (value) {
|
switch (value) {
|
||||||
case COPPER:
|
case COPPER:
|
||||||
m_sprintf(&label[0], 50, "%d copper", amt);
|
m_sprintf(&label[0], 50, "%.0f copper", amt);
|
||||||
amt /= 100;
|
amt /= 100;
|
||||||
break;
|
break;
|
||||||
case SILVER:
|
case SILVER:
|
||||||
m_sprintf(&label[0], 50, "%d silver", amt);
|
m_sprintf(&label[0], 50, "%.0f silver", amt);
|
||||||
clip.x = 48;
|
clip.x = 48;
|
||||||
amt /= 10;
|
amt /= 10;
|
||||||
break;
|
break;
|
||||||
case GOLD:
|
case GOLD:
|
||||||
m_sprintf(&label[0], 50, "%d gold", amt);
|
m_sprintf(&label[0], 50, "%.0f gold", amt);
|
||||||
clip.y = 16;
|
clip.y = 16;
|
||||||
break;
|
break;
|
||||||
case PLATINUM:
|
case PLATINUM:
|
||||||
m_sprintf(&label[0], 50, "%d platinum", amt);
|
m_sprintf(&label[0], 50, "%.0f platinum", amt);
|
||||||
clip.x = 48;
|
clip.x = 48;
|
||||||
clip.y = 16;
|
clip.y = 16;
|
||||||
amt *= 10;
|
amt *= 10;
|
||||||
|
|
Loading…
Reference in New Issue