LibreWands/Source/engineMaps.h

106 lines
2.2 KiB
C
Raw Normal View History

2023-07-01 06:40:19 +02:00
// This file is part of LibreWands.
2023-07-01 08:25:53 +02:00
// LibreWands 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.
2023-07-01 06:40:19 +02:00
2023-07-01 08:25:53 +02:00
// LibreWands 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.
2023-07-01 06:40:19 +02:00
2023-07-01 08:25:53 +02:00
// You should have received a copy of the GNU General Public License along with LibreWands. If
// not, see https://www.gnu.org/licenses/.
2023-07-01 06:40:19 +02:00
2023-07-01 10:46:24 +02:00
// ---
2023-07-01 08:25:53 +02:00
// For more information on the world maps part of this game engine, see the LibreWands book.
2023-07-01 08:25:53 +02:00
// Monsters that characters sometimes carry. See char below.
2023-07-01 04:18:03 +02:00
struct mapmonster
{
uint_fast8_t type;
uint_fast8_t level;
};
2023-07-01 08:25:53 +02:00
// Base blocks that reside in the world maps.
2023-06-26 17:42:36 +02:00
struct Base
{
uint_fast16_t x;
uint_fast16_t y;
uint_fast8_t t;
2023-06-26 17:42:36 +02:00
uint_fast8_t c;
uint_fast8_t walk;
uint_fast8_t active;
};
2023-07-01 08:25:53 +02:00
// Info signs that reside in the world maps.
2023-06-26 17:42:36 +02:00
struct Info
{
uint_fast16_t x;
uint_fast16_t y;
uint_fast8_t t;
uint_fast8_t c;
2023-06-26 17:42:36 +02:00
char dialog[256];
uint_fast8_t active;
};
2023-07-01 08:25:53 +02:00
// Items that reside in the world maps.
2023-06-26 17:42:36 +02:00
struct Item
{
uint_fast16_t x;
uint_fast16_t y;
uint_fast8_t t;
uint_fast8_t c;
2023-06-26 17:42:36 +02:00
uint_fast8_t ID;
uint_fast8_t active;
};
2023-07-01 08:25:53 +02:00
// Doors that reside in the world maps.
struct Door
{
uint_fast16_t x;
uint_fast16_t y;
uint_fast8_t t;
uint_fast8_t c;
uint_fast8_t lock;
uint_fast8_t ID;
uint_fast16_t nx;
uint_fast16_t ny;
2023-06-26 17:42:36 +02:00
uint_fast8_t active;
};
2023-07-01 08:25:53 +02:00
// Characters that reside in the world maps.
struct Char
{
uint_fast16_t x;
uint_fast16_t y;
uint_fast8_t t;
uint_fast8_t c;
uint_fast8_t type;
uint_fast8_t move;
char name[256];
2023-06-26 14:52:47 +02:00
char dialog1[256];
char dialog2[256];
struct mapmonster mon[5];
2023-06-26 17:42:36 +02:00
uint_fast8_t active;
};
2023-07-01 08:25:53 +02:00
// Our world maps live here.
struct maps
{
struct Item *Item;
struct Base *Base;
struct Door *Door;
2023-06-26 14:52:47 +02:00
struct Info *Info;
struct Char *Char;
uint_fast32_t nItem;
uint_fast32_t nBase;
uint_fast32_t nDoor;
uint_fast32_t nInfo;
uint_fast32_t nChar;
};
struct maps *map = NULL;
uint_fast8_t nMap = 0;
2023-06-26 17:42:36 +02:00
2023-06-28 17:59:35 +02:00
#include "engineMaps.c"