Jump to content

Random face in Boom with TNTHOM?


Recommended Posts

Forgive me if this has been discussed before, but being sleep deprived and seeing this gave me a bit of a scare... does anyone know anything about this? It happens when you shoot/fire and you're looking at a HOM with TNTHOM enabled. What the fuck?

 

wtf.png.bff582ffc09bb812fdb2fc082b80d990.png

Share this post


Link to post
5 minutes ago, fraggle said:

That's Lee Killough, the author of MBF and one of the main programmers on Boom. You found an easter egg, congrats.

 

That's what I figured... though, I've read a lot of source port documentation and I don't ever recall seeing anything about easter eggs in the classic DOS-era ports. I guess it wasn't important enough, or I just missed it.

Share this post


Link to post

Killough's love of obfuscation is well known.

 

I think this is the responsible code:

  if (autodetect_hom)
    { // killough 2/10/98: add flashing red HOM indicators
      char c[47*47];
      extern int lastshottic;
      int i,color=(gametic % 20) < 9 ? 0xb0 : 0;
      memset(*screens+viewwindowy*SCREENWIDTH,color,viewheight*SCREENWIDTH);
      for (i=0;i<47*47;i++)
        {
          char t =
"/////////////////////////////////////////////////////////////////////////////"
"/////////////////////////////////////////////////////////////////////////////"
"///////jkkkkklk////////////////////////////////////hkllklklkklkj/////////////"
"///////////////////jkkkkklklklkkkll//////////////////////////////kkkkkklklklk"
"lkkkklk//////////////////////////jllkkkkklklklklklkkklk//////////////////////"
"//klkkllklklklkllklklkkklh//////////////////////kkkkkjkjjkkj\3\205\214\3lllkk"
"lkllh////////////////////kllkige\211\210\207\206\205\204\203\203\203\205`\206"
"\234\234\234\234kkllg//////////////////klkkjhfe\210\206\203\203\203\202\202"
"\202\202\202\202\203\205`\207\211eikkk//////////////////kkkk\3g\211\207\206"
"\204\203\202\201\201\200\200\200\200\200\201\201\202\204b\210\211\3lkh///////"
"//////////lklki\213\210b\206\203\201\201\200\200\200\200\200Z\200\200\200\202"
"\203\204\205\210\211jll/////////////////lkkk\3\212\210b\205\202\201\200\200"
"\200XW\200\200\200\200\200\200\202\203\204\206\207eklj////////////////lkkjg"
"\211b\206\204\202\200\200\200YWWX\200Z\200\200\200\202\203\203\205bdjkk//////"
"//////////llkig\211a\205\203\202\200\200\200YXWX\200\200\200\200\200\201\202"
"\203\203\206\207ekk////////////////lkki\3\211\206\204\202\201\200\200XXWWWXX"
"\200\200\200\200\202\202\204\206\207ekk////////////////lkkj\3e\206\206\204\\"
"\200\200XWVVWWWXX\200\200\200\\\203\205\207\231kk////////////////lkkjjgcccfd"
"\207\203WVUVW\200\200\202\202\204\204\205\204\206\210gkk////////////////kkkkj"
"e``\210hjjgb\200W\200\205\206fhghcbdcdfkk////////////////jkkj\3\207ab\211e"
"\213j\3g\204XX\207\213jii\212\207\203\204\210gfkj///////////////j\211lkjf\210"
"\214\3\3kj\213\213\211\205X\200\205\212\210\213\213\213\211\210\203\205gelj//"
"////////////hf\211\213kh\212\212i\212gkh\202\203\210\210\202\201\206\207\206"
"\\kkhf\210aabkk//////////////je\210\210\3g\210\207\210e\210c\205\204\202\210"
"\207\203\202\210\205\203\203fjbe\213\210bbieW/////////////ke\207\206ie\206"
"\203\203\203\205\205\204\203\210\211\207\202\202\206\210\203\204\206\207\210"
"\211\231\206\206`\206\206]/////////////kf\\\202ig\204\203\202\201\\\202\202"
"\205\207\210\207\203\202\206\206\206\205\203\203\203\202\202\203\204b\206\204"
"Z/////////////i\3\\\204j\212\204\202\201\200\202\202\202\203\206\211\210\203"
"\203c\205\202\201\201\201\200\200\201\202\204a\204\201W/////////////j\3\207"
"\210jh\206\202\200\200\200\200\200\202\206\211\205\202\202bb\201\200\200\200"
"\200\200\200\202\203b\\WW/////////////jke\206jic\203\201\200\200\200\200\202"
"\211\211\201\200\200\204\210\201\200\200W\200\200\200\201\204c\\\200]////////"
"//////kd\210\3\3e\205\202\200\200W\200\202\211\210\210\201\202\207\210\203"
"\200WWW\200\200\202\205d\\\202///////////////kkdhigb\203\201\200\200\200\202"
"\206\210\210\205\210\211\206\203\200WWW\200\201\203ce\203\205////////////////"
"ijkig\211\203\201\200\200\202\206\207\207\205\206\207\210\206\203\200\200WW"
"\200\203\206ce\202_//////////////////jig\210\203\202\200\201\206\210\210\205"
"\204\204\205\206\206\204\202\200\200\200\200\203bcd////////////////////hjgc"
"\205\202\201\203\206\210\206\204\204\202\202\204\205\206\204\200\200\200\201"
"\206\207c//////////////////////j\3\207\204\203\202\202\211c\204\201W\200\200"
"\203\205\206\203\200\200\200\203\206b///////////////////////ihd\204\203\202"
"\201\207f\205VTVTW\202\210\206Z\200\200\203aa////////////////////////jg\204"
"\204\203\201\202\210\211\211c\206\205\210d\210\200\200\200\202\204ac/////////"
"///////////////j\3b\203\203\202\202\205\207\206\205\207\207\206\206\202\200"
"\201\202\203ac/////////////////////////iid\206\204\203\202\204\205\377\205"
"\204\205\204\203\201\200\202\203\203bc//////////////////////////ej\207\205"
"\203\201\202\202\203\207\204\203\202\202\201\201\203\203bd///////////////////"
"////////ee\3a\204\201\200\201\202\205\203\201\200\200\201\202\204\205cc//////"
"//////////////////////c\3ec\203\201\200\200\201\202\201\200\200\202\203\206cc"
"//////////////////////////////c\3f\206\203\201\200\200\200\200\200\201\203bdc"
"////////////////////////////////g\3\211\206\202\\\201\200\201\202\203dde/////"
"/////////////////////////////\234\3db\203\203\203\203adec////////////////////"
"/////////////////hffed\211de////////////////////"[i];
          c[i] = t=='/' ? color : t;
        }
      if (gametic-lastshottic < TICRATE*2 && gametic-lastshottic > TICRATE/8)
        V_DrawBlock(viewwindowx +  viewwidth/2 - 24,
                    viewwindowy + viewheight/2 - 24, 0, 47, 47, c);
      R_DrawViewBorder();
    }

