Code Search for Developers
 
 
  

bmf.h from Boson at Krugle


Show bmf.h syntax highlighted

/*
    This file is part of the Boson game
    Copyright (C) 2005 Rivo Laks (rivolaks@hot.ee)

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program 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 General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/

#ifndef BMF_H
#define BMF_H


/**
 * BMF (Boson Model Format) file magics.
 *
 * BMF file consists of hierarchy of chunks. Each chunk has a start and
 *  possibly end magic code associated with it.
 **/


// FILE_ID is the string at the beginning of BMF file.
// BMF file can be recognized by it.
#define BMF_FILE_ID                    "BMF "
#define BMF_FILE_ID_LEN                4


// Version of the BMF format
#define BMF_VERSION_MAJOR              0
#define BMF_VERSION_MINOR              1
#define BMF_VERSION_RELEASE            1

#define BMF_MAKE_VERSION_CODE(a, b, c)  ( ((a) << 16) | ((b) << 8) | (c) )
#define BMF_VERSION_CODE \
    BMF_MAKE_VERSION_CODE(BMF_VERSION_MAJOR, BMF_VERSION_MINOR, BMF_VERSION_RELEASE)


// Magics for different chunks
#define BMF_MAGIC_MODEL                0x100000
#define BMF_MAGIC_MODEL_END            0x100001
#define BMF_MAGIC_TEXTURES             0x100010
#define BMF_MAGIC_MATERIALS            0x100020
#define BMF_MAGIC_MODEL_INFO           0x100030
#define BMF_MAGIC_MODEL_INFO_END       0x100031
#define BMF_MAGIC_MODEL_NAME           0x100032
#define BMF_MAGIC_MODEL_COMMENT        0x100033
#define BMF_MAGIC_MODEL_AUTHOR         0x100034
#define BMF_MAGIC_MODEL_RADIUS         0x100036
#define BMF_MAGIC_MODEL_BBOX           0x100037
#define BMF_MAGIC_ARRAYS               0x100050
#define BMF_MAGIC_LODS                 0x100090
#define BMF_MAGIC_LOD                  0x100100
#define BMF_MAGIC_MESHES               0x100110
#define BMF_MAGIC_MESH_INFO            0x100111
#define BMF_MAGIC_MESH_DATA            0x100114
#define BMF_MAGIC_MESH_MISC            0x100118
#define BMF_MAGIC_FRAMES               0x100120
#define BMF_MAGIC_END                  0x109999


// Same as corresponding OpenGL constants
#define BMF_RENDERMODE_TRIANGLES       0x0004
#define BMF_RENDERMODE_TRIANGLE_STRIP  0x0005
#define BMF_RENDERMODE_TRIANGLE_FAN    0x0006

// 8-, 16- and 32-bit unsigned integers
#define BMF_DATATYPE_UNSIGNED_BYTE     0x1401
#define BMF_DATATYPE_UNSIGNED_SHORT    0x1403
#define BMF_DATATYPE_UNSIGNED_INT      0x1405


#endif //BMF_H




See more files for this project here

Boson

Boson is an OpenGL real-time strategy game. It is designed to run on Unix (Linux) computers, and is built on top of the KDE, Qt and kdegames libraries.

Project homepage: http://sourceforge.net/projects/boson
Programming language(s): C,C++
License: other

  libgfx/
    gfx/
      arcball.h
      array.h
      baseball.h
      geom3d.h
      geom4d.h
      gfx.h
      gl.h
      glext.h
      gltools.h
      gui.h
      intvec.h
      mat2.h
      mat3.h
      mat4.h
      mfc.h
      quat.h
      raster.h
      script.h
      symmat3.h
      symmat4.h
      trackball.h
      vec2.h
      vec3.h
      vec4.h
      wintools.h
    CMakeLists.txt
    arcball.cxx
    baseball.cxx
    config-libgfx.h.cmake
    geom3d.cxx
    geom4d.cxx
    gltools.cxx
    gui.cxx
    mat2.cxx
    mat3.cxx
    mat4.cxx
    quat.cxx
    raster-jpeg.cxx
    raster-png.cxx
    raster-pnm.cxx
    raster-tiff.cxx
    raster.cxx
    script.cxx
    symmat3.cxx
    symmat4.cxx
    time.cxx
    trackball.cxx
    wintools.cxx
  loaders/
    lib3ds_test/
      README
      lib3ds_test_puma.c
      mob_puma.3ds
    loader-3ds.cpp
    loader-3ds.h
    loader-ac.cpp
    loader-ac.h
    loader-md2.cpp
    loader-md2.h
  mixkit/
    COPYING.txt
    MxAsp.cxx
    MxAsp.h
    MxBlock.h
    MxBlock2.h
    MxBlock3.h
    MxBlockModel.cxx
    MxBlockModel.h
    MxCamera.cxx
    MxCamera.h
    MxCmdParser.cxx
    MxCmdParser.h
    MxDualModel.cxx
    MxDualModel.h
    MxDualSlim.cxx
    MxDualSlim.h
    MxDynBlock.h
    MxEdgeFilter.cxx
    MxEdgeFilter.h
  processors/
  test/
  CMakeLists.txt
  bmf.h
  bo3dtools.cpp
  bo3dtools.h
  debug.h
  frame.cpp
  frame.h
  loader.cpp
  loader.h
  lod.cpp
  lod.h
  main.cpp
  material.cpp
  material.h
  mesh.cpp
  mesh.h
  model.cpp
  model.h
  processor.cpp
  processor.h
  saver.cpp
  saver.h
  texture.cpp
  texture.h