From 68ebcb559fdb335485c6f684d4ab85f3bc0202d2 Mon Sep 17 00:00:00 2001 From: Eduardo Bart Date: Sun, 29 Jul 2012 09:04:47 -0300 Subject: [PATCH] Fixes for compiling with clang --- modules/game_market/market.lua | 24 ++++++++++++------------ src/framework/graphics/particlesystem.h | 1 + src/otclient/container.h | 1 + src/otclient/game.h | 2 ++ src/otclient/item.h | 1 + src/otclient/map.h | 1 + src/otclient/thingtype.h | 3 ++- src/otclient/tile.h | 3 +++ 8 files changed, 23 insertions(+), 13 deletions(-) diff --git a/modules/game_market/market.lua b/modules/game_market/market.lua index 23def568..0770a64a 100644 --- a/modules/game_market/market.lua +++ b/modules/game_market/market.lua @@ -196,21 +196,21 @@ local function updateDetails(itemId, descriptions, purchaseStats, saleStats) end end end - sellStatsTable:addRow({{['text'] = 'Total Transations:'}, + sellStatsTable:addRow({{['text'] = 'Total Transations:'}, {['text'] = transactions, ['width'] = 270}}) - sellStatsTable:addRow({{['text'] = 'Highest Price:'}, + sellStatsTable:addRow({{['text'] = 'Highest Price:'}, {['text'] = highestPrice, ['width'] = 270}}) if totalPrice > 0 and transactions > 0 then - sellStatsTable:addRow({{['text'] = 'Average Price:'}, + sellStatsTable:addRow({{['text'] = 'Average Price:'}, {['text'] = math.floor(totalPrice/transactions), ['width'] = 270}}) else - sellStatsTable:addRow({{['text'] = 'Average Price:'}, + sellStatsTable:addRow({{['text'] = 'Average Price:'}, {['text'] = 0, ['width'] = 270}}) end - sellStatsTable:addRow({{['text'] = 'Lowest Price:'}, + sellStatsTable:addRow({{['text'] = 'Lowest Price:'}, {['text'] = lowestPrice, ['width'] = 270}}) end @@ -235,21 +235,21 @@ local function updateDetails(itemId, descriptions, purchaseStats, saleStats) end end end - buyStatsTable:addRow({{['text'] = 'Total Transations:'}, + buyStatsTable:addRow({{['text'] = 'Total Transations:'}, {['text'] = transactions, ['width'] = 270}}) - buyStatsTable:addRow({{['text'] = 'Highest Price:'}, + buyStatsTable:addRow({{['text'] = 'Highest Price:'}, {['text'] = highestPrice, ['width'] = 270}}) if totalPrice > 0 and transactions > 0 then - buyStatsTable:addRow({{['text'] = 'Average Price:'}, + buyStatsTable:addRow({{['text'] = 'Average Price:'}, {['text'] = math.floor(totalPrice/transactions), ['width'] = 270}}) else - buyStatsTable:addRow({{['text'] = 'Average Price:'}, + buyStatsTable:addRow({{['text'] = 'Average Price:'}, {['text'] = 0, ['width'] = 270}}) end - buyStatsTable:addRow({{['text'] = 'Lowest Price:'}, + buyStatsTable:addRow({{['text'] = 'Lowest Price:'}, {['text'] = lowestPrice, ['width'] = 270}}) end end @@ -445,7 +445,7 @@ end local function initMarketItems() -- populate all market items marketItems = {} - local types = g_things.findThingTypeByAttr(ThingAttrMarket) + local types = g_things.findThingTypeByAttr(ThingAttrMarket, 0) for i = 1, #types do local t = types[i] local newItem = Item.create(t:getId()) @@ -571,7 +571,7 @@ function init() g_ui.importStyle('ui/general/markettabs.otui') g_ui.importStyle('ui/general/marketbuttons.otui') g_ui.importStyle('ui/general/marketcombobox.otui') - + protocol.initProtocol() connect(g_game, { onGameEnd = Market.reset }) marketWindow = g_ui.createWidget('MarketWindow', rootWidget) diff --git a/src/framework/graphics/particlesystem.h b/src/framework/graphics/particlesystem.h index a432b6ef..9c203998 100644 --- a/src/framework/graphics/particlesystem.h +++ b/src/framework/graphics/particlesystem.h @@ -24,6 +24,7 @@ #define PARTICLESYSTEM_H #include "declarations.h" +#include "particle.h" #include "particleemitter.h" #include "particleaffector.h" diff --git a/src/otclient/container.h b/src/otclient/container.h index 30b6bdf3..3976f034 100644 --- a/src/otclient/container.h +++ b/src/otclient/container.h @@ -24,6 +24,7 @@ #define CONTAINER_H #include "declarations.h" +#include "item.h" #include diff --git a/src/otclient/game.h b/src/otclient/game.h index 0bd4e3e1..7b143c67 100644 --- a/src/otclient/game.h +++ b/src/otclient/game.h @@ -25,6 +25,8 @@ #include "declarations.h" #include "item.h" +#include "animatedtext.h" +#include "effect.h" #include "creature.h" #include "container.h" #include "protocolgame.h" diff --git a/src/otclient/item.h b/src/otclient/item.h index d9fb5113..cf879a0f 100644 --- a/src/otclient/item.h +++ b/src/otclient/item.h @@ -25,6 +25,7 @@ #include #include "thing.h" +#include "effect.h" #include "itemtype.h" enum ItemAttr : uint8 diff --git a/src/otclient/map.h b/src/otclient/map.h index 9276886d..7d3cf4d1 100644 --- a/src/otclient/map.h +++ b/src/otclient/map.h @@ -29,6 +29,7 @@ #include "creatures.h" #include "animatedtext.h" #include "statictext.h" +#include "tile.h" #include diff --git a/src/otclient/thingtype.h b/src/otclient/thingtype.h index d307cd2e..36752419 100644 --- a/src/otclient/thingtype.h +++ b/src/otclient/thingtype.h @@ -24,8 +24,9 @@ #define THINGTYPE_H #include "declarations.h" + #include -#include +#include #include #include #include diff --git a/src/otclient/tile.h b/src/otclient/tile.h index 305e9c37..a45f0e79 100644 --- a/src/otclient/tile.h +++ b/src/otclient/tile.h @@ -24,6 +24,9 @@ #define TILE_H #include "declarations.h" +#include "effect.h" +#include "creature.h" +#include "item.h" #include enum tileflags_t