From DoomWiki.org

picture format edits[edit]

Hi Wesley, I wanted to approve these edits but I'm not sure they're correct. You state "There is also a different picture format used for the starting screens, help pages, and the Heretic picture format.". Do you mean TITLEPIC by starting screens, or something else? I'm not aware of a different picture format for TITLEPIC/HELP/CREDIT etc., nor changes made for Heretic. Can you elaborate, please? — Shambler (talk) 08:10, 15 April 2019 (CDT)

Wesley[edit]

It is not clear how this discussion is supposed to take place, this does not seem to be a forum.

The first question is going to be what this particular page is going to be about? Is it just about patch format? (then it should call it patch format and not picture format). If it is about all the formats then it might have to admit to png and the other formats that some other ports use.

The term "picture format" may mean different things in different Doom ports. In DoomLegacy, it refers to a picture format, that is used instead of patch format. DoomLegacy may dynamically decide to render a particular texture or patch using picture format instead. To do this it renders the patches into a buffer and then saves that buffer as a picture.

I cleaned up the Doom picture format page because it seemed to be about the patch format, and kept trying to call it something else. The sentence about other formats is true, there are other formats in the modern implementations of Doom. The vanilla Doom may be pretty close to using patches for everything, but not many people who are going to explore the code are going to go to that source. I left it an ambiguous sentence that warned them to look out for other formats when these other page types are concerned.

I spent several hours tracking down specifics, and then had to give that up because it was open-ended work.

Specifics[edit]

This is what I found out looking at DoomLegacy. (the page formatter is mangling this, it reads like the original when in EDIT).


******* Doom Large Images If this cannot do more than one line, it is pretty useless.

******* Doom Large Images
*** From doom.wad
Graphics
 TITLEPIC, HELP1, INTERPIC  patch
 WIMAP0, WIMAP1, WIMAP2   patch
 M_DOOM    patch
 END sequence   patch
 ENDPIC, PFUB1 PFUB2, VICTORY2  patch
Patches
 SKY1, SKY2, SKY3, SKY4     patch
Sprites
 - all monster, weapon, object patches


*** From doom2.wad
Graphics
 TITLEPIC, BOSSBACK, CREDIT, HELP, INTERPIC  patch
 M_DOOM    patch
 - several menu labels  patch
 - map names            patch
Patches
 RSKY1, RSKY2, RSKY3     patch
 - all wall texture patches
Sprites
 - all monster, weapon, object patches
Textures
 texture lump


*** From heretic.wad
Graphics
 M_HTIC     patch
 MAPE1, MAPE2, MAPE3   patch
Lumps
 CREDIT, TITLE, E2END      raw
 FINAL1, FINAL2   raw
 HELP1, HELP2     raw
Patches
 SKY1, SKY2, SKY3     patch


*** From legacy.wad
 CREDIT    patch
 RSKY1, RSKY2, RSKY3     patch
 - several menu labels  patch
   RANKINGS  patch
Lumps
 SBOHEALT  lmp  pic_t
 SBOARMOR  lmp  pic_t
 SBOEMPTY  lmp  pic_t
 SBOFRAGS  lmp  pic_t


*** Function calling
* Doom
 HELP1, HELP2
 -> V_DrawScalePatch

* Doom2
 HELP, CREDIT
 -> V_DrawScalePatch

* Heretic
 HELP1, HELP2
 -> V_DrawRawScreen_Num


* Doom status bar overlay
- draws status bar images that are lumps stored in pic_t format
  - DoomLegacy feature, lumps are from legacy.wad
    - status bar health   SBOHEALT
    - status bar armor    SBOARMOR
    - status bar frags    SBOFRAGS
 -> V_DrawScalePic_Num
    -> W_CachePicNum
    -> V_BlitScalePic


* Functions

Func D_PageDrawer ()
{
// Draws whole screen patches.
// Fills the borders by repeating a flat.
// Used for TITLEPIC, HELP1, HELP2, ORDER, CREDIT, FINAL1, FINAL2, E2END
}

Func V_DrawScalePic_Num ()
{
// Used for Legacy overlay graphics
 -> W_CachePicNum
 -> V_BlitScalePic
}

