gfx in layouts. Undocumented? + version changes
This commit is contained in:
parent
9041380465
commit
cc4c772e23
|
@ -1,4 +1,4 @@
|
||||||
VERSION := \"0.9.1\"
|
VERSION := \"0.9.2\"
|
||||||
|
|
||||||
DESTDIR=
|
DESTDIR=
|
||||||
BIN=
|
BIN=
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
VERSION := \"0.9.1\"
|
VERSION := \"0.9.2\"
|
||||||
|
|
||||||
PREFIX=/usr/local
|
PREFIX=/usr/local
|
||||||
DESTDIR=
|
DESTDIR=
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
VERSION := \"0.9.1\"
|
VERSION := \"0.9.2\"
|
||||||
|
|
||||||
PREFIX=
|
PREFIX=
|
||||||
DESTDIR=
|
DESTDIR=
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[Desktop Entry]
|
[Desktop Entry]
|
||||||
Encoding=UTF-8
|
Encoding=UTF-8
|
||||||
Version=0.9.1
|
Version=0.9.2
|
||||||
Type=Application
|
Type=Application
|
||||||
Name=INSTEAD
|
Name=INSTEAD
|
||||||
Name[ru]=INSTEAD
|
Name[ru]=INSTEAD
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
</head><body brgcolor="#d6e7c9" bgcolor="#ffffff">
|
</head><body brgcolor="#d6e7c9" bgcolor="#ffffff">
|
||||||
<center>[ <a href="#info">What is it?</a> ] [ <a href="#screenshots">Screenshots</a> ] [ <a href="#download"> Download </a> ]</center>
|
<center>[ <a href="#info">What is it?</a> ] [ <a href="#screenshots">Screenshots</a> ] [ <a href="#download"> Download </a> ]</center>
|
||||||
<hr>
|
<hr>
|
||||||
<center><h2>INSTEAD 0.9.1 — interpreter of simple text adventures </h2></center>
|
<center><h2>INSTEAD 0.9.2 — interpreter of simple text adventures </h2></center>
|
||||||
<h1><a name="info">What is it?</a></h1>
|
<h1><a name="info">What is it?</a></h1>
|
||||||
<p align="justify">The interpreter of STEAD (Simple Text Adventures) allows to play games, combining visual novels, text adventure and classic quests of 1990-s. The STEAD games features are: </p>
|
<p align="justify">The interpreter of STEAD (Simple Text Adventures) allows to play games, combining visual novels, text adventure and classic quests of 1990-s. The STEAD games features are: </p>
|
||||||
<ul>
|
<ul>
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
</head><body brgcolor="#d6e7c9" bgcolor="#ffffff">
|
</head><body brgcolor="#d6e7c9" bgcolor="#ffffff">
|
||||||
<center>[ <a href="#info">Что это такое?</a> ] [ <a href="#screenshots">Скриншоты</a> ] [ <a href="#download"> Скачать </a> ]</center>
|
<center>[ <a href="#info">Что это такое?</a> ] [ <a href="#screenshots">Скриншоты</a> ] [ <a href="#download"> Скачать </a> ]</center>
|
||||||
<hr>
|
<hr>
|
||||||
<center><h2>INSTEAD 0.9.1 -- интерпретатор простых текстовых приключений для Unix</h2></center>
|
<center><h2>INSTEAD 0.9.2 -- интерпретатор простых текстовых приключений для Unix</h2></center>
|
||||||
<h1><a name="info">Что это такое?</a></h1>
|
<h1><a name="info">Что это такое?</a></h1>
|
||||||
<p align="justify">Интерпретатор STEAD (Simply Text Adventure) позволяет проигрывать игры, которые по жанру являются
|
<p align="justify">Интерпретатор STEAD (Simply Text Adventure) позволяет проигрывать игры, которые по жанру являются
|
||||||
смесью визуальной новеллы, текстового квеста и классических квестов 90-х. Особенности STEAD игры:</p>
|
смесью визуальной новеллы, текстового квеста и классических квестов 90-х. Особенности STEAD игры:</p>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
.TH INSTEAD 6 "Version 0.9.1" Instead GAMES
|
.TH INSTEAD 6 "Version 0.9.2" Instead GAMES
|
||||||
|
|
||||||
.SH NAME
|
.SH NAME
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ Runs the game in fullscreen mode.
|
||||||
.B -window
|
.B -window
|
||||||
Runs the game in windowed mode.
|
Runs the game in windowed mode.
|
||||||
.TP
|
.TP
|
||||||
.B -noautosave <path>
|
.B -noautosave
|
||||||
Disable autosave/autoload.
|
Disable autosave/autoload.
|
||||||
.PP
|
.PP
|
||||||
Configuration file name is 'insteadrc' and it's located in ~/.instead/.
|
Configuration file name is 'insteadrc' and it's located in ~/.instead/.
|
||||||
|
|
|
@ -1044,6 +1044,7 @@ struct image {
|
||||||
struct image *next;
|
struct image *next;
|
||||||
char *name;
|
char *name;
|
||||||
img_t image;
|
img_t image;
|
||||||
|
int free_it;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct image *image_new(const char *name, img_t img)
|
struct image *image_new(const char *name, img_t img)
|
||||||
|
@ -1054,6 +1055,7 @@ struct image *image_new(const char *name, img_t img)
|
||||||
g->image = img;
|
g->image = img;
|
||||||
g->name = strdup(name);
|
g->name = strdup(name);
|
||||||
g->next = NULL;
|
g->next = NULL;
|
||||||
|
g->free_it = 0;
|
||||||
return g;
|
return g;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1063,7 +1065,8 @@ void image_free(struct image *image)
|
||||||
return;
|
return;
|
||||||
if (image->name)
|
if (image->name)
|
||||||
free(image->name);
|
free(image->name);
|
||||||
// gfx_free_image(image->image);
|
if (image->free_it)
|
||||||
|
gfx_free_image(image->image);
|
||||||
free(image);
|
free(image);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1927,6 +1930,7 @@ void txt_layout_update_links(layout_t layout, int x, int y, clear_fn clear)
|
||||||
txt_layout_draw_ex(lay, lay->lines, x, y, 0, lay->h, clear);
|
txt_layout_draw_ex(lay, lay->lines, x, y, 0, lay->h, clear);
|
||||||
// gfx_noclip();
|
// gfx_noclip();
|
||||||
}
|
}
|
||||||
|
|
||||||
img_t get_img(struct layout *layout, char *p)
|
img_t get_img(struct layout *layout, char *p)
|
||||||
{
|
{
|
||||||
int len;
|
int len;
|
||||||
|
@ -1942,6 +1946,16 @@ img_t get_img(struct layout *layout, char *p)
|
||||||
return NULL;
|
return NULL;
|
||||||
p[len] = 0;
|
p[len] = 0;
|
||||||
img = layout_lookup_image(layout, p);
|
img = layout_lookup_image(layout, p);
|
||||||
|
if (!img && (img = gfx_load_image(p))) {
|
||||||
|
struct image *image = image_new(p, img);
|
||||||
|
if (!image) {
|
||||||
|
gfx_free_image(img);
|
||||||
|
img = NULL;
|
||||||
|
} else {
|
||||||
|
layout_add_image(layout, image);
|
||||||
|
image->free_it = 1; /* free on layout destroy */
|
||||||
|
}
|
||||||
|
}
|
||||||
p[len] = '>';
|
p[len] = '>';
|
||||||
return img;
|
return img;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
game.hinting = true;
|
game.hinting = true;
|
||||||
game.showlast = true;
|
game.showlast = true;
|
||||||
|
|
||||||
|
iface.img = function(self, str)
|
||||||
|
return "<g:"..str..">";
|
||||||
|
end;
|
||||||
|
|
||||||
iface.xref = function(self, str, obj)
|
iface.xref = function(self, str, obj)
|
||||||
local o = ref(here():srch(obj));
|
local o = ref(here():srch(obj));
|
||||||
local cmd=''
|
local cmd=''
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
stead = {
|
stead = {
|
||||||
version = "0.9.1",
|
version = "0.9.2",
|
||||||
table = table,
|
table = table,
|
||||||
string = string,
|
string = string,
|
||||||
math = math,
|
math = math,
|
||||||
|
@ -38,6 +38,10 @@ function cat(v,...)
|
||||||
return res;
|
return res;
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function img(v)
|
||||||
|
return iface:img(v);
|
||||||
|
end
|
||||||
|
|
||||||
function txtem(v)
|
function txtem(v)
|
||||||
return iface:em(v)
|
return iface:em(v)
|
||||||
end
|
end
|
||||||
|
@ -1355,6 +1359,9 @@ function strip(s)
|
||||||
return s;
|
return s;
|
||||||
end
|
end
|
||||||
iface = {
|
iface = {
|
||||||
|
img = function(self, str)
|
||||||
|
return '';
|
||||||
|
end,
|
||||||
em = function(self, str)
|
em = function(self, str)
|
||||||
return str;
|
return str;
|
||||||
end,
|
end,
|
||||||
|
|
Reference in a new issue