Fixes for compiling with clang

This commit is contained in:
Eduardo Bart 2012-07-29 09:04:47 -03:00
parent 73769c62e4
commit 68ebcb559f
8 changed files with 23 additions and 13 deletions

View File

@ -196,21 +196,21 @@ local function updateDetails(itemId, descriptions, purchaseStats, saleStats)
end end
end end
end end
sellStatsTable:addRow({{['text'] = 'Total Transations:'}, sellStatsTable:addRow({{['text'] = 'Total Transations:'},
{['text'] = transactions, ['width'] = 270}}) {['text'] = transactions, ['width'] = 270}})
sellStatsTable:addRow({{['text'] = 'Highest Price:'}, sellStatsTable:addRow({{['text'] = 'Highest Price:'},
{['text'] = highestPrice, ['width'] = 270}}) {['text'] = highestPrice, ['width'] = 270}})
if totalPrice > 0 and transactions > 0 then if totalPrice > 0 and transactions > 0 then
sellStatsTable:addRow({{['text'] = 'Average Price:'}, sellStatsTable:addRow({{['text'] = 'Average Price:'},
{['text'] = math.floor(totalPrice/transactions), ['width'] = 270}}) {['text'] = math.floor(totalPrice/transactions), ['width'] = 270}})
else else
sellStatsTable:addRow({{['text'] = 'Average Price:'}, sellStatsTable:addRow({{['text'] = 'Average Price:'},
{['text'] = 0, ['width'] = 270}}) {['text'] = 0, ['width'] = 270}})
end end
sellStatsTable:addRow({{['text'] = 'Lowest Price:'}, sellStatsTable:addRow({{['text'] = 'Lowest Price:'},
{['text'] = lowestPrice, ['width'] = 270}}) {['text'] = lowestPrice, ['width'] = 270}})
end end
@ -235,21 +235,21 @@ local function updateDetails(itemId, descriptions, purchaseStats, saleStats)
end end
end end
end end
buyStatsTable:addRow({{['text'] = 'Total Transations:'}, buyStatsTable:addRow({{['text'] = 'Total Transations:'},
{['text'] = transactions, ['width'] = 270}}) {['text'] = transactions, ['width'] = 270}})
buyStatsTable:addRow({{['text'] = 'Highest Price:'}, buyStatsTable:addRow({{['text'] = 'Highest Price:'},
{['text'] = highestPrice, ['width'] = 270}}) {['text'] = highestPrice, ['width'] = 270}})
if totalPrice > 0 and transactions > 0 then if totalPrice > 0 and transactions > 0 then
buyStatsTable:addRow({{['text'] = 'Average Price:'}, buyStatsTable:addRow({{['text'] = 'Average Price:'},
{['text'] = math.floor(totalPrice/transactions), ['width'] = 270}}) {['text'] = math.floor(totalPrice/transactions), ['width'] = 270}})
else else
buyStatsTable:addRow({{['text'] = 'Average Price:'}, buyStatsTable:addRow({{['text'] = 'Average Price:'},
{['text'] = 0, ['width'] = 270}}) {['text'] = 0, ['width'] = 270}})
end end
buyStatsTable:addRow({{['text'] = 'Lowest Price:'}, buyStatsTable:addRow({{['text'] = 'Lowest Price:'},
{['text'] = lowestPrice, ['width'] = 270}}) {['text'] = lowestPrice, ['width'] = 270}})
end end
end end
@ -445,7 +445,7 @@ end
local function initMarketItems() local function initMarketItems()
-- populate all market items -- populate all market items
marketItems = {} marketItems = {}
local types = g_things.findThingTypeByAttr(ThingAttrMarket) local types = g_things.findThingTypeByAttr(ThingAttrMarket, 0)
for i = 1, #types do for i = 1, #types do
local t = types[i] local t = types[i]
local newItem = Item.create(t:getId()) local newItem = Item.create(t:getId())
@ -571,7 +571,7 @@ function init()
g_ui.importStyle('ui/general/markettabs.otui') g_ui.importStyle('ui/general/markettabs.otui')
g_ui.importStyle('ui/general/marketbuttons.otui') g_ui.importStyle('ui/general/marketbuttons.otui')
g_ui.importStyle('ui/general/marketcombobox.otui') g_ui.importStyle('ui/general/marketcombobox.otui')
protocol.initProtocol() protocol.initProtocol()
connect(g_game, { onGameEnd = Market.reset }) connect(g_game, { onGameEnd = Market.reset })
marketWindow = g_ui.createWidget('MarketWindow', rootWidget) marketWindow = g_ui.createWidget('MarketWindow', rootWidget)

View File

@ -24,6 +24,7 @@
#define PARTICLESYSTEM_H #define PARTICLESYSTEM_H
#include "declarations.h" #include "declarations.h"
#include "particle.h"
#include "particleemitter.h" #include "particleemitter.h"
#include "particleaffector.h" #include "particleaffector.h"

View File

@ -24,6 +24,7 @@
#define CONTAINER_H #define CONTAINER_H
#include "declarations.h" #include "declarations.h"
#include "item.h"
#include <framework/luaengine/luaobject.h> #include <framework/luaengine/luaobject.h>

View File

@ -25,6 +25,8 @@
#include "declarations.h" #include "declarations.h"
#include "item.h" #include "item.h"
#include "animatedtext.h"
#include "effect.h"
#include "creature.h" #include "creature.h"
#include "container.h" #include "container.h"
#include "protocolgame.h" #include "protocolgame.h"

View File

@ -25,6 +25,7 @@
#include <framework/global.h> #include <framework/global.h>
#include "thing.h" #include "thing.h"
#include "effect.h"
#include "itemtype.h" #include "itemtype.h"
enum ItemAttr : uint8 enum ItemAttr : uint8

View File

@ -29,6 +29,7 @@
#include "creatures.h" #include "creatures.h"
#include "animatedtext.h" #include "animatedtext.h"
#include "statictext.h" #include "statictext.h"
#include "tile.h"
#include <framework/core/clock.h> #include <framework/core/clock.h>

View File

@ -24,8 +24,9 @@
#define THINGTYPE_H #define THINGTYPE_H
#include "declarations.h" #include "declarations.h"
#include <framework/core/declarations.h> #include <framework/core/declarations.h>
#include <framework/graphics/declarations.h> #include <framework/graphics/texture.h>
#include <framework/graphics/coordsbuffer.h> #include <framework/graphics/coordsbuffer.h>
#include <framework/luaengine/luaobject.h> #include <framework/luaengine/luaobject.h>
#include <framework/net/server.h> #include <framework/net/server.h>

View File

@ -24,6 +24,9 @@
#define TILE_H #define TILE_H
#include "declarations.h" #include "declarations.h"
#include "effect.h"
#include "creature.h"
#include "item.h"
#include <framework/luaengine/luaobject.h> #include <framework/luaengine/luaobject.h>
enum tileflags_t enum tileflags_t