/* Copyright © 2020 tyrolyean * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef _GAME_H #define _GAME_H #include #include extern char command_buffer[100]; extern uint8_t command_buffer_pointer; #define COMPUTER_STATE_NOTHING 0 #define COMPUTER_STATE_KEYBOARD 1 #define COMPUTER_STATE_FLOPPY 2 extern uint8_t computer_state; /* FSM for the computer */ extern bool bear_shot; extern uint8_t current_room; void routine_game(); void prepare_command_buffer(); void ingest_user_char(char in); void perform_action(uint8_t action_id); void move_direction(uint8_t direction); void describe_room(uint8_t room, bool auto_desc); void print_inventory(); void print_room_item(); void consume_room_item(const char* item_name); void use_item(const char* item_name); void use_item_id(uint8_t item_id); bool perform_computer_action(uint8_t action_id); void reset_game(bool fleshed); void init_game(); #endif