2020-03-14 22:30:05 +01:00
|
|
|
/* 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 <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _STRUCTURES_H
|
|
|
|
#define _STRUCTURES_H
|
|
|
|
|
2020-03-20 00:09:03 +01:00
|
|
|
#include <sound.h>
|
|
|
|
|
2020-03-14 22:30:05 +01:00
|
|
|
#include <stdint.h>
|
|
|
|
#include <avr/pgmspace.h>
|
2020-03-17 17:50:19 +01:00
|
|
|
#include <stdbool.h>
|
|
|
|
|
2020-03-20 00:09:03 +01:00
|
|
|
#define NUM_ACTIONS 0x0A
|
2020-03-17 17:50:19 +01:00
|
|
|
#define ACTION_HELP 0x00
|
|
|
|
#define ACTION_NORTH 0x01
|
|
|
|
#define ACTION_SOUTH 0x02
|
|
|
|
#define ACTION_WEST 0x03
|
|
|
|
#define ACTION_EAST 0x04
|
|
|
|
#define ACTION_DESCRIBE 0x05
|
|
|
|
#define ACTION_USE 0x06
|
2020-03-20 00:09:03 +01:00
|
|
|
#define ACTION_INVENTORY 0x07
|
|
|
|
#define ACTION_SEARCH 0x08
|
|
|
|
#define ACTION_TAKE 0x09
|
|
|
|
|
|
|
|
/* The direction in the direction table is the action_id - 1 */
|
|
|
|
#define DIRECTION_NORTH 0x00
|
|
|
|
#define DIRECTION_SOUTH 0x01
|
|
|
|
#define DIRECTION_WEST 0x02
|
|
|
|
#define DIRECTION_EAST 0x03
|
|
|
|
|
|
|
|
#define NUM_ROOMS 0x0A
|
|
|
|
#define ROOM_NOTHING 0x00
|
|
|
|
#define ROOM_LONELYROAD 0x01
|
|
|
|
#define ROOM_SNDIRTROAD 0x02
|
|
|
|
#define ROOM_FIREPLACE 0x03
|
|
|
|
#define ROOM_EWSTREET 0x04
|
|
|
|
#define ROOM_OLDHOUSE 0x05
|
|
|
|
#define ROOM_LIVINGROOM 0x06
|
|
|
|
#define ROOM_ATTIC 0x07
|
|
|
|
#define ROOM_BASEMENT 0x08
|
2020-03-26 23:53:14 +01:00
|
|
|
#define ROOM_COMPUTER 0x09
|
2020-03-20 00:09:03 +01:00
|
|
|
|
|
|
|
#define NUM_ITEMS 0x07
|
|
|
|
#define ITEM_FLOPPY 0x00
|
|
|
|
#define ITEM_SCREWDRIVER 0x01
|
2020-03-26 23:53:14 +01:00
|
|
|
#define ITEM_KEYBOARD 0x02
|
2020-03-20 00:09:03 +01:00
|
|
|
#define ITEM_SAUSAGE 0x03
|
|
|
|
#define ITEM_FLESH 0x04
|
2020-03-26 23:53:14 +01:00
|
|
|
#define ITEM_KEY 0x05
|
2020-03-20 00:09:03 +01:00
|
|
|
#define ITEM_PISTOL 0x06
|
2020-03-17 17:50:19 +01:00
|
|
|
|
2020-03-14 22:30:05 +01:00
|
|
|
extern const uint8_t sine_table[256] PROGMEM;
|
|
|
|
extern const uint8_t noise_table[1024] PROGMEM;
|
2020-03-26 23:53:14 +01:00
|
|
|
|
|
|
|
extern char* sndirtroad_msg[2];
|
|
|
|
extern char* user_action_req_msgs[3];
|
2020-03-14 22:30:05 +01:00
|
|
|
|
2020-03-17 16:25:58 +01:00
|
|
|
extern const char* info_table[];
|
2020-03-17 17:50:19 +01:00
|
|
|
extern const char* action_table[NUM_ACTIONS];
|
2020-03-20 00:09:03 +01:00
|
|
|
extern const char* room_table[NUM_ROOMS];
|
2020-03-26 23:53:14 +01:00
|
|
|
extern char* room_description_table[NUM_ROOMS];
|
2020-03-20 00:09:03 +01:00
|
|
|
extern uint8_t room_map_table[NUM_ROOMS][4];
|
|
|
|
extern bool room_visited_table[NUM_ROOMS];
|
|
|
|
extern const char* item_table[NUM_ITEMS];
|
|
|
|
extern bool inventory[NUM_ITEMS];
|
|
|
|
extern int8_t item_room_map[NUM_ROOMS];
|
|
|
|
extern const struct tone_t * room_track_map[NUM_ROOMS];
|
2020-03-14 22:30:05 +01:00
|
|
|
#endif
|