Func V_DrawRawScreen ()
{
// Used for Legacy credits.
// Used for heretic: TITLE, HELP1, HELP2, ORDER, CREDIT, FINAL1, FINAL2, E2END
  -> W_CacheRawAsPic
  -> V_BlitScalePic
}

Func W_CacheRawAsPic ()
{
// convert raw heretic picture to legacy pic_t format
// Used for heretic: TITLE, HELP1, HELP2, ORDER, CREDIT, FINAL1, FINAL2, E2END
}

Func W_CachePicName, W_CachePicNum ()
{
- reads a lump that is in pic_t format
}

Func V_BlitScalePic ()
{
- renders images that are in pic_t format
  - can only draw pic mode = PALETTE
  - the usual pic are sized for 320x200
}


*** pic_t format
<<code>>
// This is the Doom PIC format (not the Pictor PIC format).
typedef enum {
    PALETTE         = 0,  // 1 byte is the index in the doom palette (as usual)
    INTENSITY       = 1,  // 1 byte intensity
    INTENSITY_ALPHA = 2,  // 2 byte : alpha then intensity
    RGB24           = 3,  // 24 bit rgb
    RGBA32          = 4,  // 32 bit rgba
} pic_mode_t;

pic_t image format
{
    uint16_t  width;
    byte      zero;   // set to 0 allow autodetection of pic_t 
                      // mode instead of patch or raw
    byte      mode;   // see pic_mode_t above
    uint16_t  height;
    uint16_t  reserved1;  // set to 0
    byte      data[0];
}
<</code>>

In spite of the mode definition above, all actual Doom pic seem to be mode 0.


*** Flats
- stored as a raw image without a header
- original was 64x64 raw image
  - DoomLegacy will accept other square sizes, upto 256x256
- drawn horizontally (by rows)

func  R_GetFlat
// just reads a lump into a cache

—The preceding unsigned comment was added by Wesleyjohnson (talkcontribs) .

New categories[edit]

Please pause on that flood of categories, this may be undesirable. Ideas that have a significant effect on the wiki should be proposed and discussed first in Doom Wiki:Central Processing. --Xymph (talk) 05:51, 30 December 2022 (CST)

If you mean the [[Category:: name ]] markers. I was assuming they do not do anything if the category does not actually exist yet, or if that category does not actually reference the markers. I was using them to record which categories that Doom Legacy was in, as some categories do not use the marker and just has the port names entered directly. Otherwise, I would have to search all the categories to find ones that Doom Legacy was within, or was not within but should be. I was going to comment the purely note keeping ones if they caused problems, assuming I can find a way to comment out such things.
I have not created any new categories, these record existing categories that Doom Legacy should be within. I added some entries for categories that might exist in the future, or might good categories, (but this was in case someone else creates it). Some like CajunBot, I am just not sure of (why is that a category).
This was a very long session trying to get this updated.
Not sure how these messages are supposed to notify the user. I only saw these when I hit the WesleyJohnson button trying to find the logout (I see it now, hiding in the corner). Wesleyjohnson (talk) 07:09, 30 December 2022 (CST)
Messages on talk pages are threaded via indents, and should be signed. You've been around here since 2011, so I'd expect you had plenty time to learn from the many examples elsewhere. ;) A new entry on your talk page should generate a pop-up message the next time you visit any wiki page. Also, keeping an eye on Special:RecentChanges for edits and follow-ups to your own contributions provides another source for learning.
Adding new categories to a page implies proposing that they should be created, and they are now red-linked in the Doom Legacy footer. But that could have far-reaching consequences throughout bigger parts of the wiki, so should not be undertaken without prior discussion as noted above.
Your outline above is not entirely coherent to me on what you're trying to accomplish, but marking individual features that DL supports is generally not handled via categories in that level of detail. So again, if you have some ideas that may benefit the wiki beyond the DL article, then please start a new topic in Central Processing. Otherwise, I am more inclined to reject the edit that sparked this discussion. --Xymph (talk) 06:55, 30 December 2022 (CST)
Okay, that wraps it up then. --Xymph (talk) 07:43, 30 December 2022 (CST)