mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 13:37:00 +00:00
+ Got rid of zip lib requirement in G3D...
Still can re-enable code by defining _HAVE_ZIP...
+ Remove silly X11 lib dependency from G3D
Code doesn't seem to do anything yet anyway, and even if, we don't want it :p
+ Fix another weird G3D build problem...
+ Remove some __asm usage in g3d, which is not available on Win64
My editor also decided to remove a ton of trailing white spaces...tss...
+ Reapply G3D fixes for 64bit VC
+ not use SSE specific header when SSE not enabled in *nix
+ Updated project files
+ New vmap_assembler VC90/VC80 Project
+ vmap assembler binaries updates
NOTE: Old vmap fikes expected work (as tests show) with new library version.
But better use new generated versions. Its different in small parts to bad or good...
(based on Lynx3d's repo commit 44798d3)
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
81 lines
1.3 KiB
C++
81 lines
1.3 KiB
C++
/**
|
|
@file BinaryFormat.cpp
|
|
@maintainer Morgan McGuire, http://graphics.cs.williams.edu
|
|
|
|
@created 2005-06-10
|
|
@edited 2005-06-10
|
|
*/
|
|
|
|
#include "G3D/BinaryFormat.h"
|
|
|
|
namespace G3D {
|
|
|
|
int32 byteSize(BinaryFormat f) {
|
|
switch (f) {
|
|
case BOOL8_BINFMT:
|
|
case UINT8_BINFMT:
|
|
case INT8_BINFMT:
|
|
return 1;
|
|
|
|
case UINT16_BINFMT:
|
|
case INT16_BINFMT:
|
|
return 2;
|
|
|
|
case FLOAT16_BINFMT:
|
|
return 2;
|
|
|
|
case UINT32_BINFMT:
|
|
case INT32_BINFMT:
|
|
case FLOAT32_BINFMT:
|
|
return 4;
|
|
|
|
case FLOAT64_BINFMT:
|
|
case UINT64_BINFMT:
|
|
case INT64_BINFMT:
|
|
return 8;
|
|
|
|
case INT128_BINFMT:
|
|
case UINT128_BINFMT:
|
|
return 16;
|
|
|
|
case VECTOR2_BINFMT:
|
|
return 2 * 4;
|
|
|
|
case VECTOR2INT16_BINFMT:
|
|
return 2 * 2;
|
|
|
|
case VECTOR3_BINFMT:
|
|
return 3 * 4;
|
|
|
|
case VECTOR3INT16_BINFMT:
|
|
return 3 * 2;
|
|
|
|
case VECTOR4_BINFMT:
|
|
return 4 * 4;
|
|
|
|
case VECTOR4INT16_BINFMT:
|
|
return 4 * 4;
|
|
|
|
case COLOR3_BINFMT:
|
|
return 3 * 4;
|
|
|
|
case COLOR3UINT8_BINFMT:
|
|
return 3 * 1;
|
|
|
|
case COLOR3INT16_BINFMT:
|
|
return 3 * 2;
|
|
|
|
case COLOR4_BINFMT:
|
|
return 4 * 4;
|
|
|
|
case COLOR4UINT8_BINFMT:
|
|
return 4 * 1;
|
|
|
|
case COLOR4INT16_BINFMT:
|
|
return 4 * 2;
|
|
|
|
default:
|
|
return -1;
|
|
}
|
|
}
|
|
}
|