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"
092bdebe sago007 2017-03-19 14:39 28
092bdebe sago007 2017-03-19 14:39 29
ReplayPlayer::ReplayPlayer() {
092bdebe sago007 2017-03-19 14:39 30
}
092bdebe sago007 2017-03-19 14:39 31
092bdebe sago007 2017-03-19 14:39 32
ReplayPlayer::~ReplayPlayer() {
092bdebe sago007 2017-03-19 14:39 33
}
092bdebe sago007 2017-03-19 14:39 34
092bdebe sago007 2017-03-19 14:39 35
bool ReplayPlayer::IsActive() {
092bdebe sago007 2017-03-19 14:39 36
	return isActive;
092bdebe sago007 2017-03-19 14:39 37
}
092bdebe sago007 2017-03-19 14:39 38
092bdebe sago007 2017-03-19 14:39 39
void ReplayPlayer::Draw(SDL_Renderer* target) {
092bdebe sago007 2017-03-19 14:39 40
	DrawBackground(target);
092bdebe sago007 2017-03-19 14:39 41
}
092bdebe sago007 2017-03-19 14:39 42
092bdebe sago007 2017-03-19 14:39 43
void ReplayPlayer::ProcessInput(const SDL_Event& event, bool& processed) {
092bdebe sago007 2017-03-19 14:39 44
	UpdateMouseCoordinates(event, globalData.mousex, globalData.mousey);
092bdebe sago007 2017-03-19 14:39 45
092bdebe sago007 2017-03-19 14:39 46
	if (isConfirmEvent(event) || isEscapeEvent(event)) {
092bdebe sago007 2017-03-19 14:39 47
		isActive = false;
092bdebe sago007 2017-03-19 14:39 48
		processed = true;
092bdebe sago007 2017-03-19 14:39 49
	}
092bdebe sago007 2017-03-19 14:39 50
}
092bdebe sago007 2017-03-19 14:39 51
092bdebe sago007 2017-03-19 14:39 52
void ReplayPlayer::Update() {
092bdebe sago007 2017-03-19 14:39 53
092bdebe sago007 2017-03-19 14:39 54
}
1970-01-01 00:00 55