/************************************************************ * * * tuto0.c * * * * * L Evans 30/01/97 * * * * Copyright (C) 1996 Sony Computer Entertainment Inc. * * All Rights Reserved * * * ***********************************************************/ #include #include #include #include "pad.h" #include "tmd.h" #define SCREEN_WIDTH 320 #define SCREEN_HEIGHT 240 #define PACKETMAX (2048*24) /* Max GPU packets */ static PACKET packetArea[2][PACKETMAX]; /* GPU PACKETS AREA */ #define SINGLE_MODEL_ADDRESS 0x800c0000 #define OT_LENGTH 9 static GsOT Wot[2]; /* Handler of OT */ static GsOT_TAG wtags[2][1<coord = tempMatrix; // set position by absolute coordinates coordSystem->coord.t[0] = translationVector->vx; coordSystem->coord.t[1] = translationVector->vy; coordSystem->coord.t[2] = translationVector->vz; // tell GTE that coordinate system has been updated coordSystem->flg = 0; } void InitialiseView (void) { ProjectionDistance = 192; GsSetProjection(ProjectionDistance); view.vrx = 0; view.vry = 0; view.vrz = 0; view.vpx = 0; view.vpy = 0; view.vpz = -500; view.rz = 0; view.super = WORLD; GsSetRefView2(&view); } void InitialiseLighting (void) { TheLights[0].vx = ONE; TheLights[0].vy = 0; TheLights[0].vz = 0; TheLights[0].r = 128; TheLights[0].g = 0; TheLights[0].b = 0; GsSetFlatLight(0, &TheLights[0]); TheLights[1].vx = 0; TheLights[1].vy = ONE; TheLights[1].vz = 0; TheLights[1].r = 0; TheLights[1].g = 128; TheLights[1].b = 0; GsSetFlatLight(1, &TheLights[1]); TheLights[2].vx = 0; TheLights[2].vy = 0; TheLights[2].vz = ONE; TheLights[2].r = 0; TheLights[2].g = 0; TheLights[2].b = 128; GsSetFlatLight(2, &TheLights[2]); GsSetAmbient(ONE/4, ONE/4, ONE/4); // ambient lighting } long* InitialiseModel (long* adrs) { long *dop; dop = adrs; dop++; GsMapModelingData(dop); dop++; dop++; return dop; }