No real changes, only minor tweaks to the trasparency of the inventory UI.

master
kts 2013-11-16 23:23:43 -08:00
parent 2776c9a91c
commit 81b566f9c8
1 changed files with 4 additions and 3 deletions

View File

@ -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);
}