1
0
forked from 0ad/0ad

#bugfixes

wdbg: ignore exceptions generated during normal OutputDebugString
operation. (unclear why we are now getting them all of the sudden -
shouldn't happen!)

JS: fix strings identifying JS functions (some were inadvertently
renamed according to capitalized C++ names)

GameLoop: add code to import Atlas_ReportError

Register: fix include guard name and thus unbreak Atlas

This was SVN commit r5062.
This commit is contained in:
janwas 2007-05-11 13:11:25 +00:00
parent d69a0c52bb
commit 9809d5ace4
6 changed files with 12 additions and 5 deletions

View File

@ -653,6 +653,11 @@ static void get_exception_locus(const EXCEPTION_POINTERS* ep,
// - this information would not be available for C++ exceptions.
LONG WINAPI wdbg_exception_filter(EXCEPTION_POINTERS* ep)
{
// OutputDebugString raises an exception, which OUGHT to be swallowed
// by WaitForDebugEvent but sometimes isn't. if we see it, ignore it.
if(ep->ExceptionRecord->ExceptionCode == 0x40010006) // DBG_PRINTEXCEPTION_C
return EXCEPTION_CONTINUE_EXECUTION;
// note: we risk infinite recursion if someone raises an SEH exception
// from within this function. therefore, abort immediately if we have
// already been called; the first error is the most important, anyway.

View File

@ -76,12 +76,12 @@ void CEntity::ScriptingInit()
AddMethod<jsval, &CEntity::RegisterDamage>( "registerDamage", 0 );
AddMethod<jsval, &CEntity::RegisterOrderChange>( "registerOrderChange", 0 );
AddMethod<jsval, &CEntity::GetAttackDirections>( "getAttackDirections", 0 );
AddMethod<jsval, &CEntity::FindSector>( "FindSector", 4);
AddMethod<jsval, &CEntity::FindSector>( "findSector", 4);
AddMethod<jsval, &CEntity::GetHeight>( "getHeight", 0 );
AddMethod<jsval, &CEntity::HasRallyPoint>( "hasRallyPoint", 0 );
AddMethod<jsval, &CEntity::SetRallyPoint>( "setRallyPoint", 0 );
AddMethod<jsval, &CEntity::GetRallyPoint>( "getRallyPoint", 0 );
AddMethod<jsval, &CEntity::OnDamaged>( "OnDamaged", 1 );
AddMethod<jsval, &CEntity::OnDamaged>( "onDamaged", 1 );
AddMethod<jsval, &CEntity::GetVisibleEntities>( "getVisibleEntities", 0 );
AddMethod<float, &CEntity::GetDistance>( "getDistance", 1 );
AddMethod<jsval, &CEntity::FlattenTerrain>( "flattenTerrain", 0 );

View File

@ -421,7 +421,7 @@ void CTechnology::ScriptingInit()
AddMethod<jsval, &CTechnology::ApplyEffects>( "applyEffects", 2 );
AddMethod<jsval, &CTechnology::IsExcluded>( "isExcluded", 0 );
AddMethod<jsval, &CTechnology::IsValid>( "IsValid", 0 );
AddMethod<jsval, &CTechnology::IsValid>( "isValid", 0 );
AddMethod<jsval, &CTechnology::IsResearched>( "isResearched", 0 );
AddMethod<jsval, &CTechnology::GetPlayerID>( "getPlayerID", 0 );

View File

@ -160,7 +160,7 @@ void JSI_Sound::ScriptingInit()
AddMethod<bool, &JSI_Sound::Free>("free", 0);
AddMethod<bool, &JSI_Sound::SetGain>("setGain", 0);
AddMethod<bool, &JSI_Sound::SetPitch>("setPitch", 0);
AddMethod<bool, &JSI_Sound::SetPosition>("SetPosition", 0);
AddMethod<bool, &JSI_Sound::SetPosition>("setPosition", 0);
AddMethod<bool, &JSI_Sound::Fade>("fade", 0);
CJSObject<JSI_Sound>::ScriptingInit("Sound", &JSI_Sound::Construct, 1);

View File

@ -34,6 +34,7 @@ void (*Atlas_GLSetCurrent)(void* cavas);
void (*Atlas_GLSwapBuffers)(void* canvas);
void (*Atlas_NotifyEndOfFrame)();
void (*Atlas_DisplayError)(const wchar_t* text, unsigned int flags);
void (*Atlas_ReportError)();
namespace AtlasMessage
{
void* (*ShareableMallocFptr)(size_t);
@ -87,6 +88,7 @@ bool BeginAtlas(const CmdLineArgs& args, const DllLoader& dll)
dll.LoadSymbol("Atlas_GLSwapBuffers", Atlas_GLSwapBuffers);
dll.LoadSymbol("Atlas_NotifyEndOfFrame", Atlas_NotifyEndOfFrame);
dll.LoadSymbol("Atlas_DisplayError", Atlas_DisplayError);
dll.LoadSymbol("Atlas_ReportError", Atlas_ReportError);
dll.LoadSymbol("ShareableMalloc", ShareableMallocFptr);
dll.LoadSymbol("ShareableFree", ShareableFreeFptr);
}

View File

@ -4,7 +4,7 @@
// We want to include Messages.h again below, with some different definitions,
// so cheat and undefine its include-guard
#undef MESSAGES_H__
#undef INCLUDED_MESSAGES
#include <map>
#include <string>