add some hacky code to allow passing sfc files with -b
[openc2e.git] / Blackboard.h
blobdad5121f3d664c8a5abf81c4c98cf1baf32ac6ba
1 /*
2 * Blackboard.h
3 * openc2e
5 * Created by Alyssa Milburn on Sat Jan 12 2008.
6 * Copyright (c) 2008 Alyssa Milburn. All rights reserved.
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
20 #include "CompoundAgent.h"
22 #ifndef _C2E_BLACKBOARD_H
23 #define _C2E_BLACKBOARD_H
25 class Blackboard : public CompoundAgent {
26 friend class BlackboardPart;
28 protected:
29 // configuration
30 unsigned int textx, texty;
31 unsigned int backgroundcolour, chalkcolour, aliascolour;
33 // state
34 std::vector<std::pair<unsigned int, std::string> > strings;
35 std::string currenttext;
37 void renderText(class Surface *renderer, int xoffset, int yoffset);
39 public:
40 Blackboard(unsigned char family, unsigned char genus, unsigned short species, unsigned int plane,
41 std::string spritefile, unsigned int firstimage, unsigned int imagecount, unsigned int tx,
42 unsigned int ty, unsigned int bgcolour, unsigned int ckcolour, unsigned int alcolour);
43 Blackboard(std::string spritefile, unsigned int firstimage, unsigned int imagecount,
44 unsigned int tx, unsigned int ty, unsigned int bgcolour, unsigned int ckcolour,
45 unsigned int alcolour);
47 void addBlackboardString(unsigned int n, unsigned int id, std::string text);
48 void showText(bool show);
51 class BlackboardPart : public CompoundPart {
52 friend class Blackboard;
54 protected:
55 BlackboardPart(Blackboard *p, unsigned int _id);
57 public:
58 void partRender(class Surface *renderer, int xoffset, int yoffset);
59 unsigned int getWidth() { return 0; }
60 unsigned int getHeight() { return 0; }
63 #endif
64 /* vim: set noet: */