git repos / blockattack-game

blame: source/code/ReplayPlayer.cpp

normal view · raw

092bdebe sago007 2017-03-19 14:39 1
/*
092bdebe sago007 2017-03-19 14:39 2
===========================================================================
092bdebe sago007 2017-03-19 14:39 3
blockattack - Block Attack - Rise of the Blocks
092bdebe sago007 2017-03-19 14:39 4
Copyright (C) 2005-2017 Poul Sander
092bdebe sago007 2017-03-19 14:39 5
092bdebe sago007 2017-03-19 14:39 6
This program is free software: you can redistribute it and/or modify
092bdebe sago007 2017-03-19 14:39 7
it under the terms of the GNU General Public License as published by
092bdebe sago007 2017-03-19 14:39 8
the Free Software Foundation, either version 2 of the License, or
092bdebe sago007 2017-03-19 14:39 9
(at your option) any later version.
092bdebe sago007 2017-03-19 14:39 10
092bdebe sago007 2017-03-19 14:39 11
This program is distributed in the hope that it will be useful,
092bdebe sago007 2017-03-19 14:39 12
but WITHOUT ANY WARRANTY; without even the implied warranty of
092bdebe sago007 2017-03-19 14:39 13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
092bdebe sago007 2017-03-19 14:39 14
GNU General Public License for more details.
092bdebe sago007 2017-03-19 14:39 15
092bdebe sago007 2017-03-19 14:39 16
You should have received a copy of the GNU General Public License
092bdebe sago007 2017-03-19 14:39 17
along with this program.  If not, see http://www.gnu.org/licenses/
092bdebe sago007 2017-03-19 14:39 18
092bdebe sago007 2017-03-19 14:39 19
Source information and contacts persons can be found at
092bdebe sago007 2017-03-19 14:39 20
http://www.blockattack.net
092bdebe sago007 2017-03-19 14:39 21
===========================================================================
092bdebe sago007 2017-03-19 14:39 22
*/
092bdebe sago007 2017-03-19 14:39 23
092bdebe sago007 2017-03-19 14:39 24
#include "ReplayPlayer.hpp"
092bdebe sago007 2017-03-19 14:39 25
#include "global.hpp"
092bdebe sago007 2017-03-19 14:39 26
#include "common.h"
092bdebe sago007 2017-03-19 14:39 27
#include "MenuSystem.h"
c4baf4ba sago007 2017-03-25 15:37 28
//#include "BlockGameSdl.inc"
c4baf4ba sago007 2017-03-25 15:37 29
c4baf4ba sago007 2017-03-25 15:37 30
c4baf4ba sago007 2017-03-25 15:37 31
c4baf4ba sago007 2017-03-25 15:37 32
/*static void MoveBlockGameSdls( BlockGameSdl& game1, BlockGameSdl& game2 ) {
c8a2dae7 sago007 2017-08-19 16:36 33
game1.SetTopXY(50, globalData.ysize/2-284);
c8a2dae7 sago007 2017-08-19 16:36 34
game2.SetTopXY(globalData.xsize-500, globalData.ysize/2-284);
c4baf4ba sago007 2017-03-25 15:37 35
}*/
c4baf4ba sago007 2017-03-25 15:37 36
092bdebe sago007 2017-03-19 14:39 37
092bdebe sago007 2017-03-19 14:39 38
ReplayPlayer::ReplayPlayer() {
092bdebe sago007 2017-03-19 14:39 39
}
092bdebe sago007 2017-03-19 14:39 40
092bdebe sago007 2017-03-19 14:39 41
ReplayPlayer::~ReplayPlayer() {
092bdebe sago007 2017-03-19 14:39 42
}
092bdebe sago007 2017-03-19 14:39 43
092bdebe sago007 2017-03-19 14:39 44
bool ReplayPlayer::IsActive() {
092bdebe sago007 2017-03-19 14:39 45
	return isActive;
092bdebe sago007 2017-03-19 14:39 46
}
092bdebe sago007 2017-03-19 14:39 47
092bdebe sago007 2017-03-19 14:39 48
void ReplayPlayer::Draw(SDL_Renderer* target) {
092bdebe sago007 2017-03-19 14:39 49
	DrawBackground(target);
c4baf4ba sago007 2017-03-25 15:37 50
	//MoveBlockGameSdls(theGame, theGame2);
c4baf4ba sago007 2017-03-25 15:37 51
	//DrawEverything(globalData.xsize, globalData.ysize, &theGame, &theGame2);
092bdebe sago007 2017-03-19 14:39 52
}
092bdebe sago007 2017-03-19 14:39 53
092bdebe sago007 2017-03-19 14:39 54
void ReplayPlayer::ProcessInput(const SDL_Event& event, bool& processed) {
092bdebe sago007 2017-03-19 14:39 55
	UpdateMouseCoordinates(event, globalData.mousex, globalData.mousey);
092bdebe sago007 2017-03-19 14:39 56
092bdebe sago007 2017-03-19 14:39 57
	if (isConfirmEvent(event) || isEscapeEvent(event)) {
092bdebe sago007 2017-03-19 14:39 58
		isActive = false;
092bdebe sago007 2017-03-19 14:39 59
		processed = true;
092bdebe sago007 2017-03-19 14:39 60
	}
092bdebe sago007 2017-03-19 14:39 61
}
092bdebe sago007 2017-03-19 14:39 62
092bdebe sago007 2017-03-19 14:39 63
void ReplayPlayer::Update() {
092bdebe sago007 2017-03-19 14:39 64
092bdebe sago007 2017-03-19 14:39 65
}
1970-01-01 00:00 66