2023-11-20 23:25:36 -06:00
|
|
|
#pragma region License
|
2023-11-14 18:11:32 -06:00
|
|
|
/*
|
|
|
|
License (OLC-3)
|
|
|
|
~~~~~~~~~~~~~~~
|
|
|
|
|
2024-01-02 00:46:32 -06:00
|
|
|
Copyright 2024 Joshua Sigona <sigonasr2@gmail.com>
|
2023-11-14 18:11:32 -06:00
|
|
|
|
|
|
|
Redistribution and use in source and binary forms, with or without modification,
|
|
|
|
are permitted provided that the following conditions are met:
|
|
|
|
|
|
|
|
1. Redistributions or derivations of source code must retain the above copyright
|
|
|
|
notice, this list of conditions and the following disclaimer.
|
|
|
|
|
|
|
|
2. Redistributions or derivative works in binary form must reproduce the above
|
|
|
|
copyright notice. This list of conditions and the following disclaimer must be
|
|
|
|
reproduced in the documentation and/or other materials provided with the distribution.
|
|
|
|
|
|
|
|
3. Neither the name of the copyright holder nor the names of its contributors may
|
|
|
|
be used to endorse or promote products derived from this software without specific
|
|
|
|
prior written permission.
|
|
|
|
|
|
|
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
|
|
|
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
|
|
|
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
|
|
|
|
SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
|
|
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
|
|
|
|
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
|
|
|
|
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
|
|
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
|
|
|
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
|
|
SUCH DAMAGE.
|
2023-11-29 00:50:00 -06:00
|
|
|
|
|
|
|
Portions of this software are copyright © 2023 The FreeType
|
|
|
|
Project (www.freetype.org). Please see LICENSE_FT.txt for more information.
|
|
|
|
All rights reserved.
|
2023-11-14 18:11:32 -06:00
|
|
|
*/
|
2023-11-20 23:25:36 -06:00
|
|
|
#pragma endregion
|
2023-06-15 00:11:39 -05:00
|
|
|
#pragma once
|
2024-01-10 02:24:12 -06:00
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
using BackdropName=std::string;
|
|
|
|
|
2023-08-06 19:00:09 -05:00
|
|
|
#define INCLUDE_ANIMATION_DATA extern safemap<std::string,Animate2D::FrameSequence>ANIMATION_DATA;
|
2023-06-15 00:11:39 -05:00
|
|
|
#define INCLUDE_MONSTER_LIST extern std::vector<Monster>MONSTER_LIST;
|
|
|
|
#define INCLUDE_SPAWNER_LIST extern std::vector<MonsterSpawner>SPAWNER_LIST;
|
2023-07-25 19:48:24 -05:00
|
|
|
#define INCLUDE_DAMAGENUMBER_LIST extern std::vector<std::shared_ptr<DamageNumber>>DAMAGENUMBER_LIST;
|
2024-01-04 05:21:56 -06:00
|
|
|
#define INCLUDE_game extern AiL*game;
|
2023-12-19 00:15:47 -06:00
|
|
|
#define INCLUDE_MONSTER_DATA extern std::map<std::string,MonsterData>MONSTER_DATA;
|
2023-06-30 15:44:41 -07:00
|
|
|
#define INCLUDE_BULLET_LIST extern std::vector<std::unique_ptr<Bullet>>BULLET_LIST;
|
2023-07-12 00:23:36 -05:00
|
|
|
#define INCLUDE_EMITTER_LIST extern std::vector<std::unique_ptr<Emitter>>EMITTER_LIST;
|
2023-08-06 19:00:09 -05:00
|
|
|
#define INCLUDE_DATA extern utils::datafile DATA;
|
2023-12-18 15:40:36 -06:00
|
|
|
#define INCLUDE_STRATEGY_DATA extern safemap<std::string,std::function<void(Monster&,float,std::string)>>STRATEGY_DATA;
|
2023-09-12 05:07:12 -05:00
|
|
|
#define INCLUDE_TILE_ANIMATION_DATA extern std::map<int,std::vector<std::pair<int,float>>>TILE_ANIMATION_DATA;
|
2023-09-16 07:00:38 -05:00
|
|
|
#define INCLUDE_GFX extern safemap<std::string,Renderable>GFX;
|
2023-10-07 15:47:26 -05:00
|
|
|
#define INCLUDE_ITEM_DATA extern safemap<std::string,ItemInfo>ITEM_DATA;
|
2023-10-06 18:46:13 -05:00
|
|
|
#define INCLUDE_ITEM_CATEGORIES extern safemap<std::string,std::set<std::string>>ITEM_CATEGORIES;
|
2023-11-11 17:31:53 -06:00
|
|
|
#define DO_NOTHING [](MenuFuncData data){return true;}
|
2023-12-15 23:57:09 -06:00
|
|
|
#define INCLUDE_WINDOW_SIZE extern vi2d WINDOW_SIZE;
|
2023-07-02 08:42:18 -07:00
|
|
|
|
2024-01-10 02:24:12 -06:00
|
|
|
#define INCLUDE_BACKDROP_DATA extern std::map<BackdropName,Renderable>BACKDROP_DATA;
|
|
|
|
|
|
|
|
|
2023-11-19 15:57:18 -06:00
|
|
|
#define INCLUDE_CENTERED extern const vf2d Menu::CENTERED;
|
|
|
|
|
2023-07-13 20:24:47 +00:00
|
|
|
#define ACCESS_PLAYER Player*p=game->GetPlayer();
|
2023-07-06 03:22:05 -05:00
|
|
|
|
2024-01-14 16:23:31 -06:00
|
|
|
#define VARIANTS float,int,std::string,bool,vf2d,std::vector<std::any>
|
2023-11-21 06:05:52 -06:00
|
|
|
#undef INFINITE
|
2023-07-13 20:24:47 +00:00
|
|
|
#define INFINITE 999999
|
|
|
|
|
|
|
|
#define SETUP_CLASS(class) \
|
2023-07-23 12:33:20 -05:00
|
|
|
class::class() \
|
|
|
|
:Player::Player(){} \
|
2023-07-14 19:14:04 +00:00
|
|
|
class::class(Player*player) \
|
2023-07-22 04:21:10 -05:00
|
|
|
:Player::Player(player){} \
|
2023-07-13 20:24:47 +00:00
|
|
|
Class class::GetClass(){return cl;} \
|
|
|
|
std::string class::GetClassName(){return name;} \
|
|
|
|
Ability&class::GetRightClickAbility(){return rightClickAbility;}; \
|
|
|
|
Ability&class::GetAbility1(){return ability1;}; \
|
|
|
|
Ability&class::GetAbility2(){return ability2;}; \
|
|
|
|
Ability&class::GetAbility3(){return ability3;}; \
|
2023-07-14 15:44:17 +00:00
|
|
|
Ability&class::GetAbility4(){return ability4;}; \
|
2023-08-06 19:00:09 -05:00
|
|
|
std::string&class::GetWalkNAnimation(){return walk_n;}; \
|
|
|
|
std::string&class::GetWalkEAnimation(){return walk_e;}; \
|
|
|
|
std::string&class::GetWalkSAnimation(){return walk_s;}; \
|
|
|
|
std::string&class::GetWalkWAnimation(){return walk_w;}; \
|
|
|
|
std::string&class::GetIdleNAnimation(){return idle_n;}; \
|
|
|
|
std::string&class::GetIdleEAnimation(){return idle_e;}; \
|
|
|
|
std::string&class::GetIdleSAnimation(){return idle_s;}; \
|
|
|
|
std::string&class::GetIdleWAnimation(){return idle_w;}; \
|
2023-07-26 19:46:39 -05:00
|
|
|
std::string class::name=""; \
|
|
|
|
Class class::cl=ANY; \
|
2023-09-26 02:40:38 -05:00
|
|
|
Ability class::rightClickAbility=Ability(); \
|
|
|
|
Ability class::ability1=Ability(); \
|
|
|
|
Ability class::ability2=Ability(); \
|
|
|
|
Ability class::ability3=Ability(); \
|
|
|
|
Ability class::ability4=Ability(); \
|
2023-08-06 19:00:09 -05:00
|
|
|
std::string class::idle_n="WARRIOR_IDLE_N"; \
|
|
|
|
std::string class::idle_e="WARRIOR_IDLE_E"; \
|
|
|
|
std::string class::idle_s="WARRIOR_IDLE_S"; \
|
|
|
|
std::string class::idle_w="WARRIOR_IDLE_W"; \
|
|
|
|
std::string class::walk_n="WARRIOR_WALK_N"; \
|
|
|
|
std::string class::walk_e="WARRIOR_WALK_E"; \
|
|
|
|
std::string class::walk_s="WARRIOR_WALK_S"; \
|
|
|
|
std::string class::walk_w="WARRIOR_WALK_W";
|