Skip to content

Commit

Permalink
Update MRVN to be up to date* with Net-Custom's (MRVN-Radiant#74)
Browse files Browse the repository at this point in the history
* entity, surface inspectors: clear focus widget while showing to keep global shortcuts working

* improve performance of console, shader view

* * fix QComboBox popup leaking shortcuts

* sanitize Entity inspector key/value input

* * ctrl/ctrl + shift modifiers in value spinners divide step by 10 & 100 respectively

* on Enter in NonModalEntry, NonModalSpinner always do apply, since not every selected instance necessarily has shown property applied

* fix default GUI theme application on the fly

* make console text color adaptive to GUI theme changes

* install share/qt5/plugins/styles/qwindowsvistastyle.dll

for native look'n'feel in Windows with 'Default' theme

* Surface Inspector flags: fix window resizing

* rework Surface Inspector for correct +- scale buttons alignment

* fix icon name typo

* update Entity Attributes scrollbar on deselection

Qt updates on widget addition, doesn't on chosen way of deletion

* use radio menu items in grid menu

* Update pluginmenu.cpp

* fix Widget_connectToggleDependency

apply dependency effect on creation (preferences loading case; only has been working during manual toggling)

Widget_connectToggleDependency: track checkbox graying out to allow chained dependencies

* more pronounced grid major color in Blender theme

* * brush.cone result respects original brush bounds and is currect projection dependent

* tweak menu text

* fix mouse chasing in 2x2 & floating layouts

QTimer was getting new connections added w/o removing existing ones; fix the same in FreezePointer
zero check is seemingly not needed now; zeros spam was caused by this QTimer misuse

* move "windows:darkmode=1" parameter setting to qt.conf

* enable DPI awareness on Windows

fixes text size in texEdit, lineEdit, label, button, comboBox, comboBox size
setting to awareness V2 somehow has effect of not setting awareness

* texture browser, model browser trees: disable text ellision

horizontal scroll + ellided text made no much sense

* adjust preferences dialog.spinners decimals

* oops, fix misplaced code in "adjust preferences dialog.spinners decimals"

* * fix automatic target/names resolving after doing map 'Save as' or unnamed map 'Save'

original graph was kept in the namespace and new graph had 0 namespace

* * Model Browser: unmoved m2 resets models rotations

* * preferences.Selection.Create brushes in 3D (by m1 drag)

remove "Left mouse click tunnel selector" option (now always ON)

* entity smartedit.color key entry.change icon to one also making sense in linux

* * light entity radius: support negative intensity display and adjustment (keep sign while adjusting)

* fix: do not modify light intensity on transformations besides light radius transformation

* * light radiuses: don't render biggest radius, make them less occluding in 3D

* minor console tweak

* * installer of map developer's files (common shaders/textures/w/e is included in gamepack)

* * support multiple Extra Resource Paths

* * fix equally named builds execution

* add Application::aboutQt to about dialog

* * Run Engine After Compile function:

 make 'Engine to Run' & 'Engine Arguments' customizable in preferences

* simplify build code

* update quickhull lib

* * UV Tool::skew: snap lines to vertices

change snapping measure to distance

* * UV Tool: measure snapping distance in screenspace

* tweak StringOutputStream use

auto str = StringOutputStream()(bla) use form was not doing copy elision or move, but copy

* fix check_version(), RADIANT_MAJOR_VERSION was ignored

* adjust some too pruning QLayout::setContentsMargins

* got CopiedString move constructor to actually work

conditions fulfilled:
string pointer is always functional, hence no flow conditions needed
move is fully efficient
moving to different program dynamic module works (no dependency on static vars)

* use CopiedString.empty()

* fix obscure linux locale override issue (sunplug writing ? in place of -)

* be safe while doing copy to EntityClass::flagnames

* fix on import or paste: target/name "qwerty01" -> "qwerty1"

* fix Run Engine After Compile arguments passing (was eating 1st)

* move f2f inside Renderer_GetStats()

* Revert "fix build in ubuntu via using deprecated Qt function"

This reverts commit c618ce3. and f7977eb.

* fix deprecated Qt function warnings

* fix nonmonitored builds broken in 9a13f9ed552ec7a7f056557ce922746df22b970f

* fix model browser scrollbar scrolling lag in KDE

