View Issue Details

IDProjectCategoryView StatusLast Update
0000567Gameplay + OpenGL[All Projects] Bugpublic2017-04-14 08:41
ReporterMajor Cooke 
Assigned To 
PriorityhighSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Summary0000567: Draw* can only draw one bar at a time
DescriptionIt appears the DrawBar functions are a bit broken.
Steps To ReproduceD4DResources.pk3
D4DBrokenBars.pk3

Download both files and load in that order. The health and armor bar to the left shows only the text for the armor and the bar for the health.

Open D4DBrokenBars.pk3 -> ZStatusBars.txt.
Uncomment line 166 + 167 and run the game again.

Both health bar and armor count is gone, replaced with the armor bar.
TagsNo tags attached.

Relationships

Activities

Major Cooke

Major Cooke

2017-04-11 09:51

reporter   ~0001311

I saw I had border enabled by mistake. That fixed the issue of the bars not drawing, but text still does not draw.
Major Cooke

Major Cooke

2017-04-11 10:09

reporter   ~0001312

Last edited: 2017-04-11 10:12

View 3 revisions

UPDATE
D4DBrokenBars2.pk3

Wound up changing the entire thing just a little to better match.

The moment all DrawBars are commented out, the font and blue health "+" symbol will actually draw. But only then.

int hp = (CPlayer ? CPlayer.mo.health : 0);
if (hp > 0)
{
    Vector2 ArmorTextPos = (-4, 679);
    int colArmor = Font.CR_WHITE;
    int armorAmount = GetArmorAmount();
    
    // Armor
    if (GetAmountOnly("PowerInvulBase"))
    {
        colArmor = Font.CR_RED;
        armorAmount = 666;
    }
    
    DrawBar("BODYARM1", "BODYARM0", GetArmorAmount(), 100, (18, 676), 0, 0, imageAlignment);
    
DrawBar("BODYARM2", "BODYARM0", Max(0, GetArmorAmount() - 100), 100, (18, 676), 0, 
0, imageAlignment);
    DrawString(mQ4SmallHudFont, FormatNumber(armorAmount, 1, 3), (-4, 679), DI_TEXT_ALIGN_RIGHT, colArmor);
    
    
// Health
    
    int hpi = mHealthInterpolator.GetValue();
    DrawBar("BODYHEL1", "BODYHEL0", hpi, 100, (18, 694), 0, 0, imageAlignment);
    
DrawBar("BODYHEL2", "BODYHEL0", Max(0, hpi - 100), 100, (18, 694), 0, 0, imageAlignment);
    
DrawString(mQ4SmallHudFont, FormatNumber(hp, 1, 3), (-4, 697), DI_TEXT_ALIGN_RIGHT, Font.CR_WHITE);
    
    
DrawImage ("BODYHELC", (0, 697), imageAlignment);
}



Major Cooke

Major Cooke

2017-04-12 20:48

reporter   ~0001330

Okay, all further attempts to rectify this problem have been futile so for now, I'm simply going to hold off further progress on the huds until addressed. No idea what causes it, but it appears it may be overriding everything else -- which is strange, considering it doesn't remove the bigger hud base itself. Yet, it causes the health plus symbol to disappear...
Nash

Nash

2017-04-12 22:32

reporter   ~0001331

I had some difficulties with screen rectangle clipping recently. Could be related, because the DrawBar stuff internally uses screen clipping.

Sorry I can't give any more details, I got frustrated and deleted whatever it was I was experimenting with.

Some of the problems I faced were:

- the clipping rectangle completely blanking out the main menu and console
- a lot of difficulty setting up clipping rectangles for more than one HUD element (one would overwrite the other, or something to that effect)
Major Cooke

Major Cooke

2017-04-13 10:31

reporter   ~0001337

Yeah, what caused some of my issues was the fact that at first I had border as 1. When I turned it off, that allowed some thing to be drawn but it still screws up the rest.

Issue History

Date Modified Username Field Change
2017-04-11 09:34 Major Cooke New Issue
2017-04-11 09:51 Major Cooke Note Added: 0001311
2017-04-11 10:09 Major Cooke Note Added: 0001312
2017-04-11 10:09 Major Cooke Note Edited: 0001312 View Revisions
2017-04-11 10:12 Major Cooke Note Edited: 0001312 View Revisions
2017-04-12 20:48 Major Cooke Note Added: 0001330
2017-04-12 22:32 Nash Note Added: 0001331
2017-04-13 10:31 Major Cooke Note Added: 0001337
2017-04-14 08:41 Graf Zahl Status new => resolved
2017-04-14 08:41 Graf Zahl Resolution open => fixed