From 81b566f9c8dad0b0d5a8a24cf01619d3d4c7e60f Mon Sep 17 00:00:00 2001 From: kts Date: Sat, 16 Nov 2013 23:23:43 -0800 Subject: [PATCH] No real changes, only minor tweaks to the trasparency of the inventory UI. --- interface/sdl.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/interface/sdl.c b/interface/sdl.c index 4f0bc97..24c452b 100644 --- a/interface/sdl.c +++ b/interface/sdl.c @@ -508,7 +508,8 @@ void interfaceDrawInventory() { //SDL_Rect render_area = { screen->w-(screen->w/6), screen->h/8, screen->w/6, screen->h/2 }; SDL_Surface *new_surface = SDL_CreateRGBSurface(screen->flags, inventory_width, inventory_height, screen->format->BitsPerPixel, screen->format->Rmask, screen->format->Gmask, screen->format->Bmask, screen->format->Amask); SDL_Rect render_area = { (screen->w/2)-(inventory_width/2), (screen->h/2)-(inventory_height/2), inventory_width, inventory_height }; - SDL_FillRect(new_surface, NULL, SDL_MapRGB(new_surface->format, 196, 164, 64)); + //SDL_FillRect(new_surface, NULL, SDL_MapRGB(new_surface->format, 196, 164, 64)); + SDL_FillRect(new_surface, NULL, SDL_MapRGB(new_surface->format, 196, 196, 196)); struct Tile *current_item = ((struct PlayerTile*)player->data)->inventory.tile; int i = 0; while (current_item) { @@ -516,13 +517,13 @@ void interfaceDrawInventory() { drawScaledSprite(&item_sprites, current_item->id, new_surface, i*item_sprites.s_width, 0); interfaceDrawStringF(&font_mini, new_surface, ((struct ItemTile*)current_item->data)->name, inventory_width/2-(strlen(((struct ItemTile*)current_item->data)->name)*font_mini.width*font_mini.scale_x/2), inventory_height - (font_mini.height*font_mini.scale_y)); } else { - drawScaledTransparentSprite(&item_sprites, current_item->id, 0.75f, new_surface, i*item_sprites.s_width, 0); + drawScaledTransparentSprite(&item_sprites, current_item->id, 0.50f, new_surface, i*item_sprites.s_width, 0); } current_item = current_item->next; i++; } //drawScaledSprite(&player_sprites, 0, new_surface, 0, 0); - SDL_SetAlpha(new_surface, SDL_SRCALPHA, 128); + SDL_SetAlpha(new_surface, SDL_SRCALPHA, 232); SDL_BlitSurface(new_surface, NULL, screen, &render_area); SDL_FreeSurface(new_surface); }