5 * Created by Alyssa Milburn on Tue Nov 28 2006.
6 * Copyright (c) 2006 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.
25 #include <boost/filesystem/path.hpp>
33 unsigned int tickdata
;
34 unsigned int ticktimes
[10];
35 unsigned int ticktimeptr
;
36 unsigned int lasttimestamp
;
38 bool w_down
, a_down
, s_down
, d_down
;
39 unsigned char *palette
;
41 bool cmdline_enable_sound
;
43 std::vector
<std::string
> cmdline_bootstrap
;
47 std::map
<std::string
, boost::shared_ptr
<Backend
> > possible_backends
;
48 std::map
<std::string
, boost::shared_ptr
<class AudioBackend
> > possible_audiobackends
;
49 std::string preferred_backend
, preferred_audiobackend
;
52 std::map
<caosVar
, caosVar
, caosVarCompare
> eame_variables
; // non-serialised
54 boost::shared_ptr
<Backend
> backend
;
55 boost::shared_ptr
<class AudioBackend
> audio
;
56 std::string
getBackendName() { return preferred_backend
; }
57 std::string
getAudioBackendName() { return preferred_audiobackend
; }
59 unsigned char *getPalette() { return palette
; }
61 std::string
getGameName() { return gamename
; }
64 bool dorendering
, fastticks
, refreshdisplay
;
70 void setBackend(boost::shared_ptr
<Backend
> b
);
71 std::string
executeNetwork(std::string in
);
73 unsigned int msUntilTick();
76 void handleKeyboardScrolling();
78 void handleResizedWindow(SomeEvent
&event
);
79 void handleMouseMove(SomeEvent
&event
);
80 void handleMouseButton(SomeEvent
&event
);
81 void handleKeyDown(SomeEvent
&event
);
82 void handleSpecialKeyDown(SomeEvent
&event
);
83 void handleSpecialKeyUp(SomeEvent
&event
);
85 void addPossibleBackend(std::string
, boost::shared_ptr
<Backend
>);
86 void addPossibleAudioBackend(std::string
, boost::shared_ptr
<AudioBackend
>);
88 bool parseCommandLine(int argc
, char *argv
[]);
92 bool noRun() { return cmdline_norun
; }
94 boost::filesystem::path
homeDirectory();
95 boost::filesystem::path
storageDirectory();