finish almost object output display
This commit is contained in:
parent
d37a552873
commit
c0626eefee
|
@ -368,6 +368,10 @@ namespace LibCmo::CK2 {
|
||||||
|
|
||||||
#pragma region Not important variable visitor
|
#pragma region Not important variable visitor
|
||||||
|
|
||||||
|
CK_BITMAPDATA_FLAGS CKBitmapData::GetBitmapFlags() const {
|
||||||
|
return m_BitmapFlags;
|
||||||
|
}
|
||||||
|
|
||||||
void CKBitmapData::SetCubeMap(bool is_cube) {
|
void CKBitmapData::SetCubeMap(bool is_cube) {
|
||||||
if (is_cube) {
|
if (is_cube) {
|
||||||
SetSlotCount(6);
|
SetSlotCount(6);
|
||||||
|
|
|
@ -110,6 +110,8 @@ namespace LibCmo::CK2 {
|
||||||
|
|
||||||
#pragma region Not important funcs
|
#pragma region Not important funcs
|
||||||
|
|
||||||
|
CK_BITMAPDATA_FLAGS GetBitmapFlags() const;
|
||||||
|
|
||||||
void SetCubeMap(bool is_cube);
|
void SetCubeMap(bool is_cube);
|
||||||
bool IsCubeMap() const;
|
bool IsCubeMap() const;
|
||||||
|
|
||||||
|
|
|
@ -157,7 +157,7 @@ namespace LibCmo::CK2 {
|
||||||
}
|
}
|
||||||
|
|
||||||
CKDWORD CKContext::GetManagerCount() {
|
CKDWORD CKContext::GetManagerCount() {
|
||||||
return m_ManagerList.size();
|
return static_cast<CKDWORD>(m_ManagerList.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
MgrImpls::CKBaseManager* CKContext::GetManager(CKDWORD index) {
|
MgrImpls::CKBaseManager* CKContext::GetManager(CKDWORD index) {
|
||||||
|
|
|
@ -289,7 +289,7 @@ namespace LibCmo::CK2::ObjImpls {
|
||||||
chunk->ReadStruct(uvcount);
|
chunk->ReadStruct(uvcount);
|
||||||
if (uvcount != 0) {
|
if (uvcount != 0) {
|
||||||
// make sure no overflow
|
// make sure no overflow
|
||||||
uvcount = std::min(uvcount, chl.m_CustomUV.size());
|
uvcount = std::min(uvcount, static_cast<CKDWORD>(chl.m_CustomUV.size()));
|
||||||
|
|
||||||
CKDWORD bufsize = uvcount * CKSizeof(VxMath::VxVector2);
|
CKDWORD bufsize = uvcount * CKSizeof(VxMath::VxVector2);
|
||||||
auto locker = chunk->LockReadBufferWrapper(bufsize);
|
auto locker = chunk->LockReadBufferWrapper(bufsize);
|
||||||
|
|
|
@ -93,34 +93,41 @@ namespace LibCmo::CK2::ObjImpls {
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
CKDWORD fmtbytesize;
|
CKDWORD fmtbytesize;
|
||||||
if (chunk->SeekIdentifierAndReturnSize(CK_STATESAVEFLAGS_TEXTURE::CK_STATESAVE_OLDTEXONLY, &fmtbytesize)) {
|
// MARK: there is a patch for virtools 2.1 implement.
|
||||||
|
// CK_STATESAVE_TEXONLY is noy valid in 2.1 but we add it for cpmpatibility reason.
|
||||||
|
if (chunk->SeekIdentifierAndReturnSize(CK_STATESAVEFLAGS_TEXTURE::CK_STATESAVE_OLDTEXONLY, &fmtbytesize) ||
|
||||||
|
chunk->SeekIdentifierAndReturnSize(CK_STATESAVEFLAGS_TEXTURE::CK_STATESAVE_TEXONLY, &fmtbytesize)) {
|
||||||
// for mid data:
|
// for mid data:
|
||||||
// HIGH >>> 0xFF (blank) 0xFF (save options) 0xFF (transparent + movie info + video fmt) 0xFF (mip map) <<< LOW
|
// HIGH >>> 0xFF (blank) 0xFF (save options) 0xFF (transparent + movie info + video fmt) 0xFF (mip map) <<< LOW
|
||||||
// for mixed flags:
|
// for mixed flags:
|
||||||
// HIGH >>> 1(blank) 1(cubemap) 1(has video fmt) 1(is transparent)
|
// HIGH >>> 1(blank) 1(cubemap) 1(has video fmt) 1(is transparent)
|
||||||
CKDWORD mixdata;
|
CKDWORD mixdata;
|
||||||
chunk->ReadStruct(mixdata);
|
chunk->ReadStruct(mixdata);
|
||||||
|
// set mipmap
|
||||||
m_UseMipMap = (mixdata & 0xFF);
|
m_UseMipMap = (mixdata & 0xFF);
|
||||||
m_ImageHost.SetSaveOptions(static_cast<CK_TEXTURE_SAVEOPTIONS>((mixdata & 0xFF0000) >> 16));
|
mixdata >>= 8;
|
||||||
|
// mix flags
|
||||||
mixdata = mixdata & 0xFF00 >> 8;
|
CKDWORD mixflags = mixdata & 0xFF;
|
||||||
m_ImageHost.SetTransparent(mixdata & 0x1);
|
mixdata >>= 8;
|
||||||
bool hasVideoFmt = mixdata & 0x2;
|
m_ImageHost.SetTransparent(mixflags & 0x1);
|
||||||
m_ImageHost.SetCubeMap(mixdata & 0x4);
|
bool hasVideoFmt = mixflags & 0x2;
|
||||||
// MARK: I ignore 0x4 in there because it involve video.
|
m_ImageHost.SetCubeMap(mixflags & 0x4);
|
||||||
|
// save options
|
||||||
|
m_ImageHost.SetSaveOptions(static_cast<CK_TEXTURE_SAVEOPTIONS>(mixdata & 0xFF));
|
||||||
|
mixdata >>= 8;
|
||||||
|
|
||||||
// set current slot, transparent color, and video format.
|
// set current slot, transparent color, and video format.
|
||||||
CKDWORD currentSlot, transColor;
|
CKDWORD currentSlot, transColor;
|
||||||
fmtbytesize -= CKSizeof(CKDWORD);
|
fmtbytesize -= CKSizeof(CKDWORD);
|
||||||
switch (fmtbytesize) {
|
switch (fmtbytesize) {
|
||||||
case (3 * sizeof(CKDWORD)):
|
case (3 * CKSizeof(CKDWORD)):
|
||||||
chunk->ReadStruct(transColor);
|
chunk->ReadStruct(transColor);
|
||||||
m_ImageHost.SetTransparentColor(transColor);
|
m_ImageHost.SetTransparentColor(transColor);
|
||||||
chunk->ReadStruct(currentSlot);
|
chunk->ReadStruct(currentSlot);
|
||||||
m_ImageHost.SetCurrentSlot(currentSlot);
|
m_ImageHost.SetCurrentSlot(currentSlot);
|
||||||
chunk->ReadStruct(m_VideoFormat);
|
chunk->ReadStruct(m_VideoFormat);
|
||||||
break;
|
break;
|
||||||
case (2 * sizeof(CKDWORD)):
|
case (2 * CKSizeof(CKDWORD)):
|
||||||
if (m_ImageHost.GetSlotCount() <= 1 || !hasVideoFmt) {
|
if (m_ImageHost.GetSlotCount() <= 1 || !hasVideoFmt) {
|
||||||
chunk->ReadStruct(transColor);
|
chunk->ReadStruct(transColor);
|
||||||
m_ImageHost.SetTransparentColor(transColor);
|
m_ImageHost.SetTransparentColor(transColor);
|
||||||
|
@ -133,7 +140,7 @@ namespace LibCmo::CK2::ObjImpls {
|
||||||
chunk->ReadStruct(m_VideoFormat);
|
chunk->ReadStruct(m_VideoFormat);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case (sizeof(CKDWORD)):
|
case (CKSizeof(CKDWORD)):
|
||||||
if (hasVideoFmt) {
|
if (hasVideoFmt) {
|
||||||
chunk->ReadStruct(m_VideoFormat);
|
chunk->ReadStruct(m_VideoFormat);
|
||||||
} else if (m_ImageHost.GetSlotCount() <= 1) {
|
} else if (m_ImageHost.GetSlotCount() <= 1) {
|
||||||
|
|
|
@ -339,6 +339,15 @@ namespace Unvirt::AccessibleValue {
|
||||||
{ LibCmo::CK2::CK_TEXTURE_SAVEOPTIONS::CKTEXTURE_USEGLOBAL, {"CKTEXTURE_USEGLOBAL"} },
|
{ LibCmo::CK2::CK_TEXTURE_SAVEOPTIONS::CKTEXTURE_USEGLOBAL, {"CKTEXTURE_USEGLOBAL"} },
|
||||||
{ LibCmo::CK2::CK_TEXTURE_SAVEOPTIONS::CKTEXTURE_INCLUDEORIGINALFILE, {"CKTEXTURE_INCLUDEORIGINALFILE"} },
|
{ LibCmo::CK2::CK_TEXTURE_SAVEOPTIONS::CKTEXTURE_INCLUDEORIGINALFILE, {"CKTEXTURE_INCLUDEORIGINALFILE"} },
|
||||||
};
|
};
|
||||||
|
const GeneralReflectionArray<LibCmo::CK2::CK_BITMAPDATA_FLAGS> CK_BITMAPDATA_FLAGS {
|
||||||
|
{ LibCmo::CK2::CK_BITMAPDATA_FLAGS::CKBITMAPDATA_INVALID, {"CKBITMAPDATA_INVALID"} },
|
||||||
|
{ LibCmo::CK2::CK_BITMAPDATA_FLAGS::CKBITMAPDATA_TRANSPARENT, {"CKBITMAPDATA_TRANSPARENT"} },
|
||||||
|
{ LibCmo::CK2::CK_BITMAPDATA_FLAGS::CKBITMAPDATA_FORCERESTORE, {"CKBITMAPDATA_FORCERESTORE"} },
|
||||||
|
{ LibCmo::CK2::CK_BITMAPDATA_FLAGS::CKBITMAPDATA_CLAMPUPTODATE, {"CKBITMAPDATA_CLAMPUPTODATE"} },
|
||||||
|
{ LibCmo::CK2::CK_BITMAPDATA_FLAGS::CKBITMAPDATA_CUBEMAP, {"CKBITMAPDATA_CUBEMAP"} },
|
||||||
|
{ LibCmo::CK2::CK_BITMAPDATA_FLAGS::CKBITMAPDATA_FREEVIDEOMEMORY, {"CKBITMAPDATA_FREEVIDEOMEMORY"} },
|
||||||
|
{ LibCmo::CK2::CK_BITMAPDATA_FLAGS::CKBITMAPDATA_DYNAMIC, {"CKBITMAPDATA_DYNAMIC"} },
|
||||||
|
};
|
||||||
|
|
||||||
const GeneralReflectionArray<LibCmo::VxMath::VX_PIXELFORMAT> VX_PIXELFORMAT {
|
const GeneralReflectionArray<LibCmo::VxMath::VX_PIXELFORMAT> VX_PIXELFORMAT {
|
||||||
{ LibCmo::VxMath::VX_PIXELFORMAT::UNKNOWN_PF, {"UNKNOWN_PF"} },
|
{ LibCmo::VxMath::VX_PIXELFORMAT::UNKNOWN_PF, {"UNKNOWN_PF"} },
|
||||||
|
|
|
@ -35,7 +35,10 @@ namespace Unvirt {
|
||||||
for (auto& item : desc) {
|
for (auto& item : desc) {
|
||||||
// if it have exacelt same entry, return directly
|
// if it have exacelt same entry, return directly
|
||||||
if (item.first == val) {
|
if (item.first == val) {
|
||||||
strl = item.second.mName;
|
StringHelper::StdstringPrintf(strl, "%s (0x%08" PRIXCKDWORD ")",
|
||||||
|
item.second.mName,
|
||||||
|
static_cast<LibCmo::CKDWORD>(item.first)
|
||||||
|
);
|
||||||
return strl;
|
return strl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -80,6 +83,7 @@ namespace Unvirt {
|
||||||
extern const GeneralReflectionArray<LibCmo::CK2::CK_OBJECT_FLAGS> CK_OBJECT_FLAGS;
|
extern const GeneralReflectionArray<LibCmo::CK2::CK_OBJECT_FLAGS> CK_OBJECT_FLAGS;
|
||||||
extern const GeneralReflectionArray<LibCmo::CK2::CK_3DENTITY_FLAGS> CK_3DENTITY_FLAGS;
|
extern const GeneralReflectionArray<LibCmo::CK2::CK_3DENTITY_FLAGS> CK_3DENTITY_FLAGS;
|
||||||
extern const GeneralReflectionArray<LibCmo::CK2::CK_TEXTURE_SAVEOPTIONS> CK_TEXTURE_SAVEOPTIONS;
|
extern const GeneralReflectionArray<LibCmo::CK2::CK_TEXTURE_SAVEOPTIONS> CK_TEXTURE_SAVEOPTIONS;
|
||||||
|
extern const GeneralReflectionArray<LibCmo::CK2::CK_BITMAPDATA_FLAGS> CK_BITMAPDATA_FLAGS;
|
||||||
|
|
||||||
extern const GeneralReflectionArray<LibCmo::VxMath::VX_PIXELFORMAT> VX_PIXELFORMAT;
|
extern const GeneralReflectionArray<LibCmo::VxMath::VX_PIXELFORMAT> VX_PIXELFORMAT;
|
||||||
extern const GeneralReflectionArray<LibCmo::VxMath::VXTEXTURE_BLENDMODE> VXTEXTURE_BLENDMODE;
|
extern const GeneralReflectionArray<LibCmo::VxMath::VXTEXTURE_BLENDMODE> VXTEXTURE_BLENDMODE;
|
||||||
|
|
|
@ -45,13 +45,16 @@ namespace Unvirt::StructFormatter {
|
||||||
r = (argb & 0x00FF0000) >> 16,
|
r = (argb & 0x00FF0000) >> 16,
|
||||||
g = (argb & 0x0000FF00) >> 8,
|
g = (argb & 0x0000FF00) >> 8,
|
||||||
b = (argb & 0x000000FF);
|
b = (argb & 0x000000FF);
|
||||||
fprintf(stdout, "A:%" PRIuCKDWORD " (%.4" PRIfCKFLOAT ") RGB(%" PRIuCKDWORD ", %" PRIuCKDWORD ", %" PRIuCKDWORD ") RGB#%" PRIxCKDWORD "%" PRIxCKDWORD "%" PRIxCKDWORD " RGBA#%" PRIxCKDWORD "%" PRIxCKDWORD "%" PRIxCKDWORD "%" PRIxCKDWORD,
|
fprintf(stdout, "A:%" PRIuCKDWORD " (%.4" PRIfCKFLOAT ") RGB(%" PRIuCKDWORD ", %" PRIuCKDWORD ", %" PRIuCKDWORD ") RGB#%02" PRIxCKDWORD "%02" PRIxCKDWORD "%02" PRIxCKDWORD " RGBA#%02" PRIxCKDWORD "%02" PRIxCKDWORD "%02" PRIxCKDWORD "%02" PRIxCKDWORD,
|
||||||
a, col.a,
|
a, col.a,
|
||||||
r, g, b,
|
r, g, b,
|
||||||
r, g, b,
|
r, g, b,
|
||||||
r, g, b, a
|
r, g, b, a
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
static void PrintColor(LibCmo::CKDWORD argb) {
|
||||||
|
PrintColor(LibCmo::VxMath::VxColor(argb));
|
||||||
|
}
|
||||||
|
|
||||||
template<class _Ty>
|
template<class _Ty>
|
||||||
static void GeneralPrintList(
|
static void GeneralPrintList(
|
||||||
|
@ -87,6 +90,10 @@ namespace Unvirt::StructFormatter {
|
||||||
fprintf(stdout, "CK ID: %" PRIuCKID "\n", obj->GetID());
|
fprintf(stdout, "CK ID: %" PRIuCKID "\n", obj->GetID());
|
||||||
// print class id
|
// print class id
|
||||||
fprintf(stdout, "Class ID: %" PRIiCLASSID " (%s)\n", obj->GetClassID(), AccessibleValue::GetClassIdHierarchy(obj->GetClassID()).c_str());
|
fprintf(stdout, "Class ID: %" PRIiCLASSID " (%s)\n", obj->GetClassID(), AccessibleValue::GetClassIdHierarchy(obj->GetClassID()).c_str());
|
||||||
|
// print flags
|
||||||
|
fputs("Flags:\n", stdout);
|
||||||
|
fputs(AccessibleValue::GetFlagEnumName(obj->GetObjectFlags(), AccessibleValue::EnumDesc::CK_OBJECT_FLAGS, "\n").c_str(), stdout);
|
||||||
|
fputc('\n', stdout);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void PrintCKSceneObjectDetail(LibCmo::CK2::ObjImpls::CKSceneObject* obj) {
|
static void PrintCKSceneObjectDetail(LibCmo::CK2::ObjImpls::CKSceneObject* obj) {
|
||||||
|
@ -177,7 +184,40 @@ namespace Unvirt::StructFormatter {
|
||||||
static void PrintCKTextureDetail(LibCmo::CK2::ObjImpls::CKTexture* obj) {
|
static void PrintCKTextureDetail(LibCmo::CK2::ObjImpls::CKTexture* obj) {
|
||||||
PrintCKBeObjectDetail(obj);
|
PrintCKBeObjectDetail(obj);
|
||||||
fputs(UNVIRT_TERMCOL_LIGHT_YELLOW(("CKTexture\n")), stdout);
|
fputs(UNVIRT_TERMCOL_LIGHT_YELLOW(("CKTexture\n")), stdout);
|
||||||
fputs(UNVIRT_TERMCOL_LIGHT_RED(("No Data\n")), stdout);
|
|
||||||
|
// texture
|
||||||
|
fputs("== Texture ==\n", stdout);
|
||||||
|
|
||||||
|
LibCmo::CK2::CKBitmapData& bd = obj->GetUnderlyingData();
|
||||||
|
LibCmo::CKDWORD slot_count = bd.GetSlotCount();
|
||||||
|
fprintf(stdout, "Slot Count: %" PRIuCKDWORD "\n", slot_count);
|
||||||
|
fprintf(stdout, "Current Slot: %" PRIuCKDWORD "\n", bd.GetCurrentSlot());
|
||||||
|
|
||||||
|
fputs("Index\tWidth\tHeight\tImage Addr\tImage Size\tFilename\n", stdout);
|
||||||
|
for (LibCmo::CKDWORD i = 0; i < slot_count; ++i) {
|
||||||
|
auto desc = bd.GetImageDesc(i);
|
||||||
|
|
||||||
|
fprintf(stdout, "#%" PRIuCKDWORD "\t", i);
|
||||||
|
fprintf(stdout, "%" PRIuCKDWORD "\t%" PRIuCKDWORD "\t", desc->GetWidth(), desc->GetHeight());
|
||||||
|
PrintPointer(desc->GetImage());
|
||||||
|
fputc('\t', stdout);
|
||||||
|
fprintf(stdout, "0x%" PRIxCKDWORD " bytes\t", desc->GetImageSize());
|
||||||
|
PrintCKSTRING(bd.GetSlotFileName(i));
|
||||||
|
fputc('\n', stdout);
|
||||||
|
}
|
||||||
|
|
||||||
|
// other data
|
||||||
|
fputs("== Misc ==\n", stdout);
|
||||||
|
fprintf(stdout, "Video Format: %s\n", AccessibleValue::GetEnumName(obj->GetVideoFormat(), AccessibleValue::EnumDesc::VX_PIXELFORMAT).c_str());
|
||||||
|
fprintf(stdout, "Save Option: %s\n", AccessibleValue::GetEnumName(bd.GetSaveOptions(), AccessibleValue::EnumDesc::CK_TEXTURE_SAVEOPTIONS).c_str());
|
||||||
|
fprintf(stdout, "Pick Threshold: %" PRIuCKDWORD "\n", bd.GetPickThreshold());
|
||||||
|
fputs("Transparent Color: ", stdout);
|
||||||
|
PrintColor(bd.GetTransparentColor());
|
||||||
|
fputc('\n', stdout);
|
||||||
|
|
||||||
|
fputs("Bitmap Flags:\n", stdout);
|
||||||
|
fputs(AccessibleValue::GetFlagEnumName(bd.GetBitmapFlags(), AccessibleValue::EnumDesc::CK_BITMAPDATA_FLAGS, "\n").c_str(), stdout);
|
||||||
|
fputc('\n', stdout);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void PrintCKMaterialDetail(LibCmo::CK2::ObjImpls::CKMaterial* obj) {
|
static void PrintCKMaterialDetail(LibCmo::CK2::ObjImpls::CKMaterial* obj) {
|
||||||
|
@ -204,7 +244,7 @@ namespace Unvirt::StructFormatter {
|
||||||
|
|
||||||
// basic data
|
// basic data
|
||||||
fputs("== Basic ==\n", stdout);
|
fputs("== Basic ==\n", stdout);
|
||||||
fprintf(stdout, "Both Sided: ");
|
fputs("Both Sided: ", stdout);
|
||||||
PrintBool(obj->GetTwoSidedEnabled());
|
PrintBool(obj->GetTwoSidedEnabled());
|
||||||
fputc('\n', stdout);
|
fputc('\n', stdout);
|
||||||
fprintf(stdout, "Fill Mode: %s\n", AccessibleValue::GetEnumName(obj->GetFillMode(), AccessibleValue::EnumDesc::VXFILL_MODE).c_str());
|
fprintf(stdout, "Fill Mode: %s\n", AccessibleValue::GetEnumName(obj->GetFillMode(), AccessibleValue::EnumDesc::VXFILL_MODE).c_str());
|
||||||
|
@ -227,13 +267,13 @@ namespace Unvirt::StructFormatter {
|
||||||
fprintf(stdout, "Filter Min: %s\n", AccessibleValue::GetEnumName(obj->GetTextureMinMode(), AccessibleValue::EnumDesc::VXTEXTURE_FILTERMODE).c_str());
|
fprintf(stdout, "Filter Min: %s\n", AccessibleValue::GetEnumName(obj->GetTextureMinMode(), AccessibleValue::EnumDesc::VXTEXTURE_FILTERMODE).c_str());
|
||||||
fprintf(stdout, "Filter Mag: %s\n", AccessibleValue::GetEnumName(obj->GetTextureMagMode(), AccessibleValue::EnumDesc::VXTEXTURE_FILTERMODE).c_str());
|
fprintf(stdout, "Filter Mag: %s\n", AccessibleValue::GetEnumName(obj->GetTextureMagMode(), AccessibleValue::EnumDesc::VXTEXTURE_FILTERMODE).c_str());
|
||||||
fprintf(stdout, "Address Mode: %s\n", AccessibleValue::GetEnumName(obj->GetTextureAddressMode(), AccessibleValue::EnumDesc::VXTEXTURE_ADDRESSMODE).c_str());
|
fprintf(stdout, "Address Mode: %s\n", AccessibleValue::GetEnumName(obj->GetTextureAddressMode(), AccessibleValue::EnumDesc::VXTEXTURE_ADDRESSMODE).c_str());
|
||||||
fprintf(stdout, "Perspective Correct: ");
|
fputs("Perspective Correct: ", stdout);
|
||||||
PrintBool(obj->GetPerspectiveCorrectionEnabled());
|
PrintBool(obj->GetPerspectiveCorrectionEnabled());
|
||||||
fputc('\n', stdout);
|
fputc('\n', stdout);
|
||||||
|
|
||||||
// alpha test
|
// alpha test
|
||||||
fputs("== Alpha Test ==\n", stdout);
|
fputs("== Alpha Test ==\n", stdout);
|
||||||
fprintf(stdout, "Enabled: ");
|
fputs("Enabled: ", stdout);
|
||||||
PrintBool(obj->GetAlphaTestEnabled());
|
PrintBool(obj->GetAlphaTestEnabled());
|
||||||
fputc('\n', stdout);
|
fputc('\n', stdout);
|
||||||
fprintf(stdout, "Alpha Function: %s\n", AccessibleValue::GetEnumName(obj->GetAlphaFunc(), AccessibleValue::EnumDesc::VXCMPFUNC).c_str());
|
fprintf(stdout, "Alpha Function: %s\n", AccessibleValue::GetEnumName(obj->GetAlphaFunc(), AccessibleValue::EnumDesc::VXCMPFUNC).c_str());
|
||||||
|
@ -241,7 +281,7 @@ namespace Unvirt::StructFormatter {
|
||||||
|
|
||||||
// alpha blend
|
// alpha blend
|
||||||
fputs("== Alpha Blend ==\n", stdout);
|
fputs("== Alpha Blend ==\n", stdout);
|
||||||
fprintf(stdout, "Enabled: ");
|
fputs("Enabled: ", stdout);
|
||||||
PrintBool(obj->GetAlphaBlendEnabled());
|
PrintBool(obj->GetAlphaBlendEnabled());
|
||||||
fputc('\n', stdout);
|
fputc('\n', stdout);
|
||||||
fprintf(stdout, "Source Blend: %s\n", AccessibleValue::GetEnumName(obj->GetSourceBlend(), AccessibleValue::EnumDesc::VXBLEND_MODE).c_str());
|
fprintf(stdout, "Source Blend: %s\n", AccessibleValue::GetEnumName(obj->GetSourceBlend(), AccessibleValue::EnumDesc::VXBLEND_MODE).c_str());
|
||||||
|
@ -249,7 +289,7 @@ namespace Unvirt::StructFormatter {
|
||||||
|
|
||||||
// z buffer
|
// z buffer
|
||||||
fputs("== Z-Buffer Write ==\n", stdout);
|
fputs("== Z-Buffer Write ==\n", stdout);
|
||||||
fprintf(stdout, "Enabled: ");
|
fputs("Enabled: ", stdout);
|
||||||
PrintBool(obj->GetZWriteEnabled());
|
PrintBool(obj->GetZWriteEnabled());
|
||||||
fputc('\n', stdout);
|
fputc('\n', stdout);
|
||||||
fprintf(stdout, "Z Compare Function: %s\n", AccessibleValue::GetEnumName(obj->GetZFunc(), AccessibleValue::EnumDesc::VXCMPFUNC).c_str());
|
fprintf(stdout, "Z Compare Function: %s\n", AccessibleValue::GetEnumName(obj->GetZFunc(), AccessibleValue::EnumDesc::VXCMPFUNC).c_str());
|
||||||
|
|
|
@ -47,7 +47,7 @@ namespace Unvirt {
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetCmdLine(std::string& u8cmd) {
|
void GetCmdLine(std::string& u8cmd) {
|
||||||
fputs("Unvirt> ", stdout);
|
fputs(UNVIRT_TERMCOL_LIGHT_GREEN(("Unvirt> ")), stdout);
|
||||||
#if defined(LIBCMO_OS_WIN32)
|
#if defined(LIBCMO_OS_WIN32)
|
||||||
std::wstring wcmd;
|
std::wstring wcmd;
|
||||||
std::getline(std::wcin, wcmd);
|
std::getline(std::wcin, wcmd);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user