Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/aoineko-fr/MSXgl into main
Browse files Browse the repository at this point in the history
  • Loading branch information
aoineko-fr committed Jun 12, 2024
2 parents 84c653f + fa9a8d7 commit 30bdefd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tools/MSXtk/src/MSXbin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ void EndTable(std::string& data, const std::string& name, u32 size)
data += "\n};\n";
if (g_AddSize)
{
data += StringFormat("#define %s_SIZE %i\n", MSX::ToUpper(name), size);
data += StringFormat("#define %s_SIZE %i\n", MSX::ToUpper(name).c_str(), size);
}
break;
case DATA_LANG_ASM: data += "\n"; break;
Expand Down
7 changes: 4 additions & 3 deletions tools/MSXtk/src/MSXmath.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include <string.h>
#include <ctime>
#include <limits>
#include <cfloat>

// MSX Tool Kit
#include "MSXtk.h"
Expand Down Expand Up @@ -200,15 +201,15 @@ void PrintTable(i32 t)
switch (DataSize)
{
case MSX::DATASIZE_8bits:
x = op->Signed ? Clamp(x, _I8_MIN, _I8_MAX) : Clamp(x, 0, _UI8_MAX);
x = op->Signed ? Clamp(x, INT8_MIN, INT8_MAX) : Clamp(x, 0, UINT8_MAX);
Exporter->AddByte(0xFF & (u32)x);
break;
case MSX::DATASIZE_16bits:
x = op->Signed ? Clamp(x, _I16_MIN, _I16_MAX) : Clamp(x, 0, _UI16_MAX);
x = op->Signed ? Clamp(x, INT16_MIN, INT16_MAX) : Clamp(x, 0, UINT16_MAX);
Exporter->AddWord(0xFFFF & (u32)x);
break;
case MSX::DATASIZE_32bits:
x = op->Signed ? Clamp(x, _I32_MIN, _I32_MAX) : Clamp(x, 0, _UI32_MAX);
x = op->Signed ? Clamp(x, INT32_MIN, INT32_MAX) : Clamp(x, 0, UINT32_MAX);
Exporter->AddDouble((u32)x);
break;
}
Expand Down

0 comments on commit 30bdefd

Please sign in to comment.