🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: rec.games.programmer
Article #663

Re: JOSH'S SCALE UNIT

#663
From: sl8nl
Date: Thu, 10 Sep 1992 21:13
31 lines
1490 bytes
In article <62430019@acf3.NYU.EDU>, reznick@acf3.NYU.EDU (Daniel Reznick) writes:
> Some time ago, you (Josh) offered to post "psuedo" code to this group
> for your mapper / scaler code.  Was the algorith similar to the one
> offered up here last week for Wolf 3D? I do understand assembly code,
> I just find it much more meaningful if I have some idea about how it
> works before I try to understand someone else's code.

As a quick summary, the Scale routine calls a modified Bresenham routine
(off the top of my head) that will skip a line for every Errorterm, or keep
adding lines for everything in between Errorterms (down/up).  It then takes
this info, and scales the image.  For instance, if the scaletable is

2,0,4,0,1   (which will probably never happen, scaling up and losing pixels,
too?)

It would draw pixel 1 twice (or row 1 depending on rows or columns), skip pixel
2, 4 on pixel 3, etc.

The perspective routine used the ScaleTable routine to generate the column
scales:

|\
| \
| /
|/
4321 (or whatever)

and used a modified line drawing routine to draw a line in memory for the
slope.

Josh
Technical Details
Message-ID: <1992Sep10.151347.58784@cc.usu.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!caen!hellgate.utah.edu!cc.usu.edu!sl8nl
References: <1532.880.uupcb@bville.gts.org> <62430019@acf3.NYU.EDU>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!caen!hellgate.utah.edu!cc.usu.edu!sl8nl
From: sl8nl@cc.usu.edu
Newsgroups: rec.games.programmer
Subject: Re: JOSH'S SCALE UNIT
Message-ID: <1992Sep10.151347.58784@cc.usu.edu>
Date: 10 Sep 92 15:13:47 MDT
References: <1532.880.uupcb@bville.gts.org> <62430019@acf3.NYU.EDU>
Organization: Utah State University
Lines: 32