Converts all game, gui editor, and system classes to utilize assets

Processed core, tools and default modules to utilize assets
Converted all console types that were string based, such as TypeImageFilename to utilize const char*/the string table, which avoids a lot of type swapping shenanigans and avoids string corruption
Removed unneeded MainEditor mockup module
Removed some unused/duplicate image assets from the tools
This commit is contained in:
Areloch 2021-07-19 01:07:08 -05:00
parent 83b0432283
commit 5525f8ecdd
1708 changed files with 19619 additions and 4596 deletions

View file

@ -276,7 +276,7 @@ void GuiFormCtrl::onRender(Point2I offset, const RectI &updateRect)
Point2I barOffset(barStart, barTop);
// Draw the start of the bar...
GFX->getDrawUtil()->drawBitmapStretchSR(mProfile->mTextureObject ,RectI(barOffset, mProfile->mBitmapArrayRects[2].extent), mProfile->mBitmapArrayRects[2] );
GFX->getDrawUtil()->drawBitmapStretchSR(mProfile->getBitmapResource(),RectI(barOffset, mProfile->mBitmapArrayRects[2].extent), mProfile->mBitmapArrayRects[2] );
// Now draw the middle...
barOffset.x += mProfile->mBitmapArrayRects[2].extent.x;
@ -290,7 +290,7 @@ void GuiFormCtrl::onRender(Point2I offset, const RectI &updateRect)
foo.inset(1,0);
GFX->getDrawUtil()->drawBitmapStretchSR(
mProfile->mTextureObject,
mProfile->getBitmapResource(),
RectI(barOffset, Point2I(barMiddleSize, mProfile->mBitmapArrayRects[3].extent.y)),
foo
);
@ -299,7 +299,7 @@ void GuiFormCtrl::onRender(Point2I offset, const RectI &updateRect)
// And the end
barOffset.x += barMiddleSize;
GFX->getDrawUtil()->drawBitmapStretchSR( mProfile->mTextureObject, RectI(barOffset, mProfile->mBitmapArrayRects[4].extent),
GFX->getDrawUtil()->drawBitmapStretchSR( mProfile->getBitmapResource(), RectI(barOffset, mProfile->mBitmapArrayRects[4].extent),
mProfile->mBitmapArrayRects[4]);
GFX->getDrawUtil()->setBitmapModulation((mMouseOver ? mProfile->mFontColorHL : mProfile->mFontColor));

View file

@ -192,7 +192,7 @@ void GuiPaneControl::onRender(Point2I offset, const RectI &updateRect)
GFX->getDrawUtil()->clearBitmapModulation();
GFX->getDrawUtil()->drawBitmapStretchSR(
mProfile->mTextureObject,
mProfile->getBitmapResource(),
RectI(offset, mProfile->mBitmapArrayRects[idx].extent),
mProfile->mBitmapArrayRects[idx]
);
@ -225,7 +225,7 @@ void GuiPaneControl::onRender(Point2I offset, const RectI &updateRect)
// Draw the start of the bar...
GFX->getDrawUtil()->drawBitmapStretchSR(
mProfile->mTextureObject,
mProfile->getBitmapResource(),
RectI(barOffset, mProfile->mBitmapArrayRects[2].extent),
mProfile->mBitmapArrayRects[2]
);
@ -242,7 +242,7 @@ void GuiPaneControl::onRender(Point2I offset, const RectI &updateRect)
foo.inset(1,0);
GFX->getDrawUtil()->drawBitmapStretchSR(
mProfile->mTextureObject,
mProfile->getBitmapResource(),
RectI(barOffset, Point2I(barMiddleSize, mProfile->mBitmapArrayRects[3].extent.y)),
foo
);
@ -252,7 +252,7 @@ void GuiPaneControl::onRender(Point2I offset, const RectI &updateRect)
barOffset.x += barMiddleSize;
GFX->getDrawUtil()->drawBitmapStretchSR(
mProfile->mTextureObject,
mProfile->getBitmapResource(),
RectI(barOffset, mProfile->mBitmapArrayRects[4].extent),
mProfile->mBitmapArrayRects[4]
);

View file

@ -147,7 +147,7 @@ bool GuiScrollCtrl::onWake()
if (! Parent::onWake())
return false;
mTextureObject = mProfile->mTextureObject;
mTextureObject = mProfile->getBitmapResource();
if (mTextureObject && (mProfile->constructBitmapArray() >= BmpStates * BmpCount))
{
mBitmapBounds = mProfile->mBitmapArrayRects.address();

View file

@ -678,7 +678,6 @@ bool GuiWindowCtrl::onWake()
return false;
//get the texture for the close, minimize, and maximize buttons
mTextureObject = mProfile->mTextureObject;
bool result = mProfile->constructBitmapArray() >= NumBitmaps;
if( !result )
{
@ -686,6 +685,8 @@ bool GuiWindowCtrl::onWake()
return false;
}
mTextureObject = mProfile->getBitmapResource();
mBitmapBounds = mProfile->mBitmapArrayRects.address();
S32 buttonHeight = mBitmapBounds[BmpStates * BmpClose].extent.y;