Saving and loading saves items in proper sorted order. Fixed bug with get inventory slot function. Connection point data is now static.
parent
0d6ab94fda
commit
ad1e2260cf
@ -0,0 +1,64 @@ |
||||
#pragma region License |
||||
/*
|
||||
License (OLC-3) |
||||
~~~~~~~~~~~~~~~ |
||||
|
||||
Copyright 2018 - 2022 OneLoneCoder.com |
||||
|
||||
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. |
||||
|
||||
Portions of this software are copyright © 2023 The FreeType |
||||
Project (www.freetype.org). Please see LICENSE_FT.txt for more information. |
||||
All rights reserved. |
||||
*/ |
||||
#pragma endregion |
||||
#pragma once |
||||
|
||||
#include "MenuComponent.h" |
||||
|
||||
class LoadFileButton:public MenuComponent{ |
||||
double playTime; |
||||
int chapter; |
||||
int level; |
||||
std::string className; |
||||
std::string saveFileName; |
||||
int saveFileID; |
||||
public: |
||||
inline LoadFileButton(geom2d::rect<float>rect,const utils::datafile&metadata,const int saveFileID,MenuFunc onClick,ButtonAttr attributes) |
||||
:MenuComponent(rect,"",onClick,attributes),playTime(metadata.GetReal(0U)),chapter(metadata.GetInt(1U)),level(metadata.GetInt(2U)),className(metadata.GetString(3U)),saveFileName(metadata.GetString(4U)),saveFileID(saveFileID){ |
||||
showDefaultLabel=false; |
||||
} |
||||
|
||||
inline void DrawDecal(ViewPort&window,bool focused){ |
||||
MenuComponent::DrawDecal(window,focused); |
||||
|
||||
|
||||
} |
||||
|
||||
inline const int&getSaveFileID()const{ |
||||
return saveFileID; |
||||
} |
||||
}; |
@ -0,0 +1,46 @@ |
||||
#pragma region License |
||||
/*
|
||||
License (OLC-3) |
||||
~~~~~~~~~~~~~~~ |
||||
|
||||
Copyright 2018 - 2022 OneLoneCoder.com |
||||
|
||||
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. |
||||
|
||||
Portions of this software are copyright © 2023 The FreeType |
||||
Project (www.freetype.org). Please see LICENSE_FT.txt for more information. |
||||
All rights reserved. |
||||
*/ |
||||
#pragma endregion |
||||
|
||||
#include "Menu.h" |
||||
#include "ScrollableWindowComponent.h" |
||||
|
||||
void Menu::InitializeLoadGameWindow(){ |
||||
Menu*loadGameWindow=CreateMenu(LOAD_GAME,CENTERED,vi2d{96,96}); |
||||
|
||||
loadGameWindow->ADD("Game Files List",ScrollableWindowComponent)({{-8,0},{112,104}})END; |
||||
} |
@ -1,354 +0,0 @@ |
||||
|
||||
Items |
||||
{ |
||||
|
||||
Item[0] |
||||
{ |
||||
Amt = 9 |
||||
Enhancement Level = 0 |
||||
Item Name = Bandages |
||||
Equip Slot = 0 |
||||
} |
||||
|
||||
|
||||
Item[1] |
||||
{ |
||||
Amt = 22 |
||||
Enhancement Level = 0 |
||||
Item Name = Blue Slime Remains |
||||
Equip Slot = 0 |
||||
} |
||||
|
||||
|
||||
Item[2] |
||||
{ |
||||
Amt = 1 |
||||
Enhancement Level = 0 |
||||
Item Name = Bone Armor |
||||
Equip Slot = 0 |
||||
} |
||||
|
||||
|
||||
Item[3] |
||||
{ |
||||
Amt = 1 |
||||
Enhancement Level = 0 |
||||
Item Name = Bone Gloves |
||||
Equip Slot = 8 |
||||
} |
||||
|
||||
|
||||
Item[4] |
||||
{ |
||||
Amt = 1 |
||||
Enhancement Level = 0 |
||||
Item Name = Bone Pants |
||||
Equip Slot = 16 |
||||
} |
||||
|
||||
|
||||
Item[5] |
||||
{ |
||||
Amt = 1 |
||||
Enhancement Level = 0 |
||||
Item Name = Copper Armor |
||||
Equip Slot = 0 |
||||
} |
||||
|
||||
|
||||
Item[6] |
||||
{ |
||||
Amt = 1 |
||||
Enhancement Level = 0 |
||||
Item Name = Copper Helmet |
||||
Equip Slot = 0 |
||||
} |
||||
|
||||
|
||||
Item[7] |
||||
{ |
||||
Amt = 1 |
||||
Enhancement Level = 0 |
||||
Item Name = Copper Pants |
||||
Equip Slot = 0 |
||||
} |
||||
|
||||
|
||||
Item[8] |
||||
{ |
||||
Amt = 1 |
||||
Enhancement Level = 0 |
||||
Item Name = Copper Shoes |
||||
Equip Slot = 0 |
||||
} |
||||
|
||||
|
||||
Item[9] |
||||
{ |
||||
Amt = 2 |
||||
Enhancement Level = 0 |
||||
Item Name = Elixir of Bear Strength |
||||
Equip Slot = 0 |
||||
} |
||||
|
||||
|
||||
Item[10] |
||||
{ |
||||
Amt = 42 |
||||
Enhancement Level = 0 |
||||
Item Name = Green Slime Remains |
||||
Equip Slot = 0 |
||||
} |
||||
|
||||
|
||||
Item[11] |
||||
{ |
||||
Amt = 1 |
||||
Enhancement Level = 0 |
||||
Item Name = Laser Sword |
||||
Equip Slot = 0 |
||||
} |
||||
|
||||
|
||||
Item[12] |
||||
{ |
||||
Amt = 1 |
||||
Enhancement Level = 0 |
||||
Item Name = Leather Gloves |
||||
Equip Slot = 0 |
||||
} |
||||
|
||||
|
||||
Item[13] |
||||
{ |
||||
Amt = 1 |
||||
Enhancement Level = 0 |
||||
Item Name = Leather Helmet |
||||
Equip Slot = 0 |
||||
} |
||||
|
||||
|
||||
Item[14] |
||||
{ |
||||
Amt = 1 |
||||
Enhancement Level = 0 |
||||
Item Name = Leather Pants |
||||
Equip Slot = 0 |
||||
} |
||||
|
||||
|
||||
Item[15] |
||||
{ |
||||
Amt = 1 |
||||
Enhancement Level = 0 |
||||
Item Name = Leather Shoes |
||||
Equip Slot = 0 |
||||
} |
||||
|
||||
|
||||
Item[16] |
||||
{ |
||||
Amt = 16 |
||||
Enhancement Level = 0 |
||||
Item Name = Minor Health Potion |
||||
Equip Slot = 0 |
||||
} |
||||
|
||||
|
||||
Item[17] |
||||
{ |
||||
Amt = 4 |
||||
Enhancement Level = 0 |
||||
Item Name = Red Slime Remains |
||||
Equip Slot = 0 |
||||
} |
||||
|
||||
|
||||
Item[18] |
||||
{ |
||||
Amt = 1 |
||||
Enhancement Level = 0 |
||||
Item Name = Ring of the Slime King |
||||
Equip Slot = 128 |
||||
|
||||
Attributes |
||||
{ |
||||
Attack = 4.000000 |
||||
Health = 17.000000 |
||||
Mana = 1.000000 |
||||
Move Spd % = 3.000000 |
||||
} |
||||
|
||||
} |
||||
|
||||
|
||||
Item[19] |
||||
{ |
||||
Amt = 1 |
||||
Enhancement Level = 0 |
||||
Item Name = Ring of the Slime King |
||||
Equip Slot = 0 |
||||
|
||||
Attributes |
||||
{ |
||||
Attack = 3.000000 |
||||
Health = 8.000000 |
||||
Mana = 3.000000 |
||||
Move Spd % = 1.000000 |
||||
} |
||||
|
||||
} |
||||
|
||||
|
||||
Item[20] |
||||
{ |
||||
Amt = 1 |
||||
Enhancement Level = 0 |
||||
Item Name = Ring of the Slime King |
||||
Equip Slot = 0 |
||||
|
||||
Attributes |
||||
{ |
||||
Attack = 3.000000 |
||||
Health = 6.000000 |
||||
Mana = 1.000000 |
||||
Move Spd % = 3.000000 |
||||
} |
||||
|
||||
} |
||||
|
||||
|
||||
Item[21] |
||||
{ |
||||
Amt = 1 |
||||
Enhancement Level = 0 |
||||
Item Name = Shell Armor |
||||
Equip Slot = 0 |
||||
} |
||||
|
||||
|
||||
Item[22] |
||||
{ |
||||
Amt = 1 |
||||
Enhancement Level = 0 |
||||
Item Name = Shell Armor |
||||
Equip Slot = 0 |
||||
} |
||||
|
||||
|
||||
Item[23] |
||||
{ |
||||
Amt = 1 |
||||
Enhancement Level = 0 |
||||
Item Name = Shell Armor |
||||
Equip Slot = 0 |
||||
} |
||||
|
||||
|
||||
Item[24] |
||||
{ |
||||
Amt = 1 |
||||
Enhancement Level = 0 |
||||
Item Name = Shell Gloves |
||||
Equip Slot = 0 |
||||
} |
||||
|
||||
|
||||
Item[25] |
||||
{ |
||||
Amt = 1 |
||||
Enhancement Level = 0 |
||||
Item Name = Shell Gloves |
||||
Equip Slot = 0 |
||||
} |
||||
|
||||
|
||||
Item[26] |
||||
{ |
||||
Amt = 1 |
||||
Enhancement Level = 0 |
||||
Item Name = Shell Gloves |
||||
Equip Slot = 0 |
||||
} |
||||
|
||||
|
||||
Item[27] |
||||
{ |
||||
Amt = 1 |
||||
Enhancement Level = 0 |
||||
Item Name = Shell Gloves |
||||
Equip Slot = 0 |
||||
} |
||||
|
||||
|
||||
Item[28] |
||||
{ |
||||
Amt = 1 |
||||
Enhancement Level = 0 |
||||
Item Name = Shell Helmet |
||||
Equip Slot = 0 |
||||
} |
||||
|
||||
|
||||
Item[29] |
||||
{ |
||||
Amt = 1 |
||||
Enhancement Level = 0 |
||||
Item Name = Shell Shoes |
||||
Equip Slot = 0 |
||||
} |
||||
|
||||
|
||||
Item[30] |
||||
{ |
||||
Amt = 1 |
||||
Enhancement Level = 0 |
||||
Item Name = Shell Sword |
||||
Equip Slot = 0 |
||||
} |
||||
|
||||
|
||||
Item[31] |
||||
{ |
||||
Amt = 1 |
||||
Enhancement Level = 0 |
||||
Item Name = Wooden Sword |
||||
Equip Slot = 0 |
||||
} |
||||
|
||||
} |
||||
|
||||
|
||||
Player |
||||
{ |
||||
Class = Wizard |
||||
Level = 1 |
||||
Current EXP = 44 |
||||
Total EXP = 44 |
||||
|
||||
Base Stats |
||||
{ |
||||
Attack = 15.000000 |
||||
CDR = 0.000000 |
||||
Crit Dmg = 50.000000 |
||||
Crit Rate = 0.000000 |
||||
Defense = 0.000000 |
||||
HP6 Recovery % = 0.000000 |
||||
Health = 80.000000 |
||||
Health % = 0.000000 |
||||
Mana = 100.000000 |
||||
Move Spd % = 100.000000 |
||||
} |
||||
|
||||
} |
||||
|
||||
|
||||
Unlocks |
||||
{ |
||||
CAMPAIGN_1_1 = True |
||||
WORLD_MAP = True |
||||
} |
||||
|
||||
Overworld Map Location = Stage I-I |
||||
Chapter = 1 |
||||
Save Name = Test File |
Loading…
Reference in new issue