1 /* 2 3 Copyright (C) 2015-2018 Night Dive Studios, LLC. 4 5 This program is free software: you can redistribute it and/or modify 6 it under the terms of the GNU General Public License as published by 7 the Free Software Foundation, either version 3 of the License, or 8 (at your option) any later version. 9 10 This program is distributed in the hope that it will be useful, 11 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 GNU General Public License for more details. 14 15 You should have received a copy of the GNU General Public License 16 along with this program. If not, see <http://www.gnu.org/licenses/>. 17 18 */ 19 /* 20 * $Source: r:/prj/lib/src/2d/RCS/fl8p.h $ 21 * $Revision: 1.11 $ 22 * $Author: kevin $ 23 * $Date: 1994/11/02 19:39:49 $ 24 * 25 * Miscellaneous stuff needed by the flat8 perspective mappers. 26 * Includes 3 and 12 bit integer fixed point macros. 27 * 28 * This file is part of the 2d library. 29 * 30 * $Log: fl8p.h $ 31 * Revision 1.11 1994/11/02 19:39:49 kevin 32 * Use 20 bit integer fixed point for bitmap coord intermediates to avoid 33 * overflows in svga. 34 * 35 * Revision 1.10 1994/07/18 17:04:27 kevin 36 * removed unnecessary includes. 37 * 38 * Revision 1.9 1994/01/16 12:04:44 kevin 39 * Added clut lighting tolerance global declaration. 40 * 41 * Revision 1.8 1994/01/03 22:26:11 kevin 42 * Added declaration for global grd_per_setup. 43 * 44 * Revision 1.7 1993/12/17 01:00:57 kevin 45 * Added egregious error constants. 46 * 47 * Revision 1.6 1993/12/15 02:49:06 kevin 48 * Added wlog and hlog to context. 49 * 50 * Revision 1.5 1993/12/14 22:31:14 kevin 51 * Moved declaration of grd_per_context to 52 * grpm.h so everyone can use it. 53 * 54 * Revision 1.4 1993/12/08 23:44:52 kevin 55 * Added vtab to per_setup structure for non/power/of/2 support. 56 * 57 * Revision 1.3 1993/12/04 17:28:28 kevin 58 * Added clut field to per_setup structure. 59 * 60 * Revision 1.2 1993/12/04 12:33:01 kevin 61 * Added new structures, new fixed point primitives. 62 * 63 * Revision 1.1 1993/11/18 23:42:36 kevin 64 * Initial revision 65 * 66 */ 67 68 #ifndef __FL8P_H 69 #define __FL8P_H 70 71 #define ACENT (grd_bm.w >> 1) 72 #define BCENT (grd_bm.h >> 1) 73 #define SCALE 0x200 74 75 #define GR_PER_CODE_OK 0 76 #define GR_PER_CODE_MEMERR 1 77 #define GR_PER_CODE_BADPLANE 2 78 #define GR_PER_CODE_BADDENOM 3 79 #define GR_PER_CODE_BADINDEX 4 80 #define GR_PER_CODE_LIN 5 81 #define GR_PER_CODE_WALL 6 82 #define GR_PER_CODE_FLOOR 7 83 #define GR_PER_CODE_BIGSLOPE 8 84 #define GR_PER_CODE_SMALLSLOPE 9 85 86 #define HS_TS_ERR 10 87 #define HS_TB_ERR 11 88 #define VS_TS_ERR 12 89 #define VS_TB_ERR 13 90 91 extern ubyte flat8_per_ltol; 92 extern ubyte flat8_per_wftol; 93 extern fix gr_clut_lit_tol; 94 95 #endif 96