Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Utility #194

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion make/VS2017/uox3.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1442,6 +1442,7 @@
<ClInclude Include="..\..\source\speech.h" />
<ClInclude Include="..\..\source\ssection.h" />
<ClInclude Include="..\..\source\StringUtility.hpp" />
<ClInclude Include="..\..\source\utility\strutil.hpp" />
<ClInclude Include="..\..\source\teffect.h" />
<ClInclude Include="..\..\source\townregion.h" />
<ClInclude Include="..\..\source\typedefs.h" />
Expand All @@ -1468,4 +1469,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>
7 changes: 5 additions & 2 deletions make/VS2017/uox3.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,10 @@
<ClInclude Include="..\..\source\EventTimer.hpp">
<Filter>Header Files\Utility</Filter>
</ClInclude>

<ClInclude Include="..\..\source\utility\strutil.hpp">
<Filter>Header Files\Utility</Filter>
</ClInclude>

<!-- UOData group -->
<ClInclude Include="..\..\source\mapstuff.h">
<Filter>Header Files\UOData</Filter>
Expand All @@ -581,4 +584,4 @@
<Filter>Resource Files</Filter>
</Image>
</ItemGroup>
</Project>
</Project>
5 changes: 3 additions & 2 deletions make/VS2022/uox3.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,8 @@
<ClInclude Include="..\..\source\StringUtility.hpp" />
<ClInclude Include="..\..\source\TimeUtility.hpp" />
<ClInclude Include="..\..\source\EventTimer.hpp" />

<ClInclude Include="..\..\source\strutil.hpp" />

<!-- UOData group -->
<ClInclude Include="..\..\source\mapclasses.h" />
<ClInclude Include="..\..\source\mapstuff.h" />
Expand All @@ -303,4 +304,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>
62 changes: 22 additions & 40 deletions make/VS2022/uox3.vcxproj.filters
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
Expand Down Expand Up @@ -66,7 +66,7 @@
<ClCompile Include="..\..\source\uox3.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<!-- Script group -->
<!-- Script group -->
<ClCompile Include="..\..\source\cServerData.cpp">
<Filter>Source Files\Script</Filter>
</ClCompile>
Expand All @@ -82,8 +82,7 @@
<ClCompile Include="..\..\source\ssection.cpp">
<Filter>Source Files\Script</Filter>
</ClCompile>

<!-- Base Objects group -->
<!-- Base Objects group -->
<ClCompile Include="..\..\source\boats.cpp">
<Filter>Source Files\Base Objects</Filter>
</ClCompile>
Expand Down Expand Up @@ -117,8 +116,7 @@
<ClCompile Include="..\..\source\ObjectFactory.cpp">
<Filter>Source Files\Base Objects</Filter>
</ClCompile>

<!-- Subsystem group -->
<!-- Subsystem group -->
<ClCompile Include="..\..\source\books.cpp">
<Filter>Source Files\Subsystem</Filter>
</ClCompile>
Expand Down Expand Up @@ -209,8 +207,7 @@
<ClCompile Include="..\..\source\worldmain.cpp">
<Filter>Source Files\Subsystem</Filter>
</ClCompile>

<!-- Other group -->
<!-- Other group -->
<ClCompile Include="..\..\source\ai.cpp">
<Filter>Source Files\Other</Filter>
</ClCompile>
Expand Down Expand Up @@ -256,8 +253,7 @@
<ClCompile Include="..\..\source\pcmanage.cpp">
<Filter>Source Files\Other</Filter>
</ClCompile>

<!-- JS Engine group -->
<!-- JS Engine group -->
<ClCompile Include="..\..\source\CJSEngine.cpp">
<Filter>Source Files\JS Engine</Filter>
</ClCompile>
Expand All @@ -279,8 +275,7 @@
<ClCompile Include="..\..\source\UOXJSPropertyFuncs.cpp">
<Filter>Source Files\JS Engine</Filter>
</ClCompile>

<!-- Network group -->
<!-- Network group -->
<ClCompile Include="..\..\source\CPacketReceive.cpp">
<Filter>Source Files\Network</Filter>
</ClCompile>
Expand All @@ -293,8 +288,7 @@
<ClCompile Include="..\..\source\IP4Address.cpp">
<Filter>Source Files\Network</Filter>
</ClCompile>

