From a1c4468c5994a5248c8369b306bc18b76276cb32 Mon Sep 17 00:00:00 2001
From: "p.kosyh"
Date: Mon, 22 Nov 2010 08:20:13 +0000
Subject: [PATCH] fixes 1.3.1
---
Makefile.mingw32ce | 2 +-
PKGBUILD.in | 2 +-
Rules.make.macosx | 2 +-
Rules.make.standalone | 2 +-
Rules.make.system | 2 +-
Rules.mingw | 2 +-
Rules.windows | 2 +-
debian/changelog | 6 ++++++
desktop/instead.desktop.in | 2 +-
instead.spec | 2 +-
readme.txt | 2 +-
setup-kit.iss | 4 ++--
setup.iss | 4 ++--
src/sdl-instead/graphics.c | 18 ++++++++++++++++--
stead/stead.lua | 2 +-
15 files changed, 37 insertions(+), 17 deletions(-)
diff --git a/Makefile.mingw32ce b/Makefile.mingw32ce
index 95e5d61..404579a 100644
--- a/Makefile.mingw32ce
+++ b/Makefile.mingw32ce
@@ -1,4 +1,4 @@
-VERSION := 1.3.0
+VERSION := 1.3.1
PREFIX=./
DESTDIR=
diff --git a/PKGBUILD.in b/PKGBUILD.in
index 777e6ec..128d588 100644
--- a/PKGBUILD.in
+++ b/PKGBUILD.in
@@ -1,6 +1,6 @@
# Contributor: Peter Kosyh
pkgname=instead
-pkgver=1.3.0
+pkgver=1.3.1
pkgrel=1
pkgdesc="instead quest interpreter"
arch=('i686' 'x86_64')
diff --git a/Rules.make.macosx b/Rules.make.macosx
index 422f16c..c6c7f37 100644
--- a/Rules.make.macosx
+++ b/Rules.make.macosx
@@ -1,4 +1,4 @@
-VERSION := 1.3.0
+VERSION := 1.3.1
DESTDIR=
BIN=
diff --git a/Rules.make.standalone b/Rules.make.standalone
index 0b22e68..413f10f 100644
--- a/Rules.make.standalone
+++ b/Rules.make.standalone
@@ -1,4 +1,4 @@
-VERSION := 1.3.0
+VERSION := 1.3.1
DESTDIR=
BIN=
diff --git a/Rules.make.system b/Rules.make.system
index 0f0eb8e..f4e36e0 100644
--- a/Rules.make.system
+++ b/Rules.make.system
@@ -1,4 +1,4 @@
-VERSION := 1.3.0
+VERSION := 1.3.1
PREFIX=/usr/local
DESTDIR=
diff --git a/Rules.mingw b/Rules.mingw
index f42ca19..4a3dc02 100644
--- a/Rules.mingw
+++ b/Rules.mingw
@@ -1,4 +1,4 @@
-VERSION := 1.3.0
+VERSION := 1.3.1
PREFIX=./
DESTDIR=
diff --git a/Rules.windows b/Rules.windows
index 6683794..80b91c1 100644
--- a/Rules.windows
+++ b/Rules.windows
@@ -1,4 +1,4 @@
-VERSION := 1.3.0
+VERSION := 1.3.1
PREFIX=
DESTDIR=
diff --git a/debian/changelog b/debian/changelog
index 3da52bf..197f5a5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+instead (1.3.1) unstable; urgency=low
+
+ * bug fix (imgl and justify);
+
+ -- Peter Kosyh Mon, 22 Nov 2010 11:17:00 +0300
+
instead (1.3.0) unstable; urgency=low
* bug fix (resample sounds while HZ change);
diff --git a/desktop/instead.desktop.in b/desktop/instead.desktop.in
index a9a6ebb..cfc106e 100644
--- a/desktop/instead.desktop.in
+++ b/desktop/instead.desktop.in
@@ -1,6 +1,6 @@
[Desktop Entry]
Encoding=UTF-8
-Version=1.3.0
+Version=1.3.1
Type=Application
Name=INSTEAD
Name[ru]=INSTEAD
diff --git a/instead.spec b/instead.spec
index 8cc5958..bee1989 100644
--- a/instead.spec
+++ b/instead.spec
@@ -1,6 +1,6 @@
Summary: simply text adventures/visual novels engine and game
Name: instead
-Version: 1.3.0
+Version: 1.3.1
Release: 1%{?dist}
License: GPLv2
URL: http://instead.googlecode.com
diff --git a/readme.txt b/readme.txt
index fd2e463..e643f0b 100644
--- a/readme.txt
+++ b/readme.txt
@@ -1,4 +1,4 @@
-INSTEAD 1.3.0
+INSTEAD 1.3.1
=============
WARNING! For successfull building you must install these development packages (names may vary in your distribution):
diff --git a/setup-kit.iss b/setup-kit.iss
index 0880b73..33fa14c 100644
--- a/setup-kit.iss
+++ b/setup-kit.iss
@@ -1,11 +1,11 @@
[Setup]
AppName=INSTEAD-KIT
-AppVerName=INSTEAD 1.3.0
+AppVerName=INSTEAD 1.3.1
DefaultDirName={pf}\Pinebrush games\INSTEAD
DefaultGroupName=Pinebrush games
UninstallDisplayIcon={app}\sdl-instead.exe
OutputDir=.
-OutputBaseFilename=instead-kit-1.3.0
+OutputBaseFilename=instead-kit-1.3.1
AllowNoIcons=true
[Languages]
diff --git a/setup.iss b/setup.iss
index b2ea1e7..0470c81 100644
--- a/setup.iss
+++ b/setup.iss
@@ -1,11 +1,11 @@
[Setup]
AppName=INSTEAD
-AppVerName=INSTEAD 1.3.0
+AppVerName=INSTEAD 1.3.1
DefaultDirName={pf}\Pinebrush games\INSTEAD
DefaultGroupName=Pinebrush games
UninstallDisplayIcon={app}\sdl-instead.exe
OutputDir=.
-OutputBaseFilename=instead-1.3.0
+OutputBaseFilename=instead-1.3.1
AllowNoIcons=true
[Languages]
diff --git a/src/sdl-instead/graphics.c b/src/sdl-instead/graphics.c
index cc42798..6c079bc 100644
--- a/src/sdl-instead/graphics.c
+++ b/src/sdl-instead/graphics.c
@@ -1408,6 +1408,20 @@ struct line *line_new(void)
return l;
}
+int line_empty(struct line *line)
+{
+ struct word *w;
+ w = line->words;
+ while (w) {
+ if (w->img_align) {
+ w = w->next;
+ continue;
+ }
+ return 0;
+ }
+ return 1;
+}
+
void line_justify(struct line *line, int width)
{
int x = 0;
@@ -3220,7 +3234,7 @@ void _txt_layout_add(layout_t lay, char *txt)
}
nl = !*p;
- if (!line->h && !img_align && !line->num) /* first word ? */
+ if (!line->h && !img_align && line_empty(line)) /* first word ? */
line->h = h;
if (img_align && !line->w)
@@ -3266,7 +3280,7 @@ void _txt_layout_add(layout_t lay, char *txt)
goto err;
}
word->valign = layout->valign;
- if (!sp && line->num)
+ if (!sp && !line_empty(line))
word->unbrake = 1;
word->style = layout->style;
diff --git a/stead/stead.lua b/stead/stead.lua
index d8b7916..f071ad4 100644
--- a/stead/stead.lua
+++ b/stead/stead.lua
@@ -1,5 +1,5 @@
stead = {
- version = "1.3.0",
+ version = "1.3.1",
api_version = "1.1.6", -- last version before 1.2.0
table = table,
delim = ',',