AddPartyCharacter

function name

syntax:

notes:

function may fail if the spriteset is not found. Puts the spriteset at the end of the party list.

see also:

none.

AnyKeyPressed


function name:

syntax:

notes:

returns the keycode of which the player pressed.

see also:

KeyPressed, RefreshInput.

ApplyColorMask


function name:

    void ApplyColorMask(int level, color mask)

syntax:

    color red;
    red.red = 255;
    BeginRendering();
    ApplyColorMask(255, red);

notes:

FlipScreen must be called. level denotes intensity levels, and sets how much of the color mask gets through.

see also:

FlipScreen.

BlitImage


function name:

    void BlitImage(image i, int x, int y)

syntax:

    image xyz;
    xyz = LoadImage("girl.i32");
    BlitImage(xyz, 30, 40);
    DestroyImage(xyz);

notes:

does not require FlipScreen. plainly copies the image to the screen.

see also:

DestroyImage, LoadImage.

ChangeMap


function name:

    void ChangeMap(string map)

syntax:

    ChangeMap("somemap.map");

notes:

Changes the map, stops the music if currently playing, and load the new map's music.

see also:

none.

ChangeSong


function name:

    int ChangeSong(string file)

syntax:

    int success;
    success = ChangeSong("lambada.mod");

notes:

returns true(1) if the song is played. Returns false is it can't find the file or can't play it it will return false(0). Stops any current music playing.

see also:

ChangeMap.

Delay


function name:

    void Delay(int milliseconds)

syntax:

    Delay(50);

notes:

works *almost* everywhere.

see also:

none.

DestroyImage


function name:

    void DestroyImage(image i)

syntax:

    image X;
    X = LoadImage("gfx/darin.pcx");
    'Do picture stuff here
    DestroyImage(X);

notes:

can cause memory errors if the image was not unloaded. Gives Win9x and NTs out of memory problems, and may crash the machine. So alway destroy your images after use.

see also:

BlitImage, LoadImage.

DrawText


function name:

    void DrawText(int x, int y, string text)

syntax:

    BeginRendering();
    DrawText(10, 20, "Status: Destroyed");
    EndRendering();
    Delay(30);

notes:

must be called in-between BeginRendering...EndRendering.

see also:

FlipScreen.

DrawTextBox


function name:

    void DrawTextBox(int x, int y, int w, int h, int offset, string text)

notes:

must be called in-between BeginRendering...EndRendering.

see also:

FlipScreen.

Exit


function name:

    void Exit()

syntax:

    Exit();

notes:

quits the current game. Nothing is saved, system files of the game unloads, but not the custom images. Quits cleanly.

see also:

ExitWithMessage, DestroyImage.

ExitWithMessage


function name:

    void ExitWithMessage(string message)

syntax:

    ExitWithMessage("Goodnight! Au Revoir!");

notes:

sets the quit message string and quits.

see also:

Exit.

FadeIn


function name:

    void FadeIn(int milliseconds)

syntax:

    FadeIn(200);

notes:

none.

see also:

FadeOut.

FadeOut


function name:

    void FadeOut(int milliseconds)

syntax:

    FadeOut(200);

notes:

none.

see also:

FadeIn.

FlipScreen


function name:

    void FlipScreen()

syntax:

    FlipScreen();

notes:

Must be called to show any graphical manpipulation. Flips the video memery to show the buffer memory.

see also:

none

GrabImage


function name:

    image GrabImage(int x, int y, int w, int h)

syntax:

    image screenshot;
    screenshot = GrabImage(0,0,320,240);

notes:

may be broken if the intended resolution was changed.

see also:

DestroyImage, BlitImage.

KeyPressed


function name:

    int KeyPressed(int key)

syntax:

    int inputx;
    inputx = KeyPressed(72);
    if (inputx == 1)
    {
    'do something
    }

notes:

checks for an input of a key. Returns true(1) if pressed, false(0) if not pressed.

see also:

AnyKeyPressed, RefreshInput.

LeftString


function name:

    string LeftString(string s, int numchars)

syntax:

    string abyz = "abcdefghijklmnopqrstuvwxyz";
    string abc;
    'I need only "abc" from abyz
    abc = LeftString(abyz, 3);

notes:

none.

see also:

MidString, RightString, StringLength.

LoadImage


function name:

    image LoadImage(string file)

syntax:

    image goat;
    goat = LoadImage("goat.i32");

notes:

Picture can be checked if loaded.

see also:

DestroyImage, BlitImage.

MapEngine


function name:

    void MapEngine()

syntax:

    MapEngine();

notes:

calls the Sphere's map engine. Keyboard, map, music are handled automatically to a degree.

see also:

ChangeMap.

MidString


function name:

    string MidString(string s, int offset, int numchars)

syntax:

    string abyz = "abcdefghijklmnopqrstuvwxyz";
    string jkl;
    'I need only "jkl" from abyz
    jkl = MidString(abyz, 9, 3);

notes:

none.

see also:

LeftString, RightString, StringLength.

PlayAnimation


function name:

    void PlayAnimation(string file)

syntax:

    int movie;
    movie = PlayAnimation("demo.flic");

notes:

...

see also:

FlipScreen.

PlaySoundEffect


function name:

    int PlaySoundEffect(string file)

syntax:

    int success;
    success = PlaySoundEffect("Zoom.wav");

notes:

returns true(1) if the sound is played. Returns false is it can't find the file or can't play it.

see also:

ChangeSong.

RefreshInput


function name:

    void RefreshInput()

syntax:

    RefreshInput();
    'any keyboard functions here

notes:

should be called before checking the keys. Updates the current keys pressed.

see also:

AnyKeyPressed, KeyPressed.

RightString


function name:

    string RightString(string s, int numchars)

syntax:

    string abyz = "abcdefghijklmnopqrstuvwxyz";
    string xyz;
    'I need only "xyz" from abyz
    xyz = MidString(abyz, 3);

notes:

none.

see also:

LeftString, MidString, StringLength.

SetColorMask


function name:

    ... SetColorMask(...)

syntax:

    SetColorMask(???);

notes:

...

see also:

ApplyColorMask

SetGameFont


function name:

    void SetGameFont(string font)

syntax:

    SetGameFont("system.rfn");

notes:

function possibly would fail and cause some problems if the font is not found.

see also:

none.

SetGameWindowStyle


function name:

    void SetGameWindowStyle(string windowstyle)

syntax:

    SetGameWindowStyle("funky.rws");

notes:

may possible fail if the file is not found.

see also:

none.

StringLength


function name:
    int StringLength(string s)

syntax:

    string sentence = "This line is very very long";
    int length;
    'How long is it?
    length = StringLength(sentence);

notes:

none.

see also:

LeftString, MidString, RightString.