The "/" characters are replaced by the background color of the HOM indicators, the others are the palette indices for his mugshot.

Share this post


Link to post
3 minutes ago, Gez said:

Killough's love of obfuscation is well known.

 

I guess that worked in his favor, then...

Share this post


Link to post
13 hours ago, Gez said:

Killough's love of obfuscation is well known.

 

Indeed,  a lot of times I was trying for hours to understand his source code.
 

Also mentioned in MBF source code comments:

Spoiler



while ((type != MT_PLASMA2) && (type = MT_PLASMA2)); //killough: obfuscated!

 

 


void P_RemoveSlimeTrails(void)                // killough 10/98
{
  byte *hit = calloc(1, numvertexes);         // Hitlist for vertices
  int i;
  for (i=0; i<numsegs; i++)                   // Go through each seg
    {
      const line_t *l = segs[i].linedef;      // The parent linedef
      if (l->dx && l->dy)                     // We can ignore orthogonal lines
	{
	  vertex_t *v = segs[i].v1;
	  do
	    if (!hit[v - vertexes])           // If we haven't processed vertex
	      {
		hit[v - vertexes] = 1;        // Mark this vertex as processed
		if (v != l->v1 && v != l->v2) // Exclude endpoints of linedefs
		  { // Project the vertex back onto the parent linedef
		    long long dx2 = (l->dx >> FRACBITS) * (l->dx >> FRACBITS);
		    long long dy2 = (l->dy >> FRACBITS) * (l->dy >> FRACBITS);
		    long long dxy = (l->dx >> FRACBITS) * (l->dy >> FRACBITS);
		    long long s = dx2 + dy2;
		    int x0 = v->x, y0 = v->y, x1 = l->v1->x, y1 = l->v1->y;
		    v->x = (dx2 * x0 + dy2 * x1 + dxy * (y0 - y1)) / s;
		    v->y = (dy2 * y0 + dx2 * y1 + dxy * (x0 - x1)) / s;
		  }
	      }  // Obfuscated C contest entry:   :)
	  while ((v != segs[i].v2) && (v = segs[i].v2));
	}
    }
  free(hit);
}


 

 

