/* Copyright (C) 1997-2001 Id Software, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ // // cg_inventory.c // #include "cg_local.h" #define INV_DISPLAY_ITEMS 17 /* ======================================================================= INVENTORY ======================================================================= */ /* ================ Inv_ParseInventory ================ */ void Inv_ParseInventory (void) { int i; for (i=0 ; ifloatVal); Vec4Set (selBarColor, Q_colorDkGrey[0], Q_colorDkGrey[1], Q_colorDkGrey[2], scr_hudalpha->floatVal * 0.66); cgi.R_GetFontDimensions (NULL, cg.hudScale[0], cg.hudScale[1], FS_SHADOW|FS_SQUARE, charSize); selected = cg.frame.playerState.stats[STAT_SELECTED_ITEM]; num = 0; selected_num = 0; for (i=0 ; i>2) & 1) { cgi.R_DrawChar (NULL, x-charSize[0], y, cg.hudScale[0], cg.hudScale[1], FS_SHADOW|FS_SQUARE, 15, Q_colorRed); cgi.R_DrawChar (NULL, x+(26*charSize[0]), y, cg.hudScale[0], cg.hudScale[1], FS_SHADOW|FS_SQUARE, 15, Q_colorRed); } } cgi.R_DrawStringLen (NULL, x, y, cg.hudScale[0], cg.hudScale[1], (item == selected) ? FS_SHADOW|FS_SQUARE : FS_SHADOW|FS_SECONDARY|FS_SQUARE, string, 26, color); y += charSize[1]; } }