Changed: #877 World editor crashes on launch ...

hg/feature/sound
kervala 15 years ago
parent ad6a1e6888
commit 0e97acfacf

@ -468,12 +468,19 @@ void CMainFrame::onLogicChanged(const std::vector<NLLIGO::CPrimRegion*> &regions
bool CMainFrame::yesNoMessage (const char *format, ... )
{
// Make a buffer string
char buffer[1024];
if (format)
{
va_list args;
va_start( args, format );
char buffer[1024];
sint ret = vsnprintf( buffer, 1024, format, args );
va_end( args );
}
else
{
strcpy(buffer, "Unknown error");
}
return theApp.yesNoMessage (buffer);
}
@ -482,12 +489,19 @@ bool CMainFrame::yesNoMessage (const char *format, ... )
void CMainFrame::errorMessage (const char *format, ... )
{
// Make a buffer string
char buffer[1024];
if (format)
{
va_list args;
va_start( args, format );
char buffer[1024];
sint ret = vsnprintf( buffer, 1024, format, args );
va_end( args );
}
else
{
strcpy(buffer, "Unknown error");
}
theApp.errorMessage (buffer);
}
@ -496,12 +510,19 @@ void CMainFrame::errorMessage (const char *format, ... )
void CMainFrame::infoMessage (const char *format, ... )
{
// Make a buffer string
char buffer[1024];
if (format)
{
va_list args;
va_start( args, format );
char buffer[1024];
sint ret = vsnprintf( buffer, 1024, format, args );
va_end( args );
}
else
{
strcpy(buffer, "Unknown error");
}
theApp.infoMessage (buffer);
}

@ -430,47 +430,76 @@ void CWorldEditorApp::OnAppAbout()
bool CWorldEditorApp::yesNoMessage (const char *format, ... )
{
// Make a buffer string
char buffer[1024];
if (format)
{
va_list args;
va_start( args, format );
char buffer[1024];
sint ret = vsnprintf( buffer, 1024, format, args );
va_end( args );
}
else
{
strcpy(buffer, "Unknown error");
}
return MessageBox (m_pMainWnd?m_pMainWnd->m_hWnd:NULL, buffer, "NeL World Editor", MB_YESNO|MB_ICONQUESTION) == IDYES;
}
void CWorldEditorApp::errorMessage (const char *format, ... )
{
// Make a buffer string
char buffer[1024];
if (format)
{
va_list args;
va_start( args, format );
char buffer[1024];
sint ret = vsnprintf( buffer, 1024, format, args );
va_end( args );
}
else
{
strcpy(buffer, "Unknown error");
}
MessageBox (m_pMainWnd?m_pMainWnd->m_hWnd:NULL, buffer, "NeL World Editor", MB_OK|MB_ICONEXCLAMATION);
}
void CWorldEditorApp::infoMessage (const char *format, ... )
{
// Make a buffer string
char buffer[1024];
if (format)
{
va_list args;
va_start( args, format );
char buffer[1024];
sint ret = vsnprintf( buffer, 1024, format, args );
va_end( args );
}
else
{
strcpy(buffer, "Unknown error");
}
MessageBox (m_pMainWnd?m_pMainWnd->m_hWnd:NULL, buffer, "NeL World Editor", MB_OK|MB_ICONINFORMATION);
}
void CWorldEditorApp::syntaxError (const char *filename, xmlNodePtr xmlNode, const char *format, ...)
{
char buffer[1024];
if (format)
{
va_list args;
va_start( args, format );
char buffer[1024];
sint ret = vsnprintf( buffer, 1024, format, args );
va_end( args );
}
else
{
strcpy(buffer, "Unknown error");
}
errorMessage ("(%s), node (%s), line (%d) :\n%s", filename, xmlNode->name, (int)xmlNode->content, buffer);
}
@ -784,12 +813,19 @@ CNoInteraction::~CNoInteraction ()
void CMyLigoConfig::errorMessage (const char *format, ... )
{
// Make a buffer string
char buffer[1024];
if (format)
{
va_list args;
va_start( args, format );
char buffer[1024];
sint ret = vsnprintf( buffer, 1024, format, args );
va_end( args );
}
else
{
strcpy(buffer, "Unknown error");
}
theApp.errorMessage (buffer);
}

@ -1092,12 +1092,20 @@ void CPlugin::postRender(CDisplay &display)
// ***************************************************************************
bool CPlugin::yesNoMessage (const char *format, ... )
{
char buffer[1024];
if (format)
{
va_list args;
va_start( args, format );
char buffer[1024];
sint ret = vsnprintf( buffer, 1024, format, args );
va_end( args );
}
else
{
strcpy(buffer, "Unknown error");
}
return _PluginAccess->yesNoMessage ("Plugin AI : %s", buffer);
}
@ -1105,12 +1113,20 @@ bool CPlugin::yesNoMessage (const char *format, ... )
// ***************************************************************************
void CPlugin::errorMessage (const char *format, ... )
{
char buffer[1024];
if (format)
{
va_list args;
va_start( args, format );
char buffer[1024];
sint ret = vsnprintf( buffer, 1024, format, args );
va_end( args );
}
else
{
strcpy(buffer, "Unknown error");
}
_PluginAccess->errorMessage ("Plugin AI : %s", buffer);
}
@ -1118,12 +1134,20 @@ void CPlugin::errorMessage (const char *format, ... )
// ***************************************************************************
void CPlugin::infoMessage (const char *format, ... )
{
char buffer[1024];
if (format)
{
va_list args;
va_start( args, format );
char buffer[1024];
sint ret = vsnprintf( buffer, 1024, format, args );
va_end( args );
}
else
{
strcpy(buffer, "Unknown error");
}
_PluginAccess->infoMessage ("Plugin AI : %s", buffer);
}

Loading…
Cancel
Save