From 85e297316b4debe167499b9954770c696e967b50 Mon Sep 17 00:00:00 2001 From: Javier Sancho Date: Tue, 22 Oct 2019 09:43:08 +0200 Subject: [PATCH] MAKE_CIRR_ID --- Makefile.am | 1 + include/IFileArchive.h | 18 +++++++++--------- include/cirrlicht.h | 1 + include/irrTypes.h | 28 ++++++++++++++++++++++++++++ 4 files changed, 39 insertions(+), 9 deletions(-) create mode 100644 include/irrTypes.h diff --git a/Makefile.am b/Makefile.am index 35fdb74..771cf4e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -29,6 +29,7 @@ pkginclude_HEADERS = \ include/IGUIStaticText.h \ include/IMeshSceneNode.h \ include/IrrlichtDevice.h \ + include/irrTypes.h \ include/ISceneManager.h \ include/ISceneNode.h \ include/ITexture.h \ diff --git a/include/IFileArchive.h b/include/IFileArchive.h index b3bcc2f..8ffa833 100644 --- a/include/IFileArchive.h +++ b/include/IFileArchive.h @@ -22,33 +22,33 @@ #ifndef __C_I_FILE_ARCHIVE_H_INCLUDED__ #define __C_I_FILE_ARCHIVE_H_INCLUDED__ -#include +#include "irrTypes.h" typedef enum { //! A PKZIP archive - EFAT_ZIP = MAKE_IRR_ID('Z','I','P', 0), + irr_io_EFAT_ZIP = MAKE_CIRR_ID('Z','I','P', 0), //! A gzip archive - EFAT_GZIP = MAKE_IRR_ID('g','z','i','p'), + irr_io_EFAT_GZIP = MAKE_CIRR_ID('g','z','i','p'), //! A virtual directory - EFAT_FOLDER = MAKE_IRR_ID('f','l','d','r'), + irr_io_EFAT_FOLDER = MAKE_CIRR_ID('f','l','d','r'), //! An ID Software PAK archive - EFAT_PAK = MAKE_IRR_ID('P','A','K', 0), + irr_io_EFAT_PAK = MAKE_CIRR_ID('P','A','K', 0), //! A Nebula Device archive - EFAT_NPK = MAKE_IRR_ID('N','P','K', 0), + irr_io_EFAT_NPK = MAKE_CIRR_ID('N','P','K', 0), //! A Tape ARchive - EFAT_TAR = MAKE_IRR_ID('T','A','R', 0), + irr_io_EFAT_TAR = MAKE_CIRR_ID('T','A','R', 0), //! A wad Archive, Quake2, Halflife - EFAT_WAD = MAKE_IRR_ID('W','A','D', 0), + irr_io_EFAT_WAD = MAKE_CIRR_ID('W','A','D', 0), //! The type of this archive is unknown - EFAT_UNKNOWN = MAKE_IRR_ID('u','n','k','n') + irr_io_EFAT_UNKNOWN = MAKE_CIRR_ID('u','n','k','n') } irr_io_E_FILE_ARCHIVE_TYPE; typedef void irr_io_IFileArchive; diff --git a/include/cirrlicht.h b/include/cirrlicht.h index a40c33a..48d96f2 100644 --- a/include/cirrlicht.h +++ b/include/cirrlicht.h @@ -36,6 +36,7 @@ #include "IGUIStaticText.h" #include "IMeshSceneNode.h" #include "IrrlichtDevice.h" +#include "irrTypes.h" #include "ISceneManager.h" #include "ISceneNode.h" #include "ITexture.h" diff --git a/include/irrTypes.h b/include/irrTypes.h new file mode 100644 index 0000000..ad6b07e --- /dev/null +++ b/include/irrTypes.h @@ -0,0 +1,28 @@ +/* c-irrlicht --- C bindings for Irrlicht Engine + + Copyright (C) 2019 Javier Sancho + + This file is part of c-irrlicht. + + c-irrlicht is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 3 of the + License, or (at your option) any later version. + + c-irrlicht 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. + + You should have received a copy of the GNU Lesser General Public + License along with guile-irrlicht. If not, see + . +*/ + +#ifndef __C_IRR_TYPES_H_INCLUDED__ +#define __C_IRR_TYPES_H_INCLUDED__ + +#define MAKE_CIRR_ID(c0, c1, c2, c3) \ + ((char)(c0) | ((char)(c1) << 8) | ((char)(c2) << 16) | ((char)(c3) << 24 )) + +#endif -- 2.39.2