D - drop item selected in inventory
u - use item selected in inventory
-UP - navigate upwards in Inventory
-DOWN - navigate downwards in inventory
+Up - navigate upwards in inventory
+Down - navigate downwards in inventory
+
+PgUp - scroll upwards in "Things here" window
+PgDn - scroll downwards in "Things here" window
Save files, replay game recording, starting over
------------------------------------------------
COMMAND inv_u
DESCRIPTION 'nav up object'
+COMMAND stack_d
+DESCRIPTION 'nav down stack'
+
+COMMAND stack_u
+DESCRIPTION 'nav up stack'
+
COMMAND keyb_dw
DESCRIPTION 'nav down window keys'
KEY 117 use
KEY 259 inv_u
KEY 258 inv_d
+KEY 339 stack_u
+KEY 338 stack_d
KEYBINDINGS 'wingeom'
KEY 50 shift_f
strong_write(io_db["file_out"], "LOG "
+ "Some objects can be used (such as: eaten) by 'u' if "
+ "they are in your inventory. "
- + "Use 'UP'/'DOWN' to navigate the inventory.\n")
+ + "Use 'Up'/'Down' to navigate the inventory.\n")
strong_write(io_db["file_out"], "LOG "
+ "Use 'l' to toggle 'look' mode (move an exploration cursor "
+ "instead of the player over the map).\n")
+ strong_write(io_db["file_out"], "LOG "
+ + "Use 'PgUp'/PgDn' to scroll the 'Things here' window.\n")
strong_write(io_db["file_out"], "LOG See README file for more details.\n")
- strong_write(io_db["file_out"], "LOG \n")
def decrement_lifepoints(t):
+static void nav_stack(char dir) //
+{
+ FILE * file = fopen("test", "a");
+ fprintf(file, "called %d\n", world.things_here_scroll);
+ if ('u' == dir && world.things_here_scroll > 0)
+ {
+ world.things_here_scroll--;
+ fprintf(file, "u\n");
+ }
+ else if ('d' == dir && world.things_here)
+ {
+ uint32_t i;
+ uint32_t n_lines = 1;
+ for (i = 0; '\0' != world.things_here[i]; i++)
+ {
+ n_lines = n_lines + (world.things_here[i] == '\n');
+ }
+ uint16_t f_h = get_win_by_id('s')->frame_size.y;
+ fprintf(file, "%d %d\n", n_lines, f_h);
+ if (n_lines > f_h && world.things_here_scroll < n_lines - f_h)
+ {
+ world.things_here_scroll++;
+ }
+ fprintf(file, "d %d\n", world.things_here_scroll);
+ }
+ fclose(file);
+}
+
+
+
static uint8_t try_0args(struct Command * command, char * match, void (* f) ())
{
if (!strcmp(command->dsc_short, match))
{
return ( try_1args(command, "inv_u", nav_inventory, 'u')
|| try_1args(command, "inv_d", nav_inventory, 'd')
+ || try_1args(command, "stack_u", nav_stack, 'u') //
+ || try_1args(command, "stack_d", nav_stack, 'd') //
|| try_1args(command, "cyc_win_f", cycle_active_win, 'f')
|| try_1args(command, "cyc_win_b", cycle_active_win, 'b')
|| try_1args(command, "scrl_r", scroll_v_screen, '+')
char * wait_response = "(polling)";
char * text = world.things_here ? world.things_here : wait_response;
add_text_with_linebreaks(win, text);
+ win->center.y = world.things_here_scroll + (win->frame_size.y / 2); //
}
{
nl_append_string("(none known)", &world.things_here);
}
+ world.things_here_scroll = 0; //
}
else if (things_here_parsing)
{
struct yx_uint8 player_pos; /* coordinates of player on map */
struct yx_uint8 look_pos; /* coordinates of look cursor */
uint16_t turn; /* world/game turn */
+ uint16_t things_here_scroll; /* scroll position things here win */ // 7DRL
int16_t player_satiation; /* player's belly fullness */
int16_t godsmood; /* island god's mood */ // 7DRL
int16_t godsfavor; /* island god's favor to player */ // 7DRL