aboutsummaryrefslogtreecommitdiff
path: root/libexe/shavelib1AWIRIX.c
blob: 04faa1c357dbc4fc0d4576cf430871748abbb5a7 (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
// 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
//#define _MAC 1
//#define MAC 1
#define UNIX 1
#define IRIX 1
#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 EXTERNAL_COLLISION 1
//#define PUBLICSDK 1
#include "newshave.h"
#ifdef _MAC
#define HUGE 100000000.0f;
#endif

#include "miscops.c"
HWND            globhWnd;

//#include "lwran.h"
#include "platform.c"

void            MOVE_SLIDERS( int, int );

// Change viewing volume and viewport.  Called when window is resized
void
ChangeSize( int w, int h )
{
	GLfloat         nRange = 200.0f;
	GLfloat         fAspect;

	//    clear_cache();
////      previewimage=0;
	drawall = 1;
	reset_mmode(  );
	//    glViewport(0,0,(GLsizei) (w),(GLsizei)(h));
	clearBG(  );
	// Prevent a divide by zero
	if( h == 0 )
		h = 1;
//  MOVE_SLIDERS(SXRES,w);
	NEW_MOVE_SLIDERS( w );
//  swapbuffers();
	SXRES = w;
	SYRES = h;

	//  SXRES=SYRES*475.0/600.0;
	//multx=795.0/(float)(w);
	//multy=595.0/(float)(h);
	;

	//redo_dials=1;
	//DRAW_ALL();
	//redo_dials=0;
	first_redraw = 0;
	refresh_dials = 1;

	// Set Viewport to window dimensions
	// glViewport(0, 0, SXRES, SYRES);
	// Reset coordinate system
	glMatrixMode( GL_PROJECTION );
	glLoadIdentity(  );
	fAspect = ( GLfloat ) w / ( GLfloat ) h;
//    gluPerspective(60.0f, fAspect, 1.0, 500.0);
	glMatrixMode( GL_MODELVIEW );
	glLoadIdentity(  );
	// Move out Z axis so we can see everything
	//  glTranslatef(0.0f, 0.0f, -400.0f);
	// glLightfv(GL_LIGHT0,GL_POSITION,lightPos);
	reset_mmode(  );
//  frontbuffer();
//  DRAW_ALL();
	DRAW_ALL(  );
}

// 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 "Oglapi.c"
#include "toolbox.c"
#include "test.c"