Welp got debugging full fledged, ran it through It goes through my init, my
vidinit, and even my draw.
and it steps through all the code cleanly yet It still doesn't display my
sprite on the screen.
--Health.cpp--
...
int CHudScouter::Init(void)
{
        HOOK_MESSAGE(Scouter);
        m_iHealth = 0;
        m_iKi = 0;
        m_iPwrLvl = 0;
        m_iFlags = 0;
        gHUD.AddHudElem(this);
        return 1;
}
...
int CHudScouter::VidInit(void)
{       m_hSprite = 0;
        m_HUD_Scouter = gHUD.GetSpriteIndex( "scouter" );
        m_iFlags |= HUD_ACTIVE;
        return 1;
}
...
int CHudScouter::Draw(float flTime)
{
        int r, g, b;
        int a = 0, x, y;
        ASSERT((m_iFlags & (HUD_ACTIVE)));
        r = 255;
        g = 255;
        b = 255;
        a = 255;
                x = 50;
                y = 50;
                SPR_Set(gHUD.GetSprite(m_HUD_Scouter), r, g, b);
                SPR_DrawHoles(0, x, y, &gHUD.GetSpriteRect(m_HUD_Scouter));
        return 1;
}
...
--End of Health.cpp--

Now you look at that and tell me I haven't done anything wrong ?, I can get
the sprite index and display
my sprite for the scouter in place of my healthhud in my healthhud class, so
it isn't getspriteindex.
x and y are both in perfect position on the screen, The alpha test sprite
should display with full intensity
and when I run through the debugger and handset the x,y, values just in
case, It still doesn't display them.
Now Am I just loosing it or what ? because that seems like a problem with
the engine to me, *remember I said
I ran breakpoints and it went through my init, my vidinit, and then every
loop it runs to draw the hud pieces
it hit my scouters hud draw breakpoint, and I successfuly stepped into every
statement and return 1; successfully
and it continued to loop and draw it like normal*  Anymore help would be
much appreciated, I just don't know
what else to do other then merge the scouter into my health hud which I
really want to avoid. Thankyou all ahead of time
for assistance.  And i'm sorry for the length of code, but I'm sure one of
you would have mearly accused me
of just making typo's.


Pj Bean
Lead Coder of Sr(http://www.sr.flagrun.net)


_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to