X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FGameInitDispose.cpp;h=6daef2b3e1790d99fdd862e62e77523f4de4d847;hb=cd043e3f9e26c2b3406b40a354c2840941e9db7f;hp=a02c05b0cb34b769224f36c1dcd99dc0a0b783ac;hpb=25e3d5e35a7fd7efdffc420efe3c41a91cefe43f;p=lugaru.git diff --git a/Source/GameInitDispose.cpp b/Source/GameInitDispose.cpp index a02c05b..6daef2b 100644 --- a/Source/GameInitDispose.cpp +++ b/Source/GameInitDispose.cpp @@ -3,20 +3,18 @@ Copyright (C) 2003, 2010 - Wolfire Games This file is part of Lugaru. -Lugaru is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. +Lugaru is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. -This program is distributed in the hope that it will be useful, +Lugaru is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -See the GNU General Public License for more details. +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +along with Lugaru. If not, see . */ #include "Game.h" @@ -224,7 +222,7 @@ GLvoid Game::ReSizeGLScene(float fov, float pnear) void Game::LoadingScreen() { static float loadprogress; - static AbsoluteTime time = {0, 0}; + //~ static AbsoluteTime time = {0, 0}; static AbsoluteTime frametime = {0, 0}; AbsoluteTime currTime = UpTime (); double deltaTime = (float) AbsoluteDeltaToDuration (currTime, frametime); @@ -747,8 +745,9 @@ void Game::LoadStuff() stillloading = 1; - for (i = 0; i < maxplayers; i++) - player[i].skeleton.drawmodel.textureptr.destroy(); + for (auto p:Person::players) { + p->skeleton.drawmodel.textureptr.destroy(); + } i = abs(Random() % 4); visibleloading = 0; //don't use loadscreentexture yet @@ -778,9 +777,6 @@ void Game::LoadStuff() realtexdetail = texdetail; - numplayers = 1; - - LOG("Loading weapon data..."); Weapon::knifetextureptr.load(":Data:Textures:knife.png", 0, 1); @@ -919,7 +915,7 @@ void Game::LoadStuff() XYZ moveamount; moveamount = 0; moveamount.z = 2; - for (i = 0; i < player[0].skeleton.num_joints; i++) { + for (i = 0; i < Person::players[0]->skeleton.num_joints; i++) { for (j = 0; j < animation[knifesneakattackanim].numframes; j++) { animation[knifesneakattackanim].position[i][j] += moveamount; } @@ -927,7 +923,7 @@ void Game::LoadStuff() LoadingScreen(); - for (i = 0; i < player[0].skeleton.num_joints; i++) { + for (i = 0; i < Person::players[0]->skeleton.num_joints; i++) { for (j = 0; j < animation[knifesneakattackedanim].numframes; j++) { animation[knifesneakattackedanim].position[i][j] += moveamount; } @@ -935,7 +931,7 @@ void Game::LoadStuff() LoadingScreen(); - for (i = 0; i < player[0].skeleton.num_joints; i++) { + for (i = 0; i < Person::players[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]; @@ -951,7 +947,7 @@ void Game::LoadStuff() animation[dead3anim].speed[1] = 0.001; animation[dead4anim].speed[1] = 0.001; - for (i = 0; i < player[0].skeleton.num_joints; i++) { + for (i = 0; i < Person::players[0]->skeleton.num_joints; i++) { for (j = 0; j < animation[swordsneakattackanim].numframes; j++) { animation[swordsneakattackanim].position[i][j] += moveamount; } @@ -963,7 +959,7 @@ void Game::LoadStuff() LoadingScreen(); - for (i = 0; i < player[0].skeleton.num_joints; i++) { + for (i = 0; i < Person::players[0]->skeleton.num_joints; i++) { for (j = 0; j < animation[swordsneakattackedanim].numframes; j++) { animation[swordsneakattackedanim].position[i][j] += moveamount; }