Oolite 1.91.0.7646-241128-10e222e
|
import "OOJSGlobal.h"
import "OOJavaScriptEngine.h"
import "OOJSPlayer.h"
import "PlayerEntityScriptMethods.h"
import "OOStringExpander.h"
import "OOConstToString.h"
import "OOConstToJSString.h"
import "OOCollectionExtractors.h"
import "OOTexture.h"
import "GuiDisplayGen.h"
import "MyOpenGLView.h"
import "ResourceManager.h"
import "OOSystemDescriptionManager.h"
import "NSFileManagerOOExtensions.h"
import "OOJSGuiScreenKeyDefinition.h"
Go to the source code of this file.
Classes | |
category | OOJavaScriptEngine(OOMonitorSupportInternal) |
Enumerations | |
enum | { kGlobal_galaxyNumber , kGlobal_global , kGlobal_guiScreen , kGlobal_postFX , kGlobal_timeAccelerationFactor } |
Functions | |
static JSBool | GlobalGetProperty (JSContext *context, JSObject *this, jsid propID, jsval *value) |
static JSBool | GlobalSetProperty (JSContext *context, JSObject *this, jsid propID, JSBool strict, jsval *value) |
static JSBool | GlobalLog (JSContext *context, uintN argc, jsval *vp) |
static JSBool | GlobalExpandDescription (JSContext *context, uintN argc, jsval *vp) |
static JSBool | GlobalKeyBindingDescription (JSContext *context, uintN argc, jsval *vp) |
static JSBool | GlobalExpandMissionText (JSContext *context, uintN argc, jsval *vp) |
static JSBool | GlobalDisplayNameForCommodity (JSContext *context, uintN argc, jsval *vp) |
static JSBool | GlobalRandomName (JSContext *context, uintN argc, jsval *vp) |
static JSBool | GlobalRandomInhabitantsDescription (JSContext *context, uintN argc, jsval *vp) |
static JSBool | GlobalSetScreenBackground (JSContext *context, uintN argc, jsval *vp) |
static JSBool | GlobalSetScreenOverlay (JSContext *context, uintN argc, jsval *vp) |
static JSBool | GlobalGetScreenBackgroundForKey (JSContext *context, uintN argc, jsval *vp) |
static JSBool | GlobalSetScreenBackgroundForKey (JSContext *context, uintN argc, jsval *vp) |
static JSBool | GlobalAutoAIForRole (JSContext *context, uintN argc, jsval *vp) |
static JSBool | GlobalPauseGame (JSContext *context, uintN argc, jsval *vp) |
static JSBool | GlobalGetGuiColorSettingForKey (JSContext *context, uintN argc, jsval *vp) |
static JSBool | GlobalSetGuiColorSettingForKey (JSContext *context, uintN argc, jsval *vp) |
static JSBool | GlobalSetExtraGuiScreenKeys (JSContext *context, uintN argc, jsval *vp) |
static JSBool | GlobalClearExtraGuiScreenKeys (JSContext *context, uintN argc, jsval *vp) |
static JSBool | GlobalGetColorSaturation (JSContext *context, uintN argc, jsval *vp) |
static JSBool | GlobalSetColorSaturation (JSContext *context, uintN argc, jsval *vp) |
static JSBool | GlobalTakeSnapShot (JSContext *context, uintN argc, jsval *vp) |
void | CreateOOJSGlobal (JSContext *context, JSObject **outGlobal) |
void | SetUpOOJSGlobal (JSContext *context, JSObject *global) |
Variables | |
static NSString *const | kOOLogDebugMessage = @"@"script.debug.message" |
static JSClass | sGlobalClass |
static JSPropertySpec | sGlobalProperties [] |
static JSFunctionSpec | sGlobalMethods [] |
anonymous enum |
Enumerator | |
---|---|
kGlobal_galaxyNumber | |
kGlobal_global | |
kGlobal_guiScreen | |
kGlobal_postFX | |
kGlobal_timeAccelerationFactor |
Definition at line 110 of file OOJSGlobal.m.
void CreateOOJSGlobal | ( | JSContext * | context, |
JSObject ** | outGlobal ) |
Definition at line 166 of file OOJSGlobal.m.
References OOJS_PROP_READONLY, and sGlobalClass.
|
static |
Definition at line 858 of file OOJSGlobal.m.
References ResourceManager::dictionaryFromFilesNamed:inFolder:andMerge:, MIN, nil, OOJS_ARGV, OOJS_NATIVE_ENTER, OOJS_NATIVE_EXIT, OOJS_RETURN_OBJECT, OOJSReportBadArguments(), and OOStringFromJSValue().
|
static |
Definition at line 452 of file OOJSGlobal.m.
References PlayerEntity::clearExtraGuiScreenKeys:key:, EXPECT_NOT, nil, OOGUIScreenIDFromJSValue(), OOJS_ARGV, OOJS_NATIVE_ENTER, OOJS_NATIVE_EXIT, OOJS_RETURN_BOOL, OOJSReportBadArguments(), OOPlayerForScripting(), and OOStringFromJSValue().
|
static |
Definition at line 389 of file OOJSGlobal.m.
References CommodityDisplayNameForSymbolicName(), MIN, nil, OOJS_ARGV, OOJS_NATIVE_ENTER, OOJS_NATIVE_EXIT, OOJS_RETURN_OBJECT, OOJSReportBadArguments(), and OOStringFromJSValue().
|
static |
Definition at line 309 of file OOJSGlobal.m.
References kNilRandomSeed, kOOExpandForJavaScript, kOOExpandGoodRNG, MIN, nil, OOExpandDescriptionString(), OOJS_ARGV, OOJS_BEGIN_FULL_NATIVE, OOJS_END_FULL_NATIVE, OOJS_NATIVE_ENTER, OOJS_NATIVE_EXIT, OOJS_RETURN_OBJECT, OOJSDictionaryFromStringTable(), OOJSReportBadArguments(), and OOStringFromJSValue().
|
static |
Definition at line 361 of file OOJSGlobal.m.
References kNilRandomSeed, kOOExpandBackslashN, kOOExpandForJavaScript, kOOExpandGoodRNG, MIN, nil, OOExpandDescriptionString(), OOJS_ARGV, OOJS_NATIVE_ENTER, OOJS_NATIVE_EXIT, OOJS_RETURN_OBJECT, OOJSDictionaryFromStringTable(), OOJSReportBadArguments(), and OOStringFromJSValue().
|
static |
Definition at line 782 of file OOJSGlobal.m.
References OOJS_NATIVE_ENTER, OOJS_NATIVE_EXIT, OOJS_RETURN_OBJECT, and UNIVERSE.
|
static |
Definition at line 704 of file OOJSGlobal.m.
References GuiDisplayGen::colorFromSetting:defaultValue:, EXPECT_NOT, nil, OOJS_ARGV, OOJS_NATIVE_ENTER, OOJS_NATIVE_EXIT, OOJS_RETURN_OBJECT, OOJSReportBadArguments(), and OOStringFromJSValue().
|
static |
Definition at line 184 of file OOJSGlobal.m.
References kGlobal_galaxyNumber, kGlobal_guiScreen, kGlobal_postFX, kGlobal_timeAccelerationFactor, OOJS_NATIVE_ENTER, OOJS_NATIVE_EXIT, OOJSReportBadPropertySelector(), OOJSValueFromGUIScreenID(), OOPlayerForScripting(), sGlobalProperties, and UNIVERSE.
|
static |
Definition at line 617 of file OOJSGlobal.m.
References EXPECT_NOT, nil, OOJS_ARGV, OOJS_NATIVE_ENTER, OOJS_NATIVE_EXIT, OOJS_RETURN_OBJECT, OOJSReportBadArguments(), and OOStringFromJSValue().
|
static |
Definition at line 336 of file OOJSGlobal.m.
References PlayerEntity::keyBindingDescription2:, MIN, nil, OOJS_ARGV, OOJS_BEGIN_FULL_NATIVE, OOJS_END_FULL_NATIVE, OOJS_NATIVE_ENTER, OOJS_NATIVE_EXIT, OOJS_RETURN_OBJECT, OOJSReportBadArguments(), OOPlayerForScripting(), and OOStringFromJSValue().
|
static |
Definition at line 264 of file OOJSGlobal.m.
References EXPECT_NOT, kOOLogDebugMessage, nil, OOJS_ARGV, OOJS_BEGIN_FULL_NATIVE, OOJS_END_FULL_NATIVE, OOJS_NATIVE_ENTER, OOJS_NATIVE_EXIT, OOJS_RETURN_VOID, OOLog, OOLogWillDisplayMessagesInClass(), OOStringFromJSValue(), OOStringFromJSValueEvenIfNull(), OOJavaScriptEngine::sendMonitorLogMessage:withMessageClass:inContext:, and OOJavaScriptEngine::sharedEngine.
|
static |
Definition at line 880 of file OOJSGlobal.m.
|
static |
Definition at line 430 of file OOJSGlobal.m.
References make_pseudo_random_seed(), nil, OOJS_ARGV, OOJS_NATIVE_ENTER, OOJS_NATIVE_EXIT, OOJS_RETURN_OBJECT, and OOJSReportBadArguments().
|
static |
Definition at line 408 of file OOJSGlobal.m.
References currentRandomSeed(), OOExpand, OOJS_NATIVE_ENTER, OOJS_NATIVE_EXIT, OOJS_RETURN_OBJECT, Ranrot(), and setRandomSeed().
|
static |
Definition at line 793 of file OOJSGlobal.m.
References MyOpenGLView::adjustColorSaturation:, MyOpenGLView::colorSaturation, EXPECT_NOT, OOJS_ARGV, OOJS_NATIVE_ENTER, OOJS_NATIVE_EXIT, and OOJS_RETURN_VOID.
|
static |
Definition at line 487 of file OOJSGlobal.m.
References EXPECT_NOT, nil, OOGUIScreenIDFromJSValue(), OOJS_ARGV, OOJS_NATIVE_ENTER, OOJS_NATIVE_EXIT, OOJS_RETURN_BOOL, OOJSNativeObjectFromJSObject(), OOJSReportBadArguments(), OOJSValueIsFunction(), OOPlayerForScripting(), OOStringFromJSValue(), OOJSGuiScreenKeyDefinition::setCallback:, OOJSGuiScreenKeyDefinition::setCallbackThis:, PlayerEntity::setExtraGuiScreenKeys:definition:, OOJSGuiScreenKeyDefinition::setName:, and OOJSGuiScreenKeyDefinition::setRegisterKeys:.
|
static |
Definition at line 735 of file OOJSGlobal.m.
References OOColor::colorWithDescription:, EXPECT_NOT, nil, OOJS_ARGV, OOJS_NATIVE_ENTER, OOJS_NATIVE_EXIT, OOJS_RETURN_BOOL, OOJSReportBadArguments(), OOStringFromJSValue(), and GuiDisplayGen::setGuiColorSettingFromKey:color:.
|
static |
Definition at line 221 of file OOJSGlobal.m.
References kGlobal_postFX, kGlobal_timeAccelerationFactor, MAX, OOJS_NATIVE_ENTER, OOJS_NATIVE_EXIT, OOJSReportBadPropertySelector(), OOJSReportBadPropertyValue(), and sGlobalProperties.
|
static |
Definition at line 583 of file OOJSGlobal.m.
References EXPECT_NOT, nil, OOJS_ARGV, OOJS_NATIVE_ENTER, OOJS_NATIVE_EXIT, OOJS_RETURN_BOOL, OOJSReportBadArguments(), OOJSReportWarning(), PLAYER, GuiDisplayGen::setBackgroundTextureDescriptor:, GuiDisplayGen::textureDescriptorFromJSValue:inContext:callerDescription:, and UNIVERSE.
|
static |
Definition at line 640 of file OOJSGlobal.m.
References EXPECT_NOT, nil, OOJS_ARGV, OOJS_NATIVE_ENTER, OOJS_NATIVE_EXIT, OOJS_RETURN_BOOL, OOJSReportBadArguments(), OOStringFromJSValue(), and GuiDisplayGen::textureDescriptorFromJSValue:inContext:callerDescription:.
|
static |
Definition at line 673 of file OOJSGlobal.m.
References EXPECT_NOT, nil, OOJS_ARGV, OOJS_NATIVE_ENTER, OOJS_NATIVE_EXIT, OOJS_RETURN_BOOL, OOJSReportBadArguments(), OOJSReportWarning(), GuiDisplayGen::setForegroundTextureDescriptor:, GuiDisplayGen::textureDescriptorFromJSValue:inContext:callerDescription:, and UNIVERSE.
|
static |
Definition at line 813 of file OOJSGlobal.m.
References EXPECT_NOT, nil, OOJS_ARGV, OOJS_BEGIN_FULL_NATIVE, OOJS_END_FULL_NATIVE, OOJS_NATIVE_ENTER, OOJS_NATIVE_EXIT, OOJS_RETURN_BOOL, OOJSReportBadArguments(), OOJSReportWarning(), and OOStringFromJSValue().
void SetUpOOJSGlobal | ( | JSContext * | context, |
JSObject * | global ) |
Definition at line 177 of file OOJSGlobal.m.
References sGlobalMethods, and sGlobalProperties.
|
static |
Definition at line 56 of file OOJSGlobal.m.
Referenced by GlobalLog().
|
static |
Definition at line 89 of file OOJSGlobal.m.
Referenced by CreateOOJSGlobal().
|
static |
Definition at line 136 of file OOJSGlobal.m.
Referenced by SetUpOOJSGlobal().
|
static |
Definition at line 123 of file OOJSGlobal.m.
Referenced by GlobalGetProperty(), GlobalSetProperty(), and SetUpOOJSGlobal().