Explorar o código

Various gcc compile fixes, and updates to linux code.

Frank Zago %!s(int64=14) %!d(string=hai) anos
pai
achega
69364b5b60
Modificáronse 4 ficheiros con 6 adicións e 10 borrados
  1. 3 7
      client/CVideoHandler.cpp
  2. 1 1
      client/GUIBase.h
  3. 1 1
      client/SDL_framerate.h
  4. 1 1
      lib/ERMParser.cpp

+ 3 - 7
client/CVideoHandler.cpp

@@ -917,10 +917,6 @@ bool CVideoPlayer::playVideo(int x, int y, SDL_Surface *dst, bool stopOnKey)
 	pos.x = x;
 	pos.y = y;
 
-	FPSmanager mainFPSmng;
-    SDL_initFramerate(&mainFPSmng);
-    SDL_setFramerate(&mainFPSmng, 48);
-
 	while(nextFrame()) {
 		
 		if(stopOnKey && keyDown())
@@ -929,9 +925,9 @@ bool CVideoPlayer::playVideo(int x, int y, SDL_Surface *dst, bool stopOnKey)
 		SDL_DisplayYUVOverlay(overlay, &pos);
 
 		// Wait 3 frames
-		SDL_framerateDelay(&mainFPSmng);
-		SDL_framerateDelay(&mainFPSmng);
-		SDL_framerateDelay(&mainFPSmng);
+		GH.mainFPSmng->framerateDelay();
+		GH.mainFPSmng->framerateDelay();
+		GH.mainFPSmng->framerateDelay();
 	}
 
 	return true;

+ 1 - 1
client/GUIBase.h

@@ -564,7 +564,7 @@ public:
 	void handleMoveInterested( const SDL_MouseMotionEvent & motion );
 	void fakeMouseMove();
 	void breakEventHandling(); //current event won't be propagated anymore
-	void CGuiHandler::drawFPSCounter(); // draws the FPS to the upper left corner of the screen
+	void drawFPSCounter(); // draws the FPS to the upper left corner of the screen
 	ui8 defActionsDef; //default auto actions
 	ui8 captureChildren; //all newly created objects will get their parents from stack and will be added to parents children list
 	std::list<CIntObject *> createdObj; //stack of objs being created

+ 1 - 1
client/SDL_framerate.h

@@ -25,7 +25,7 @@ public:
 	int fps; // the actual fps value
 
 	FPSManager(int rate); // initializes the manager with a given fps rate
-	void FPSManager::init(); // needs to be called directly before the main game loop to reset the internal timer
+	void init(); // needs to be called directly before the main game loop to reset the internal timer
 	void framerateDelay(); // needs to be called every game update cycle
 };
 

+ 1 - 1
lib/ERMParser.cpp

@@ -559,6 +559,6 @@ void ERMParser::repairEncoding( char * str, int len ) const
 #else
 
 ERMParser::ERMParser(std::string file){}
-void ERMParser::parseFile(){}
+std::vector<ERM::TLine> ERMParser::parseFile() {}
 
 #endif