From b7cded07732a85204b7e251d51cf4538a58ce374 Mon Sep 17 00:00:00 2001 From: Jan-Fabian Humann Date: Tue, 1 Mar 2005 22:46:37 +0000 Subject: Deleting subx and suby for items, because it's useless --- src/floor_item.cpp | 1 - src/floor_item.h | 1 - src/game.cpp | 18 ++++++------------ src/graphic/graphic.cpp | 10 ++-------- 4 files changed, 8 insertions(+), 22 deletions(-) diff --git a/src/floor_item.cpp b/src/floor_item.cpp index fb974356..5aacfeb8 100755 --- a/src/floor_item.cpp +++ b/src/floor_item.cpp @@ -75,7 +75,6 @@ FloorItem *find_floor_item_by_id(unsigned int int_id) { FloorItem::FloorItem() { id = 0; int_id = 0; x = 0; y = 0; - subx = 0; suby = 0; } FloorItem::~FloorItem() { diff --git a/src/floor_item.h b/src/floor_item.h index 61a62804..1f0baa6b 100755 --- a/src/floor_item.h +++ b/src/floor_item.h @@ -33,7 +33,6 @@ class FloorItem { unsigned int id; unsigned int int_id; unsigned short x, y; - unsigned short subx, suby; /** * Constructor. diff --git a/src/game.cpp b/src/game.cpp index c3157aab..b089b234 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -166,7 +166,6 @@ void do_input() while (SDL_PollEvent(&event)) { bool used = false; - // For discontinuous keys if (event.type == SDL_KEYDOWN) { @@ -347,13 +346,12 @@ void do_input() } } - } - } - - // Push input to GUI when not used - if (!used) { - guiInput->pushInput(event); - } + } + } + // Push input to GUI when not used + if (!used) { + guiInput->pushInput(event); + } } // End while @@ -1044,8 +1042,6 @@ void do_parse() { floorItem->id = net_w_value(RFIFOW(6)); floorItem->x = net_w_value(RFIFOW(9)); floorItem->y = net_w_value(RFIFOW(11)); - floorItem->subx = net_b_value(RFIFOB(15)); - floorItem->suby = net_b_value(RFIFOB(16)); floorItem->int_id = net_l_value(RFIFOL(2)); add_floor_item(floorItem); break; @@ -1055,8 +1051,6 @@ void do_parse() { floorItem->id = net_w_value(RFIFOW(6)); floorItem->x = net_w_value(RFIFOW(9)); floorItem->y = net_w_value(RFIFOW(11)); - floorItem->subx = net_b_value(RFIFOB(13)); - floorItem->suby = net_b_value(RFIFOB(14)); floorItem->int_id = net_l_value(RFIFOL(2)); add_floor_item(floorItem); break; diff --git a/src/graphic/graphic.cpp b/src/graphic/graphic.cpp index 98b1319c..0d8a926b 100644 --- a/src/graphic/graphic.cpp +++ b/src/graphic/graphic.cpp @@ -401,14 +401,8 @@ void Engine::draw() unsigned short y = floorItem->y; int sx = x - camera_x; int sy = y - camera_y; - int absx = sx * 32 - floorItem->subx - offset_x; - int absy = sy * 32 - floorItem->suby - offset_y; - /** - * subx and suby are serverside randomly generated to be - * either 3, 6, 9 or 12. - * this seems to be a finer differentiation for coordinates. - * TODO: Find a better way to implement subx and suby. - */ + int absx = sx * 32 - offset_x; + int absy = sy * 32 - offset_y; if (floorItem->id >= 501 && floorItem->id <= 1202) { itemset->spriteset[floorItem->id - 501]->draw(screen, absx, -- cgit v1.2.3-70-g09d2