|
1
|
if (scr_debug)
|
|
2
|
{
|
|
3
|
if (active)
|
|
4
|
{
|
|
5
|
if (obj_board_camera.con == 0)
|
|
6
|
{
|
|
7
|
scr_board_objnamescr_board_objname
function scr_board_objname()
{
if (scr_debug())
{
if (global.chemg_show_room)
{
var __cx = board_tilex(12) - 2;
var __cy = board_tiley(0);
if (argument_count >= 1)
__cx = argument0;
if (argument_count >= 2)
__cy = argument1;
draw_set_halign(fa_right);
draw_set_font(fnt_main);
draw_set_color(c_aqua);
draw_text_outline(__cx, __cy, string_copy(object_get_name(object_index), 5, 99));
draw_set_font(fnt_small);
draw_set_halign(fa_left);
draw_set_color(c_white);
}
}
} ();
|
|
8
|
var count = 0;
|
|
9
|
}
|
|
10
|
}
|
|
11
|
}
|
|
12
|
if (active && obj_board_camera.con == 0)
|
|
13
|
{
|
|
14
|
var nodrawkeyval = i_ex(obj_board_grabobject);
|
|
15
|
draw_set_font(scr_84_get_fontscr_84_get_font
function scr_84_get_font(arg0)
{
if (!variable_global_exists("chemg_last_get_font"))
global.chemg_last_get_font = "";
if (arg0 != global.chemg_last_get_font)
global.chemg_last_get_font = arg0;
return ds_map_find_value(global.font_map, arg0);
} ("8bit"));
|
|
16
|
if (i_ex(key) && nodrawkeyval <= 0)
|
|
17
|
{
|
|
18
|
var linespace = 18;
|
|
19
|
draw_text((key.x + 16) - (round(string_width(keystring)) / 2), key.y + 32 + 4, keystring);
|
|
20
|
draw_text((key.x + 16) - (round(string_width(string(key.cost))) / 2), key.y + 32 + 4 + linespace, string(key.cost));
|
|
21
|
}
|
|
22
|
if (i_ex(heal))
|
|
23
|
{
|
|
24
|
if (pocketcheck == 0)
|
|
25
|
{
|
|
26
|
pocketcheck = 1;
|
|
27
|
emptypocket = scr_pocketspace() + scr_inventoryspacescr_inventoryspace
function scr_inventoryspace()
{
var freespace = 0;
var inventoryspace = 12;
for (var i = 0; i < inventoryspace; i++)
{
if (global.item[i] == 0)
freespace++;
}
debug_message("from " + object_get_name(object_index) + ": scr_inventoryspace(): free inventory slots=" + string(freespace));
return freespace;
}
function scr_pocketspace()
{
var pocketspace = 0;
for (var i = 0; i < global.flag[64 storage_size]; i++)
{
if (global.pocketitem[i] == 0)
pocketspace++;
}
debug_message("from " + object_get_name(object_index) + ": scr_pocketspace(): free pocket slots=" + string(pocketspace));
return pocketspace;
} ();
|
|
28
|
}
|
|
29
|
draw_set_halign(fa_center);
|
|
30
|
if (!emptypocket)
|
|
31
|
draw_set_color(c_gray);
|
|
32
|
draw_text(heal.x + 16, heal.y + 32 + 4, string_hash_to_newline(heal.mystring));
|
|
33
|
draw_set_color(c_white);
|
|
34
|
draw_set_halign(fa_left);
|
|
35
|
}
|
|
36
|
}
|