From 24415f5ccd80808c74cca1318090e7d35ec0dcf3 Mon Sep 17 00:00:00 2001 From: Shay Date: Thu, 1 Oct 2020 16:09:19 -0600 Subject: [PATCH] clang-format stuff --- common/goos/InterpreterEval.cpp | 2 +- game/kernel/kdgo.cpp | 8 +++---- game/kernel/kmachine.cpp | 40 ++++++++++++++++----------------- game/kernel/kscheme.cpp | 2 +- game/overlord/fake_iso.cpp | 12 +++++----- game/overlord/iso.cpp | 9 ++++---- game/overlord/iso_api.cpp | 6 ++--- game/sce/deci2.cpp | 2 +- 8 files changed, 40 insertions(+), 41 deletions(-) diff --git a/common/goos/InterpreterEval.cpp b/common/goos/InterpreterEval.cpp index 226bda29a5..9bbbaf0016 100644 --- a/common/goos/InterpreterEval.cpp +++ b/common/goos/InterpreterEval.cpp @@ -637,4 +637,4 @@ Object Interpreter::eval_error(const Object& form, throw_eval_error(form, "Error: " + args.unnamed.at(0).as_string()->data); return EmptyListObject::make_new(); } -} // namespace goos \ No newline at end of file +} // namespace goos diff --git a/game/kernel/kdgo.cpp b/game/kernel/kdgo.cpp index c1d5df7d94..d5627a1ffb 100644 --- a/game/kernel/kdgo.cpp +++ b/game/kernel/kdgo.cpp @@ -176,7 +176,7 @@ void BeginLoadingDGO(const char* name, Ptr buffer1, Ptr buffer2, Ptr // file name strcpy(sMsg[msgID].name, name); - //printf("[Begin Loading DGO RPC] %s, 0x%x, 0x%x, 0x%x\n", name, buffer1.offset, buffer2.offset, + // printf("[Begin Loading DGO RPC] %s, 0x%x, 0x%x, 0x%x\n", name, buffer1.offset, buffer2.offset, // currentHeap.offset); spdlog::info("[Begin Loading DGO RPC] {}, 0x{}, 0x{}, 0x{}", name, buffer1.offset, buffer2.offset, currentHeap.offset); @@ -301,7 +301,7 @@ void load_and_link_dgo(u64 name_gstr, u64 heap_info, u64 flag, u64 buffer_size) * This does not use the mutli-threaded linker and will block until the entire file is done.e */ void load_and_link_dgo_from_c(const char* name, Ptr heap, u32 linkFlag, s32 bufferSize) { - //printf("[Load and Link DGO From C] %s\n", name); + // printf("[Load and Link DGO From C] %s\n", name); spdlog::info("[Load and Link DGO From C] {}", name); u32 oldShowStall = sShowStallMsg; @@ -351,7 +351,7 @@ void load_and_link_dgo_from_c(const char* name, Ptr heap, u32 linkFla char objName[64]; strcpy(objName, (dgoObj + 4).cast().c()); // name from dgo object header - //printf("[link and exec] %s %d\n", objName, lastObjectLoaded); + // printf("[link and exec] %s %d\n", objName, lastObjectLoaded); spdlog::info("[link and exec] {} {}", objName, lastObjectLoaded); link_and_exec(obj, objName, objSize, heap, linkFlag); // link now! @@ -361,4 +361,4 @@ void load_and_link_dgo_from_c(const char* name, Ptr heap, u32 linkFla } } sShowStallMsg = oldShowStall; -} \ No newline at end of file +} diff --git a/game/kernel/kmachine.cpp b/game/kernel/kmachine.cpp index 8e2bb63aad..3514aeb97b 100644 --- a/game/kernel/kmachine.cpp +++ b/game/kernel/kmachine.cpp @@ -148,15 +148,15 @@ void InitParms(int argc, const char* const* argv) { * DONE, EXACT */ void InitCD() { - //printf("Initializing CD drive\nThis may take a while ...\n"); + // printf("Initializing CD drive\nThis may take a while ...\n"); spdlog::debug("Initializing CD drive\nThis may take a while...\n"); sceCdInit(SCECdINIT); sceCdMmode(SCECdDVD); while (sceCdDiskReady(0) == SCECdNotReady) { - //printf("Drive not ready ... insert a disk!\n"); + // printf("Drive not ready ... insert a disk!\n"); spdlog::debug("Drive not ready... insert a disk!\n"); } - // printf("Disk type %d\n", sceCdGetDiskType()); + // printf("Disk type %d\n", sceCdGetDiskType()); spdlog::debug("Disk type {}\n", sceCdGetDiskType()); } @@ -175,27 +175,27 @@ void InitIOP() { if (!reboot) { // reboot with development IOP kernel - //printf("Rebooting IOP...\n"); + // printf("Rebooting IOP...\n"); spdlog::debug("Rebooting IOP..."); while (!sceSifRebootIop("host0:/usr/local/sce/iop/modules/ioprp221.img")) { - //printf("Failed, retrying...\n"); + // printf("Failed, retrying...\n"); spdlog::debug("Failed, retrying"); } while (!sceSifSyncIop()) { - //printf("Syncing...\n"); + // printf("Syncing...\n"); spdlog::debug("Syncing..."); } } else { // reboot with IOP kernel off of the disk // reboot with development IOP kernel - //printf("Rebooting IOP...\n"); + // printf("Rebooting IOP...\n"); spdlog::debug("Rebooting IOP..."); while (!sceSifRebootIop("cdrom0:\\DRIVERS\\IOPRP221.IMG;1")) { - //printf("Failed, retrying...\n"); + // printf("Failed, retrying...\n"); spdlog::debug("Failed, retrying"); } while (!sceSifSyncIop()) { - //printf("Syncing...\n"); + // printf("Syncing...\n"); spdlog::debug("Syncing..."); } } @@ -247,7 +247,7 @@ void InitIOP() { sceSifLoadModule("host0:/usr/home/src/989snd10/iop/989ERR.IRX", 0, nullptr); - //printf("Initializing CD library\n"); + // printf("Initializing CD library\n"); spdlog::debug("Initializing CD library..."); auto rv = sceSifLoadModule("host0:binee/overlord.irx", cmd + len + 1 - overlord_boot_command, overlord_boot_command); @@ -280,7 +280,7 @@ void InitIOP() { MsgErr("loading 989snd.irx failed\n"); } - //printf("Initializing CD library in ISO_CD mode\n"); + // printf("Initializing CD library in ISO_CD mode\n"); spdlog::debug("Initializing CD library in ISO_CD mode..."); auto rv = sceSifLoadModule("cdrom0:\\\\DRIVERS\\\\OVERLORD.IRX;1", cmd + len + 1 - overlord_boot_command, overlord_boot_command); @@ -292,7 +292,7 @@ void InitIOP() { if (rv < 0) { MsgErr("MC driver init failed %d\n", rv); } else { - //printf("InitIOP OK\n"); + // printf("InitIOP OK\n"); spdlog::debug("InitIOP OK"); } } @@ -314,8 +314,8 @@ int InitMachine() { // initialize the global heap u32 global_heap_size = GLOBAL_HEAP_END - HEAP_START; float size_mb = ((float)global_heap_size) / (float)(1 << 20); - //printf("gkernel: global heap - 0x%x to 0x%x (size %.3f MB)\n", HEAP_START, GLOBAL_HEAP_END, - // size_mb); + // printf("gkernel: global heap - 0x%x to 0x%x (size %.3f MB)\n", HEAP_START, GLOBAL_HEAP_END, + // size_mb); spdlog::info("gkernel: global heap 0x{} to 0x{} (size {} MB)", HEAP_START, GLOBAL_HEAP_END, size_mb); kinitheap(kglobalheap, Ptr(HEAP_START), global_heap_size); @@ -326,8 +326,8 @@ int InitMachine() { kinitheap(kdebugheap, Ptr(DEBUG_HEAP_START), debug_heap_size); float debug_size_mb = ((float)debug_heap_size) / (float)(1 << 20); float gap_size_mb = ((float)DEBUG_HEAP_START - GLOBAL_HEAP_END) / (float)(1 << 20); - //printf("gkernel: debug heap - 0x%x to 0x%x (size %.3f MB, gap %.3f MB)\n", DEBUG_HEAP_START, - //debug_heap_end, debug_size_mb, gap_size_mb); + // printf("gkernel: debug heap - 0x%x to 0x%x (size %.3f MB, gap %.3f MB)\n", DEBUG_HEAP_START, + // debug_heap_end, debug_size_mb, gap_size_mb); spdlog::info("gkernel: global heap 0x{} to 0x{} (size {} MB, gap {} MB)", DEBUG_HEAP_START, debug_heap_end, debug_size_mb, gap_size_mb); } else { @@ -354,10 +354,10 @@ int InitMachine() { InitGoalProto(); } - //printf("InitSound\n"); + // printf("InitSound\n"); spdlog::info("InitSound"); InitSound(); // do nothing! - //printf("InitRPC\n"); + // printf("InitRPC\n"); spdlog::info("InitRPC"); InitRPC(); // connect to IOP reset_output(); // reset output buffers @@ -369,10 +369,10 @@ int InitMachine() { } spdlog::info("InitListenerConnect"); - //printf("InitListenerConnect\n"); + // printf("InitListenerConnect\n"); InitListenerConnect(); spdlog::info("InitCheckListener"); - //printf("InitCheckListener\n"); + // printf("InitCheckListener\n"); InitCheckListener(); Msg(6, "kernel: machine started\n"); return 0; diff --git a/game/kernel/kscheme.cpp b/game/kernel/kscheme.cpp index d51c0a8652..049c2f1232 100644 --- a/game/kernel/kscheme.cpp +++ b/game/kernel/kscheme.cpp @@ -1898,7 +1898,7 @@ s32 InitHeapAndSymbol() { } else { spdlog::info("Got correct kernel version {}.{}", kernel_version >> 0x13, (kernel_version >> 3) & 0xffff); - //printf("Got correct kernel version %d.%d\n", kernel_version >> 0x13, + // printf("Got correct kernel version %d.%d\n", kernel_version >> 0x13, // (kernel_version >> 3) & 0xffff); } } diff --git a/game/overlord/fake_iso.cpp b/game/overlord/fake_iso.cpp index 5f53ba766a..50273a0104 100644 --- a/game/overlord/fake_iso.cpp +++ b/game/overlord/fake_iso.cpp @@ -216,7 +216,7 @@ uint32_t FS_GetLength(FileRecord* fr) { * This is an ISO FS API Function */ LoadStackEntry* FS_Open(FileRecord* fr, int32_t offset) { - //printf("[OVERLORD] FS Open %s\n", fr->name); // Added + // printf("[OVERLORD] FS Open %s\n", fr->name); // Added spdlog::info("[OVERLORD] FS Open {}", fr->name); LoadStackEntry* selected = nullptr; // find first unused spot on load stack. @@ -231,7 +231,7 @@ LoadStackEntry* FS_Open(FileRecord* fr, int32_t offset) { return selected; } } - //printf("[OVERLORD ISO CD] Failed to FS_Open %s\n", fr->name); + // printf("[OVERLORD ISO CD] Failed to FS_Open %s\n", fr->name); spdlog::warn("[OVERLORD] Failed to FS Open {}", fr->name); ExitIOP(); return nullptr; @@ -243,7 +243,7 @@ LoadStackEntry* FS_Open(FileRecord* fr, int32_t offset) { * This is an ISO FS API Function */ LoadStackEntry* FS_OpenWad(FileRecord* fr, int32_t offset) { - //printf("[OVERLORD] FS Open %s\n", fr->name); // Added + // printf("[OVERLORD] FS Open %s\n", fr->name); // Added spdlog::info("[OVERLORD] FS_OpenWad {}", fr->name); LoadStackEntry* selected = nullptr; for (uint32_t i = 0; i < MAX_OPEN_FILES; i++) { @@ -254,7 +254,7 @@ LoadStackEntry* FS_OpenWad(FileRecord* fr, int32_t offset) { return selected; } } - //printf("[OVERLORD ISO CD] Failed to FS_OpenWad %s\n", fr->name); + // printf("[OVERLORD ISO CD] Failed to FS_OpenWad %s\n", fr->name); spdlog::warn("[OVERLORD] Failed to FS_OpenWad {}", fr->name); ExitIOP(); return nullptr; @@ -265,7 +265,7 @@ LoadStackEntry* FS_OpenWad(FileRecord* fr, int32_t offset) { * This is an ISO FS API Function */ void FS_Close(LoadStackEntry* fd) { - //printf("[OVERLORD] FS Close %s\n", fd->fr->name); + // printf("[OVERLORD] FS Close %s\n", fd->fr->name); spdlog::info("[OVERLORD] FS_Close {}", fd->fr->name); // close the FD @@ -285,7 +285,7 @@ uint32_t FS_BeginRead(LoadStackEntry* fd, void* buffer, int32_t len) { int32_t real_size = len; if (len < 0) { // not sure what this is about... - //printf("[OVERLORD ISO CD] negative length warning!\n"); + // printf("[OVERLORD ISO CD] negative length warning!\n"); spdlog::warn("[OVERLORD ISO CD] Negative length warning!"); real_size = len + 0x7ff; } diff --git a/game/overlord/iso.cpp b/game/overlord/iso.cpp index d38044e2f8..2991140223 100644 --- a/game/overlord/iso.cpp +++ b/game/overlord/iso.cpp @@ -18,7 +18,6 @@ #include "fake_iso.h" #include "game/common/dgo_rpc_types.h" - using namespace iop; u32 ISOThread(); @@ -494,9 +493,9 @@ u32 RunDGOStateMachine(IsoMessage* _cmd, IsoBufferHeader* buffer) { // if we are done with header if (cmd->bytes_processed == sizeof(DgoHeader)) { - //printf("[Overlord DGO] Got DGO file header for %s with %d objects\n", - //cmd->dgo_header.name, - //cmd->dgo_header.object_count); // added + // printf("[Overlord DGO] Got DGO file header for %s with %d objects\n", + // cmd->dgo_header.name, + // cmd->dgo_header.object_count); // added spdlog::info("[Overlord DGO] Got DGO file header for {} with {} objects", cmd->dgo_header.name, cmd->dgo_header.object_count); cmd->bytes_processed = 0; @@ -927,4 +926,4 @@ void CancelDGO(RPC_Dgo_Cmd* cmd) { // TODO - VAG_MarkLoopStart // TODO - VAG_MarkLoopEnd // TODO - VAG_MarkNonloopStart -// TODO - VAG_MarkNonloopEnd \ No newline at end of file +// TODO - VAG_MarkNonloopEnd diff --git a/game/overlord/iso_api.cpp b/game/overlord/iso_api.cpp index 48b5fe9d86..65a7cf8f40 100644 --- a/game/overlord/iso_api.cpp +++ b/game/overlord/iso_api.cpp @@ -8,7 +8,7 @@ using namespace iop; * Load a File to IOP memory (blocking) */ void LoadISOFileToIOP(FileRecord* file, void* addr, uint32_t length) { - //printf("[OVERLORD] LoadISOFileToIOP %s, %d/%d bytes\n", file->name, length, file->size); + // printf("[OVERLORD] LoadISOFileToIOP %s, %d/%d bytes\n", file->name, length, file->size); spdlog::info("[OVERLORD] LoadISOFileToIOP {}, {}/{} bytes", file->name, length, file->size); IsoCommandLoadSingle cmd; cmd.cmd_id = LOAD_TO_IOP_CMD_ID; @@ -29,7 +29,7 @@ void LoadISOFileToIOP(FileRecord* file, void* addr, uint32_t length) { * Load a File to IOP memory (blocking) */ void LoadISOFileToEE(FileRecord* file, uint32_t addr, uint32_t length) { - //printf("[OVERLORD] LoadISOFileToEE %s, %d/%d bytes\n", file->name, length, file->size); + // printf("[OVERLORD] LoadISOFileToEE %s, %d/%d bytes\n", file->name, length, file->size); spdlog::info("[OVERLORD] LoadISOFileToEE {}, {}/{} bytes", file->name, length, file->size); IsoCommandLoadSingle cmd; cmd.cmd_id = LOAD_TO_EE_CMD_ID; @@ -44,4 +44,4 @@ void LoadISOFileToEE(FileRecord* file, uint32_t addr, uint32_t length) { if (cmd.status) { cmd.length_to_copy = 0; } -} \ No newline at end of file +} diff --git a/game/sce/deci2.cpp b/game/sce/deci2.cpp index e8b4f91a12..38e45d605d 100644 --- a/game/sce/deci2.cpp +++ b/game/sce/deci2.cpp @@ -69,7 +69,7 @@ s32 sceDeci2Open(u16 protocol, void* opt, void (*handler)(s32 event, s32 param, drv.id = protocol_count + 1; drv.active = true; protocols[protocol_count++] = drv; - //printf("[DECI2] Add new protocol driver %d for 0x%x\n", drv.id, drv.protocol); + // printf("[DECI2] Add new protocol driver %d for 0x%x\n", drv.id, drv.protocol); spdlog::info("[DECI2] Add new protocol driver {} for 0x{}", drv.id, drv.protocol); server->unlock();