#ifndef __SCOTTISH_TEXTURES_H #define __SCOTTISH_TEXTURES_H /* SCOTTISH_TEXTURES.H Copyright (C) 1991-2001 and beyond by Bungie Studios, Inc. and the "Aleph One" developers. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. This license is contained in the file "COPYING", which is included with this source code; it is available online at http://www.gnu.org/licenses/gpl.html Thursday, April 28, 1994 4:54:54 PM Feb 17, 2000 (Loren Petrich): Made the polygons' origin positions and sprite rectangles' depths better adapted to long distances Mar 12, 2000 (Loren Petrich): Added shape descriptors to the wall-texture render objects for the convenience of OpenGL rendering; also added object indices to the sprite. Weapons in hand have a special index. Aug 9, 2000 (Loren Petrich): A few obsolete constants deleted; rendering functions moved to Rasterizer_SW.h May 3, 2003 (Br'fin (Jeremy Parsons)) Added LowLevelShape workaround for passing LowLevelShape info of sprites instead of abusing/overflowing shape_descriptors */ #include "shape_descriptors.h" /* ---------- constants */ enum /* transfer modes */ { _tinted_transfer, /* pass background through given shading table for non-transparent pixels; config word is $mmnn: mm is a mask applied to a random number in [0,32) which is then added to nn and used to retrieve a tinting table. ÔordinaryÕ (pathways-style) tinting can be accomplished by passing an alternate shading table. */ _solid_transfer, /* writes (0,0) color of texture for non-transparent pixels; does not respect shading */ _big_landscaped_transfer, /* does not distort texture (texture is anchored in screen-space) */ _textured_transfer, /* distorts texture to match surface */ _shadeless_transfer, /* does not respect any lighting information; uses a single shading table */ _static_transfer /* writes static for non-transparent pixels (config word is the unsigned chance in 64k that a non-transparent pixel will become transparent). does not respect shading. */ // _big_landscaped_transfer }; /* ---------- shading tables */ #define MAXIMUM_SHADING_TABLE_INDEXES PIXEL8_MAXIMUM_COLORS #define FIRST_SHADING_TABLE 0 struct tint_table8 { pixel8 index[PIXEL8_MAXIMUM_COLORS]; }; struct tint_table16 { pixel16 red[PIXEL16_MAXIMUM_COMPONENT+1]; pixel16 green[PIXEL16_MAXIMUM_COMPONENT+1]; pixel16 blue[PIXEL16_MAXIMUM_COMPONENT+1]; }; struct tint_table32 { pixel32 red[PIXEL32_MAXIMUM_COMPONENT+1]; pixel32 green[PIXEL32_MAXIMUM_COMPONENT+1]; pixel32 blue[PIXEL32_MAXIMUM_COMPONENT+1]; }; /* ---------- structures */ /* ignore multiple shading tables if set */ #define _SHADELESS_BIT 0x8000 class OGL_ModelData; struct rectangle_definition { uint16 flags; struct bitmap_definition *texture; /* screen coordinates; x0