+
+
+
+extern void nav_inventory(struct World * world, char dir)
+{
+ if ('u' == dir)
+ {
+ if (world->inventory_select > 0)
+ {
+ world->inventory_select--;
+ }
+ return;
+ }
+ struct MapObj * player = get_player(world);
+ struct MapObj * owned = player->owns;
+ if (NULL == owned)
+ {
+ return;
+ }
+ uint8_t n_owned = 0;
+ for (; NULL != owned->next; owned = owned->next, n_owned++);
+ if (world->inventory_select < n_owned)
+ {
+ world->inventory_select++;
+ }
+}