View Issue Details

IDProjectCategoryView StatusLast Update
0000620Gameplay + OpenGL[All Projects] Bugpublic2017-04-23 05:58
ReporterGutawer 
Assigned ToGraf Zahl 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionopen 
Platformamd64OSWindowsOS Version10
Summary0000620: ZScript HUD SetClipRect h variable not working
Description[code=c++] SetClipRect(0, 1080 - 128, 64, 64); DrawImage("STARTAN2", (0, 1080), DI_ITEM_LEFT_BOTTOM); [/code]

This piece of code successfully clips the STARTAN2 texture in half horizontally as expected, but does nothing to it vertically, leaving a 64 * 128 texture on the screen when a 64 * 64 texture was expected.
TagsNo tags attached.

Relationships

Activities

Gutawer

Gutawer

2017-04-23 05:05

reporter   ~0001532

Apologies for the broken formatting, was supposed to look like this:
SetClipRect(0, 1080 - 128, 64, 64);
DrawImage("STARTAN2", (0, 1080), DI_ITEM_LEFT_BOTTOM);
Graf Zahl

Graf Zahl

2017-04-23 05:21

administrator   ~0001533

Post your entire code. This fragment is not enough to see what goes wrong.
Gutawer

Gutawer

2017-04-23 05:35

reporter   ~0001534

Alright:
Class TestingStatusBar : BaseStatusBar {
    override void Init() {
        Super.Init();
        SetSize(0, 1920, 1080);
    }
    
    override void DrawAutomapHUD(double ticFrac) {
        // This uses the normal automap HUD but just changes the highlight color.
        DoDrawAutomapHUD(Font.CR_GREY, Font.CR_UNTRANSLATED);
    }
    
    override void Draw (int state, double TicFrac) {
        Super.Draw (state, TicFrac);

        if (state == HUD_StatusBar)
        {
            BeginStatusBar();
            DrawMainBar (TicFrac);
        }
        else if (state == HUD_Fullscreen)
        {
            BeginHUD();
            DrawFullScreenStuff ();
        }
    }
    
    void DrawMainBar(double TicFrac) {
    }
    
    void DrawFullScreenStuff() {
        SetClipRect(0, 1080 - 128, 64, 64);
        DrawImage("STARTAN2", (0, 1080), DI_ITEM_LEFT_BOTTOM);
    }
}

Issue History

Date Modified Username Field Change
2017-04-23 05:03 Gutawer New Issue
2017-04-23 05:05 Gutawer Note Added: 0001532
2017-04-23 05:21 Graf Zahl Note Added: 0001533
2017-04-23 05:21 Graf Zahl Assigned To => Graf Zahl
2017-04-23 05:21 Graf Zahl Status new => feedback
2017-04-23 05:35 Gutawer Note Added: 0001534
2017-04-23 05:35 Gutawer Status feedback => assigned
2017-04-23 05:58 Graf Zahl Status assigned => resolved