source: branches/work_304/ARApi.h @ 422

Revision 422, 3.1 KB checked in by jls17, 6 years ago (diff)
  • fixed an error in the version definition for 8.1 in ARApi.h
  • added some version checks so ARInside could be compiled with older api versions again
Line 
1//Copyright (C) 2009 Stefan Nerlich | stefan.nerlich@hotmail.com
2//
3//This file is part of ARInside.
4//
5//    ARInside is free software: you can redistribute it and/or modify
6//    it under the terms of the GNU General Public License as published by
7//    the Free Software Foundation, version 2 of the License.
8//
9//    ARInside is distributed in the hope that it will be useful,
10//    but WITHOUT ANY WARRANTY; without even the implied warranty of
11//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12//    GNU General Public License for more details.
13//
14//    You should have received a copy of the GNU General Public License
15//    along with Foobar.  If not, see <http://www.gnu.org/licenses/>.
16
17#pragma once
18#include <ar.h>
19#include <arfree.h>
20#include <arstruct.h>
21#include <arextern.h>
22
23// this is just a little workaround for a bug in ar.h version 7.5
24#ifndef AR_FILTER_ERRHANDLER_ENABLE
25#ifdef AR_ERRHANDLER_ENABLE
26#define AR_FILTER_ERRHANDLER_ENABLE AR_ERRHANDLER_ENABLE
27#else
28#define AR_FILTER_ERRHANDLER_ENABLE 1
29#endif
30#endif
31
32// this is just a workarround for a missing definition in ar.h version 7.6.04
33#ifdef AR_SESS_CONTROL_PROP_DESIGN_OVERLAYGROUP
34#undef AR_SESS_CONTROL_PROP_DESIGN_OVERLAYGROUP
35#endif
36#define AR_SESS_CONTROL_PROP_DESIGN_OVERLAYGROUP 1961
37
38#ifdef AR_SESS_CONTROL_PROP_API_OVERLAYGROUP
39#undef AR_SESS_CONTROL_PROP_API_OVERLAYGROUP
40#endif
41#define AR_SESS_CONTROL_PROP_API_OVERLAYGROUP 1962
42
43#ifndef AR_RESERV_OVERLAY_STRING
44#define AR_RESERV_OVERLAY_STRING "__o"
45#endif
46
47#ifndef AR_ORIGINAL_OBJECT
48#define AR_ORIGINAL_OBJECT 0
49#endif
50#ifndef AR_OVERLAID_OBJECT
51#define AR_OVERLAID_OBJECT 1
52#endif
53#ifndef AR_OVERLAY_OBJECT
54#define AR_OVERLAY_OBJECT 2
55#endif
56#ifndef AR_CUSTOM_OBJECT
57#define AR_CUSTOM_OBJECT 4
58#endif
59
60
61// to support our own xml object types used in lists
62#define AR_STRUCT_ITEM_USER    500
63#define AR_STRUCT_ITEM_GROUP   501
64#define AR_STRUCT_ITEM_ROLE    502
65
66#define AR_STRUCT_ITEM_XML_USER       (AR_STRUCT_XML_OFFSET | AR_STRUCT_ITEM_USER)
67#define AR_STRUCT_ITEM_XML_GROUP      (AR_STRUCT_XML_OFFSET | AR_STRUCT_ITEM_GROUP)
68#define AR_STRUCT_ITEM_XML_ROLE       (AR_STRUCT_XML_OFFSET | AR_STRUCT_ITEM_ROLE)
69
70// api version definitions (see AR_CURRENT_API_VERSION in ar.h)
71#define AR_API_VERSION_450 7
72#define AR_API_VERSION_500 8                    // TODO: check this again !!
73#define AR_API_VERSION_510 9
74#define AR_API_VERSION_600 10
75#define AR_API_VERSION_630 11
76#define AR_API_VERSION_700 12
77#define AR_API_VERSION_710 13
78#define AR_API_VERSION_750 14
79#define AR_API_VERSION_763 17
80#define AR_API_VERSION_764 18
81#define AR_API_VERSION_800 19
82#define AR_API_VERSION_810 20
83
84// see AR_EXPORT_VERSION in arstruct.h for definition
85#define AR_XML_VERSION_450 5
86#define AR_XML_VERSION_500 6
87#define AR_XML_VERSION_510 7
88#define AR_XML_VERSION_600 8
89#define AR_XML_VERSION_630 8
90#define AR_XML_VERSION_700 9
91#define AR_XML_VERSION_710 10
92#define AR_XML_VERSION_750 11
93
94// template for clearing memory of AR structs
95template<class T>
96void ARZeroMemory(T* obj) { memset(obj, 0, sizeof(T)); }
Note: See TracBrowser for help on using the repository browser.