diff options
author | Jan-Fabian Humann <malastare@gmx.net> | 2005-03-01 22:46:37 +0000 |
---|---|---|
committer | Jan-Fabian Humann <malastare@gmx.net> | 2005-03-01 22:46:37 +0000 |
commit | b7cded07732a85204b7e251d51cf4538a58ce374 (patch) | |
tree | 039358abb935e74c4fcc7cd36daf9f09f4a39f11 /src | |
parent | 28e644b9a72bc41a5403cfcb282c5ca2aa372fa1 (diff) | |
download | mana-client-b7cded07732a85204b7e251d51cf4538a58ce374.tar.gz mana-client-b7cded07732a85204b7e251d51cf4538a58ce374.tar.bz2 mana-client-b7cded07732a85204b7e251d51cf4538a58ce374.tar.xz mana-client-b7cded07732a85204b7e251d51cf4538a58ce374.zip |
Deleting subx and suby for items, because it's useless
Diffstat (limited to 'src')
-rwxr-xr-x | src/floor_item.cpp | 1 | ||||
-rwxr-xr-x | src/floor_item.h | 1 | ||||
-rw-r--r-- | src/game.cpp | 18 | ||||
-rw-r--r-- | 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, |