Subversion Repositories eduke32

Rev

Rev 5054 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5054 Rev 5057
Line 2007... Line 2007...
2007
            // ALTERNATIVE STATUS BAR
2007
            // ALTERNATIVE STATUS BAR
2008
2008
2009
                        int32_t hudoffset = althud == 2 ? 32 : 200;
2009
                        int32_t hudoffset = althud == 2 ? 32 : 200;
2010
            static int32_t ammo_sprites[MAX_WEAPONS];
2010
            static int32_t ammo_sprites[MAX_WEAPONS];
2011
2011
2012
            if (ammo_sprites[0] == 0)
2012
            if (EDUKE32_PREDICT_FALSE(ammo_sprites[0] == 0))
2013
            {
2013
            {
2014
                /* this looks stupid but it lets us initialize static memory to dynamic values
2014
                /* this looks stupid but it lets us initialize static memory to dynamic values
2015
                   these values can be changed from the CONs with dynamic tile remapping
2015
                   these values can be changed from the CONs with dynamic tile remapping
2016
                   but we don't want to have to recreate the values in memory every time
2016
                   but we don't want to have to recreate the values in memory every time
2017
                   the HUD is drawn */
2017
                   the HUD is drawn */
2018
2018
2019
                int32_t asprites[MAX_WEAPONS] = { BOOTS, AMMO, SHOTGUNAMMO, BATTERYAMMO,
2019
                int32_t asprites[MAX_WEAPONS] = { -1, AMMO, SHOTGUNAMMO, BATTERYAMMO,
2020
                                                  RPGAMMO, HBOMBAMMO, CRYSTALAMMO, DEVISTATORAMMO,
2020
                                                  RPGAMMO, HBOMBAMMO, CRYSTALAMMO, DEVISTATORAMMO,
2021
                                                  TRIPBOMBSPRITE, FREEZEAMMO+1, HBOMBAMMO, GROWAMMO
2021
                                                  TRIPBOMBSPRITE, FREEZEAMMO+1, HBOMBAMMO, GROWAMMO
2022
                                                };
2022
                                                };
2023
                Bmemcpy(ammo_sprites, asprites, sizeof(ammo_sprites));
2023
                Bmemcpy(ammo_sprites, asprites, sizeof(ammo_sprites));
2024
            }
2024
            }
Line 2044... Line 2044...
2044
                if (lAmount == -1)
2044
                if (lAmount == -1)
2045
                    lAmount = p->inv_amount[GET_SHIELD];
2045
                    lAmount = p->inv_amount[GET_SHIELD];
2046
                G_DrawAltDigiNum(105,-(hudoffset-22),lAmount,-16,10+16+256);
2046
                G_DrawAltDigiNum(105,-(hudoffset-22),lAmount,-16,10+16+256);
2047
            }
2047
            }
2048
                       
2048
-
 
2049
                        if (ammo_sprites[p->curr_weapon] >= 0)
-
 
2050
            {
2049
            i = (tilesiz[ammo_sprites[p->curr_weapon]].y > 50) ? 16384 : 32768;
2051
                i = (tilesiz[ammo_sprites[p->curr_weapon]].y >= 50) ? 16384 : 32768;
2050
-
 
2051
            rotatesprite_althudr(57,hudoffset-15,sbarsc(i),0,ammo_sprites[p->curr_weapon],0,0,10+512);
2052
                rotatesprite_althudr(57,hudoffset-15,sbarsc(i),0,ammo_sprites[p->curr_weapon],0,0,10+512);
-
 
2053
            }
2052
2054
2053
            if (PWEAPON(snum, p->curr_weapon, WorksLike) == HANDREMOTE_WEAPON) i = HANDBOMB_WEAPON;
2055
            if (PWEAPON(snum, p->curr_weapon, WorksLike) == HANDREMOTE_WEAPON) i = HANDBOMB_WEAPON;
2054
            else i = p->curr_weapon;
2056
            else i = p->curr_weapon;
2055
2057
2056
            if (PWEAPON(snum, p->curr_weapon, WorksLike) != KNEE_WEAPON &&
2058
            if (PWEAPON(snum, p->curr_weapon, WorksLike) != KNEE_WEAPON &&