1 /* 2 This file is part of Warzone 2100. 3 Copyright (C) 1999-2004 Eidos Interactive 4 Copyright (C) 2005-2020 Warzone 2100 Project 5 6 Warzone 2100 is free software; you can redistribute it and/or modify 7 it under the terms of the GNU General Public License as published by 8 the Free Software Foundation; either version 2 of the License, or 9 (at your option) any later version. 10 11 Warzone 2100 is distributed in the hope that it will be useful, 12 but WITHOUT ANY WARRANTY; without even the implied warranty of 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 GNU General Public License for more details. 15 16 You should have received a copy of the GNU General Public License 17 along with Warzone 2100; if not, write to the Free Software 18 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 */ 20 #ifndef _imd_ 21 #define _imd_ 22 23 #include "lib/framework/wzstring.h" 24 #include <functional> 25 26 struct iIMDShape; 27 28 #define PIE_NAME "PIE" // Pumpkin image export data file 29 #define PIE_VER 2 30 #define PIE_FLOAT_VER 3 31 32 //************************************************************************* 33 34 // PIE model flags 35 // premultiplied implies additive 36 #define iV_IMD_NO_ADDITIVE 0x00000001 37 #define iV_IMD_ADDITIVE 0x00000002 38 #define iV_IMD_PREMULTIPLIED 0x00000004 39 // pitch to camera implies roll to camera 40 #define iV_IMD_ROLL_TO_CAMERA 0x00000010 41 #define iV_IMD_PITCH_TO_CAMERA 0x00000020 42 #define iV_IMD_NOSTRETCH 0x00001000 43 #define iV_IMD_TCMASK 0x00010000 44 45 // polygon flags b0..b7: col, b24..b31: anim index 46 47 #define iV_IMD_TEX 0x00000200 // this is both a polygon and pie flag 48 #define iV_IMD_TEXANIM 0x00004000 // iV_IMD_TEX must be set also 49 50 //************************************************************************* 51 52 void modelShutdown(); 53 54 // Enumerate over loaded models 55 void enumerateLoadedModels(const std::function<void (const std::string& modelName, iIMDShape& model)>& func); 56 57 /// Get filename of model pointer. This is really slow, so do not abuse for logging 58 /// purposes, for example. 59 const std::string &modelName(iIMDShape *model); 60 61 iIMDShape *modelGet(const WzString &filename); 62 63 #endif 64