1 /* ResidualVM - A 3D game interpreter 2 * 3 * ResidualVM is the legal property of its developers, whose names 4 * are too numerous to list here. Please refer to the AUTHORS 5 * file distributed with this source distribution. 6 * 7 * Additional copyright for this file: 8 * Copyright (C) 1999-2000 Revolution Software Ltd. 9 * This code is based on source code created by Revolution Software, 10 * used with permission. 11 * 12 * This program is free software; you can redistribute it and/or 13 * modify it under the terms of the GNU General Public License 14 * as published by the Free Software Foundation; either version 2 15 * of the License, or (at your option) any later version. 16 * 17 * This program is distributed in the hope that it will be useful, 18 * but WITHOUT ANY WARRANTY; without even the implied warranty of 19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 * GNU General Public License for more details. 21 * 22 * You should have received a copy of the GNU General Public License 23 * along with this program; if not, write to the Free Software 24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 25 * 26 */ 27 28 #ifndef ICB_P4_GENERIC_PC_H 29 #define ICB_P4_GENERIC_PC_H 30 31 #include "engines/icb/non_ad_module.h" 32 #include "engines/icb/debug_pc.h" 33 #include "engines/icb/common/px_common.h" 34 #include "engines/icb/common/px_anims.h" 35 36 #include "common/textconsole.h" 37 38 namespace ICB { 39 40 // Useful typedef's for types 41 42 // These are now done in px_common.h 43 /* 44 // Might just be int's on the PSX 45 typedef float PXreal; 46 // Is likely to be done using fixed-point maths on PSX 47 typedef float PXfloat; 48 49 */ 50 51 // The camera 52 typedef PCcamera PXcamera; 53 // The animation, frame, marker 54 typedef PXframe_PSX PXframe; 55 typedef PXmarker_PSX PXmarker; 56 typedef PXanim_PSX PXanim; 57 // typedef PCactor PXactor; 58 59 // Very hacky #defines for function overloading 60 #define PXWorldToFilm WorldToFilm 61 62 // Very hacky #defines for function overloading 63 // #define PXFrameEnOfAnim ADFrameEnOfAnim 64 #define PXFrameEnOfAnim(n, pAnim) psxFrameEnOfAnim(n, pAnim, __FILE__, __LINE__) 65 #define PXAngleOfVector AngleOfVector 66 #define PXfabs fabs 67 #define PXfmod fmod 68 #define PXsqrt sqrt 69 #define PXsin sin 70 #define PXcos cos 71 #define PXfloor floor 72 73 // screen dimensions 74 #define SCREEN_WIDTH 640 75 #define SCREEN_DEPTH 480 76 77 // screen coordinate limits 78 #define SCREEN_LEFT_EDGE 0 79 #define SCREEN_RIGHT_EDGE SCREEN_WIDTH - 1 80 #define SCREEN_TOP_EDGE 0 81 #define SCREEN_BOTTOM_EDGE SCREEN_DEPTH - 1 82 83 // Definition and function for comparing floats. 84 #define FLOAT_COMPARE_TOLERANCE ((float)0.000001) 85 inline bool8 FloatsEqual(PXfloat fA, PXfloat fB, PXfloat tolerance = FLOAT_COMPARE_TOLERANCE) { return ((bool8)((fabs(fA - fB) < tolerance))); } 86 87 // This is the name of a bitmap which contains a reference palette entry to be used for transparency. 88 #define BITMAP_TRANSPARENCY_REFERENCE "transparent_ref" 89 90 } // End of namespace ICB 91 92 #include "engines/icb/gfx/psx_anims.h" 93 94 #endif // #ifndef P4_GENERIC_PC_H 95