Merge remote-tracking branch 'smally/platform_type_consistency' into platform-type-consistency

Conflicts:
	Engine/source/platform/platformCPUCount.cpp
This commit is contained in:
Daniel Buckmaster 2014-04-04 13:43:25 +11:00
commit 87d9e245b7
210 changed files with 896 additions and 896 deletions

View file

@ -539,7 +539,7 @@ DefineEngineMethod( GuiTSCtrl, getWorldToScreenScale, Point2F, (),,
//-----------------------------------------------------------------------------
DefineEngineMethod( GuiTSCtrl, calculateViewDistance, float, ( float radius ),,
DefineEngineMethod( GuiTSCtrl, calculateViewDistance, F32, ( F32 radius ),,
"Given the camera's current FOV, get the distance from the camera's viewpoint at which the given radius will fit in the render area.\n"
"@param radius Radius in world-space units which should fit in the view.\n"
"@return The distance from the viewpoint at which the given radius would be fully visible." )

View file

@ -1478,7 +1478,7 @@ void GuiWindowCtrl::positionButtons(void)
// Until a pref, if alignment is LEFT, put buttons RIGHT justified.
// ELSE, put buttons LEFT justified.
int closeLeft = mainOff.x, closeTop = mainOff.y, closeOff = buttonWidth + 2;
S32 closeLeft = mainOff.x, closeTop = mainOff.y, closeOff = buttonWidth + 2;
if ( mProfile->mAlignment == GuiControlProfile::LeftJustify )
{
closeOff = -closeOff;

View file

@ -178,13 +178,13 @@ void GuiBitmapCtrl::onRender(Point2I offset, const RectI &updateRect)
GFXTextureObject* texture = mTextureObject;
RectI srcRegion;
RectI dstRegion;
float xdone = ((float)getExtent().x/(float)texture->mBitmapSize.x)+1;
float ydone = ((float)getExtent().y/(float)texture->mBitmapSize.y)+1;
F32 xdone = ((F32)getExtent().x/(F32)texture->mBitmapSize.x)+1;
F32 ydone = ((F32)getExtent().y/(F32)texture->mBitmapSize.y)+1;
int xshift = mStartPoint.x%texture->mBitmapSize.x;
int yshift = mStartPoint.y%texture->mBitmapSize.y;
for(int y = 0; y < ydone; ++y)
for(int x = 0; x < xdone; ++x)
S32 xshift = mStartPoint.x%texture->mBitmapSize.x;
S32 yshift = mStartPoint.y%texture->mBitmapSize.y;
for(S32 y = 0; y < ydone; ++y)
for(S32 x = 0; x < xdone; ++x)
{
srcRegion.set(0,0,texture->mBitmapSize.x,texture->mBitmapSize.y);
dstRegion.set( ((texture->mBitmapSize.x*x)+offset.x)-xshift,

View file

@ -260,7 +260,7 @@ bool GuiFileTreeCtrl::matchesFilters(const char* filename)
if( !mFilters.size() )
return true;
for(int i = 0; i < mFilters.size(); i++)
for(S32 i = 0; i < mFilters.size(); i++)
{
if(FindMatch::isMatch( mFilters[i], filename))
return true;

View file

@ -213,7 +213,7 @@ void GuiGameListOptionsCtrl::addRow(const char* label, const char* optionsList,
Row * row = new Row();
Vector<StringTableEntry> options( __FILE__, __LINE__ );
S32 count = StringUnit::getUnitCount(optionsList, DELIM);
for (int i = 0; i < count; ++i)
for (S32 i = 0; i < count; ++i)
{
const char * option = StringUnit::getUnit(optionsList, i, DELIM);
options.push_back(StringTable->insert(option, true));
@ -238,7 +238,7 @@ void GuiGameListOptionsCtrl::setOptions(S32 rowIndex, const char * optionsList)
S32 count = StringUnit::getUnitCount(optionsList, DELIM);
row->mOptions.setSize(count);
for (int i = 0; i < count; ++i)
for (S32 i = 0; i < count; ++i)
{
const char * option = StringUnit::getUnit(optionsList, i, DELIM);
row->mOptions[i] = StringTable->insert(option, true);

View file

@ -138,7 +138,7 @@ DefineEngineMethod( GuiMLTextCtrl, addText, void, ( const char* text, bool refor
object->addText(text, dStrlen(text), reformat);
}
DefineEngineMethod( GuiMLTextCtrl, setCursorPosition, bool, (int newPos),,
DefineEngineMethod( GuiMLTextCtrl, setCursorPosition, bool, (S32 newPos),,
"@brief Change the text cursor's position to a new defined offset within the text in the control.\n\n"
"@param newPos Offset to place cursor.\n"
"@tsexample\n"
@ -153,7 +153,7 @@ DefineEngineMethod( GuiMLTextCtrl, setCursorPosition, bool, (int newPos),,
return object->setCursorPosition(newPos);
}
DefineEngineMethod( GuiMLTextCtrl, scrollToTag, void, (int tagID),,
DefineEngineMethod( GuiMLTextCtrl, scrollToTag, void, (S32 tagID),,
"@brief Scroll down to a specified tag.\n\n"
"Detailed description\n\n"
"@param tagID TagID to scroll the control to\n"

View file

@ -1688,7 +1688,7 @@ DefineEngineMethod( GuiTextEditCtrl, getCursorPos, S32, (),,
return( object->getCursorPos() );
}
DefineEngineMethod( GuiTextEditCtrl, setCursorPos, void, (int position),,
DefineEngineMethod( GuiTextEditCtrl, setCursorPos, void, (S32 position),,
"@brief Sets the text cursor at the defined position within the control.\n\n"
"@param position Text position to set the text cursor.\n"
"@tsexample\n"

View file

@ -79,12 +79,12 @@ IMPLEMENT_CALLBACK( GuiTextListCtrl, onDeleteKey, void, ( const char* id ),( id
"@see GuiControl\n\n"
);
static int sortColumn;
static S32 sortColumn;
static bool sIncreasing;
static const char *getColumn(const char *text)
{
int ct = sortColumn;
S32 ct = sortColumn;
while(ct--)
{
text = dStrchr(text, '\t');
@ -530,7 +530,7 @@ DefineEngineMethod( GuiTextListCtrl, getSelectedId, S32, (),,
return object->getSelectedId();
}
DefineEngineMethod( GuiTextListCtrl, setSelectedById, void, (int id),,
DefineEngineMethod( GuiTextListCtrl, setSelectedById, void, (S32 id),,
"@brief Finds the specified entry by id, then marks its row as selected.\n\n"
"@param id Entry within the text list to make selected.\n"
"@tsexample\n"
@ -548,7 +548,7 @@ DefineEngineMethod( GuiTextListCtrl, setSelectedById, void, (int id),,
object->setSelectedCell(Point2I(0, index));
}
DefineEngineMethod( GuiTextListCtrl, setSelectedRow, void, (int rowNum),,
DefineEngineMethod( GuiTextListCtrl, setSelectedRow, void, (S32 rowNum),,
"@briefSelects the specified row.\n\n"
"@param rowNum Row number to set selected.\n"
"@tsexample\n"
@ -584,7 +584,7 @@ DefineEngineMethod( GuiTextListCtrl, clearSelection, void, (),,
object->setSelectedCell(Point2I(-1, -1));
}
DefineEngineMethod( GuiTextListCtrl, addRow, S32, (int id, const char* text, int index),(0,"",-1),
DefineEngineMethod( GuiTextListCtrl, addRow, S32, (S32 id, const char* text, S32 index),(0,"",-1),
"@brief Adds a new row at end of the list with the defined id and text.\n"
"If index is used, then the new row is inserted at the row location of 'index'.\n\n"
"@param id Id of the new row.\n"
@ -612,7 +612,7 @@ DefineEngineMethod( GuiTextListCtrl, addRow, S32, (int id, const char* text, int
return ret;
}
DefineEngineMethod( GuiTextListCtrl, setRowById, void, (int id, const char* text),,
DefineEngineMethod( GuiTextListCtrl, setRowById, void, (S32 id, const char* text),,
"@brief Sets the text at the defined id.\n\n"
"@param id Id to change.\n"
"@param text Text to use at the Id.\n"
@ -629,7 +629,7 @@ DefineEngineMethod( GuiTextListCtrl, setRowById, void, (int id, const char* text
object->setEntry(id, text);
}
DefineEngineMethod( GuiTextListCtrl, sort, void, ( int columnId, bool increasing ), ( true ),
DefineEngineMethod( GuiTextListCtrl, sort, void, ( S32 columnId, bool increasing ), ( true ),
"@brief Performs a standard (alphabetical) sort on the values in the specified column.\n\n"
"@param columnId Column ID to perform the sort on.\n"
"@param increasing If false, sort will be performed in reverse.\n"
@ -646,7 +646,7 @@ DefineEngineMethod( GuiTextListCtrl, sort, void, ( int columnId, bool increasing
object->sort( columnId, increasing );
}
DefineEngineMethod( GuiTextListCtrl, sortNumerical, void, (int columnID, bool increasing), ( true ),
DefineEngineMethod( GuiTextListCtrl, sortNumerical, void, (S32 columnID, bool increasing), ( true ),
"@brief Perform a numerical sort on the values in the specified column.\n\n"
"Detailed description\n\n"
"@param columnId Column ID to perform the sort on.\n"
@ -687,7 +687,7 @@ DefineEngineMethod( GuiTextListCtrl, rowCount, S32, (),,
return object->getNumEntries();
}
DefineEngineMethod( GuiTextListCtrl, getRowId, S32, (int index),,
DefineEngineMethod( GuiTextListCtrl, getRowId, S32, (S32 index),,
"@brief Get the row ID for an index.\n\n"
"@param index Index to get the RowID at\n"
"@tsexample\n"
@ -705,7 +705,7 @@ DefineEngineMethod( GuiTextListCtrl, getRowId, S32, (int index),,
return object->mList[index].id;
}
DefineEngineMethod( GuiTextListCtrl, getRowTextById, const char*, (int id),,
DefineEngineMethod( GuiTextListCtrl, getRowTextById, const char*, (S32 id),,
"@brief Get the text of a row with the specified id.\n\n"
"@tsexample\n"
"// Define the id\n"
@ -722,7 +722,7 @@ DefineEngineMethod( GuiTextListCtrl, getRowTextById, const char*, (int id),,
return object->mList[index].text;
}
DefineEngineMethod( GuiTextListCtrl, getRowNumById, S32, (int id),,
DefineEngineMethod( GuiTextListCtrl, getRowNumById, S32, (S32 id),,
"@brief Get the row number for a specified id.\n\n"
"@param id Id to get the row number at\n"
"@tsexample\n"
@ -739,7 +739,7 @@ DefineEngineMethod( GuiTextListCtrl, getRowNumById, S32, (int id),,
return index;
}
DefineEngineMethod( GuiTextListCtrl, getRowText, const char*, (int index),,
DefineEngineMethod( GuiTextListCtrl, getRowText, const char*, (S32 index),,
"@brief Get the text of the row with the specified index.\n\n"
"@param index Row index to acquire the text at.\n"
"@tsexample\n"
@ -756,7 +756,7 @@ DefineEngineMethod( GuiTextListCtrl, getRowText, const char*, (int index),,
return object->mList[index].text;
}
DefineEngineMethod( GuiTextListCtrl, removeRowById, void, (int id),,
DefineEngineMethod( GuiTextListCtrl, removeRowById, void, (S32 id),,
"@brief Remove row with the specified id.\n\n"
"@param id Id to remove the row entry at\n"
"@tsexample\n"
@ -770,7 +770,7 @@ DefineEngineMethod( GuiTextListCtrl, removeRowById, void, (int id),,
object->removeEntry(id);
}
DefineEngineMethod( GuiTextListCtrl, removeRow, void, (int index),,
DefineEngineMethod( GuiTextListCtrl, removeRow, void, (S32 index),,
"@brief Remove a row from the table, based on its index.\n\n"
"@param index Row index to remove from the list.\n"
"@tsexample\n"
@ -784,7 +784,7 @@ DefineEngineMethod( GuiTextListCtrl, removeRow, void, (int index),,
object->removeEntryByIndex(index);
}
DefineEngineMethod( GuiTextListCtrl, scrollVisible, void, (int rowNum),,
DefineEngineMethod( GuiTextListCtrl, scrollVisible, void, (S32 rowNum),,
"@brief Scroll so the specified row is visible\n\n"
"@param rowNum Row number to make visible\n"
"@tsexample\n"
@ -813,7 +813,7 @@ DefineEngineMethod( GuiTextListCtrl, findTextIndex, S32, (const char* needle),,
return( object->findEntryByText(needle) );
}
DefineEngineMethod( GuiTextListCtrl, setRowActive, void, (int rowNum, bool active),,
DefineEngineMethod( GuiTextListCtrl, setRowActive, void, (S32 rowNum, bool active),,
"@brief Mark a specified row as active/not.\n\n"
"@param rowNum Row number to change the active state.\n"
"@param active Boolean active state to set the row number.\n"
@ -830,7 +830,7 @@ DefineEngineMethod( GuiTextListCtrl, setRowActive, void, (int rowNum, bool activ
object->setEntryActive( U32( rowNum ), active );
}
DefineEngineMethod( GuiTextListCtrl, isRowActive, bool, (int rowNum),,
DefineEngineMethod( GuiTextListCtrl, isRowActive, bool, (S32 rowNum),,
"@brief Check if the specified row is currently active or not.\n\n"
"@param rowNum Row number to check the active state.\n"
"@tsexample\n"

View file

@ -4920,7 +4920,7 @@ ConsoleMethod( GuiTreeViewCtrl, open, void, 3, 4, "(SimSet obj, bool okToEdit=tr
ConsoleMethod( GuiTreeViewCtrl, setItemTooltip, void, 4, 4, "( int id, string text ) - Set the tooltip to show for the given item." )
{
int id = dAtoi( argv[ 2 ] );
S32 id = dAtoi( argv[ 2 ] );
GuiTreeViewCtrl::Item* item = object->getItem( id );
if( !item )
@ -4934,7 +4934,7 @@ ConsoleMethod( GuiTreeViewCtrl, setItemTooltip, void, 4, 4, "( int id, string te
ConsoleMethod( GuiTreeViewCtrl, setItemImages, void, 5, 5, "( int id, int normalImage, int expandedImage ) - Sets the normal and expanded images to show for the given item." )
{
int id = dAtoi( argv[ 2 ] );
S32 id = dAtoi( argv[ 2 ] );
GuiTreeViewCtrl::Item* item = object->getItem( id );
if( !item )
@ -4949,7 +4949,7 @@ ConsoleMethod( GuiTreeViewCtrl, setItemImages, void, 5, 5, "( int id, int normal
ConsoleMethod( GuiTreeViewCtrl, isParentItem, bool, 3, 3, "( int id ) - Returns true if the given item contains child items." )
{
int id = dAtoi( argv[ 2 ] );
S32 id = dAtoi( argv[ 2 ] );
if( !id && object->getItemCount() )
return true;
@ -5065,7 +5065,7 @@ ConsoleMethod(GuiTreeViewCtrl, getSelectedObjectList, const char*, 2, 2,
dSprintf(buff,1024,"");
const Vector< GuiTreeViewCtrl::Item* > selectedItems = object->getSelectedItems();
for(int i = 0; i < selectedItems.size(); i++)
for(S32 i = 0; i < selectedItems.size(); i++)
{
GuiTreeViewCtrl::Item *item = selectedItems[i];
@ -5130,7 +5130,7 @@ ConsoleMethod(GuiTreeViewCtrl, getSelectedItemList,const char*, 2,2,"returns a s
dSprintf(buff,1024,"");
const Vector< S32 >& selected = object->getSelected();
for(int i = 0; i < selected.size(); i++)
for(S32 i = 0; i < selected.size(); i++)
{
S32 id = selected[i];
//get the current length of the buffer

View file

@ -1561,7 +1561,7 @@ void GuiCanvas::setupFences()
mFences = new GFXFence*[mNumFences];
// Allocate the new fences
for( int i = 0; i < mNumFences; i++ )
for( S32 i = 0; i < mNumFences; i++ )
mFences[i] = GFX->createFence();
}

View file

@ -97,7 +97,7 @@ void GuiEaseViewCtrl::onRender(Point2I offset, const RectI &updateRect)
// Draw curve.
for( int i = 1; i <= numPoints; ++ i )
for( S32 i = 1; i <= numPoints; ++ i )
{
F32 x = ( F32 ) i / ( F32 ) numPoints;
F32 y = mEase.getValue( x, 0, 1, 1 );

View file

@ -274,7 +274,7 @@ void GuiGraphCtrl::addDatum(S32 plotID, F32 v)
//-----------------------------------------------------------------------------
float GuiGraphCtrl::getDatum( int plotID, int sample)
F32 GuiGraphCtrl::getDatum( S32 plotID, S32 sample)
{
AssertFatal(plotID > -1 && plotID < MaxPlots, "Invalid plot specified!");
AssertFatal(sample > -1 && sample < MaxDataPoints, "Invalid sample specified!");

View file

@ -182,7 +182,7 @@ DefineEngineMethod( GuiImageList, count, S32, (),,
return object->Count();
}
DefineEngineMethod( GuiImageList, remove, bool, (int index),,
DefineEngineMethod( GuiImageList, remove, bool, (S32 index),,
"@brief Removes an image from the list by index.\n\n"
"@param index Image index to remove.\n"
"@tsexample\n"

View file

@ -193,7 +193,7 @@ DefineEngineMethod( GuiMenuBar, setMenuMargins, void, (S32 horizontalMargin, S32
object->mBitmapMargin = bitmapToTextSpacing;
}
DefineEngineMethod(GuiMenuBar, addMenu, void, (const char* menuText, int menuId),,
DefineEngineMethod(GuiMenuBar, addMenu, void, (const char* menuText, S32 menuId),,
"@brief Adds a new menu to the menu bar.\n\n"
"@param menuText Text to display for the new menu item.\n"
"@param menuId ID for the new menu item.\n"
@ -215,7 +215,7 @@ DefineEngineMethod(GuiMenuBar, addMenu, void, (const char* menuText, int menuId)
object->addMenu(menuText, menuId);
}
DefineEngineMethod(GuiMenuBar, addMenuItem, void, (const char* targetMenu, const char* menuItemText, int menuItemId, const char* accelerator, int checkGroup),
DefineEngineMethod(GuiMenuBar, addMenuItem, void, (const char* targetMenu, const char* menuItemText, S32 menuItemId, const char* accelerator, int checkGroup),
("","",0,NULL,-1),
"@brief Adds a menu item to the specified menu. The menu argument can be either the text of a menu or its id.\n\n"
"@param menu Menu name or menu Id to add the new item to.\n"
@ -496,7 +496,7 @@ DefineEngineMethod(GuiMenuBar, setMenuItemVisible, void, (const char* menuTarget
menuItem->visible = isVisible;
}
DefineEngineMethod(GuiMenuBar, setMenuItemBitmap, void, (const char* menuTarget, const char* menuItemTarget, int bitmapIndex),,
DefineEngineMethod(GuiMenuBar, setMenuItemBitmap, void, (const char* menuTarget, const char* menuItemTarget, S32 bitmapIndex),,
"@brief Sets the specified menu item bitmap index in the bitmap array. Setting the item's index to -1 will remove any bitmap.\n\n"
"@param menuTarget Menu to affect the menuItem in\n"
"@param menuItem Menu item to affect\n"

View file

@ -40,7 +40,7 @@ ConsoleDocClass( GuiParticleGraphCtrl,
GuiParticleGraphCtrl::GuiParticleGraphCtrl()
{
for(int i = 0; i < MaxPlots; i++)
for(S32 i = 0; i < MaxPlots; i++)
{
mPlots[i].mGraphColor = ColorF(1.0, 1.0, 1.0);
VECTOR_SET_ASSOCIATION(mPlots[i].mGraphData);
@ -140,7 +140,7 @@ void GuiParticleGraphCtrl::onRender(Point2I offset, const RectI &updateRect)
ColorF color(1.0f, 1.0f, 1.0f, 0.5f);
pDrawUtil->drawRectFill(updateRect, color);
for (int k = 0; k < MaxPlots; k++)
for (S32 k = 0; k < MaxPlots; k++)
{
// Nothing to graph
if ((mPlots[k].mGraphData.size() == 0) || (mPlots[k].mHidden == true))

View file

@ -42,7 +42,7 @@
static const F32 sMoveScaler = 50.0f;
static const F32 sZoomScaler = 200.0f;
static const int sNodeRectSize = 16;
static const S32 sNodeRectSize = 16;
IMPLEMENT_CONOBJECT( GuiShapeEdPreview );

View file

@ -123,13 +123,13 @@ public:
GFXTextureObject* texture = mTextureObject;
RectI srcRegion;
RectI dstRegion;
float xdone = ((float)getExtent().x/(float)texture->mBitmapSize.x)+1;
float ydone = ((float)getExtent().y/(float)texture->mBitmapSize.y)+1;
F32 xdone = ((F32)getExtent().x/(F32)texture->mBitmapSize.x)+1;
F32 ydone = ((F32)getExtent().y/(F32)texture->mBitmapSize.y)+1;
int xshift = mStartPoint.x%texture->mBitmapSize.x;
int yshift = mStartPoint.y%texture->mBitmapSize.y;
for(int y = 0; y < ydone; ++y)
for(int x = 0; x < xdone; ++x)
S32 xshift = mStartPoint.x%texture->mBitmapSize.x;
S32 yshift = mStartPoint.y%texture->mBitmapSize.y;
for(S32 y = 0; y < ydone; ++y)
for(S32 x = 0; x < xdone; ++x)
{
srcRegion.set(0,0,texture->mBitmapSize.x,texture->mBitmapSize.y);
dstRegion.set( ((texture->mBitmapSize.x*x)+offset.x)-xshift,

View file

@ -1298,7 +1298,7 @@ DefineEngineMethod( EditTSCtrl, renderCircle, void, ( Point3F pos, Point3F norma
PrimBuild::begin( GFXLineStrip, points.size() + 1 );
for( int i = 0; i < points.size(); i++ )
for( S32 i = 0; i < points.size(); i++ )
PrimBuild::vertex3fv( points[i] );
// GFX does not have a LineLoop primitive, so connect the last line
@ -1321,7 +1321,7 @@ DefineEngineMethod( EditTSCtrl, renderCircle, void, ( Point3F pos, Point3F norma
PrimBuild::vertex3fv( pos );
// Edge verts
for( int i = 0; i < points.size(); i++ )
for( S32 i = 0; i < points.size(); i++ )
PrimBuild::vertex3fv( points[i] );
PrimBuild::vertex3fv( points[0] );