<!-- Utility group -->
<!-- Utility group -->
<ClCompile Include="..\..\source\StringUtility.cpp">
<Filter>Source Files\Utility</Filter>
</ClCompile>
Expand All @@ -304,8 +298,7 @@
<ClCompile Include="..\..\source\EventTimer.cpp">
<Filter>Source Files\Utility</Filter>
</ClCompile>

<!-- UOData group -->
<!-- UOData group -->
<ClCompile Include="..\..\source\mapstuff.cpp">
<Filter>Source Files\UOData</Filter>
</ClCompile>
Expand All @@ -315,14 +308,12 @@
<ClCompile Include="..\..\source\UOPData.cpp">
<Filter>Source Files\UOData</Filter>
</ClCompile>

</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\source\uox3.h">
<Filter>Header Files</Filter>
</ClInclude>

<!-- Script group -->
<!-- Script group -->
<ClInclude Include="..\..\source\cServerData.h">
<Filter>Header Files\Script</Filter>
</ClInclude>
Expand All @@ -338,8 +329,7 @@
<ClInclude Include="..\..\source\ssection.h">
<Filter>Header Files\Script</Filter>
</ClInclude>

<!-- Base Objects group -->
<!-- Base Objects group -->
<ClInclude Include="..\..\source\cBaseObject.h">
<Filter>Header Files\Base Objects</Filter>
</ClInclude>
Expand Down Expand Up @@ -379,8 +369,7 @@
<ClInclude Include="..\..\source\uoxstruct.h">
<Filter>Header Files\Base Objects</Filter>
</ClInclude>

<!-- Subsystem group -->
<!-- Subsystem group -->
<ClInclude Include="..\..\source\books.h">
<Filter>Header Files\Subsystem</Filter>
</ClInclude>
Expand Down Expand Up @@ -411,9 +400,6 @@
<ClInclude Include="..\..\source\cWeather.hpp">
<Filter>Header Files\Subsystem</Filter>
</ClInclude>
<ClInclude Include="..\..\source\gump.h">
<Filter>Header Files\Subsystem</Filter>
</ClInclude>
<ClInclude Include="..\..\source\jail.h">
<Filter>Header Files\Subsystem</Filter>
</ClInclude>
Expand Down Expand Up @@ -453,8 +439,7 @@
<ClInclude Include="..\..\source\PartySystem.h">
<Filter>Header Files\Subsystem</Filter>
</ClInclude>

<!-- Other group -->
<!-- Other group -->
<ClInclude Include="..\..\source\cdice.h">
<Filter>Header Files\Other</Filter>
</ClInclude>
Expand Down Expand Up @@ -497,8 +482,7 @@
<ClInclude Include="..\..\source\UOXStdHeaders.h">
<Filter>Header Files\Other</Filter>
</ClInclude>

<!-- JS Engine group -->
<!-- JS Engine group -->
<ClInclude Include="..\..\source\CJSEngine.h">
<Filter>Header Files\JS Engine</Filter>
</ClInclude>
Expand Down Expand Up @@ -526,11 +510,10 @@
<ClInclude Include="..\..\source\UOXJSPropertyFuncs.h">
<Filter>Header Files\JS Engine</Filter>
</ClInclude>
<ClInclude Include="..\..\source\UOXJSPropertySpecs.h">
<ClInclude Include="..\..\source\UOXJSPropertySpecs.h">
<Filter>Header Files\JS Engine</Filter>
</ClInclude>

<!-- Network group -->
<!-- Network group -->
<ClInclude Include="..\..\source\CPacketReceive.h">
<Filter>Header Files\Network</Filter>
</ClInclude>
Expand All @@ -543,20 +526,20 @@
<ClInclude Include="..\..\source\IP4Address.hpp">
<Filter>Header Files\Network</Filter>
</ClInclude>


