- LoadSave(":Data:Textures:Bloodfur.png",0,1,&bloodText[0],0);
- LoadSave(":Data:Textures:Wolfbloodfur.png",0,1,&wolfbloodText[0],0);
-
- oldenvironment=-4;
-
- gameon=1;
- mainmenu=0;
-
- firstload=0;
- //if(targetlevel!=7)
- Loadlevel(targetlevel);
-
-
- rabbitcoords=player[0].coords;
- rabbitcoords.y=terrain.getHeight(rabbitcoords.x,rabbitcoords.z);
-
- animation[runanim].Load((char *)":Data:Animations:Run",middleheight,neutral);
-
- animation[bounceidleanim].Load((char *)":Data:Animations:Idle",middleheight,neutral);
- animation[stopanim].Load((char *)":Data:Animations:Stop",middleheight,neutral);
-
- animation[jumpupanim].Load((char *)":Data:Animations:JumpUp",highheight,neutral);
- animation[jumpdownanim].Load((char *)":Data:Animations:JumpDown",highheight,neutral);
-
- animation[landanim].Load((char *)":Data:Animations:Landing",lowheight,neutral);
- animation[landhardanim].Load((char *)":Data:Animations:Landhard",lowheight,neutral);
- animation[climbanim].Load((char *)":Data:Animations:Climb",lowheight,neutral);
- animation[hanganim].Load((char *)":Data:Animations:Hangon",lowheight,neutral);
- animation[spinkickanim].Load((char *)":Data:Animations:SpinKick",middleheight,normalattack);
-
- animation[getupfromfrontanim].Load((char *)":Data:Animations:GetUpFromFront",lowheight,neutral);
- animation[getupfrombackanim].Load((char *)":Data:Animations:GetUpFromBack",lowheight,neutral);
- animation[crouchanim].Load((char *)":Data:Animations:Crouch",lowheight,neutral);
- animation[sneakanim].Load((char *)":Data:Animations:Sneak",lowheight,neutral);
- animation[rollanim].Load((char *)":Data:Animations:Roll",lowheight,neutral);
- animation[flipanim].Load((char *)":Data:Animations:Flip",highheight,neutral);
- animation[frontflipanim].Load((char *)":Data:Animations:Flip",highheight,neutral);
- animation[spinkickreversedanim].Load((char *)":Data:Animations:SpinKickCaught",middleheight,reversed);
-
- animation[spinkickreversalanim].Load((char *)":Data:Animations:SpinKickCatch",middleheight,reversal);
- animation[lowkickanim].Load((char *)":Data:Animations:lowkick",middleheight,normalattack);
- animation[sweepanim].Load((char *)":Data:Animations:sweep",lowheight,normalattack);
- animation[sweepreversedanim].Load((char *)":Data:Animations:SweepCaught",lowheight,reversed);
- animation[sweepreversalanim].Load((char *)":Data:Animations:SweepCatch",middleheight,reversal);
- animation[rabbitkickanim].Load((char *)":Data:Animations:RabbitKick",middleheight,normalattack);
- animation[rabbitkickreversedanim].Load((char *)":Data:Animations:RabbitKickCaught",middleheight,reversed);
- animation[rabbitkickreversalanim].Load((char *)":Data:Animations:RabbitKickCatch",lowheight,reversal);
- animation[upunchanim].Load((char *)":Data:Animations:Upunch",middleheight,normalattack);
- animation[staggerbackhighanim].Load((char *)":Data:Animations:Staggerbackhigh",middleheight,neutral);
- animation[upunchreversedanim].Load((char *)":Data:Animations:UpunchCaught",middleheight,reversed);
-
- animation[upunchreversalanim].Load((char *)":Data:Animations:UpunchCatch",middleheight,reversal);
- animation[hurtidleanim].Load((char *)":Data:Animations:Hurtidle",middleheight,neutral);
- animation[backhandspringanim].Load((char *)":Data:Animations:Backhandspring",middleheight,neutral);
- animation[fightidleanim].Load((char *)":Data:Animations:Fightidle",middleheight,neutral);
- animation[walkanim].Load((char *)":Data:Animations:Walk",middleheight,neutral);
-
- animation[fightsidestep].Load((char *)":Data:Animations:Fightsidestep",middleheight,neutral);
- animation[killanim].Load((char *)":Data:Animations:Kill",middleheight,normalattack);
- animation[sneakattackanim].Load((char *)":Data:Animations:Sneakattack",middleheight,reversal);
- animation[sneakattackedanim].Load((char *)":Data:Animations:Sneakattacked",middleheight,reversed);
- animation[drawrightanim].Load((char *)":Data:Animations:drawright",middleheight,neutral);
- animation[knifeslashstartanim].Load((char *)":Data:Animations:slashstart",middleheight,normalattack);
- animation[crouchdrawrightanim].Load((char *)":Data:Animations:crouchdrawright",lowheight,neutral);
- animation[crouchstabanim].Load((char *)":Data:Animations:crouchstab",lowheight,normalattack);
-
- animation[knifefollowanim].Load((char *)":Data:Animations:slashfollow",middleheight,reversal);
- animation[knifefollowedanim].Load((char *)":Data:Animations:slashfollowed",middleheight,reversed);
- animation[knifethrowanim].Load((char *)":Data:Animations:knifethrow",middleheight,normalattack);
- animation[removeknifeanim].Load((char *)":Data:Animations:removeknife",middleheight,neutral);
- animation[crouchremoveknifeanim].Load((char *)":Data:Animations:crouchremoveknife",lowheight,neutral);
- animation[jumpreversedanim].Load((char *)":Data:Animations:JumpCaught",middleheight,reversed);
- animation[jumpreversalanim].Load((char *)":Data:Animations:JumpCatch",middleheight,reversal);
- animation[staggerbackhardanim].Load((char *)":Data:Animations:Staggerbackhard",middleheight,neutral);
-
- animation[dropkickanim].Load((char *)":Data:Animations:Dropkick",middleheight,normalattack);
- animation[winduppunchanim].Load((char *)":Data:Animations:Winduppunch",middleheight,normalattack);
- animation[winduppunchblockedanim].Load((char *)":Data:Animations:Winduppunchblocked",middleheight,normalattack);
- animation[blockhighleftanim].Load((char *)":Data:Animations:Blockhighleft",middleheight,normalattack);
- animation[blockhighleftstrikeanim].Load((char *)":Data:Animations:Blockhighleftstrike",middleheight,normalattack);
- animation[backflipanim].Load((char *)":Data:Animations:Backflip",highheight,neutral);
- animation[walljumpbackanim].Load((char *)":Data:Animations:Walljumpback",highheight,neutral);
- animation[walljumpfrontanim].Load((char *)":Data:Animations:Walljumpfront",highheight,neutral);
- animation[rightflipanim].Load((char *)":Data:Animations:Rightflip",highheight,neutral);
- animation[walljumprightanim].Load((char *)":Data:Animations:Walljumpright",highheight,neutral);
- animation[leftflipanim].Load((char *)":Data:Animations:Leftflip",highheight,neutral);
- animation[walljumpleftanim].Load((char *)":Data:Animations:Walljumpleft",highheight,neutral);
- animation[walljumprightkickanim].Load((char *)":Data:Animations:Walljumprightkick",highheight,neutral);
- animation[walljumpleftkickanim].Load((char *)":Data:Animations:Walljumpleftkick",highheight,neutral);
- animation[knifefightidleanim].Load((char *)":Data:Animations:Knifefightidle",middleheight,neutral);
- animation[knifesneakattackanim].Load((char *)":Data:Animations:Knifesneakattack",middleheight,reversal);
- animation[knifesneakattackedanim].Load((char *)":Data:Animations:Knifesneakattacked",middleheight,reversed);
- animation[swordfightidleanim].Load((char *)":Data:Animations:swordfightidle",middleheight,neutral);
- animation[drawleftanim].Load((char *)":Data:Animations:drawleft",middleheight,neutral);
- animation[swordslashanim].Load((char *)":Data:Animations:swordslash",middleheight,normalattack);
- animation[swordgroundstabanim].Load((char *)":Data:Animations:swordgroundstab",lowheight,normalattack);
- animation[dodgebackanim].Load((char *)":Data:Animations:dodgeback",middleheight,neutral);
- animation[swordsneakattackanim].Load((char *)":Data:Animations:Swordsneakattack",middleheight,reversal);
- animation[swordsneakattackedanim].Load((char *)":Data:Animations:Swordsneakattacked",middleheight,reversed);
- animation[swordslashreversedanim].Load((char *)":Data:Animations:swordslashCaught",middleheight,reversed);
- animation[swordslashreversalanim].Load((char *)":Data:Animations:swordslashCatch",middleheight,reversal);
- animation[knifeslashreversedanim].Load((char *)":Data:Animations:knifeslashCaught",middleheight,reversed);
- animation[knifeslashreversalanim].Load((char *)":Data:Animations:knifeslashCatch",middleheight,reversal);
- animation[swordfightidlebothanim].Load((char *)":Data:Animations:swordfightidleboth",middleheight,neutral);
- animation[swordslashparryanim].Load((char *)":Data:Animations:sworduprightparry",middleheight,normalattack);
- animation[swordslashparriedanim].Load((char *)":Data:Animations:swordslashparried",middleheight,normalattack);
- animation[wolfidle].Load((char *)":Data:Animations:Wolfidle",middleheight,neutral);
- animation[wolfcrouchanim].Load((char *)":Data:Animations:Wolfcrouch",lowheight,neutral);
- animation[wolflandanim].Load((char *)":Data:Animations:Wolflanding",lowheight,neutral);
- animation[wolflandhardanim].Load((char *)":Data:Animations:Wolflandhard",lowheight,neutral);
- animation[wolfrunanim].Load((char *)":Data:Animations:Wolfrun",middleheight,neutral);
- animation[wolfrunninganim].Load((char *)":Data:Animations:Wolfrunning",middleheight,neutral);
- animation[rabbitrunninganim].Load((char *)":Data:Animations:Rabbitrunning",middleheight,neutral);
- animation[wolfstopanim].Load((char *)":Data:Animations:Wolfstop",middleheight,neutral);
- animation[rabbittackleanim].Load((char *)":Data:Animations:Rabbittackle",middleheight,neutral);
- animation[rabbittacklinganim].Load((char *)":Data:Animations:Rabbittackling",middleheight,reversal);
- animation[rabbittackledbackanim].Load((char *)":Data:Animations:Rabbittackledback",middleheight,reversed);
- animation[rabbittackledfrontanim].Load((char *)":Data:Animations:Rabbittackledfront",middleheight,reversed);
- animation[wolfslapanim].Load((char *)":Data:Animations:Wolfslap",middleheight,normalattack);
- animation[staffhitanim].Load((char *)":Data:Animations:StaffHit",middleheight,normalattack);
- animation[staffgroundsmashanim].Load((char *)":Data:Animations:StaffGroundSmash",lowheight,normalattack);
- animation[staffspinhitanim].Load((char *)":Data:Animations:Spinwhack",middleheight,normalattack);
- animation[staffhitreversedanim].Load((char *)":Data:Animations:StaffHitCaught",middleheight,reversed);
- animation[staffhitreversalanim].Load((char *)":Data:Animations:StaffHitCatch",middleheight,reversal);
- animation[staffspinhitreversedanim].Load((char *)":Data:Animations:SpinWhackCaught",middleheight,reversed);
- animation[staffspinhitreversalanim].Load((char *)":Data:Animations:SpinWhackCatch",middleheight,reversal);
-
- animation[sitanim].Load((char *)":Data:Animations:Sit",lowheight,neutral);
- animation[sleepanim].Load((char *)":Data:Animations:Sleep",lowheight,neutral);
- animation[talkidleanim].Load((char *)":Data:Animations:TalkIdle",middleheight,neutral);
-
- animation[sitwallanim].Load((char *)":Data:Animations:Dying",lowheight,neutral);
- animation[dead1anim].Load((char *)":Data:Animations:Dead1",lowheight,neutral);
- animation[dead2anim].Load((char *)":Data:Animations:Dead2",lowheight,neutral);
- animation[dead3anim].Load((char *)":Data:Animations:Dead3",lowheight,neutral);
- animation[dead4anim].Load((char *)":Data:Animations:Dead4",lowheight,neutral);
- //Fix knife stab, too lazy to do it manually
- XYZ moveamount;
- moveamount=0;
- moveamount.z=2;
- for(i=0;i<player[0].skeleton.num_joints;i++){
- for(j=0;j<animation[knifesneakattackanim].numframes;j++){
- animation[knifesneakattackanim].position[i][j]+=moveamount;
- }
- }
-
- loadscreencolor=4;
- LoadingScreen();
-
- for(i=0;i<player[0].skeleton.num_joints;i++){
- for(j=0;j<animation[knifesneakattackedanim].numframes;j++){
- animation[knifesneakattackedanim].position[i][j]+=moveamount;
- }
- }
-
- loadscreencolor=4;
- LoadingScreen();
-
- for(i=0;i<player[0].skeleton.num_joints;i++){
- animation[dead1anim].position[i][1]=animation[dead1anim].position[i][0];
- animation[dead2anim].position[i][1]=animation[dead2anim].position[i][0];
- animation[dead3anim].position[i][1]=animation[dead3anim].position[i][0];
- animation[dead4anim].position[i][1]=animation[dead4anim].position[i][0];
- }
- animation[dead1anim].speed[0]=0.001;
- animation[dead2anim].speed[0]=0.001;
- animation[dead3anim].speed[0]=0.001;
- animation[dead4anim].speed[0]=0.001;
-
- animation[dead1anim].speed[1]=0.001;
- animation[dead2anim].speed[1]=0.001;
- animation[dead3anim].speed[1]=0.001;
- animation[dead4anim].speed[1]=0.001;
-
- for(i=0;i<player[0].skeleton.num_joints;i++){
- for(j=0;j<animation[swordsneakattackanim].numframes;j++){
- animation[swordsneakattackanim].position[i][j]+=moveamount;
- }
- }
- loadscreencolor=4;
- LoadingScreen();
- for(j=0;j<animation[swordsneakattackanim].numframes;j++){
- animation[swordsneakattackanim].weapontarget[j]+=moveamount;
- }
-
- loadscreencolor=4;
- LoadingScreen();
-
- for(i=0;i<player[0].skeleton.num_joints;i++){
- for(j=0;j<animation[swordsneakattackedanim].numframes;j++){
- animation[swordsneakattackedanim].position[i][j]+=moveamount;
- }
- }
- /*
- for(i=0;i<player[0].skeleton.num_joints;i++){
- for(j=0;j<animation[sleepanim].numframes;j++){
- animation[sleepanim].position[i][j]=DoRotation(animation[sleepanim].position[i][j],0,180,0);
- }
- }
- */
- loadscreencolor=4;
- LoadingScreen();
- temptexdetail=texdetail;
- texdetail=1;
- texdetail=temptexdetail;
-
- loadscreencolor=4;
- LoadingScreen();
-
- //if(ismotionblur){
- if(!screentexture){
- glPixelStorei( GL_UNPACK_ALIGNMENT, 1 );
-
- glGenTextures( 1, &screentexture );
- glTexEnvi( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE );
-
-
- glEnable(GL_TEXTURE_2D);
- glBindTexture( GL_TEXTURE_2D, screentexture);
- glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR );
- glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR );
-
- glCopyTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, 0, 0, kTextureSize, kTextureSize, 0);
- }
- //}
-
- LoadSounds();
-
- /*PlaySoundEx( consolesuccesssound, samp[consolesuccesssound], NULL, true);
- OPENAL_SetVolume(channels[consolesuccesssound], 256);
- OPENAL_SetPaused(channels[consolesuccesssound], false);
- */
- if(targetlevel!=7){
- float gLoc[3]={0,0,0};
- float vel[3]={0,0,0};
- OPENAL_Sample_SetMinMaxDistance(samp[fireendsound], 9999.0f, 99999.0f);
- PlaySoundEx( fireendsound, samp[fireendsound], NULL, true);
- OPENAL_3D_SetAttributes(channels[fireendsound], gLoc, vel);
- OPENAL_SetVolume(channels[fireendsound], 256);
- OPENAL_SetPaused(channels[fireendsound], false);
- OPENAL_Sample_SetMinMaxDistance(samp[fireendsound], 8.0f, 2000.0f);
- }
-
- stillloading=0;
- loading=0;
- changedelay=1;
-
- visibleloading=0;
-}