2002-02-08 17:30:02 +08:00
|
|
|
/* ************************
|
|
|
|
Copyright Terrain Experts Inc.
|
|
|
|
Terrain Experts Inc (TERREX) reserves all rights to this source code
|
2002-03-09 18:51:09 +08:00
|
|
|
unless otherwise specified in writing by the President of TERREX.
|
2002-02-08 17:30:02 +08:00
|
|
|
This copyright may be updated in the future, in which case that version
|
|
|
|
supercedes this one.
|
|
|
|
-------------------
|
|
|
|
Terrex Experts Inc.
|
2002-03-09 18:51:09 +08:00
|
|
|
4400 East Broadway #314
|
|
|
|
Tucson, AZ 85711
|
2002-02-08 17:30:02 +08:00
|
|
|
info@terrex.com
|
2002-03-09 18:51:09 +08:00
|
|
|
Tel: (520) 323-7990
|
2002-02-08 17:30:02 +08:00
|
|
|
************************
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* trpage_sys.h
|
From Terrex and Andrew Sampsom and Don Tidrow and Robert Osfield,
email comments from Andew Sampson,
"I've contacted Terrex, and obtained the 2.2 version
of their trpage library. The library included a
fork of OSG 0.9.8's txp plugin, modified to load 2.1+
txp DBs.
I've done the work of incorporating the changes made
to OSG's txp plugin since 0.9.8 into Terrex's fork.
The forked version is now up-to-date with the changes
made to OSG 0.9.9 and 1.0.
Terrex made a lot of changes (especially differences
in whitespace), so the diff between the forked version
and OSG 1.0's txp plugin is yucky. I did my best, but
keep in mind that this is the result of a 4-way merge
(kinda... terrex-0.9.8, stock-0.9.8, stock-0.9.9,
stock-1.0).
I really want to see this forked version merged back
into the main OSG branch. The new features offered by
this version of the plugin (2.1+ support, variable
LOD support, bug fixes) are worth the trouble."
--
Don Tidrow then took this code and added his work.
--
Robert Osfield then fixed all the warnings that abound in the trpage code base.
2006-06-27 18:07:42 +08:00
|
|
|
System specific declarations.
|
|
|
|
*/
|
2002-02-08 17:30:02 +08:00
|
|
|
|
|
|
|
#ifndef trpage_sys_h_
|
|
|
|
#define trpage_sys_h_
|
|
|
|
|
2003-07-23 21:34:48 +08:00
|
|
|
#ifndef PATHSEPERATOR
|
2002-03-09 18:51:09 +08:00
|
|
|
#ifdef macintosh
|
2003-07-23 21:34:48 +08:00
|
|
|
#define PATHSEPERATOR ":"
|
2002-03-09 18:51:09 +08:00
|
|
|
#else
|
2003-07-23 21:34:48 +08:00
|
|
|
#define PATHSEPERATOR "/"
|
2002-03-09 18:51:09 +08:00
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(_WIN32)
|
From Terrex and Andrew Sampsom and Don Tidrow and Robert Osfield,
email comments from Andew Sampson,
"I've contacted Terrex, and obtained the 2.2 version
of their trpage library. The library included a
fork of OSG 0.9.8's txp plugin, modified to load 2.1+
txp DBs.
I've done the work of incorporating the changes made
to OSG's txp plugin since 0.9.8 into Terrex's fork.
The forked version is now up-to-date with the changes
made to OSG 0.9.9 and 1.0.
Terrex made a lot of changes (especially differences
in whitespace), so the diff between the forked version
and OSG 1.0's txp plugin is yucky. I did my best, but
keep in mind that this is the result of a 4-way merge
(kinda... terrex-0.9.8, stock-0.9.8, stock-0.9.9,
stock-1.0).
I really want to see this forked version merged back
into the main OSG branch. The new features offered by
this version of the plugin (2.1+ support, variable
LOD support, bug fixes) are worth the trouble."
--
Don Tidrow then took this code and added his work.
--
Robert Osfield then fixed all the warnings that abound in the trpage code base.
2006-06-27 18:07:42 +08:00
|
|
|
/* *********************
|
|
|
|
System Specific Section.
|
|
|
|
This is currently set up for win32.
|
|
|
|
*********************
|
|
|
|
*/
|
2002-02-08 17:30:02 +08:00
|
|
|
|
|
|
|
#include <windows.h>
|
|
|
|
|
2004-08-05 21:41:52 +08:00
|
|
|
#ifdef _MSC_VER
|
2002-02-08 17:30:02 +08:00
|
|
|
// Microsoft Developer warnings that annoy me
|
|
|
|
#pragma warning ( disable : 4251)
|
|
|
|
#pragma warning ( disable : 4275)
|
|
|
|
#pragma warning ( disable : 4786)
|
2004-08-05 21:41:52 +08:00
|
|
|
#pragma warning ( disable : 4251)
|
2004-08-04 16:27:43 +08:00
|
|
|
#endif
|
2002-02-08 17:30:02 +08:00
|
|
|
|
|
|
|
// Somewhat system independent file deletion macro
|
2003-07-23 21:34:48 +08:00
|
|
|
#define TRPGDELETEFILE(file) DeleteFile((file))
|
2002-02-08 17:30:02 +08:00
|
|
|
|
|
|
|
#ifndef int64
|
2003-07-23 21:34:48 +08:00
|
|
|
// 64 bit long value. Need this for really big files.
|
|
|
|
typedef __int64 int64;
|
2002-02-10 18:42:55 +08:00
|
|
|
#endif
|
|
|
|
|
2005-11-21 21:51:24 +08:00
|
|
|
// Get the template intantiations for basic types
|
|
|
|
#include <osg/Export>
|
|
|
|
|
2002-02-08 17:30:02 +08:00
|
|
|
#else // Unix
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
// Delete a file
|
|
|
|
#define TRPGDELETEFILE(file) remove((file))
|
|
|
|
|
2002-03-09 18:51:09 +08:00
|
|
|
#ifndef int64
|
2002-02-10 18:42:55 +08:00
|
|
|
typedef long long int64;
|
2002-02-08 17:30:02 +08:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// Basic data types
|
|
|
|
#ifndef uint8
|
|
|
|
typedef unsigned char uint8;
|
|
|
|
#endif
|
|
|
|
#ifndef int32
|
|
|
|
typedef int int32;
|
|
|
|
#endif
|
|
|
|
#ifndef uint32
|
|
|
|
typedef unsigned int uint32;
|
|
|
|
#endif
|
|
|
|
#ifndef float32
|
|
|
|
typedef float float32;
|
|
|
|
#endif
|
|
|
|
#ifndef float64
|
|
|
|
typedef double float64;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
#include <map>
|
2003-07-23 21:34:48 +08:00
|
|
|
#include <string>
|
2002-02-08 17:30:02 +08:00
|
|
|
|
|
|
|
|
|
|
|
// We use long longs for addresses within a paging file
|
|
|
|
typedef int64 trpgllong;
|
|
|
|
|
|
|
|
// These are used to export classes from a DLL
|
|
|
|
// Definitely Windows specific
|
2003-07-23 21:34:48 +08:00
|
|
|
#include <trpage_ident.h>
|
|
|
|
#include <trdll.h>
|
2002-02-08 17:30:02 +08:00
|
|
|
|
|
|
|
#endif
|