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=
|
||||
BIN=
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
VERSION := \"0.9.1\"
|
||||
VERSION := \"0.9.2\"
|
||||
|
||||
PREFIX=/usr/local
|
||||
DESTDIR=
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
VERSION := \"0.9.1\"
|
||||
VERSION := \"0.9.2\"
|
||||
|
||||
PREFIX=
|
||||
DESTDIR=
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[Desktop Entry]
|
||||
Encoding=UTF-8
|
||||
Version=0.9.1
|
||||
Version=0.9.2
|
||||
Type=Application
|
||||
Name=INSTEAD
|
||||
Name[ru]=INSTEAD
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
</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>
|
||||
<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>
|
||||
<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>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
</head><body brgcolor="#d6e7c9" bgcolor="#ffffff">
|
||||
<center>[ <a href="#info">Что это такое?</a> ] [ <a href="#screenshots">Скриншоты</a> ] [ <a href="#download"> Скачать </a> ]</center>
|
||||
<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>
|
||||
<p align="justify">Интерпретатор STEAD (Simply Text Adventure) позволяет проигрывать игры, которые по жанру являются
|
||||
смесью визуальной новеллы, текстового квеста и классических квестов 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
|
||||
|
||||
|
@ -54,7 +54,7 @@ Runs the game in fullscreen mode.
|
|||
.B -window
|
||||
Runs the game in windowed mode.
|
||||
.TP
|
||||
.B -noautosave <path>
|
||||
.B -noautosave
|
||||
Disable autosave/autoload.
|
||||
.PP
|
||||
Configuration file name is 'insteadrc' and it's located in ~/.instead/.
|
||||
|
|
|
@ -1044,6 +1044,7 @@ struct image {
|
|||
struct image *next;
|
||||
char *name;
|
||||
img_t image;
|
||||
int free_it;
|
||||
};
|
||||
|
||||
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->name = strdup(name);
|
||||
g->next = NULL;
|
||||
g->free_it = 0;
|
||||
return g;
|
||||
}
|
||||
|
||||
|
@ -1063,7 +1065,8 @@ void image_free(struct image *image)
|
|||
return;
|
||||
if (image->name)
|
||||
free(image->name);
|
||||
// gfx_free_image(image->image);
|
||||
if (image->free_it)
|
||||
gfx_free_image(image->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);
|
||||
// gfx_noclip();
|
||||
}
|
||||
|
||||
img_t get_img(struct layout *layout, char *p)
|
||||
{
|
||||
int len;
|
||||
|
@ -1942,6 +1946,16 @@ img_t get_img(struct layout *layout, char *p)
|
|||
return NULL;
|
||||
p[len] = 0;
|
||||
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] = '>';
|
||||
return img;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
game.hinting = true;
|
||||
game.showlast = true;
|
||||
|
||||
iface.img = function(self, str)
|
||||
return "<g:"..str..">";
|
||||
end;
|
||||
|
||||
iface.xref = function(self, str, obj)
|
||||
local o = ref(here():srch(obj));
|
||||
local cmd=''
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
stead = {
|
||||
version = "0.9.1",
|
||||
version = "0.9.2",
|
||||
table = table,
|
||||
string = string,
|
||||
math = math,
|
||||
|
@ -38,6 +38,10 @@ function cat(v,...)
|
|||
return res;
|
||||
end
|
||||
|
||||
function img(v)
|
||||
return iface:img(v);
|
||||
end
|
||||
|
||||
function txtem(v)
|
||||
return iface:em(v)
|
||||
end
|
||||
|
@ -1355,6 +1359,9 @@ function strip(s)
|
|||
return s;
|
||||
end
|
||||
iface = {
|
||||
img = function(self, str)
|
||||
return '';
|
||||
end,
|
||||
em = function(self, str)
|
||||
return str;
|
||||
end,
|
||||
|
|
Reference in a new issue