Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
plums

Max dimensions of WILV/CWILV graphics for vanilla?

Recommended Posts

Just curious, I couldn't find the answer anywhere and maybe someone knows before I start using trial-and-error to find out.

Share this post


Link to post

I think you're limited to about 64 pixels in height before they start interfering with the placement of other graphics, width seems to be less of an issue.

Share this post


Link to post

Thanks, but I'm more interested in "absolute max size before it crashes the game." Larger than 320 px wide is too much for obvious reasons, I don't know if 320 will work though. Guess I'll have to try it out.

Share this post


Link to post

OK, results of my "not extremely thorough but good enough for me" tests. Replace CWILVxx with WILVxx for Doom 1, obviously.

  • Max horizontal size is 320 px, as expected. Higher will crash when the level name is supposed to be displayed.
  • Max vertical size without replacing other graphics is 149 px.
  • Max vertical size without interfering with other text is about 27 px. The normal CWILVxx lumps are 12 pixels high, so this is plenty of space to get two lines of text in.
  • The WIF lump ("FINISHED") always appears below the CWILVxx graphic. It's possible that replacing it with a shorter graphic might let you extend the vertical size of CWILVxx, because it seems like the crash occurs due to the enginge trying to draw WIF off-screen. This was untested.
  • The spacing between CWILVxx and WIF seems to increase as CWILVxx gets taller. I might test this more or sourcedive to figure out why.
  • Kills/Items/Secrets graphics and percentage scores get drawn over CWILVxx, if it is tall enough.
  • I didn't try multiplayer at all.
  • Chocolate Doom seems to behave exactly the same as Vanilla Doom in all cases I tested, as one would hope.


edit - Something I just noticed: CWILV00 (ENTRYWAY) is only 11 pixels high while all other text is 12. It looks like a smaller font compared to the rest of the text graphics!

Share this post


Link to post

// Draws "<Levelname> Finished!"
void WI_drawLF(void)
{
    int y = WI_TITLEY;

    // draw <LevelName> 
    V_DrawPatch((SCREENWIDTH - SHORT(lnames[wbs->last]->width))/2,
		y, FB, lnames[wbs->last]);

    // draw "Finished!"
    y += (5*SHORT(lnames[wbs->last]->height))/4;
    
    V_DrawPatch((SCREENWIDTH - SHORT(finished->width))/2,
		y, FB, finished);
}



// Draws "Entering <LevelName>"
void WI_drawEL(void)
{
    int y = WI_TITLEY;

    // draw "Entering"
    V_DrawPatch((SCREENWIDTH - SHORT(entering->width))/2,
		y, FB, entering);

    // draw level
    y += (5*SHORT(lnames[wbs->next]->height))/4;

    V_DrawPatch((SCREENWIDTH - SHORT(lnames[wbs->next]->width))/2,
		y, FB, lnames[wbs->next]);

}
So it uses a spacing equal to 5/4th the height of the (C)WILV graphic between the top of said graphic and the top of either "Finished" below or "Entering" above. (So the actual distance between both graphics is 1/4th of the (C)WILV height.)

For reference, SCREENWIDTH is 320 and TITLEY is 2.

149 is the maximum dimension because WIF and WIENTER are 12 pixel tall. 149*5/4=186 (rounded down) +2 for TITLEY = 188, +12 for the height of WIF/WIENTER = 200. If you make WIF and WIENTER just one pixel tall, you can push up to 158 pixels.

Share this post


Link to post
Gez said:

Entering


lol I knew I was forgetting something. Oh well, doesn't seem to matter as far as sizes go.

Anyhow, thanks for that. Any insight as to why they'd use proportional spacing instead of just a fixed distance?

Share this post


Link to post

I guess this way the code didn't need to know about which font size they'd end up using?

Share this post


Link to post
plums said:

edit - Something I just noticed: CWILV00 (ENTRYWAY) is only 11 pixels high while all other text is 12. It looks like a smaller font compared to the rest of the text graphics!

Yep - someone got a little careless and cropped the top row of pixels from that graphic.

Share this post


Link to post
Gez said:

I guess this way the code didn't need to know about which font size they'd end up using?


Sounds plausible.

GreyGhost said:

Yep - someone got a little careless and cropped the top row of pixels from that graphic.


Carelessness in Doom? I am shocked, shocked I tell you.

Share this post


Link to post

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  
×