funpackf(tfile, "Bi", &(acc->progress));
int nbCampaigns;
funpackf(tfile, "Bi", &nbCampaigns);
- //~ printf("loading %d campaign progress info\n",nbCampaigns);
for (int k = 0; k < nbCampaigns; ++k) {
string campaignName = "";
funpackf(tfile, "Bb", &c);
campaignName.append(1, c);
}
- //~ printf("loading %s campaign progress info\n",campaignName.c_str());
funpackf(tfile, "Bf", &(acc->campaignProgress[campaignName].time));
funpackf(tfile, "Bf", &(acc->campaignProgress[campaignName].score));
funpackf(tfile, "Bf", &(acc->campaignProgress[campaignName].fasttime));
extern float texscale;
extern Light light;
extern Terrain terrain;
-//extern Sprites sprites;
extern float multiplier;
extern float sps;
extern float viewdistance;
extern int bloodtoggle;
extern int difficulty;
extern bool decals;
-// MODIFIED GWC
-//extern int texdetail;
extern float texdetail;
extern bool musictoggle;
extern int tutoriallevel;
float maxdistance = 0;
float tempdist;
- //~ int whichclosest;
for (int i = 0; i < objects.numobjects; i++) {
tempdist = distsq(¢er, &objects.position[i]);
if (tempdist > maxdistance) {
- //~ whichclosest=i;
maxdistance = tempdist;
}
}
if (!Person::players[i]->dead) {
tempdist = distsq(¢er, &Person::players[i]->coords);
if (tempdist > maxdistance) {
- //~ whichclosest=i;
maxdistance = tempdist;
}
}
extern Skeleton testskeleton;
extern int numsounds;
extern Terrain terrain;
-//extern Sprites sprites;
extern int kTextureSize;
extern float texdetail;
extern float realtexdetail;
Weapon::throwingknifemodel.load((char *)":Data:Models:throwingknife.solid", 1);
Weapon::throwingknifemodel.Scale(.001, .001, .001);
- //Weapon::throwingknifemodel.Rotate(0,0,-90);
Weapon::throwingknifemodel.Rotate(90, 0, 0);
Weapon::throwingknifemodel.Rotate(0, 90, 0);
Weapon::throwingknifemodel.flat = 0;
Weapon::throwingknifemodel.CalculateNormals(1);
- //Weapon::throwingknifemodel.ScaleNormals(-1,-1,-1);
Weapon::swordmodel.load((char *)":Data:Models:sword.solid", 1);
Weapon::swordmodel.Scale(.001, .001, .001);
- //Weapon::swordmodel.Rotate(0,0,-90);
Weapon::swordmodel.Rotate(90, 0, 0);
Weapon::swordmodel.Rotate(0, 90, 0);
Weapon::swordmodel.Rotate(0, 0, 90);
Weapon::swordmodel.flat = 1;
Weapon::swordmodel.CalculateNormals(1);
- //Weapon::swordmodel.ScaleNormals(-1,-1,-1);
Weapon::staffmodel.load((char *)":Data:Models:staff.solid", 1);
Weapon::staffmodel.Scale(.005, .005, .005);
- //Weapon::staffmodel.Rotate(0,0,-90);
Weapon::staffmodel.Rotate(90, 0, 0);
Weapon::staffmodel.Rotate(0, 90, 0);
Weapon::staffmodel.Rotate(0, 0, 90);
Weapon::staffmodel.flat = 1;
Weapon::staffmodel.CalculateNormals(1);
- //Weapon::staffmodel.ScaleNormals(-1,-1,-1);
terrain.shadowtexture.load(":Data:Textures:shadow.png", 0, 1);
terrain.bloodtexture.load(":Data:Textures:blood.png", 0, 1);
terraintexture.load(":Data:Textures:snow.jpg", 1, 0);
terraintexture2.load(":Data:Textures:rock.jpg", 1, 0);
- //LoadTexture(":Data:Textures:detailgrain.png",&terraintexture3,1);
-
-
-
temptexdetail = texdetail;
if (texdetail > 1)
terraintexture.load(":Data:Textures:sand.jpg", 1, 0);
terraintexture2.load(":Data:Textures:sandslope.jpg", 1, 0);
- //LoadTexture(":Data:Textures:detailgrain.png",&terraintexture3,1);
-
-
temptexdetail = texdetail;
if (texdetail > 1)
terraintexture.load(":Data:Textures:grassdirt.jpg", 1, 0);
terraintexture2.load(":Data:Textures:mossrock.jpg", 1, 0);
- //LoadTexture(":Data:Textures:detail.png",&terraintexture3,1);
-
-
temptexdetail = texdetail;
if (texdetail > 1)
float maxdistance = 0;
float tempdist;
- //~ int whichclosest;
for (int i = 0; i < objects.numobjects; i++) {
tempdist = distsq(&objects.center, &objects.position[i]);
if (tempdist > maxdistance) {
- //~ whichclosest=i;
maxdistance = tempdist;
}
}
}
}
funpackf(tfile, "Bi", &Person::players[i - howmanyremoved]->numwaypoints);
- //Person::players[i-howmanyremoved]->numwaypoints=10;
for (int j = 0; j < Person::players[i - howmanyremoved]->numwaypoints; j++) {
funpackf(tfile, "Bf", &Person::players[i - howmanyremoved]->waypoints[j].x);
funpackf(tfile, "Bf", &Person::players[i - howmanyremoved]->waypoints[j].y);
break;
case 19:
tutorialstage = 20;
- //tutorialmaxtime=500;
break;
case 20:
tutorialmaxtime = 500;
int hostile = 0;
float hostiletime = 0;
-XYZ envsound[30]; // = {0};
+XYZ envsound[30];
float envsoundvol[30] = {0};
float envsoundlife[30] = {0};
int numenvsounds;
bool gamestarted = false;
-//TextureList textures;
-
StereoMode stereomode = stereoNone;
StereoMode newstereomode = stereoNone;
float stereoseparation = 0.05;
char *ptr;
DIR *dirp;
- //if (PHYSFS_exists(buf))
if (access(buf, F_OK) == 0)
return(1); /* quick rejection: exists in current case. */
FILE *tfile;
long i;
- //~ int oldvertexNum, oldTriangleNum;
- //~ oldvertexNum = vertexNum;
- //~ oldTriangleNum = TriangleNum;
-
type = notextype;
color = 0;
}
for (i = 0; i < TriangleNum; i++) {
- //funpackf(tfile, "Bi Bi Bi", &Triangles[i].vertex[0], &Triangles[i].vertex[1], &Triangles[i].vertex[2]);
short vertex[ 6];
funpackf(tfile, "Bs Bs Bs Bs Bs Bs", &vertex[ 0], &vertex[ 1], &vertex[ 2], &vertex[ 3], &vertex[ 4], &vertex[ 5]);
Triangles[i].vertex[ 0] = vertex[ 0];
if (visibleloading)
Game::LoadingScreen();
- //~ int oldvertexNum, oldTriangleNum;
- //~ oldvertexNum = vertexNum;
- //~ oldTriangleNum = TriangleNum;
-
type = normaltype;
color = 0;
}
for (i = 0; i < TriangleNum; i++) {
- //funpackf(tfile, "Bi Bi Bi", &Triangles[i].vertex[0], &Triangles[i].vertex[1], &Triangles[i].vertex[2]);
short vertex[ 6];
funpackf(tfile, "Bs Bs Bs Bs Bs Bs", &vertex[ 0], &vertex[ 1], &vertex[ 2], &vertex[ 3], &vertex[ 4], &vertex[ 5]);
Triangles[i].vertex[ 0] = vertex[ 0];
}
for (i = 0; i < TriangleNum; i++) {
- //funpackf(tfile, "Bi Bi Bi", &Triangles[i].vertex[0], &Triangles[i].vertex[1], &Triangles[i].vertex[2]);
short vertex[ 6];
funpackf(tfile, "Bs Bs Bs Bs Bs Bs", &vertex[ 0], &vertex[ 1], &vertex[ 2], &vertex[ 3], &vertex[ 4], &vertex[ 5]);
Triangles[i].vertex[ 0] = vertex[ 0];
LOG(std::string("Loading raw...") + filename);
- //~ int oldvertexNum, oldTriangleNum;
- //~ oldvertexNum = vertexNum;
- //~ oldTriangleNum = TriangleNum;
-
type = rawtype;
color = 0;
}
for (i = 0; i < TriangleNum; i++) {
- //funpackf(tfile, "Bi Bi Bi", &Triangles[i].vertex[0], &Triangles[i].vertex[1], &Triangles[i].vertex[2]);
short vertex[ 6];
funpackf(tfile, "Bs Bs Bs Bs Bs Bs", &vertex[ 0], &vertex[ 1], &vertex[ 2], &vertex[ 3], &vertex[ 4], &vertex[ 5]);
Triangles[i].vertex[ 0] = vertex[ 0];
p1 = skeleton.drawmodel.vertex[skeleton.drawmodel.Triangles[whichtri].vertex[0]];
p2 = skeleton.drawmodel.vertex[skeleton.drawmodel.Triangles[whichtri].vertex[1]];
p3 = skeleton.drawmodel.vertex[skeleton.drawmodel.Triangles[whichtri].vertex[2]];
- /*
- CrossProduct(p2-p1,p3-p1,&N);
- CrossProduct(p0-p1,p3-p1,&temp);
- s = dotproduct(&temp,&N)/findLength(&N);
- CrossProduct(p2-p1,p1-p0,&temp);
- t = dotproduct(&temp,&N)/findLength(&N);
- r = 1 - (s + t);*/
bary.x = distsq(&p0, &p1);
bary.y = distsq(&p0, &p2);
coordsx = skeleton.drawmodel.Triangles[whichtri].gx[0] * bary.x + skeleton.drawmodel.Triangles[whichtri].gx[1] * bary.y + skeleton.drawmodel.Triangles[whichtri].gx[2] * bary.z;
coordsy = skeleton.drawmodel.Triangles[whichtri].gy[0] * bary.x + skeleton.drawmodel.Triangles[whichtri].gy[1] * bary.y + skeleton.drawmodel.Triangles[whichtri].gy[2] * bary.z;
- //coordsx=skeleton.drawmodel.Triangles[whichtri].gx[1];
- //coordsy=skeleton.drawmodel.Triangles[whichtri].gy[1];
-
if (bleeding <= 0 && spurt) {
spurt = 0;
for (int i = 0; i < 3; i++) {