]> git.jsancho.org Git - c-irrlicht.git/commitdiff
MAKE_CIRR_ID
authorJavier Sancho <jsf@jsancho.org>
Tue, 22 Oct 2019 07:43:08 +0000 (09:43 +0200)
committerJavier Sancho <jsf@jsancho.org>
Tue, 22 Oct 2019 07:43:08 +0000 (09:43 +0200)
Makefile.am
include/IFileArchive.h
include/cirrlicht.h
include/irrTypes.h [new file with mode: 0644]

index 35fdb7459ee3b2e0837b60c175e310cef71ccd91..771cf4e4091de89f36678df9c4404e7747cf0592 100644 (file)
@@ -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 \
index b3bcc2f80909debcd4c11cdf40deaad10e02983f..8ffa8330414efb8e51af830abbfe37d737d64c66 100644 (file)
 #ifndef __C_I_FILE_ARCHIVE_H_INCLUDED__
 #define __C_I_FILE_ARCHIVE_H_INCLUDED__
 
-#include <irrlicht/irrTypes.h>
+#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;
index a40c33aca81dcf9ec3d2de294a1ffb8b0e7fa0b0..48d96f2e4ef324fb4449bced017be80f483e20f8 100644 (file)
@@ -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 (file)
index 0000000..ad6b07e
--- /dev/null
@@ -0,0 +1,28 @@
+/* c-irrlicht --- C bindings for Irrlicht Engine
+
+   Copyright (C) 2019 Javier Sancho <jsf@jsancho.org>
+
+   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
+   <http://www.gnu.org/licenses/>.
+*/
+
+#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