CFinaleStaticScene.h 1.18 KB
Newer Older
1 2 3 4 5 6 7 8 9 10
/*
 * CFinaleStaticScene.h
 *
 *  Created on: 10.11.2009
 *      Author: gerstrong
 */

#ifndef CFINALESTATICSCENE_H_
#define CFINALESTATICSCENE_H_

11
#include "engine/vorticon/dialog/CMessageBoxVort.h"
12
#include "graphics/GsBitmap.h"
13 14 15
#include <SDL.h>
#include <string>
#include <list>
16
#include <memory>
17

Gerhard Stein's avatar
Gerhard Stein committed
18 19
struct bitmap_structure
{
20
    GsBitmap bitmap;
21 22 23 24 25 26
	SDL_Rect dest_rect;
	Uint16 from_count;
	Uint16 to_count;
};

// Prototype Reference to finale.cpp. This one still uses old C code.
Gerhard Stein's avatar
Gerhard Stein committed
27
bool finale_draw( SDL_Surface *sfc, const std::string& filename, const std::string& path);
28

29 30
class CFinaleStaticScene
{
31 32 33 34
public:
	CFinaleStaticScene(const std::string &game_path, const std::string &scene_file);

	void showBitmapAt(const std::string &bitmapname, Uint16 from_count, Uint16 to_count, Uint16 x, Uint16 y);
Gerhard Stein's avatar
Gerhard Stein committed
35
	void setTimer(Uint16 timer) {	m_timer = timer;	}
Gerhard Stein's avatar
Gerhard Stein committed
36
    void ponder();
Gerhard Stein's avatar
Gerhard Stein committed
37
    void render(const int step);
Gerhard Stein's avatar
Gerhard Stein committed
38
    bool mustclose() { return m_mustclose; }
39 40 41 42

private:

	std::vector<bitmap_structure> m_BitmapVector;
43
	std::shared_ptr<SDL_Surface> mpSceneSurface;
Gerhard Stein's avatar
Gerhard Stein committed
44
	bool m_mustclose;    
Gerhard Stein's avatar
Gerhard Stein committed
45
    int m_timer; // Only used, if no Text to display is set. Example is the preview section
46 47 48
};

#endif /* CFINALESTATICSCENE_H_ */