aboutsummaryrefslogtreecommitdiff
path: root/libexe/shavelib1forAWOSX_INTEL.c
blob: 1e77547874d106e433ef16b62b75a45f9d9ab63b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
// Shave and a Haircut
// (c) 2019 Epic Games
// US Patent 6720962

//#include <ri.h>

#include "math.h"

//#define GLUT_DISABLE_ATEXIT_HACK 1

//#define GLUT_BUILDING_LIB 1

int GLOBAL_VERBOSE =1;

#define _MAC 1
#define MAC 1
#define INTEL 1
//
// The following are taken from Maya's OpenMayaMac.h file, with all of the Maya
// API-specific stuff removed.
//
#define NOMINMAX
#define national
#define STYLEAPP
#ifdef __cplusplus
#	define __ANSI_CPP__
#endif
#define _BOOL

#define AL_STYLE

#define OSMac_					1
#if defined(__MACH__)
#	define OSMac_MachO_			1
#else
#	define OSMac_CFM_			1
#endif

#define TARGET_API_MAC_CARBON 	1

// Need this so that we can check MAC_OS_X_VERSION_10_3
//
#if defined(OSMac_MachO_)
#   include <AvailabilityMacros.h>
#endif

#if defined(OSMac_MachO_) && !defined(MAC_OS_X_VERSION_10_3)
#	define sqrtf	sqrt
#	define cosf		cos
#	define sinf		sin
#	define tanf		tan
#	define acosf	acos
#	define asinf	asin
#	define atanf	atan
#	define logf		log
#	define expf		exp
#	define atan2f	atan2
#	define powf		pow
#endif

#if defined(OSMac_MachO_)
#	include <sys/param.h>
#endif

#if defined(OSMac_MachO_)
#define __CF_USE_FRAMEWORK_INCLUDES__ 1
	// Need to include CarbonCore.h before cmath gets included.  This is a bug in
	// the Apple system headers
#include <CoreServices/CoreServices.h>
	// Darwin "check" macro in "AssertMacros.h" collides with API routines
	//
#undef check
#endif

// End of stuff from OpenMayaMac.h

#if defined(OSMac_CFM_)
#include <Carbon.h>
#endif

#define NOTBROKEN 1				// you need this for anything

#define LIB	1					// you need this for  lw, maya and soft

//#define RENDERLW 1  // you need this for  lw

//#define VOLUMETRICLW 1

//#define DLL 1       // you need this for rman & LW

//#define MKVOX 1     // you need this for rman

//#define BROKEN 1 // is this a demo version?

//#define NOLIB 1 // this is the interactive

#define SOFTIMAGE 1



//#define C4D 1



#define MAYA3D 1



//#define EXTERNAL_COLLISION 1

//define PUBLICSDK 1



#include "newshave.h"



#ifdef MAC
#ifndef HUGE
#define HUGE 100000000.0f;
#endif
#endif





#include "miscops.c"



HWND            globhWnd;





//#include "lwran.h"

#include "platform.c"





// This function does any needed initialization on the rendering

// context.  Here it sets up and initializes the lighting for

// the scene.





char            thewholepath[255];







VERT            vxm( Matrix, VERT );









int             main_entry( int argc, char **argv );

int             slcheck( void );

#ifdef NOLIB

int
main_entry( int argc, char **argv )
{

	// INITIALIZE GLUT INTERFACE, OPEN WINDOW

	GlutInit( &argc, argv, 800, 600 );

//  glutInit_ATEXIT_HACK(&argc, argv, 800, 600);

	globhWnd = GetForegroundWindow(  );



	G_loaded = 2;



	if( slcheck(  ) )

		joemain(  );			// initializes menus etc

//if (!slcheck()) DRAW_STATUS(neg1);

	glutMainLoop(  );

	return ( 0 );

}





#endif







#include "mathstuff.c"




#include "test.c"