helapordo 1.4.12
Loading...
Searching...
No Matches
rooms.h
Go to the documentation of this file.
1// jgabaut @ github.com/jgabaut
2// SPDX-License-Identifier: GPL-3.0-only
3/*
4 Copyright (C) 2022-2024 jgabaut
5
6 This program is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, version 3 of the License.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <https://www.gnu.org/licenses/>.
17*/
18
19#ifndef GAME_ROOMS_H_
20#define GAME_ROOMS_H_
21#include "artifacts.h"
22#include "turn_op.h"
23
24void initRoom(Room * r, Fighter * f, int index, roomClass type, int enemyTotal,
25 loadInfo * load_info, Koliseo_Temp * t_kls);
26void initRoom_Home(Room * r, int roomIndex, Fighter * f, loadInfo * load_info,
27 Koliseo_Temp * t_kls);
28void initRoom_Enemies(Room * r, int roomIndex, int enemyTotal,
29 loadInfo * load_info, Koliseo_Temp * t_kls);
30void initRoom_Shop(Room * r, int roomIndex, Fighter * f, Koliseo_Temp * t_kls);
31void initRoom_Boss(Room * r, int roomIndex, Fighter * f, Koliseo_Temp * t_kls);
32void initRoom_Treasure(Room * r, int roomIndex, Fighter * f,
33 Koliseo_Temp * t_kls);
34void initRoom_Roadfork(Room * r, int roomIndex, Fighter * f,
35 Koliseo_Temp * t_kls);
36
37#ifdef HELAPORDO_CURSES_BUILD
38int handleRoom_Home(Gamestate * gamestate, Room * room, int index, Path * p,
39 Fighter * player, loadInfo * load_info,
40 char fighter_sprites[CLASSESMAX +
41 1][MAXFRAMES][MAXROWS][MAXCOLS],
42 Koliseo * kls, Koliseo_Temp * t_kls);
43int handleRoom_Enemies(Gamestate * gamestate, Room * room, int index, Path * p,
44 Fighter * player, loadInfo * load_info,
45 char enemy_sprites[ENEMYCLASSESMAX +
46 1][MAXFRAMES][MAXROWS][MAXCOLS],
47 char fighter_sprites[CLASSESMAX +
48 1][MAXFRAMES][MAXROWS][MAXCOLS],
49 Koliseo * kls, Koliseo_Temp * t_kls, RingaBuf* rb_notifications);
50int handleRoom_Boss(Gamestate * gamestate, Room * room, int index, Path * p,
51 Fighter * player, loadInfo * load_info,
52 char boss_sprites[BOSSCLASSESMAX +
53 1][MAXFRAMES][MAXROWS][MAXCOLS],
54 char fighter_sprites[CLASSESMAX +
55 1][MAXFRAMES][MAXROWS][MAXCOLS],
56 Koliseo * kls, Koliseo_Temp * t_kls, RingaBuf* rb_notifications);
57int handleRoom_Shop(Room * room, int roomsDone, Path * path, Fighter * f,
58 Koliseo * kls, Koliseo_Temp * t_kls);
59int handleRoom_Treasure(Room * room, int roomsDone, Path * path, Fighter * f,
60 Koliseo * kls, Koliseo_Temp * t_kls);
61int handleRoom_Roadfork(Room * room, int *roadFork_value, int roomsDone,
62 Path * path, Fighter * f);
63
64void open_chest(WINDOW * w, Chest * c, Fighter * f, Koliseo * kls,
65 Koliseo_Temp * t_kls);
66#else
67#ifndef HELAPORDO_RAYLIB_BUILD
68#error "HELAPORDO_CURSES_BUILD and HELAPORDO_RAYLIB_BUILD are both undefined.\n"
69#else
70void open_chest(Rectangle * notification_area, Chest * c, Fighter * f, Koliseo * kls,
71 Koliseo_Temp * t_kls);
72#endif // HELAPORDO_RAYLIB_BUILD
73#endif // HELAPORDO_CURSES_BUILD
74
75#endif // GAME_ROOMS_H_
#define CLASSESMAX
Maximum index of fighterClass, so that the size has to add 1 for the 0th index.
Definition game_core.h:594
#define BOSSCLASSESMAX
Maximum index of bossClass, so that the size has to add 1 for the 0th index.
Definition game_core.h:724
roomClass
The different kinds of Room.
Definition game_core.h:1647
#define ENEMYCLASSESMAX
Maximum index of enemyClass, so that the size has to add 1 for the 0th index.
Definition game_core.h:668
void initRoom_Shop(Room *r, int roomIndex, Fighter *f, Koliseo_Temp *t_kls)
Takes one Room pointer of class SHOP and initialises all the fields, using stats from the passed figh...
Definition rooms.c:3267
void initRoom_Roadfork(Room *r, int roomIndex, Fighter *f, Koliseo_Temp *t_kls)
Takes one Room pointer of class ROADFORK and initialises all the fields, using stats from the passed ...
Definition rooms.c:3361
void initRoom_Boss(Room *r, int roomIndex, Fighter *f, Koliseo_Temp *t_kls)
Takes one Room pointer of class BOSS and initialises all the fields, using stats from the passed figh...
Definition rooms.c:3299
void initRoom(Room *r, Fighter *f, int index, roomClass type, int enemyTotal, loadInfo *load_info, Koliseo_Temp *t_kls)
Takes one Room pointer and calls the correct initialising function, after setting the room class valu...
Definition rooms.c:3396
void initRoom_Enemies(Room *r, int roomIndex, int enemyTotal, loadInfo *load_info, Koliseo_Temp *t_kls)
Takes one Room pointer of class ENEMIES and initialises all the fields.
Definition rooms.c:3161
void initRoom_Home(Room *r, int roomIndex, Fighter *f, loadInfo *load_info, Koliseo_Temp *t_kls)
Takes one Room pointer of class HOME and initialises all the fields.
Definition rooms.c:3134
void initRoom_Treasure(Room *r, int roomIndex, Fighter *f, Koliseo_Temp *t_kls)
Takes one Room pointer of class TREASURE and initialises all the fields, using stats from the passed ...
Definition rooms.c:3330
Represents the entity initialised from a chestClass.
Definition game_core.h:1543
Represents the entity initialised from a fighterClass.
Definition game_core.h:1079
Holds arguments for a game.
Definition game_core.h:1885
Holds the state of game progression.
Definition game_core.h:1343
Represents the entity initialised from a roomClass.
Definition game_core.h:1756
Contains loaded values to pass to initRoom().
Definition game_core.h:1864