mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-01-31 03:12:41 +00:00
(svn r17081) [0.7] -Backport from trunk:
- Fix: [NewGRF] Mark house tiles dirty when triggers were triggered (r17047) - Fix: [NewGRF] Trigger house trigger 02 only for the north tile [FS#3085] (r17046) - Fix: Graphical glitch with graph key [FS#3083] (r17041) - Fix: "[bd]ash"-ism in configure [FS#3076] (r17026) - Fix: Infinite recursion in content dependency checking [FS#3075] (r17015) - Fix: Concatenating strings in Squirrel when non-ASCII strings were received from OpenTTD failed [FS#3074] (r17013)
This commit is contained in:
parent
ad2c54d119
commit
a61574a033
@ -1407,7 +1407,9 @@ make_cflags_and_ldflags() {
|
||||
# Also make makedepend aware of compiler's built-in defines.
|
||||
if [ "$with_makedepend" != "0" ]; then
|
||||
cflags_makedep="`echo | $cxx_host -E -x c++ -dM - | sed 's@.define @-D@g;s@ .*@ @g;s@(.*)@@g' | tr -d '\r\n'`"
|
||||
cflags_makedep="$cflags_makedep `echo "$CFLAGS" | sed 's@ /@ -@g;s@-I[ ]*[^ ]*@@g'`"
|
||||
|
||||
# Please escape ALL " within ` because e.g. "" terminates the string in some sh implementations
|
||||
cflags_makedep="$cflags_makedep `echo \"$CFLAGS\" | sed 's@ /@ -@g;s@-I[ ]*[^ ]*@@g'`"
|
||||
else
|
||||
makedepend=""
|
||||
fi
|
||||
|
18
configure
vendored
18
configure
vendored
@ -85,7 +85,7 @@ if [ ! -f "$LANG_DIR/english.txt" ]; then
|
||||
fi
|
||||
|
||||
# Read the source.list and process it
|
||||
SRCS="`< $ROOT_DIR/source.list tr '\r' '\n' | $awk '
|
||||
AWKCOMMAND='
|
||||
{ }
|
||||
/^( *)#end/ { if (deep == skip) { skip -= 1; } deep -= 1; next; }
|
||||
/^( *)#else/ { if (deep == skip) { skip -= 1; } else if (deep - 1 == skip) { skip += 1; } next; }
|
||||
@ -130,13 +130,17 @@ SRCS="`< $ROOT_DIR/source.list tr '\r' '\n' | $awk '
|
||||
print $0;
|
||||
}
|
||||
}
|
||||
' | $PIPE_SORT`"
|
||||
'
|
||||
|
||||
OBJS_C="` echo \"$SRCS\" | $awk ' { ORS = " " } /\.c$/ { gsub(".c$", ".o", $0); print $0; }'`"
|
||||
OBJS_CPP="`echo \"$SRCS\" | $awk ' { ORS = " " } /\.cpp$/ { gsub(".cpp$", ".o", $0); print $0; }'`"
|
||||
OBJS_MM="` echo \"$SRCS\" | $awk ' { ORS = " " } /\.mm$/ { gsub(".mm$", ".o", $0); print $0; }'`"
|
||||
OBJS_RC="` echo \"$SRCS\" | $awk ' { ORS = " " } /\.rc$/ { gsub(".rc$", ".o", $0); print $0; }'`"
|
||||
SRCS="` echo \"$SRCS\" | $awk ' { ORS = " " } { print $0; }'`"
|
||||
# Read the source.list and process it
|
||||
# Please escape ALL " within ` because e.g. "" terminates the string in some sh implementations
|
||||
SRCS="`< $ROOT_DIR/source.list tr '\r' '\n' | $awk \"$AWKCOMMAND\" | $PIPE_SORT`"
|
||||
|
||||
OBJS_C="` echo \"$SRCS\" | $awk ' { ORS = \" \" } /\.c$/ { gsub(\".c$\", \".o\", $0); print $0; }'`"
|
||||
OBJS_CPP="`echo \"$SRCS\" | $awk ' { ORS = \" \" } /\.cpp$/ { gsub(\".cpp$\", \".o\", $0); print $0; }'`"
|
||||
OBJS_MM="` echo \"$SRCS\" | $awk ' { ORS = \" \" } /\.mm$/ { gsub(\".mm$\", \".o\", $0); print $0; }'`"
|
||||
OBJS_RC="` echo \"$SRCS\" | $awk ' { ORS = \" \" } /\.rc$/ { gsub(\".rc$\", \".o\", $0); print $0; }'`"
|
||||
SRCS="` echo \"$SRCS\" | $awk ' { ORS = \" \" } { print $0; }'`"
|
||||
|
||||
# In makefiles, we always use -u for sort
|
||||
if [ -z "$sort" ]; then
|
||||
|
29
readme.txt
29
readme.txt
@ -17,6 +17,7 @@ Table of Contents:
|
||||
5.0) OpenTTD features
|
||||
6.0) Configuration File
|
||||
7.0) Compiling
|
||||
* 7.1) Required/optional libraries
|
||||
8.0) Translating
|
||||
* 8.1 Guidelines
|
||||
* 8.2 Translation
|
||||
@ -319,18 +320,12 @@ Windows:
|
||||
You can also build it using the Makefile with MSYS/MinGW or Cygwin/MinGW.
|
||||
Please read the Makefile for more information.
|
||||
|
||||
Solaris 10:
|
||||
You need g++ (version 3 or higher), together with SDL. Installation of
|
||||
libpng and zlib is recommended. For the first build it is required
|
||||
to execute "bash configure" first. Note that ./configure does not work
|
||||
yet. It is likely that you don't have a strip binary, so use the
|
||||
--disable-strip option in that case. Fontconfig (>2.3.0) and freetype
|
||||
are optional. "make run" will then run the program.
|
||||
Solaris, FreeBSD, OpenBSD:
|
||||
Use "gmake", but do a "./configure" before the first build.
|
||||
|
||||
Unix:
|
||||
Linux/Unix:
|
||||
OpenTTD can be built with GNU "make". On non-GNU systems it's called "gmake".
|
||||
However, for the first build one has to do a "./configure" first.
|
||||
Note that you need SDL-devel 1.2.5 (or higher) to compile OpenTTD.
|
||||
|
||||
MacOS X:
|
||||
Use "make" or Xcode (which will then call make for you)
|
||||
@ -342,15 +337,6 @@ MacOS X:
|
||||
BeOS:
|
||||
Use "make", but do a "./configure" before the first build.
|
||||
|
||||
FreeBSD:
|
||||
You need the port devel/sdl12 for a non-dedicated build.
|
||||
graphics/png is optional for screenshots in the PNG format.
|
||||
Use "gmake", but do a "./configure" before the first build.
|
||||
|
||||
OpenBSD:
|
||||
Use "gmake", but do a "./configure" before the first build.
|
||||
Note that you need the port devel/sdl to compile OpenTTD.
|
||||
|
||||
MorphOS:
|
||||
Use "make". However, for the first build one has to do a "./configure" first.
|
||||
Note that you need the MorphOS SDK, latest libnix updates (else C++ parts of
|
||||
@ -371,6 +357,8 @@ DOS:
|
||||
will be generated that does not need cwsdpmi.exe by adding the cswdstub.exe
|
||||
to the created OpenTTD binary.
|
||||
|
||||
7.1) Required/optional libraries:
|
||||
---- -------------------
|
||||
The following libraries are used by OpenTTD for:
|
||||
- libSDL/liballegro: hardware access (video, sound, mouse)
|
||||
- zlib: (de)compressing of savegames
|
||||
@ -379,6 +367,11 @@ The following libraries are used by OpenTTD for:
|
||||
- libfontconfig: searching for fonts, resolving font names to actual fonts
|
||||
- libicu: handling of right-to-left scripts (e.g. Arabic and Persian)
|
||||
|
||||
OpenTTD does not require any of the libraries to be present, but without
|
||||
zlib you cannot open most savegames or use the content downloading system.
|
||||
Without libSDL/liballegro on non-Windows and non-MacOS X machines you have
|
||||
no graphical user interface; you would be building a dedicated server.
|
||||
|
||||
8.0) Translating:
|
||||
---- -------------------
|
||||
See http://www.openttd.org/development for up-to-date information.
|
||||
|
@ -99,7 +99,7 @@ static const Widget _graph_legend_widgets[] = {
|
||||
};
|
||||
|
||||
static const WindowDesc _graph_legend_desc(
|
||||
WDP_AUTO, WDP_AUTO, 250, 198, 250, 198,
|
||||
WDP_AUTO, WDP_AUTO, 250, 196, 250, 196,
|
||||
WC_GRAPH_LEGEND, WC_NONE,
|
||||
WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET,
|
||||
_graph_legend_widgets
|
||||
|
@ -38,6 +38,7 @@ bool ContentInfo::IsSelected() const
|
||||
switch (this->state) {
|
||||
case ContentInfo::SELECTED:
|
||||
case ContentInfo::AUTOSELECTED:
|
||||
case ContentInfo::ALREADY_HERE:
|
||||
return true;
|
||||
|
||||
default:
|
||||
|
@ -245,7 +245,7 @@ void ClientNetworkContentSocketHandler::DownloadSelectedContent(uint &files, uin
|
||||
ContentID *ids = MallocT<ContentID>(infos.Length());
|
||||
for (ContentIterator iter = infos.Begin(); iter != infos.End(); iter++) {
|
||||
const ContentInfo *ci = *iter;
|
||||
if (!ci->IsSelected()) continue;
|
||||
if (!ci->IsSelected() || ci->state == ContentInfo::ALREADY_HERE) continue;
|
||||
|
||||
ids[files++] = ci->id;
|
||||
bytes += ci->filesize;
|
||||
|
@ -551,7 +551,7 @@ bool NewHouseTileLoop(TileIndex tile)
|
||||
}
|
||||
|
||||
TriggerHouse(tile, HOUSE_TRIGGER_TILE_LOOP);
|
||||
TriggerHouse(tile, HOUSE_TRIGGER_TILE_LOOP_TOP);
|
||||
if (hs->building_flags & BUILDING_HAS_1_TILE) TriggerHouse(tile, HOUSE_TRIGGER_TILE_LOOP_TOP);
|
||||
|
||||
if (HasBit(hs->callback_mask, CBM_HOUSE_ANIMATION_START_STOP)) {
|
||||
/* If this house is marked as having a synchronised callback, all the
|
||||
@ -580,6 +580,7 @@ bool NewHouseTileLoop(TileIndex tile)
|
||||
}
|
||||
|
||||
SetHouseProcessingTime(tile, hs->processing_time);
|
||||
MarkTileDirtyByTile(tile);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -615,7 +616,11 @@ static void DoTriggerHouse(TileIndex tile, HouseTrigger trigger, byte base_rando
|
||||
break;
|
||||
|
||||
case HOUSE_TRIGGER_TILE_LOOP_TOP:
|
||||
if (!first) break;
|
||||
if (!first) {
|
||||
/* The top tile is marked dirty by the usual TileLoop */
|
||||
MarkTileDirtyByTile(tile);
|
||||
break;
|
||||
}
|
||||
/* Random value of first tile already set. */
|
||||
if (hs->building_flags & BUILDING_2_TILES_Y) DoTriggerHouse(TILE_ADDXY(tile, 0, 1), trigger, random_bits, false);
|
||||
if (hs->building_flags & BUILDING_2_TILES_X) DoTriggerHouse(TILE_ADDXY(tile, 1, 0), trigger, random_bits, false);
|
||||
|
@ -80,8 +80,8 @@ namespace SQConvert {
|
||||
template <> inline int Return<int64> (HSQUIRRELVM vm, int64 res) { sq_pushinteger(vm, ClampToI32(res)); return 1; }
|
||||
template <> inline int Return<Money> (HSQUIRRELVM vm, Money res) { sq_pushinteger(vm, ClampToI32(res)); return 1; }
|
||||
template <> inline int Return<bool> (HSQUIRRELVM vm, bool res) { sq_pushbool (vm, res); return 1; }
|
||||
template <> inline int Return<char *> (HSQUIRRELVM vm, char *res) { if (res == NULL) sq_pushnull(vm); else {sq_pushstring (vm, OTTD2FS(res), strlen(res)); free(res);} return 1; }
|
||||
template <> inline int Return<const char *>(HSQUIRRELVM vm, const char *res) { if (res == NULL) sq_pushnull(vm); else {sq_pushstring (vm, OTTD2FS(res), strlen(res));} return 1; }
|
||||
template <> inline int Return<char *> (HSQUIRRELVM vm, char *res) { if (res == NULL) sq_pushnull(vm); else { sq_pushstring(vm, OTTD2FS(res), -1); free(res); } return 1; }
|
||||
template <> inline int Return<const char *>(HSQUIRRELVM vm, const char *res) { if (res == NULL) sq_pushnull(vm); else { sq_pushstring(vm, OTTD2FS(res), -1); } return 1; }
|
||||
template <> inline int Return<void *> (HSQUIRRELVM vm, void *res) { sq_pushuserpointer(vm, res); return 1; }
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user