(svn r9297) [NoAI] -Fix: regression-test shows that 64bit systems gave other results for INVALID_TILE then 32bit system. Now they both act like the 32bit system.
[NoAI] -Update: updated regression-test to show 32bit output
--- a/bin/ai/regression/regression.txt Sun Mar 18 21:22:48 2007 +0000
+++ b/bin/ai/regression/regression.txt Sun Mar 18 21:31:57 2007 +0000
@@ -4,9 +4,9 @@
TickTest: 1
--AIBase--
- Rand(): 3480652716
+ Rand(): -814314580
Rand(): 959788226
- Rand(): 2922153337
+ Rand(): -1372813959
RandRange(0): 0
RandRange(0): 0
RandRange(0): 0
@@ -161,7 +161,7 @@
Industry -1
IsValidIndustry(): false
GetName(): (null : 0x00000000)
- GetLocation(): 4294967295
+ GetLocation(): -1
Industry 0
IsValidIndustry(): true
GetName(): Kennville Oil Refinery
@@ -441,11 +441,11 @@
Industry 69
IsValidIndustry(): false
GetName(): (null : 0x00000000)
- GetLocation(): 4294967295
+ GetLocation(): -1
Industry 70
IsValidIndustry(): false
GetName(): (null : 0x00000000)
- GetLocation(): 4294967295
+ GetLocation(): -1
Valid Industries: 69
GetIndustryCount(): 69
@@ -471,7 +471,7 @@
IsValidTown(): false
GetName(): (null : 0x00000000)
GetPopulation(): 0
- GetLocation(): 4294967295
+ GetLocation(): -1
Town 0
IsValidTown(): true
GetName(): Planfield
@@ -616,16 +616,16 @@
IsValidTown(): false
GetName(): (null : 0x00000000)
GetPopulation(): 0
- GetLocation(): 4294967295
+ GetLocation(): -1
Town 29
IsValidTown(): false
GetName(): (null : 0x00000000)
GetPopulation(): 0
- GetLocation(): 4294967295
+ GetLocation(): -1
Town 30
IsValidTown(): false
GetName(): (null : 0x00000000)
GetPopulation(): 0
- GetLocation(): 4294967295
+ GetLocation(): -1
Valid Industries: 28
GetTownCount(): 28
--- a/src/squirrel_helper.cpp Sun Mar 18 21:22:48 2007 +0000
+++ b/src/squirrel_helper.cpp Sun Mar 18 21:31:57 2007 +0000
@@ -5,9 +5,9 @@
#include "stdafx.h"
#include "squirrel_helper.hpp"
-template <> int SQConvert::Return<uint8> (HSQUIRRELVM vm, uint8 res) { sq_pushinteger(vm, res); return 1; }
-template <> int SQConvert::Return<uint16>(HSQUIRRELVM vm, uint16 res) { sq_pushinteger(vm, res); return 1; }
-template <> int SQConvert::Return<uint32>(HSQUIRRELVM vm, uint32 res) { sq_pushinteger(vm, res); return 1; }
+template <> int SQConvert::Return<uint8> (HSQUIRRELVM vm, uint8 res) { sq_pushinteger(vm, (int32)res); return 1; }
+template <> int SQConvert::Return<uint16>(HSQUIRRELVM vm, uint16 res) { sq_pushinteger(vm, (int32)res); return 1; }
+template <> int SQConvert::Return<uint32>(HSQUIRRELVM vm, uint32 res) { sq_pushinteger(vm, (int32)res); return 1; }
template <> int SQConvert::Return<int8> (HSQUIRRELVM vm, int8 res) { sq_pushinteger(vm, res); return 1; }
template <> int SQConvert::Return<int16> (HSQUIRRELVM vm, int16 res) { sq_pushinteger(vm, res); return 1; }
template <> int SQConvert::Return<int32> (HSQUIRRELVM vm, int32 res) { sq_pushinteger(vm, res); return 1; }