summaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2005-01-15 17:49:01 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2005-01-15 17:49:01 +0000
commit8ed926ea15e8f151b8b81f93a5dccd0d53cf7ca1 (patch)
tree800d8d02db775b5f263eaee92c5cbf021d800e9f /src/game.cpp
parentc92d7c1188febd7c5af15fa710ab06c3af4dede5 (diff)
downloadmana-8ed926ea15e8f151b8b81f93a5dccd0d53cf7ca1.tar.gz
mana-8ed926ea15e8f151b8b81f93a5dccd0d53cf7ca1.tar.bz2
mana-8ed926ea15e8f151b8b81f93a5dccd0d53cf7ca1.tar.xz
mana-8ed926ea15e8f151b8b81f93a5dccd0d53cf7ca1.zip
Cleaned up includes, separated engine from graphics and single buffer now
used throughout application, cleaned up shop functions.
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/game.cpp b/src/game.cpp
index a4cde620..142cfbe2 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -122,7 +122,7 @@ short get_elapsed_time(short start_time) {
void game() {
do_init();
- GraphicEngine *graphicEngine = new GraphicEngine();
+ Engine *engine = new Engine();
//SDL_Event event;
//SDL_EnableUNICODE(1);
@@ -139,13 +139,13 @@ void game() {
//}
do_input();
- graphicEngine->refresh();
+ engine->draw();
+ graphics->updateScreen();
do_parse();
flush();
}
-
- delete graphicEngine;
+ delete engine;
close_session();
}
@@ -359,7 +359,7 @@ void do_parse() {
char direction;
Being *being = NULL;
PATH_NODE *pn;
- int len;
+ int len, n_items;
// We need at least 2 bytes to identify a packet
if (in_size >= 2) {
@@ -700,15 +700,15 @@ void do_parse() {
switch (RFIFOB(26)) {
case 0: // Damage
being = find_node(RFIFOL(6));
- if(being!=NULL) {
- if(being->speech!=NULL) {
+ if (being != NULL) {
+ if (being->speech != NULL) {
free(being->speech);
being->speech = NULL;
//being->speech_time = SPEECH_TIME;
}
being->speech = (char *)malloc(5);
memset(being->speech, '\0', 5);
- if(RFIFOW(22)==0) {
+ if (RFIFOW(22) == 0) {
sprintf(being->speech, "miss");
being->speech_color = makecol(255, 255, 0);
} else {