diff options
| author | Felix Morgner <felix.morgner@gmail.com> | 2026-08-24 11:16:07 +0200 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@gmail.com> | 2026-08-24 11:16:07 +0200 |
| commit | c068f22329d5cc722622a2183bbb22eef2093df7 (patch) | |
| tree | 12d56c1aede67988a55e241364606bfbb4dba933 /tool_src/BspLib/ObjectBinFormat.h | |
| download | openparsec-main.tar.xz openparsec-main.zip | |
Diffstat (limited to 'tool_src/BspLib/ObjectBinFormat.h')
| -rw-r--r-- | tool_src/BspLib/ObjectBinFormat.h | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/tool_src/BspLib/ObjectBinFormat.h b/tool_src/BspLib/ObjectBinFormat.h new file mode 100644 index 0000000..0810318 --- /dev/null +++ b/tool_src/BspLib/ObjectBinFormat.h @@ -0,0 +1,55 @@ +//----------------------------------------------------------------------------- +// BSPLIB HEADER: ObjectBinFormat.h +// +// Copyright (c) 1998-1999 by Markus Hadwiger +// All Rights Reserved. +//----------------------------------------------------------------------------- + +#ifndef _OBJECTBINFORMAT_H_ +#define _OBJECTBINFORMAT_H_ + +// bsplib header files +#include "BspLibDefs.h" +#include "BspObject.h" +#include "SystemIO.h" + + +BSPLIB_NAMESPACE_BEGIN + + +// BspObject capable of writing itself in binary format ----------------------- +// +class ObjectBinFormat : public BspObject, public virtual SystemIO { + +public: + + // output formats + enum { + BINFORMAT_ODT, // ODT (old format: single object) + BINFORMAT_OD2, // OD2 (new format: scene/tree) + }; + +public: + ObjectBinFormat( BspObject& object ) : BspObject( object ) { } + ~ObjectBinFormat() { } + int WriteDataToFile( const char *filename, int format ); + +private: + void ODT_CalcAffineMapping( Face& face, dword *dmatrx ); + byte * ODT_CreateEngineObject( int& memblocksize ); + byte * ODT_CreateFileObject( int& memblocksize, byte *engineobj ); + + void OD2_CalcAffineMapping( Face& face, dword *dmatrx ); + byte * OD2_CreateEngineObject( int& memblocksize ); + byte * OD2_CreateFileObject( int& memblocksize, byte *engineobj ); + +private: + static char line[]; // scratchpad +}; + + +BSPLIB_NAMESPACE_END + + +#endif // _OBJECTBINFORMAT_H_ + |
