Skip to content

Commit

Permalink
fix format
Browse files Browse the repository at this point in the history
  • Loading branch information
coco875 committed Jan 8, 2025
1 parent 030ab72 commit e5dc9b8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions src/graphic/Fast3D/gfx_pc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ using namespace std;
#define SUPPORT_CHECK(x) assert(x)

// SCALE_M_N: upscale/downscale M-bit integer to N-bit
#define SCALE_5_8(VAL_) (((VAL_) * 0xFF) / 0x1F)
#define SCALE_5_8(VAL_) (((VAL_)*0xFF) / 0x1F)
#define SCALE_8_5(VAL_) ((((VAL_) + 4) * 0x1F) / 0xFF)
#define SCALE_4_8(VAL_) ((VAL_) * 0x11)
#define SCALE_4_8(VAL_) ((VAL_)*0x11)
#define SCALE_8_4(VAL_) ((VAL_) / 0x11)
#define SCALE_3_8(VAL_) ((VAL_) * 0x24)
#define SCALE_3_8(VAL_) ((VAL_)*0x24)
#define SCALE_8_3(VAL_) ((VAL_) / 0x24)

// Based off the current set native dimensions or active framebuffer
Expand Down Expand Up @@ -2582,7 +2582,7 @@ static void gfx_s2dex_bg_copy(F3DuObjBg* bg) {
rawTexMetadata.v_pixel_scale = tex->VPixelScale;
rawTexMetadata.type = tex->Type;
rawTexMetadata.resource = tex;
data = (uintptr_t)reinterpret_cast<char*>(tex->ImageData);
data = (uintptr_t) reinterpret_cast<char*>(tex->ImageData);
}

s16 dsdx = 4 << 10;
Expand Down Expand Up @@ -2621,7 +2621,7 @@ static void gfx_s2dex_bg_1cyc(F3DuObjBg* bg) {
rawTexMetadata.v_pixel_scale = tex->VPixelScale;
rawTexMetadata.type = tex->Type;
rawTexMetadata.resource = tex;
data = (uintptr_t)reinterpret_cast<char*>(tex->ImageData);
data = (uintptr_t) reinterpret_cast<char*>(tex->ImageData);
}

// TODO: Implement bg scaling correctly
Expand Down Expand Up @@ -3323,7 +3323,7 @@ bool gfx_set_timg_handler_rdp(F3DGfx** cmd0) {
return false;
}

i = (uintptr_t)reinterpret_cast<char*>(tex->ImageData);
i = (uintptr_t) reinterpret_cast<char*>(tex->ImageData);
texFlags = tex->Flags;
rawTexMetdata.width = tex->Width;
rawTexMetdata.height = tex->Height;
Expand Down
2 changes: 1 addition & 1 deletion src/resource/ResourceFactoryPng.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Ship {
bool ResourceFactoryPng::FileHasValidFormatAndReader(std::shared_ptr<File> file) {
if (file->InitData->Format != RESOURCE_FORMAT_IMG) {
if (file->InitData->Format != RESOURCE_FORMAT_PNG) {
SPDLOG_ERROR("resource file format does not match factory format.");
return false;
}
Expand Down

0 comments on commit e5dc9b8

Please sign in to comment.