Aura
Graphics Engines (render.asm)
_View
- Inputs: (x0,y0)=player coordinate on map; aa=direction player is looking in.
- Outputs: Rendered voxel view in Video backbuffer.
Draws the view from (x0,y0) looking in direction aa at 320x200x32-bit to _Video buffer.
Calls _Line to draw each voxel "scanline" from back to front.
_Line
- Inputs: (x0,y0)-(x1,y1)=Horizontal voxel area; hy=Relative size of voxel;
s=Distance of voxel from viewer; Depth=Scanline number
- Outputs: Scanline rendered to _Video buffer.
Used by _View to draw each voxel (easier said than done, but it works :).
_RefreshVideoBuffer
- Inputs: None
- Outputs: Copies the backbuffer to the display buffer.
Copies the rendering buffer to the display buffer. In ModeX, the display
buffer is then copied (in the main loop) to video memory. In VESA, the
display buffer IS the video memory.
_ScaleImage
- Inputs: (x,y)=upper left hand corner location of scaled bitmap in
backbuffer; SrcWidth=original bitmap width; SrcHeight=original bitmap
height; DestWidth=scaled bitmap width; DestHeight=scaled bitmap height;
*Image=offset of bitmap in ImageSeg selector
- Outputs: Bitmap scaled into backbuffer (with clipping)
Assumes that es=VideoBlock. Performs linear scaling of a source bitmap
onto the backbuffer. Very fast, uses only integers (no FP).
_RenderPlayer
- Inputs: (x0,y0)=player coordinate on map; aa=direction player is looking in;
Player=Offset of Player Info in PlayerSeg selector.
- Outputs: Backbuffer ready to go to screen
Renders a sprite to the screen representing the position of a different player.
Calls _ScaleImage to put the image on the screen. Does quite a bit of math to
do distance and height calculations and to position the image correctly on the
screen with the proper orientation.
_RenderPlayers
- Inputs: (x0,y0)=player coordinate on map; aa=direction player is looking in.
- Outputs: Backbuffer ready to go to screen
Renders sprites to the screen representing the positions of the other players.
Calls _RenderPlayer once per player.