Skip to content

Commit

Permalink
little patch
Browse files Browse the repository at this point in the history
  • Loading branch information
Turmoil committed Dec 22, 2022
1 parent 4b90423 commit 2a6d728
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 8 deletions.
8 changes: 4 additions & 4 deletions Dungeon/Dungeon.rc
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ IDI_ICON1 ICON "Dungeon.ico"
//

VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,1,1,5
PRODUCTVERSION 1,1,1,5
FILEVERSION 1,1,1,6
PRODUCTVERSION 1,1,1,6
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
Expand All @@ -89,12 +89,12 @@ BEGIN
BEGIN
VALUE "CompanyName", "New Desire Studios"
VALUE "FileDescription", "Main executable for Dungeon"
VALUE "FileVersion", "1.1.1.5"
VALUE "FileVersion", "1.1.1.6"
VALUE "InternalName", "Dungeon Canon.exe"
VALUE "LegalCopyright", "Copyright (C) New Desire Studios 2022 - 2023"
VALUE "OriginalFilename", "Dungeon.exe"
VALUE "ProductName", "Dungeon"
VALUE "ProductVersion", "1.1.1.5"
VALUE "ProductVersion", "1.1.1.6"
END
END
BLOCK "VarFileInfo"
Expand Down
1 change: 1 addition & 0 deletions Dungeon/src/object/EnemyLibrary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,5 +169,6 @@ const std::vector<Enemy*>& EnemyLibrary::GetEnemyByLevel(int level)
LOG_EXTRA_WARNING("Missing enemy of level %d", level);

static std::vector<Enemy*> dummy;

return dummy;
}
2 changes: 2 additions & 0 deletions Dungeon/src/ui/CreditsInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ bool CreditsInterface::Load(XMLElement* node)
_RETURN_IF_ERROR();

TimeInterface::Load(node);
_RETURN_IF_ERROR();

_LoadCredits(node);

_RETURN_STATE();
Expand Down
4 changes: 3 additions & 1 deletion Dungeon/src/ui/Interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ bool PlainInterface::Load(XMLElement* node)
const char* attr;

AbstractInterface::Load(node);
_RETURN_IF_ERROR();

_PARSE("in-time", m_inTime, name, 0L);
_PARSE("out-time", m_outTime, name, 0L);
Expand Down Expand Up @@ -212,6 +213,7 @@ bool TimeInterface::Load(XMLElement* node)
const char* attr;

PlainInterface::Load(node);
_RETURN_IF_ERROR();

_PARSE("duration", m_duration, name, 0L);

Expand Down Expand Up @@ -346,7 +348,7 @@ AbstractInterface* LoadInterface(XMLElement* node)

if (intf)
{
intf->SetWidgetManager(new WidgetManager());
// intf->SetWidgetManager(new WidgetManager());
if (!intf->Load(node))
{
delete intf;
Expand Down
2 changes: 2 additions & 0 deletions Dungeon/src/ui/MenuInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ bool SettingInterface::Load(XMLElement* node)
_RETURN_IF_ERROR();

PlainInterface::Load(node);
_RETURN_IF_ERROR();

_LoadSettings();

Expand Down Expand Up @@ -555,6 +556,7 @@ bool VictoryInterface::Load(XMLElement* node)
_RETURN_IF_ERROR();

TimeInterface::Load(node);
_RETURN_IF_ERROR();

_PARSE("victory", m_isVictory, name, false);

Expand Down
1 change: 1 addition & 0 deletions Dungeon/src/ui/VersionInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ bool VersionInterface::Load(XMLElement* node)
_RETURN_IF_ERROR();

PlainInterface::Load(node);
_RETURN_IF_ERROR();

WidgetManager* mgr;
XMLElement* page = node->FirstChildElement("Page");
Expand Down
2 changes: 1 addition & 1 deletion Dungine/inc/ui/AbstractWidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* *
* Start Date : July 17, 2022 *
* *
* Last Update : November 25, 2022 *
* Last Update : December 22, 2022 *
* *
* -------------------------------------------------------------------------- *
* Over View: *
Expand Down
2 changes: 1 addition & 1 deletion Dungine/inc/ui/Transition.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* *
* Start Date : April 7, 2022 *
* *
* Last Update : November 25, 2022 *
* Last Update : November 29, 2022 *
* *
* -------------------------------------------------------------------------- *
* Over View: *
Expand Down
11 changes: 10 additions & 1 deletion Dungine/src/ui/Drawer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* *
* Start Date : March 9, 2022 *
* *
* Last Update : November 29, 2022 *
* Last Update : December 22, 2022 *
* *
* -------------------------------------------------------------------------- *
* Over View: *
Expand Down Expand Up @@ -945,6 +945,15 @@ bool AnimDrawer::Load(XMLElement* node)
}
m_anim.Initialize(m_pResource->GetResource());

/*
** 2022/12/22 TS:
** Whether random beginning.
*/
bool isRandom = true;
_PARSE("random", isRandom, name, true);
if (isRandom)
m_anim.SetFrame(Random(m_anim.GetTotalFrameNum()));

float aspectRatio = dmin(1.0f * m_width / m_anim.GetFrameWidth(), 1.0f * m_height / m_anim.GetFrameHeight());
float k = (aspectRatio - 1.0f) / 2.0f;
// Compensate the effect of symbol scale.
Expand Down

0 comments on commit 2a6d728

Please sign in to comment.