breakhack/src/map_room_modifiers.h

55 lines
1.5 KiB
C
Raw Normal View History

/*
* BreakHack - A dungeone crawler RPG
* Copyright (C) 2018 Linus Probert <linus.probert@gmail.com>
*
* 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/>.
*/
2018-03-15 11:30:18 +01:00
#ifndef MAP_ROOM_MODIFIERS_H_
#define MAP_ROOM_MODIFIERS_H_
#include "vector2d.h"
// Forward declares
typedef struct Player Player;
typedef struct RoomMatrix_t RoomMatrix;
2018-03-15 11:30:18 +01:00
typedef enum RoomModifierType_e {
RMOD_TYPE_NONE,
2018-08-13 13:11:32 +02:00
RMOD_TYPE_WINDY,
RMOD_TYPE_FIRE,
2018-10-15 22:19:23 +02:00
RMOD_TYPE_CRUMBLING
2018-03-15 11:30:18 +01:00
} RoomModifierType;
2018-08-13 13:11:32 +02:00
typedef struct WindData {
2018-03-15 11:30:18 +01:00
Vector2d direction;
} WindData;
typedef union RoomModifierDataContainer_t {
WindData wind;
} RoomModifierDataContainer;
2018-08-13 13:11:32 +02:00
typedef struct RoomModifierData {
2018-03-15 11:30:18 +01:00
RoomModifierType type;
RoomModifierDataContainer data;
} RoomModifierData;
void
map_room_modifier_player_effect(Player*,
RoomMatrix*,
Vector2d *direction,
void (*)(Player*, RoomMatrix*, Vector2d));
2018-03-15 11:30:18 +01:00
#endif // MAP_ROOM_MODIFIERS_H_