Aura
Image Loading and Preprocessing (fileload.asm)
_DecodePCX
- Inputs: *Src=offset of source image in SrcSeg; *Dest=offset of decoded
image in DestSeg; SrcLen=length of source buffer; DestLen=length of
destination buffer
- Outputs: EAX=offset of palette in SrcSeg
Decompresses a RLE PCX file in SrcSeg:Src into DestSeg:Dest.
_LoadHMap
- Inputs: Name=Filename of heightmap PCX; Name2=Filename of texturemap PCX
- Outputs: AL=1 if read failed
Loads, decompresses, and does some preprocessing on the heightmap and texturemap.
Calls _CalcLight to calculate lighting values.
_CalcLight
- Inputs: (x0,y0)-(x1,y1)=Area in heightmap to calculate lighting values for
- Outputs: None
Calculates lighting values for the given heightmap area and puts the results
into the lightmap.
_LoadBMP
- Inputs: Name=Filename of BMP file to load; *Where=offset in WhereSeg
to store loaded image at.
- Outputs: AL=1 if error occurred.
Reads a 8-bit paletted BMP file into a 32-bit truecolor buffer.
_MixTexMap
- Inputs: src=offset of source image in srcSeg; Texture=offset of place to
save texture in TextureSeg; TexNum=1-8 # of texture; TILE_W_SH=the texture
width in powers of 2; TILE_H_SH=the texture height in powers of 2; shift=the
shift size (should be 8-(TILE_W_SH=TILE_H_SH))
- Outputs: AL=1 if error occurred.
Mixes the loaded image into the texture format used by the voxel renderer.
_LoadTEX
- Inputs: Name=Filename of texture; TexNum=number of texture
- Outputs: AL=1 if load failed
Calls _LoadBMP and _MixTexMap to load the texture.