Share this post


Link to post

 Heh. I wonder if the boom source was equally obfuscated. At least a search for obfuscate gives no results. That function didn't exist yet.

Quote

Your source code is your intellectual property that takes time and costs money to develop. If source code gets into the wrong hands your company can suffer a number of side-effects, including loss of competitive edge, exposure of your innovations, and can even have serious security implications. For these reasons, protecting your code is a top priority in any organization where source code is created.

 

Share this post


Link to post

The code excerpt I posted above is from Boom. It's in R_RenderPlayerView() in R_MAIN.C.

 

Share this post


Link to post
On 3/8/2020 at 12:59 PM, maxmanium said:

I've read a lot of source port documentation and I don't ever recall seeing anything about easter eggs in the classic DOS-era ports. I guess it wasn't important enough, or I just missed it.

Another one is the JFF in Boom for the IDDT-IDDT cheat, as mentioned in the Trivia section here. I always thought that should have been compleveled, but never proposed it, as it's kind of nitpicky.

Share this post


Link to post
50 minutes ago, Grazza said:

Another one is the JFF in Boom for the IDDT-IDDT cheat, as mentioned in the Trivia section here. I always thought that should have been compleveled, but never proposed it, as it's kind of nitpicky.

 

Son of a bitch, I thought it looked different...

Share this post


Link to post

 I wonder why there isn't a WinBoom, may be becouse it wouldn't make sense? There are actually a lot of differences in the code and i believe it would be doable without too much work doing the same Quasar did.

Share this post


Link to post

Yeah but i mean like WinMBF just the original Boom source, merging Quasar changes on top of Boom source instead. PrBoom also has MBF code.

Share this post


Link to post

True, i forgot that the original PRBoom existed i was thinking on the second gen one. I've tried it and it works with a DDraw emulator (DXGL), the player spins wildly in fullscreen. Works also natively windowed with the -noddraw parameter. Music plays always at full volume. The text file mentions ZDoom so may be even uses ZDoom code for video.

But merging Quasar's and fabian's changes we'd get the Woof equivalent for Boom. I don't mean that it actually makes sense but i've seen that fraggle has created DietBoom based on Woof.

Share this post


Link to post

 I did more testing and i must say this was a very good port, mouse works reasonably well and later PRBoom versions now don't even run or they show SDL problems. GDI is slow but Coco 2.x also was. If a had the skill i could add D3D rendering (or 4x scaling and widescreen for GDI could do) and a few fixes from here and there and... there! WinBoom. :D

 BTW there was a 2.03 beta but i don't know if that was based on MBF or still Boom i'd have to do a brute force comparison to know.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...