Skip to content

Commit

Permalink
tools/cxbe: Run clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
PQCraft committed Jul 28, 2023
1 parent c5d607f commit 483aba6
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 21 deletions.
38 changes: 19 additions & 19 deletions tools/cxbe/Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,26 +29,26 @@ int main(int argc, char *argv[])

bool bRetail;
uint32 dwTitleId = 0xFFFF0002;
uint32 dwRegions = XBEIMAGE_GAME_REGION_NA | XBEIMAGE_GAME_REGION_JAPAN | XBEIMAGE_GAME_REGION_RESTOFWORLD | XBEIMAGE_GAME_REGION_MANUFACTURING;;
uint32 dwRegions = XBEIMAGE_GAME_REGION_NA | XBEIMAGE_GAME_REGION_JAPAN |
XBEIMAGE_GAME_REGION_RESTOFWORLD | XBEIMAGE_GAME_REGION_MANUFACTURING;
;
uint32 dwVersion;

const char *program = argv[0];
const char *program_desc = "CXBE EXE to XBE (win32 to Xbox) Relinker (Version: " VERSION ")";
Option options[] = {
{ szExeFilename, NULL, "exefile" },
{ szXbeFilename, "OUT", "filename" },
{ szDumpFilename, "DUMPINFO", "filename" },
{ szXbeTitle, "TITLE", "title" },
{ szXbeTitleID, "TITLEID", "{%c%c-%u|%x}" },
{ szXbeRegions, "REGION",
"{-|[n][j][w][m]}\n"
" -=none, n=North America, j=Japan, w=world, m=manufacturing" },
{ szXbeVersion, "VERSION", "version" },
{ szMode, "MODE", "{debug|retail}" },
{ szLogo, "LOGO", "filename" },
{ szDebugPath, "DEBUGPATH", "path" },
{ NULL }
};
Option options[] = { { szExeFilename, NULL, "exefile" },
{ szXbeFilename, "OUT", "filename" },
{ szDumpFilename, "DUMPINFO", "filename" },
{ szXbeTitle, "TITLE", "title" },
{ szXbeTitleID, "TITLEID", "{%c%c-%u|%x}" },
{ szXbeRegions, "REGION",
"{-|[n][j][w][m]}\n"
" -=none, n=North America, j=Japan, w=world, m=manufacturing" },
{ szXbeVersion, "VERSION", "version" },
{ szMode, "MODE", "{debug|retail}" },
{ szLogo, "LOGO", "filename" },
{ szDebugPath, "DEBUGPATH", "path" },
{ NULL } };

if(ParseOptions(argv, argc, options, szErrorMessage))
{
Expand Down Expand Up @@ -91,7 +91,7 @@ int main(int argc, char *argv[])
{
char titlechar[2];
unsigned titleno;
if (sscanf(szXbeTitleID, "%c%c-%u", &titlechar[0], &titlechar[1], &titleno) != 3)
if(sscanf(szXbeTitleID, "%c%c-%u", &titlechar[0], &titlechar[1], &titleno) != 3)
{
strncpy(szErrorMessage, "invalid TITLEID", ERROR_LEN);
goto cleanup;
Expand Down Expand Up @@ -183,8 +183,8 @@ int main(int argc, char *argv[])
LogoPtr = &logo;
}

Xbe *XbeFile =
new Xbe(ExeFile, szXbeTitle, dwTitleId, dwRegions, dwVersion, bRetail, LogoPtr, szDebugPath);
Xbe *XbeFile = new Xbe(
ExeFile, szXbeTitle, dwTitleId, dwRegions, dwVersion, bRetail, LogoPtr, szDebugPath);

if(XbeFile->GetError() != 0)
{
Expand Down
3 changes: 2 additions & 1 deletion tools/cxbe/Xbe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ static size_t BasenameOffset(const std::string &path)

// construct via Exe file object
Xbe::Xbe(class Exe *x_Exe, const char *x_szTitle, uint32 x_dwTitleID, uint32 x_dwRegions,
uint32 x_dwVersion, bool x_bRetail, const std::vector<uint08> *logo, const char *x_szDebugPath)
uint32 x_dwVersion, bool x_bRetail, const std::vector<uint08> *logo,
const char *x_szDebugPath)
{
ConstructorInit();

Expand Down
3 changes: 2 additions & 1 deletion tools/cxbe/Xbe.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ class Xbe : public Error
public:
// construct via Exe file object
Xbe(class Exe *x_Exe, const char *x_szTitle, uint32 x_dwTitleID, uint32 x_dwRegions,
uint32 x_dwVersion, bool x_bRetail, const std::vector<uint08> *logo = nullptr, const char *x_szDebugPath = nullptr);
uint32 x_dwVersion, bool x_bRetail, const std::vector<uint08> *logo = nullptr,
const char *x_szDebugPath = nullptr);

// deconstructor
~Xbe();
Expand Down

0 comments on commit 483aba6

Please sign in to comment.