Skip to content

Commit

Permalink
Fixed missing help text on Frictional Concerns and -editor mode not w…
Browse files Browse the repository at this point in the history
…orking
  • Loading branch information
HumanGamer committed Mar 30, 2024
1 parent 2a38ef6 commit 4a28989
Show file tree
Hide file tree
Showing 10 changed files with 333 additions and 49 deletions.
25 changes: 25 additions & 0 deletions engine/source/console/consoleFunctions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include "core/units.h"
#include "console/arrayObject.h"
#include <regex>
#include <ctime>

// This is a temporary hack to get tools using the library to
// link in this module which contains no other references.
Expand Down Expand Up @@ -1641,3 +1642,27 @@ ConsoleFunction(regexReplace, const char*, 4, 4, "regexMatch(testString, pattern
return argv[1];
}
}

ConsoleFunction(getDayNum, const char*, 1, 1, "getDayNum();") {
time_t now = time(0);
struct tm* timeinfo = localtime(&now);
char* ret = Con::getReturnBuffer(20);
dSprintf(ret, 20, "%d", timeinfo->tm_mday);
return ret;
}

ConsoleFunction(getMonthNum, const char*, 1, 1, "getMonthNum();") {
time_t now = time(0);
struct tm* timeinfo = localtime(&now);
char* ret = Con::getReturnBuffer(20);
dSprintf(ret, 20, "%d", (timeinfo->tm_mon) + 1);
return ret;
}

ConsoleFunction(getYearNum, const char*, 1, 1, "getYearNum();") {
time_t now = time(0);
struct tm* timeinfo = localtime(&now);
char* ret = Con::getReturnBuffer(20);
dSprintf(ret, 20, "%d", (timeinfo->tm_year) + 1900);
return ret;
}
6 changes: 4 additions & 2 deletions engine/source/gui/controls/guiBitmapCtrl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ GuiBitmapCtrl::GuiBitmapCtrl(void)
mBitmapName = StringTable->insert("");
startPoint.set(0, 0);
mWrap = false;
flipY = false;
mTextureObject = NULL;
mOnMouseUpCommand = StringTable->insert("");
}
Expand All @@ -28,6 +29,7 @@ void GuiBitmapCtrl::initPersistFields()
addField("bitmap", TypeFilename, Offset(mBitmapName, GuiBitmapCtrl));
addField("wrap", TypeBool, Offset(mWrap, GuiBitmapCtrl));
addField("onMouseUp", TypeString, Offset(mOnMouseUpCommand, GuiBitmapCtrl));
addField("flipY", TypeBool, Offset(flipY, GuiBitmapCtrl));
endGroup("Misc");
}

Expand Down Expand Up @@ -143,14 +145,14 @@ void GuiBitmapCtrl::onRender(Point2I offset, const RectI& updateRect)
((texture->mBitmapSize.y * y) + offset.y) - yshift,
texture->mBitmapSize.x,
texture->mBitmapSize.y);
GFX->drawBitmapStretchSR(texture, dstRegion, srcRegion);
GFX->drawBitmapStretchSR(texture, dstRegion, srcRegion, flipY ? GFXBitmapFlip_Y : GFXBitmapFlip_None);
}

}
else
{
RectI rect(offset, mBounds.extent);
GFX->drawBitmapStretch(mTextureObject, rect);
GFX->drawBitmapStretch(mTextureObject, rect, flipY ? GFXBitmapFlip_Y : GFXBitmapFlip_None);
}
}

Expand Down
1 change: 1 addition & 0 deletions engine/source/gui/controls/guiBitmapCtrl.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class GuiBitmapCtrl : public GuiControl
GFXTexHandle mTextureObject;
Point2I startPoint;
bool mWrap;
bool flipY;

public:
//creation methods
Expand Down
4 changes: 2 additions & 2 deletions game/MBU.torsion
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@
<Configs> <Config> <Name>Debug x86</Name>
<Executable>MBUltra_DEBUG.exe</Executable>
<Arguments></Arguments>
<HasExports>true</HasExports>
<HasExports>false</HasExports>
<Precompile>true</Precompile>
<InjectDebugger>true</InjectDebugger>
<UseSetModPaths>false</UseSetModPaths>
</Config>
<Config> <Name>Release x86</Name>
<Executable>MBUltra.exe</Executable>
<Arguments></Arguments>
<HasExports>true</HasExports>
<HasExports>false</HasExports>
<Precompile>true</Precompile>
<InjectDebugger>true</InjectDebugger>
<UseSetModPaths>false</UseSetModPaths>
Expand Down
Loading

0 comments on commit 4a28989

Please sign in to comment.