<!-- Utility group -->
<!-- Utility group -->
<ClInclude Include="..\..\source\StringUtility.hpp">
<Filter>Header Files\Utility</Filter>
</ClInclude>
<ClInclude Include="..\..\source\TimeUtility.hpp">
<Filter>Header Files\Utility</Filter>
</ClInclude>
<ClInclude Include="..\..\source\EventTimer.hpp">
<ClInclude Include="..\..\source\EventTimer.hpp">
<Filter>Header Files\Utility</Filter>
</ClInclude>
<ClInclude Include="..\..\source\strutil.hpp">
<Filter>Header Files\Utility</Filter>
</ClInclude>

<!-- UOData group -->
<!-- UOData group -->
<ClInclude Include="..\..\source\mapstuff.h">
<Filter>Header Files\UOData</Filter>
</ClInclude>
Expand All @@ -569,7 +552,6 @@
<ClInclude Include="..\..\source\UOPData.hpp">
<Filter>Header Files\UOData</Filter>
</ClInclude>

</ItemGroup>
<ItemGroup>
<ResourceCompile Include="..\..\assets\uox3.rc">
Expand Down
26 changes: 21 additions & 5 deletions make/XCode/uox3.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@
56C9E3DB2A9C9035004D9F38 /* uox3.vcxproj */ = {isa = PBXFileReference; lastKnownFileType = text.xml; name = uox3.vcxproj; path = ../VS2017/uox3.vcxproj; sourceTree = "<group>"; };
56C9E3DC2A9C9035004D9F38 /* uox3.vcxproj.filters */ = {isa = PBXFileReference; lastKnownFileType = text.xml; name = uox3.vcxproj.filters; path = ../VS2017/uox3.vcxproj.filters; sourceTree = "<group>"; };
56C9E3DD2A9C9035004D9F38 /* uox3.sln */ = {isa = PBXFileReference; lastKnownFileType = text; name = uox3.sln; path = ../VS2017/uox3.sln; sourceTree = "<group>"; };
56D6EEC32A9F7707005355FA /* strutil.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = strutil.hpp; sourceTree = "<group>"; };
648153C929466EF400784170 /* libjscript.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libjscript.a; sourceTree = BUILT_PRODUCTS_DIR; };
64A9006A293E3DA3009B54DA /* uox3 */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = uox3; sourceTree = BUILT_PRODUCTS_DIR; };
64A90075293E3DD4009B54DA /* ai.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ai.cpp; sourceTree = "<group>"; };
Expand Down Expand Up @@ -342,6 +343,14 @@
name = vs2017;
sourceTree = "<group>";
};
56D6EEC22A9F76DD005355FA /* utility */ = {
isa = PBXGroup;
children = (
56D6EEC32A9F7707005355FA /* strutil.hpp */,
);
path = utility;
sourceTree = "<group>";
};
64A90061293E3DA3009B54DA = {
isa = PBXGroup;
children = (
Expand All @@ -363,13 +372,14 @@
64A90074293E3DD4009B54DA /* source */ = {
isa = PBXGroup;
children = (
56D6EEC22A9F76DD005355FA /* utility */,
64E2F795293FCE7500546A08 /* Script */,
64E2F790293FCE3800546A08 /* Base Objects */,
64E2F791293FCE4800546A08 /* Subsystem */,
64E2F792293FCE5900546A08 /* Other */,
64E2F793293FCE6200546A08 /* JS Engine */,
64E2F794293FCE6C00546A08 /* Network */,
64E2F797293FCE8C00546A08 /* Utility */,
64E2F797293FCE8C00546A08 /* OldUtility */,
64E2F796293FCE8400546A08 /* UOData */,
64A90089293E3DD4009B54DA /* Changelog.txt */,
64A90103293E3DD4009B54DA /* uox3.cpp */,
Expand Down Expand Up @@ -586,7 +596,7 @@
name = UOData;
sourceTree = "<group>";
};
64E2F797293FCE8C00546A08 /* Utility */ = {
64E2F797293FCE8C00546A08 /* OldUtility */ = {
isa = PBXGroup;
children = (
64A900BD293E3DD4009B54DA /* EventTimer.cpp */,
Expand All @@ -596,7 +606,7 @@
64A900FB293E3DD4009B54DA /* TimeUtility.cpp */,
64A900FC293E3DD4009B54DA /* TimeUtility.hpp */,
);
name = Utility;
name = OldUtility;
sourceTree = "<group>";
};
/* End PBXGroup section */
Expand Down Expand Up @@ -891,7 +901,10 @@
../../source,
../../spidermonkey,
);
WARNING_CFLAGS = "-Wno-shift-negative-value";
WARNING_CFLAGS = (
"-Wno-shift-negative-value",
"-Wno-format-security",
);
};
name = Debug;
};
Expand All @@ -911,7 +924,10 @@
../../source,
../../spidermonkey,
);
WARNING_CFLAGS = "-Wno-shift-negative-value";
WARNING_CFLAGS = (
"-Wno-shift-negative-value",
"-Wno-format-security",
);
};
name = Release;
};
Expand Down
2 changes: 2 additions & 0 deletions make/cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ add_executable(uox3
../../source/TimeUtility.hpp
../../source/EventTimer.cpp
../../source/EventTimer.hpp
../../source/utility/strutil.hpp
# UOData group
../../source/mapclasses.h
../../source/mapstuff.cpp
Expand Down Expand Up @@ -211,6 +212,7 @@ else()
-funsigned-char
-Wno-shift-negative-value
-Wno-deprecated-declarations
-Wno-format-security
)
if (APPLE)
# We always use the system zlib , as it is most likely better optimized
Expand Down
10 changes: 5 additions & 5 deletions source/CGump.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ void CGump::SetSerial( UI32 newSerial )
//o------------------------------------------------------------------------------------------------o
void CGump::AddBackground( UI16 x, UI16 y, UI16 gumpId, UI16 width, UI16 height )
{
TagList.push_back( oldstrutil::format( "resizepic %u %u %u %u %u", x, y, gumpId, width, height ));
TagList.push_back( util::format( "resizepic %u %u %u %u %u", x, y, gumpId, width, height ));
}

