Slot Machine


Worked on the inventory GUI. We can now draw images to any of the inventory slots (the red frame image is a placeholder), and the entire thing scales to different resolutions.

This was a bit easier than I thought it would be, mostly because gnounc made me see the comparison to web design with CSS.

I ran into an issue with an old largely undocumented Quake “feature”: vid_conautoscale. This cvar affects not just the scale of the console font, but of the entire user interface, meaning there actually is such a thing as a “virtual screen size” and “virtual pixels” in Quake engines. Pretty horrible, because my instinct was that a pixel damn well should be a pixel. Turns out this can just be set to 1 and it’ll make it so, but as a consequence the normal console font and menu are now too small. Because the thing was meant for 320×200 pixel artwork. Horrible stuff from 1996.

This all results in a need to draw my own console and my own menu via CSQC. Yay. The things you run into when you use technology with a history. Fortunately there exists code that does this already, as well as drag-and-drop functionality. So that is all possible. But: sheesh. Quake is 17 years old. No one fixed this stuff until now? Really?

This also makes me want to hide the console from normal users, because changing cvars such as this can make the game completely wonky.

Next up: Sharing out inventory contents to CSQC so we can actually draw the correct icons. Yay. After that, drag and drop.

Fullbright models issue has been hunted down yesterday, we know what causes it now. That sure is an annoying bug.

2 responses to “Slot Machine

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: