Skip to content

Commit 4a28989

Browse files
committed
Fixed missing help text on Frictional Concerns and -editor mode not working
1 parent 2a38ef6 commit 4a28989

File tree

10 files changed

+333
-49
lines changed

10 files changed

+333
-49
lines changed

engine/source/console/consoleFunctions.cpp

+25
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include "core/units.h"
1717
#include "console/arrayObject.h"
1818
#include <regex>
19+
#include <ctime>
1920

2021
// This is a temporary hack to get tools using the library to
2122
// link in this module which contains no other references.
@@ -1641,3 +1642,27 @@ ConsoleFunction(regexReplace, const char*, 4, 4, "regexMatch(testString, pattern
16411642
return argv[1];
16421643
}
16431644
}
1645+
1646+
ConsoleFunction(getDayNum, const char*, 1, 1, "getDayNum();") {
1647+
time_t now = time(0);
1648+
struct tm* timeinfo = localtime(&now);
1649+
char* ret = Con::getReturnBuffer(20);
1650+
dSprintf(ret, 20, "%d", timeinfo->tm_mday);
1651+
return ret;
1652+
}
1653+
1654+
ConsoleFunction(getMonthNum, const char*, 1, 1, "getMonthNum();") {
1655+
time_t now = time(0);
1656+
struct tm* timeinfo = localtime(&now);
1657+
char* ret = Con::getReturnBuffer(20);
1658+
dSprintf(ret, 20, "%d", (timeinfo->tm_mon) + 1);
1659+
return ret;
1660+
}
1661+
1662+
ConsoleFunction(getYearNum, const char*, 1, 1, "getYearNum();") {
1663+
time_t now = time(0);
1664+
struct tm* timeinfo = localtime(&now);
1665+
char* ret = Con::getReturnBuffer(20);
1666+
dSprintf(ret, 20, "%d", (timeinfo->tm_year) + 1900);
1667+
return ret;
1668+
}

engine/source/gui/controls/guiBitmapCtrl.cpp

+4-2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ GuiBitmapCtrl::GuiBitmapCtrl(void)
1616
mBitmapName = StringTable->insert("");
1717
startPoint.set(0, 0);
1818
mWrap = false;
19+
flipY = false;
1920
mTextureObject = NULL;
2021
mOnMouseUpCommand = StringTable->insert("");
2122
}
@@ -28,6 +29,7 @@ void GuiBitmapCtrl::initPersistFields()
2829
addField("bitmap", TypeFilename, Offset(mBitmapName, GuiBitmapCtrl));
2930
addField("wrap", TypeBool, Offset(mWrap, GuiBitmapCtrl));
3031
addField("onMouseUp", TypeString, Offset(mOnMouseUpCommand, GuiBitmapCtrl));
32+
addField("flipY", TypeBool, Offset(flipY, GuiBitmapCtrl));
3133
endGroup("Misc");
3234
}
3335

@@ -143,14 +145,14 @@ void GuiBitmapCtrl::onRender(Point2I offset, const RectI& updateRect)
143145
((texture->mBitmapSize.y * y) + offset.y) - yshift,
144146
texture->mBitmapSize.x,
145147
texture->mBitmapSize.y);
146-
GFX->drawBitmapStretchSR(texture, dstRegion, srcRegion);
148+
GFX->drawBitmapStretchSR(texture, dstRegion, srcRegion, flipY ? GFXBitmapFlip_Y : GFXBitmapFlip_None);
147149
}
148150

149151
}
150152
else
151153
{
152154
RectI rect(offset, mBounds.extent);
153-
GFX->drawBitmapStretch(mTextureObject, rect);
155+
GFX->drawBitmapStretch(mTextureObject, rect, flipY ? GFXBitmapFlip_Y : GFXBitmapFlip_None);
154156
}
155157
}
156158

engine/source/gui/controls/guiBitmapCtrl.h

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ class GuiBitmapCtrl : public GuiControl
2222
GFXTexHandle mTextureObject;
2323
Point2I startPoint;
2424
bool mWrap;
25+
bool flipY;
2526

2627
public:
2728
//creation methods

game/MBU.torsion

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@
1111
<Configs> <Config> <Name>Debug x86</Name>
1212
<Executable>MBUltra_DEBUG.exe</Executable>
1313
<Arguments></Arguments>
14-
<HasExports>true</HasExports>
14+
<HasExports>false</HasExports>
1515
<Precompile>true</Precompile>
1616
<InjectDebugger>true</InjectDebugger>
1717
<UseSetModPaths>false</UseSetModPaths>
1818
</Config>
1919
<Config> <Name>Release x86</Name>
2020
<Executable>MBUltra.exe</Executable>
2121
<Arguments></Arguments>
22-
<HasExports>true</HasExports>
22+
<HasExports>false</HasExports>
2323
<Precompile>true</Precompile>
2424
<InjectDebugger>true</InjectDebugger>
2525
<UseSetModPaths>false</UseSetModPaths>

0 commit comments

Comments
 (0)