//o------------------------------------------------------------------------------------------------o
Expand All @@ -122,7 +122,7 @@ void CGump::AddBackground( UI16 x, UI16 y, UI16 gumpId, UI16 width, UI16 height
//o------------------------------------------------------------------------------------------------o
void CGump::AddGump( UI16 x, UI16 y, UI16 gumpId )
{
TagList.push_back( oldstrutil::format( "gumppic %u %u %u", x, y, gumpId ));
TagList.push_back( util::format( "gumppic %u %u %u", x, y, gumpId ));
}

//o------------------------------------------------------------------------------------------------o
Expand All @@ -132,7 +132,7 @@ void CGump::AddGump( UI16 x, UI16 y, UI16 gumpId )
//o------------------------------------------------------------------------------------------------o
void CGump::AddButton( UI16 x, UI16 y, UI16 imageUp, UI16 imageDown, UI16 behaviour, UI16 page, UI32 uniqueId )
{
TagList.push_back( oldstrutil::format( "button %u %u %u %u %u %u %u", x, y, imageUp, imageDown, behaviour, page, uniqueId ));
TagList.push_back( util::format( "button %u %u %u %u %u %u %u", x, y, imageUp, imageDown, behaviour, page, uniqueId ));
}

//o------------------------------------------------------------------------------------------------o
Expand All @@ -145,7 +145,7 @@ void CGump::AddText( UI16 x, UI16 y, UI16 hue, std::string text )
UI32 textId = static_cast<UI32>( TextList.size() );

TextList.push_back( text );
TagList.push_back( oldstrutil::format( "text %u %u %u %u", x, y, hue, textId ));
TagList.push_back( util::format( "text %u %u %u %u", x, y, hue, textId ));
}

//o------------------------------------------------------------------------------------------------o
Expand All @@ -155,7 +155,7 @@ void CGump::AddText( UI16 x, UI16 y, UI16 hue, std::string text )
//o------------------------------------------------------------------------------------------------o
UI16 CGump::StartPage( void )
{
TagList.push_back( oldstrutil::format( "page %u", PageCount ));
TagList.push_back( util::format( "page %u", PageCount ));

++PageCount;
return PageCount - 1;
Expand Down
Loading