dipl/code/textadv/include/structures.h

82 lines
2.5 KiB
C
Raw Permalink Normal View History

/* 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
#include <sound.h>
#include <stdint.h>
#include <avr/pgmspace.h>
#include <stdbool.h>
#define NUM_ACTIONS 0x0A
#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
#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
#define ROOM_COMPUTER 0x09
#define NUM_ITEMS 0x07
#define ITEM_FLOPPY 0x00
#define ITEM_SCREWDRIVER 0x01
#define ITEM_KEYBOARD 0x02
#define ITEM_SAUSAGE 0x03
#define ITEM_FLESH 0x04
#define ITEM_KEY 0x05
#define ITEM_PISTOL 0x06
extern const uint8_t sine_table[256] PROGMEM;
extern const uint8_t noise_table[1024] PROGMEM;
extern char* sndirtroad_msg[2];
extern char* user_action_req_msgs[3];
extern const char* info_table[];
extern const char* action_table[NUM_ACTIONS];
extern const char* room_table[NUM_ROOMS];
extern char* room_description_table[NUM_ROOMS];
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];
#endif