fix model browser M2 pan low sensitivity

* make position of selection position text consistent in 2D view

* * ctrl + shift + u: CSG Intersect

* fix return reference to local variable added in c6252fe

* deduplicate entity connecting code

* fix TextureBrowser::clampOriginY(), min origin could be >0

* support 16bit png loading in radiant

* fix assimp ASE loader crash when *MATERIAL_COUNT or *NUMSUBMTLS is not specified or is 0

code was doing vector[0u - 1] dereference in this case

* Disable the wayland backend on Linux by default

-disable the wayland backend on Linux by default
-update README to Remove "Running on wayland" Section
  • Loading branch information
Baklojan authored Aug 22, 2024
1 parent a374306 commit 29ded0c
Show file tree
Hide file tree
Showing 158 changed files with 2,275 additions and 2,135 deletions.
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ MRVN-Radiant is a fork of NetRadiant-custom (GtkRadiant 1.4 → massive rewri
> NOTE: These values are updated manually.
## Running on wayland
- When running on wayland you'll need to launch with `QT_QPA_PLATFORM=xcb` otherwise the OpenGL viewports wont clear properly.

## Other tools
- [bsp_tool](https://github.com/snake-biscuits/bsp_tool)
- A Python library for analyzing .bsp files
Expand Down
10 changes: 5 additions & 5 deletions contrib/bobtoolz/DPatch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,8 @@ void Build1dArray( vec3_t* array, const drawVert_t points[MAX_PATCH_WIDTH][MAX_P

void Print1dArray( vec3_t* array, int size ){
for ( int i = 0; i < size; i++ )
globalOutputStream() << "(" << array[i][0] << " " << array[i][1] << " " << array[i][2] << ")\t";
globalOutputStream() << "\n";
globalOutputStream() << '(' << array[i][0] << ' ' << array[i][1] << ' ' << array[i][2] << ")\t";
globalOutputStream() << '\n';
}

bool Compare1dArrays( vec3_t* a1, vec3_t* a2, int size ){
Expand Down Expand Up @@ -362,14 +362,14 @@ void DPatch::Invert(){
//Function to figure out what is actually going wrong.
void DPatch::DebugPrint()
{
globalOutputStream() << "width: " << width << "\theight: " << height << "\n";
globalOutputStream() << "width: " << width << "\theight: " << height << '\n';
for(int x = 0; x < height; x++)
{
for(int y = 0; y < width; y++)
{
globalOutputStream() << "\t(" << points[x][y].xyz[0] << " " << points[x][y].xyz[1] << " " << points[x][y].xyz[2] << ")\t";
globalOutputStream() << "\t(" << points[x][y].xyz[0] << ' ' << points[x][y].xyz[1] << ' ' << points[x][y].xyz[2] << ")\t";
}
globalOutputStream() << "\n";
globalOutputStream() << '\n';
}
}
*/
Expand Down
2 changes: 1 addition & 1 deletion contrib/bobtoolz/DWinding.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ void DWinding::CheckWinding(){
int j;
for ( j = 0; j < 3; j++ )
if ( p1[j] > BOGUS_RANGE || p1[j] < -BOGUS_RANGE ) {
globalWarningStream() << "CheckFace: BOGUS_RANGE: " << p1[j] << "\n";
globalWarningStream() << "CheckFace: BOGUS_RANGE: " << p1[j] << '\n';
}

j = i + 1 == numpoints ? 0 : i + 1;
Expand Down
8 changes: 4 additions & 4 deletions contrib/bobtoolz/dialogs/dialogs-gtk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
#include <QButtonGroup>
#include <QRadioButton>
#include <QFrame>
#include <QComboBox>
#include "gtkutil/spinbox.h"
#include "gtkutil/combobox.h"


/*--------------------------------
Expand Down Expand Up @@ -210,7 +210,7 @@ bool DoBuildStairsBox( BuildStairsRS* rs ){
}
{
form->addWidget( check_detail = new QCheckBox( "Use Detail Brushes" ) );
QObject::connect( group_style, QOverload<int>::of( &QButtonGroup::buttonClicked ), [check_detail]( int id ){
QObject::connect( group_style, &QButtonGroup::idClicked, [check_detail]( int id ){
check_detail->setEnabled( id == STYLE_BOB );
} );
check_detail->setEnabled( false );
Expand Down Expand Up @@ -258,7 +258,7 @@ bool DoDoorsBox( DoorRS* rs ){
auto form = new QFormLayout( &dialog );
form->setSizeConstraint( QLayout::SizeConstraint::SetFixedSize );
{
form->addRow( "Door Front/Back Texture", comboMain = new QComboBox );
form->addRow( "Door Front/Back Texture", comboMain = new ComboBox );
char buffer[256];
comboMain->addItems( LoadListStore( GetFilename( buffer, "bt/door-tex.txt" ) ) );
comboMain->setEditable( true );
Expand All @@ -272,7 +272,7 @@ bool DoDoorsBox( DoorRS* rs ){
checkScaleMainV->setChecked( true );
}
{
form->addRow( "Door Trim Texture", comboTrim = new QComboBox );
form->addRow( "Door Trim Texture", comboTrim = new ComboBox );
char buffer[256];
comboTrim->addItems( LoadListStore( GetFilename( buffer, "bt/door-tex-trim.txt" ) ) );
comboTrim->setEditable( true );
Expand Down
4 changes: 2 additions & 2 deletions contrib/bobtoolz/lists.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ bool LoadExclusionList( char* filename, std::list<Str>* exclusionList ){
return true;
}

globalErrorStream() << "Failed To Load Exclusion List: " << filename << "\n";
globalErrorStream() << "Failed To Load Exclusion List: " << filename << '\n';
return false;
}

Expand All @@ -64,6 +64,6 @@ QStringList LoadListStore( char* filename ){
return list;
}

globalErrorStream() << "Failed To Load GList: " << filename << "\n";
globalErrorStream() << "Failed To Load GList: " << filename << '\n';
return list;
}
8 changes: 4 additions & 4 deletions contrib/brushexport/callbacks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,22 @@ static std::string s_export_path;

void OnExportClicked( bool choose_path ){
if( choose_path ){
StringOutputStream buffer( 1024 );
StringOutputStream buffer( 256 );

if( !s_export_path.empty() ){
buffer << s_export_path.c_str();
}
if( buffer.empty() ){
buffer << GlobalRadiant().getEnginePath() << GlobalRadiant().getGameName() << "/models/";

if ( !file_readable( buffer.c_str() ) ) {
if ( !file_readable( buffer ) ) {
// just go to fsmain
buffer.clear();
buffer << GlobalRadiant().getEnginePath() << GlobalRadiant().getGameName();
}
}

const char* cpath = GlobalRadiant().m_pfnFileDialog( g_dialog.window, false, "Save as Obj", buffer.c_str(), 0, false, false, true );
const char* cpath = GlobalRadiant().m_pfnFileDialog( g_dialog.window, false, "Save as Obj", buffer, 0, false, false, true );
if ( !cpath ) {
return;
}
Expand Down Expand Up @@ -63,7 +63,7 @@ void OnExportClicked( bool choose_path ){
}
#ifdef _DEBUG
for ( const std::string& str : ignore )
globalOutputStream() << str.c_str() << "\n";
globalOutputStream() << str.c_str() << '\n';
#endif
// collapse mode
collapsemode mode = COLLAPSE_NONE;
Expand Down
32 changes: 15 additions & 17 deletions contrib/brushexport/export.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,7 @@ void ExportData::BeginBrush( Brush& b ){
groups.push_back( group() );
current = &groups.back();

StringOutputStream str( 256 );
str << "Brush" << (unsigned int)groups.size();
current->name = str.c_str();
current->name = StringStream<16>( "Brush", (unsigned int)groups.size() );
}
}

Expand Down Expand Up @@ -127,7 +125,7 @@ void ExportData::AddBrushFace( Face& f ){
current->faces.push_back( &f );

#ifdef _DEBUG
globalOutputStream() << "Added Face to group " << current->name.c_str() << "\n";
globalOutputStream() << "Added Face to group " << current->name.c_str() << '\n';
#endif
}

Expand All @@ -144,7 +142,7 @@ void ExportData::GetShaderNameFromShaderPath( const char* path, std::string& nam
}

#ifdef _DEBUG
globalOutputStream() << "Last: " << (const unsigned int) last_slash << " " << "length: " << (const unsigned int)tmp.length() << "Name: " << name.c_str() << "\n";
globalOutputStream() << "Last: " << (const unsigned int) last_slash << " length: " << (const unsigned int)tmp.length() << "Name: " << name.c_str() << '\n';
#endif
}

Expand Down Expand Up @@ -198,7 +196,7 @@ bool ExportDataAsWavefront::WriteToFile( const std::string& path, collapsemode m
if ( expmat ) {
size_t last = mtlFile.find_last_of( "//" );
std::string mtllib = mtlFile.substr( last + 1, mtlFile.size() - last ).c_str();
out << "mtllib " << mtllib.c_str() << "\n";
out << "mtllib " << mtllib.c_str() << '\n';
}

unsigned int vertex_count = 0;
Expand All @@ -217,7 +215,7 @@ bool ExportDataAsWavefront::WriteToFile( const std::string& path, collapsemode m
else {
out << "\ng ";
}
out << group.name.c_str() << "\n";
out << group.name.c_str() << '\n';

// material
if ( expmat && mode == COLLAPSE_ALL ) {
Expand Down Expand Up @@ -253,9 +251,9 @@ bool ExportDataAsWavefront::WriteToFile( const std::string& path, collapsemode m
// write vertices
if( vertexN == 0 ){
vertexN = ++vertex_count;
out << "v " << FloatFormat( vertex.x(), 1, 6 ) << " " << FloatFormat( vertex.z(), 1, 6 ) << " " << FloatFormat( -vertex.y(), 1, 6 ) << "\n";
out << "v " << FloatFormat( vertex.x(), 1, 6 ) << ' ' << FloatFormat( vertex.z(), 1, 6 ) << ' ' << FloatFormat( -vertex.y(), 1, 6 ) << '\n';
}
faceLine << " " << vertexN << "/" << texcoord_count; // store faces
faceLine << ' ' << vertexN << '/' << texcoord_count; // store faces
}
while( i != 0 );

Expand All @@ -265,7 +263,7 @@ bool ExportDataAsWavefront::WriteToFile( const std::string& path, collapsemode m
brushMaterials.emplace( face->getShader().getShader(), faceLine.c_str() );
}

out << "\n";
out << '\n';

for ( const Face* face : group.faces )
{
Expand All @@ -275,7 +273,7 @@ bool ExportDataAsWavefront::WriteToFile( const std::string& path, collapsemode m
size_t i = w.numpoints;
do{
--i;
out << "vt " << FloatFormat( w[i].texcoord.x(), 1, 6 ) << " " << FloatFormat( -w[i].texcoord.y(), 1, 6 ) << "\n";
out << "vt " << FloatFormat( w[i].texcoord.x(), 1, 6 ) << ' ' << FloatFormat( -w[i].texcoord.y(), 1, 6 ) << '\n';
}
while( i != 0 );
}
Expand All @@ -301,7 +299,7 @@ bool ExportDataAsWavefront::WriteToFile( const std::string& path, collapsemode m
}
}

out << "\n";
out << '\n';
}

if ( expmat ) {
Expand All @@ -318,13 +316,13 @@ bool ExportDataAsWavefront::WriteToFile( const std::string& path, collapsemode m
const std::string& str = material.first;
const Colour3& clr = material.second;
if ( limNames && str.size() > MAX_MATERIAL_NAME ) {
outMtl << "newmtl " << str.substr( str.size() - MAX_MATERIAL_NAME, str.size() ).c_str() << "\n";
outMtl << "newmtl " << str.substr( str.size() - MAX_MATERIAL_NAME, str.size() ).c_str() << '\n';
}
else {
outMtl << "newmtl " << str.c_str() << "\n";
outMtl << "newmtl " << str.c_str() << '\n';
}
outMtl << "Kd " << clr.x() << " " << clr.y() << " " << clr.z() << "\n";
outMtl << "map_Kd " << str.c_str() << "\n";
outMtl << "Kd " << clr.x() << ' ' << clr.y() << ' ' << clr.z() << '\n';
outMtl << "map_Kd " << str.c_str() << '\n';

}
}
Expand Down Expand Up @@ -388,7 +386,7 @@ bool ExportSelection( const StringSetWithLambda& ignorelist, collapsemode m, boo
GlobalSelectionSystem().foreachSelected( vis );

if( exporter.WriteToFile( path, m ) ){
globalOutputStream() << "brushexport::ExportSelection " << path.c_str() << "\n";
globalOutputStream() << "brushexport::ExportSelection " << path.c_str() << '\n';
return true;
}

Expand Down
4 changes: 2 additions & 2 deletions contrib/prtview/ConfigDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
#include <QSlider>
#include <QLabel>
#include <QPushButton>
#include <QComboBox>
#include <QCheckBox>
#include "gtkutil/combobox.h"


static void OnColor( PackedColour& clr ){
Expand Down Expand Up @@ -132,7 +132,7 @@ void DoConfigDialog(){
form_add_slider( form, portals.clip_range, 64, 8192, "Clip range = ", "", false );
}
{
auto combo = new QComboBox;
auto combo = new ComboBox;
vbox->addWidget( combo );
combo->addItem( "Z-Buffer Test and Write (recommended for solid or no polygons)" );
combo->addItem( "Z-Buffer Test Only (recommended for transparent polygons)" );
Expand Down
3 changes: 1 addition & 2 deletions contrib/prtview/LoadPortalFileDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#include "LoadPortalFileDialog.h"

#include "stream/stringstream.h"
#include "convert.h"
#include "os/path.h"

#include "qerplugin.h"
Expand Down Expand Up @@ -71,7 +70,7 @@ bool DoLoadPortalFileDialog(){
}


portals.fn = StringOutputStream( 256 )( PathExtensionless( GlobalRadiant().getMapName() ), ".prt" );
portals.fn = StringStream( PathExtensionless( GlobalRadiant().getMapName() ), ".prt" );

line->setText( portals.fn.c_str() );
check3d->setChecked( portals.show_3d );
Expand Down
4 changes: 1 addition & 3 deletions contrib/prtview/prtview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,7 @@ const char CLIP[] = "Clip";


void PrtView_construct(){
StringOutputStream tmp( 64 );
tmp << GlobalRadiant().getSettingsPath() << "prtview.ini";
INIfn = tmp.c_str();
INIfn = StringStream( GlobalRadiant().getSettingsPath(), "prtview.ini" );

portals.show_2d = INIGetInt( RENDER_2D, 0 );
portals.width_2d = std::clamp( INIGetInt( WIDTH_2D, 3 ), 1, 10 );
Expand Down
4 changes: 2 additions & 2 deletions contrib/shaderplug/shaderplug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,8 @@ void CreateTagFile(){
}

// Get the tag file
const auto tagFile = StringOutputStream( 256 )( GlobalRadiant().getLocalRcPath(), SHADERTAG_FILE );
const auto message = StringOutputStream( 256 )( "Tag file saved to\n", tagFile, "\nPlease restart Radiant now.\n" );
const auto tagFile = StringStream( GlobalRadiant().getLocalRcPath(), SHADERTAG_FILE );
const auto message = StringStream( "Tag file saved to\n", tagFile, "\nPlease restart Radiant now.\n" );

if ( file_exists( tagFile ) ) {
EMessageBoxReturn result = GlobalRadiant().m_pfnMessageBox( g_window,
Expand Down
9 changes: 5 additions & 4 deletions contrib/sunplug/sunplug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include "iplugin.h"

#include "string/string.h"
#include "stream/stringstream.h"
#include "modulesystem/singletonmodule.h"

#include "iundo.h" // declaration of undo system
Expand Down Expand Up @@ -204,8 +205,8 @@ void MapCoordinator(){

globalOutputStream() << "SunPlug: calculating optimal coordinates\n"; // write to console that we are calculating the coordinates
const auto [ calc_min, calc_max ] = GetOptimalCoordinates(); // calculate optimal mapcoords with the dimensions of the level bounding box
globalOutputStream() << "SunPlug: advised mapcoordsmins=" << calc_min.x() << " " << calc_max.y() << "\n"; // console info about mapcoordsmins
globalOutputStream() << "SunPlug: advised mapcoordsmaxs=" << calc_max.x() << " " << calc_min.y() << "\n"; // console info about mapcoordsmaxs
globalOutputStream() << "SunPlug: advised mapcoordsmins=" << calc_min.x() << ' ' << calc_max.y() << '\n'; // console info about mapcoordsmins
globalOutputStream() << "SunPlug: advised mapcoordsmaxs=" << calc_max.x() << ' ' << calc_min.y() << '\n'; // console info about mapcoordsmaxs

{
QDialog dialog( SunPlug::main_window, Qt::Dialog | Qt::WindowCloseButtonHint );
Expand Down Expand Up @@ -260,8 +261,8 @@ void MapCoordinator(){

if( dialog.exec() ){
UndoableCommand undo( "SunPlug.entitySetMapcoords" );
theWorldspawn->setKeyValue( "mapcoordsmins", ( spin_minX->text() + " " + spin_minY->text() ).toLatin1().constData() );
theWorldspawn->setKeyValue( "mapcoordsmaxs", ( spin_maxX->text() + " " + spin_maxY->text() ).toLatin1().constData() );
theWorldspawn->setKeyValue( "mapcoordsmins", StringStream<64>( spin_minX->value(), ' ', spin_minY->value() ).toLatin1().constData() );
theWorldspawn->setKeyValue( "mapcoordsmaxs", StringStream<64>( spin_maxX->value(), ' ', spin_maxY->value() ).toLatin1().constData() );
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion contrib/ufoaiplug/ufoai_level.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ class EntityFindTeams : public scene::Graph::Walker
*/
void get_team_count( const char *classname, int *count, int *team ){
GlobalSceneGraph().traverse( EntityFindTeams( classname, count, team ) );
globalOutputStream() << "UFO:AI: classname: " << classname << ": #" << ( *count ) << "\n";
globalOutputStream() << "UFO:AI: classname: " << classname << ": #" << ( *count ) << '\n';
}

/**
Expand Down
1 change: 1 addition & 0 deletions install-dlls-msys2-mingw.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ cd $MINGWDIR
for EXTRAPATH in \
'./share/qt5/plugins/imageformats/*.dll' \
'./share/qt5/plugins/platforms/*.dll' \
'./share/qt5/plugins/styles/*.dll' \
; do
cp --parent -v `find $EXTRAPATH -type f` "$INSTALLDIR"
done
File renamed without changes
13 changes: 13 additions & 0 deletions libs/assimp/code/AssetLib/ASE/ASEParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,13 @@ void Parser::ParseLV1MaterialListBlock() {
continue;
}
if (TokenMatch(filePtr, "MATERIAL", 8)) {
// ensure we have at least one material allocated
if (iMaterialCount == 0) {
LogWarning("*MATERIAL_COUNT unspecified or 0");
iMaterialCount = 1;
m_vMaterials.resize(iOldMaterialCount + iMaterialCount, Material("INVALID"));
}

unsigned int iIndex = 0;
ParseLV4MeshLong(iIndex);

Expand Down Expand Up @@ -634,6 +641,12 @@ void Parser::ParseLV2MaterialBlock(ASE::Material &mat) {
}
// submaterial chunks
if (TokenMatch(filePtr, "SUBMATERIAL", 11)) {
// ensure we have at least one material allocated
if (iNumSubMaterials == 0) {
LogWarning("*NUMSUBMTLS unspecified or 0");
iNumSubMaterials = 1;
mat.avSubMaterials.resize(iNumSubMaterials, Material("INVALID SUBMATERIAL"));
}

unsigned int iIndex = 0;
ParseLV4MeshLong(iIndex);
Expand Down
4 changes: 2 additions & 2 deletions libs/convert.h
Original file line number Diff line number Diff line change
Expand Up @@ -162,11 +162,11 @@ class ExtendedASCIICharacterSet
/// \brief Prints the (up to) 128 characters in the current extended-ascii character set.
/// Useful for debugging.
void print() const {
globalOutputStream() << "UTF-8 conversion required from charset: " << globalCharacterSet().get() << "\n";
globalOutputStream() << "UTF-8 conversion required from charset: " << globalCharacterSet().get() << '\n';
for ( std::size_t i = 1; i < 128; ++i )
{
if ( m_decodeMap[i].buffer != 0 ) {
globalOutputStream() << extended_ascii_for_index( i ) << " = " << m_decodeMap[i] << "\n";
globalOutputStream() << extended_ascii_for_index( i ) << " = " << m_decodeMap[i] << '\n';
}
}
}
Expand Down
Loading

0 comments on commit 29ded0c

Please sign in to comment.