Sign in to follow this  
  • entries
    90
  • comments
    59
  • views
    42085

Um...

Sign in to follow this  
diablo_tk

137 views

...that screw looks a lil lose!

So basically my computer blew up. Well actually it didnt blow up but it wasnt work for the most part of last night which is kinda suxy.

I was happily minding my own business doing this and that when the computer started making wired clicky click sounds and then promptly displayed what can only be described as a 'Blue Screen of Death', reset.

-- Corrupt file *****.sys

OH NOES!!!!!

It said please insert the install/repair disk which I did to no avail - same messages so it was kinda obvious from there what the problem was. One of my memory sticks - ! I think overheated ! - got corrupt.

That was a scary night.

Anyway that's the reason I didn't post anything (apart from a comment) last night.

So from my previous post...

The whole(most, ok some of) engine has been bindded into squirrel so you can create a window, draw images, load sounds and delta time all from within scripts which is kinda cool, though I guess a completely scripted game would be kinda slow. Anyway here is all the bindednessss glory:


/*

squirrel_binding.cpp

*/

#include "squirrel_binding.h"

#undef LoadSound

namespace Fallen
{
namespace Script
{
// System bindings
SQInteger s_LoadSystemModule(HSQUIRRELVM v)
{
CSystem::LoadModule();
return 0;
}

SQInteger s_UnloadSystemModule(HSQUIRRELVM v)
{
CSystem::UnloadModule();
return 0;
}

SQInteger s_SetSystemInterface(HSQUIRRELVM v)
{
SQInteger i;
sq_getinteger(v, 2, &i);

switch (i)
{
case 1:
CSystem::SetInterface(CSystem::Interface_Win32());
break;
}
return 0;
}

SQInteger s_UpdateSystem(HSQUIRRELVM v)
{
sq_pushbool(v, (SQBool)CSystem::Update());
return 1;
}

SQInteger s_StartTimer(HSQUIRRELVM v)
{
const SQChar * resource;
sq_getstring(v, 2, &resource);

((CTimer *)CResourceManager::GetResource(resource))->Start();

return 0;
}

SQInteger s_StopTimer(HSQUIRRELVM v)
{
const SQChar * resource;
sq_getstring(v, 2, &resource);

((CTimer *)CResourceManager::GetResource(resource))->Stop();

return 0;
}

SQInteger s_GetTimerTime(HSQUIRRELVM v)
{
const SQChar * resource;
sq_getstring(v, 2, &resource);

sq_pushfloat(v, ((CTimer *)CResourceManager::GetResource(resource))->Time());

return 1;
}

SQInteger s_GetTimerDelta(HSQUIRRELVM v)
{
const SQChar * resource;
sq_getstring(v, 2, &resource);

sq_pushfloat(v, ((CTimer *)CResourceManager::GetResource(resource))->Delta());

return 1;
}

SQInteger s_CreateTimer(HSQUIRRELVM v)
{
const SQChar * resourceName;
CResourceManager::LoadResource(resourceName, CSystem::CreateTimer());
sq_pushstring(v, resourceName, -1);
return 1;
}

// Graphics Bindings
SQInteger s_LoadGraphicsModule(HSQUIRRELVM v)
{
CGraphics::LoadModule();
return 0;
}

SQInteger s_UnloadGraphicsModule(HSQUIRRELVM v)
{
CGraphics::UnloadModule();
return 0;
}

SQInteger s_SetGraphicsInterface(HSQUIRRELVM v)
{
SQInteger i;
sq_getinteger(v, 2, &i);

switch (i)
{
case 1:
CGraphics::SetInterface(CGraphics::Interface_OpenGL());
break;
}
return 0;
}

SQInteger s_CreateContext(HSQUIRRELVM v)
{
const SQChar * title;
SQInteger width, height, bitDepth;
SQBool fullscreen;
sq_getstring(v, 2, &title);
sq_getinteger(v, 3, &width);
sq_getinteger(v, 4, &height);
sq_getinteger(v, 5, &bitDepth);
sq_getbool(v, 6, &fullscreen);
CGraphics::CreateContext(title, width, height, bitDepth, fullscreen);

return 0;
}

SQInteger s_DestroyContext(HSQUIRRELVM v)
{
CGraphics::DestroyContext();

return 0;
}

SQInteger s_SetDrawColor(HSQUIRRELVM v)
{
SQFloat r, g, b;
sq_getfloat(v, 2, &r);
sq_getfloat(v, 3, &g);
sq_getfloat(v, 4, &b);
CGraphics::SetDrawColor(r, g, b);
return 0;
}

SQInteger s_SetDrawAlpha(HSQUIRRELVM v)
{
SQFloat a;
sq_getfloat(v, 2, &a);
CGraphics::SetDrawAlpha(a);
return 0;
}

SQInteger s_SetBlend(HSQUIRRELVM v)
{
SQInteger mode;
sq_getinteger(v, 2, &mode);

switch (mode)
{
case 1:
CGraphics::SetBlend(SOLID);
case 2:
CGraphics::SetBlend(ALPHA);
case 3:
CGraphics::SetBlend(LIGHT);
case 4:
CGraphics::SetBlend(DARK);
}

return 0;
}

SQInteger s_SetMaskColor(HSQUIRRELVM v)
{
SQFloat r, g, b;
sq_getfloat(v, 2, &r);
sq_getfloat(v, 3, &g);
sq_getfloat(v, 4, &b);
CGraphics::SetMaskColor(r, g, b);
return 0;
}

SQInteger s_SetClearColor(HSQUIRRELVM v)
{
SQFloat r, g, b;
sq_getfloat(v, 2, &r);
sq_getfloat(v, 3, &g);
sq_getfloat(v, 4, &b);
CGraphics::SetClearColor(r, g, b);
return 0;
}

SQInteger s_SetViewport(HSQUIRRELVM v)
{
SQInteger x, y, w, h;
sq_getinteger(v, 2, &x);
sq_getinteger(v, 3, &y);
sq_getinteger(v, 4, &w);
sq_getinteger(v, 5, &h);
CGraphics::SetViewport(x, y, w, h);
return 0;
}

SQInteger s_SetOrigin(HSQUIRRELVM v)
{
SQFloat x, y;
sq_getfloat(v, 2, &x);
sq_getfloat(v, 3, &y);
CGraphics::SetOrigin(x, y);
return 0;
}

SQInteger s_SetRotation(HSQUIRRELVM v)
{
SQFloat angle;
sq_getfloat(v, 2, &angle);
CGraphics::SetRotation(angle);
return 0;
}

SQInteger s_SetHandle(HSQUIRRELVM v)
{
SQFloat x, y;
sq_getfloat(v, 2, &x);
sq_getfloat(v, 3, &y);
CGraphics::SetHandle(x, y);
return 0;
}

SQInteger s_SetScale(HSQUIRRELVM v)
{
SQFloat x, y;
sq_getfloat(v, 2, &x);
sq_getfloat(v, 3, &y);
CGraphics::SetScale(x, y);
return 0;
}

SQInteger s_SetVSync(HSQUIRRELVM v)
{
SQBool flag;
sq_getbool(v, 2, &flag);
CGraphics::SetVSync(flag);
return 0;
}

SQInteger s_SetFont(HSQUIRRELVM v)
{
const SQChar * resource;
sq_getstring(v, 2, &resource);
CGraphics::SetDrawFont((CFont *)CResourceManager::GetResource(resource));
return 0;
}

SQInteger s_Cls(HSQUIRRELVM v)
{
CGraphics::Cls();
return 0;
}

SQInteger s_Flip(HSQUIRRELVM v)
{
CGraphics::Flip();
return 0;
}

SQInteger s_Width(HSQUIRRELVM v)
{
sq_pushinteger(v, CGraphics::GetScreenWidth());
return 1;
}

SQInteger s_Height(HSQUIRRELVM v)
{
sq_pushinteger(v, CGraphics::GetScreenHeight());
return 1;
}

SQInteger s_GetDrawColorRed(HSQUIRRELVM v)
{
sq_pushinteger(v, CGraphics::GetDrawColorRed());
return 1;
}

SQInteger s_GetDrawColorGreen(HSQUIRRELVM v)
{
sq_pushinteger(v, CGraphics::GetDrawColorGreen());
return 1;
}

SQInteger s_GetDrawColorBlue(HSQUIRRELVM v)
{
sq_pushinteger(v, CGraphics::GetDrawColorBlue());
return 1;
}

SQInteger s_GetDrawAlpha(HSQUIRRELVM v)
{
sq_pushinteger(v, CGraphics::GetDrawAlpha());
return 1;
}

SQInteger s_GetClearColorRed(HSQUIRRELVM v)
{
sq_pushinteger(v, CGraphics::GetClearColorRed());
return 1;
}

SQInteger s_GetClearColorGreen(HSQUIRRELVM v)
{
sq_pushinteger(v, CGraphics::GetClearColorGreen());
return 1;
}

SQInteger s_GetClearColorBlue(HSQUIRRELVM v)
{
sq_pushinteger(v, CGraphics::GetClearColorBlue());
return 1;
}

SQInteger s_GetXScale(HSQUIRRELVM v)
{
sq_pushfloat(v, CGraphics::GetXScale());
return 1;
}

SQInteger s_GetYScale(HSQUIRRELVM v)
{
sq_pushfloat(v, CGraphics::GetYScale());
return 1;
}

SQInteger s_GetXHandle(HSQUIRRELVM v)
{
sq_pushfloat(v, CGraphics::GetXHandle());
return 1;
}

SQInteger s_GetYHandle(HSQUIRRELVM v)
{
sq_pushfloat(v, CGraphics::GetYHandle());
return 1;
}

SQInteger s_GetRotation(HSQUIRRELVM v)
{
sq_pushfloat(v, CGraphics::GetRotation());
return 1;
}

SQInteger s_DrawRect(HSQUIRRELVM v)
{
SQFloat x, y, w, h;
sq_getfloat(v, 2, &x);
sq_getfloat(v, 3, &y);
sq_getfloat(v, 4, &w);
sq_getfloat(v, 5, &h);
CGraphics::DrawRect(x, y, w, h);
return 0;
}

SQInteger s_DrawLine(HSQUIRRELVM v)
{
SQFloat x1, y1, x2, y2;
sq_getfloat(v, 2, &x1);
sq_getfloat(v, 3, &y1);
sq_getfloat(v, 4, &x2);
sq_getfloat(v, 5, &y2);
CGraphics::DrawLine(x1, y1, x2, y2);
return 0;
}

SQInteger s_DrawImage(HSQUIRRELVM v)
{
const SQChar * resource;
SQFloat x, y;
sq_getstring(v, 2, &resource);
sq_getfloat(v, 3, &x);
sq_getfloat(v, 4, &y);
CGraphics::DrawImage(((CImage *)CResourceManager::GetResource(resource)), x, y);
return 0;
}

SQInteger s_DrawAnimImage(HSQUIRRELVM v)
{
const SQChar * resource;
SQFloat x, y;
SQInteger frame;
sq_getstring(v, 2, &resource);
sq_getfloat(v, 3, &x);
sq_getfloat(v, 4, &y);
sq_getinteger(v, 5, &frame);
CGraphics::DrawImage(((CImage *)CResourceManager::GetResource(resource)), x, y, frame);
return 0;
}

SQInteger s_DrawText(HSQUIRRELVM v)
{
const SQChar * text;
SQFloat x, y;
sq_getstring(v, 2, &text);
sq_getfloat(v, 3, &x);
sq_getfloat(v, 4, &y);
CGraphics::DrawText(text, x, y);
return 0;
}

SQInteger s_LoadImage(HSQUIRRELVM v)
{
const SQChar * path;
const SQChar * resourceName;
SQInteger cellWidth, cellHeight;
sq_getstring(v, 2, &path);
sq_getstring(v, 3, &resourceName);
sq_getinteger(v, 4, &cellWidth);
sq_getinteger(v, 5, &cellHeight);
CResourceManager::LoadResource(resourceName, CGraphics::LoadImage(path, cellWidth, cellHeight));
sq_pushstring(v, resourceName, -1);
return 1;
}

SQInteger s_LoadFont(HSQUIRRELVM v)
{
const SQChar * path;
const SQChar * resourceName;
SQInteger size;
sq_getstring(v, 2, &path);
sq_getstring(v, 3, &resourceName);
sq_getinteger(v, 4, &size);
CResourceManager::LoadResource(resourceName, CGraphics::LoadFont(path, size));
sq_pushstring(v, resourceName, -1);
return 1;
}

// Audio bindings
SQInteger s_LoadAudioModule(HSQUIRRELVM v)
{
CAudio::LoadModule();
return 0;
}

SQInteger s_UnloadAudioModule(HSQUIRRELVM v)
{
CAudio::UnloadModule();
return 0;
}

SQInteger s_SetAudioInterface(HSQUIRRELVM v)
{
SQInteger i;
sq_getinteger(v, 2, &i);

switch (i)
{
case 1:
CAudio::SetInterface(CAudio::Interface_irrKlang());
break;
}
return 0;
}

SQInteger s_PlaySound(HSQUIRRELVM v)
{
const SQChar * resource;
SQBool loop;
sq_getstring(v, 2, &resource);
sq_getbool(v, 3, &loop);

CAudio::PlaySound((CSound *)CResourceManager::GetResource(resource), loop);

return 0;
}

SQInteger s_SetVolume(HSQUIRRELVM v)
{
SQFloat volume;
sq_getfloat(v, 2, &volume);

CAudio::SetVolume(volume);

return 0;
}

SQInteger s_GetVolume(HSQUIRRELVM v)
{
sq_pushfloat(v, CAudio::GetVolume());

return 1;
}

SQInteger s_LoadSound(HSQUIRRELVM v)
{
const SQChar * path;
const SQChar * resourceName;
sq_getstring(v, 2, &path);
sq_getstring(v, 3, &resourceName);
CResourceManager::LoadResource(resourceName, CAudio::LoadSound(path));
sq_pushstring(v, resourceName, -1);
return 1;
}

// Input Bindings
SQInteger s_LoadInputModule(HSQUIRRELVM v)
{
CInput::LoadModule();
return 0;
}

SQInteger s_UnloadInputModule(HSQUIRRELVM v)
{
CInput::UnloadModule();
return 0;
}

SQInteger s_SetInputInterface(HSQUIRRELVM v)
{
SQInteger i;
sq_getinteger(v, 2, &i);

switch (i)
{
case 1:
CInput::SetInterface(CInput::Interface_Win32());
break;
}
return 0;
}

SQInteger s_UpdateInput(HSQUIRRELVM v)
{
CInput::Update();
return 0;
}

SQInteger s_KeyHit(HSQUIRRELVM v)
{
SQInteger k;
sq_getinteger(v, 2, &k);
sq_pushbool(v, (SQBool)CInput::KeyHit(CInput::ToFallenKey(k)));
return 1;
}

SQInteger s_KeyDown(HSQUIRRELVM v)
{
SQInteger k;
sq_getinteger(v, 2, &k);
sq_pushbool(v, (SQBool)CInput::KeyDown(CInput::ToFallenKey(k)));
return 1;
}

SQInteger s_KeyPressed(HSQUIRRELVM v)
{
SQInteger k;
sq_getinteger(v, 2, &k);
sq_pushbool(v, (SQBool)CInput::KeyPressed(CInput::ToFallenKey(k)));
return 1;
}

SQInteger s_MouseHit(HSQUIRRELVM v)
{
SQInteger button;
sq_getinteger(v, 2, &button);
sq_pushbool(v, (SQBool)CInput::MouseHit(CInput::ToFallenKey(button)));
return 1;
}

SQInteger s_MouseDown(HSQUIRRELVM v)
{
SQInteger button;
sq_getinteger(v, 2, &button);
sq_pushbool(v, (SQBool)CInput::MouseDown(CInput::ToFallenKey(button)));
return 1;
}

SQInteger s_MousePressed(HSQUIRRELVM v)
{
SQInteger button;
sq_getinteger(v, 2, &button);
sq_pushbool(v, (SQBool)CInput::MousePressed(CInput::ToFallenKey(button)));
return 1;
}

SQInteger s_MouseX(HSQUIRRELVM v)
{
sq_pushinteger(v, SQInteger(CInput::MouseX()));
return 1;
}

SQInteger s_MouseY(HSQUIRRELVM v)
{
sq_pushinteger(v, SQInteger(CInput::MouseY()));
return 1;
}

SQInteger s_GetKey(HSQUIRRELVM v)
{
string letter;
letter += CInput::GetKey();
const SQChar * l = letter.c_str();
sq_pushstring(v, l, -1);
return 1;
}

// Resource manager bindings
SQInteger s_UnloadResource(HSQUIRRELVM v)
{
const SQChar * resource;

sq_getstring(v, 2, &resource);

CResourceManager::UnloadResource(resource);

return 0;
}

SQInteger s_UnloadAllResources(HSQUIRRELVM v)
{
CResourceManager::UnloadResources();

return 0;
}

void RegisterFunctions()
{
// System functions
SquirrelVM::CreateFunctionGlobal(s_LoadSystemModule, _SC("LoadSystemModule"), _SC(""));
SquirrelVM::CreateFunctionGlobal(s_UnloadSystemModule, _SC("UnloadSystemModule"), _SC(""));
SquirrelVM::CreateFunctionGlobal(s_SetSystemInterface, _SC("SetSystemInterface"), _SC("*"));

SquirrelVM::CreateFunctionGlobal(s_UpdateSystem, _SC("UpdateSystem"), _SC(""));

SquirrelVM::CreateFunctionGlobal(s_StartTimer, _SC("StartTimer"), _SC("*"));
SquirrelVM::CreateFunctionGlobal(s_StopTimer, _SC("StopTimer"), _SC("*"));
SquirrelVM::CreateFunctionGlobal(s_GetTimerTime, _SC("GetTimerTime"), _SC("*"));
SquirrelVM::CreateFunctionGlobal(s_GetTimerDelta, _SC("GetTimerDelta"), _SC("*"));

SquirrelVM::CreateFunctionGlobal(s_CreateTimer, _SC("CreateTimer"), _SC("*"));

// Graphics functions
SquirrelVM::CreateFunctionGlobal(s_LoadGraphicsModule, _SC("LoadGraphicsModule"), _SC(""));
SquirrelVM::CreateFunctionGlobal(s_UnloadGraphicsModule, _SC("UnloadGraphicsModule"), _SC(""));
SquirrelVM::CreateFunctionGlobal(s_SetGraphicsInterface, _SC("SetGraphicsInterface"), _SC("*"));

SquirrelVM::CreateFunctionGlobal(s_CreateContext, _SC("CreateContext"), _SC("*"));
SquirrelVM::CreateFunctionGlobal(s_DestroyContext, _SC("DestroyContext"), _SC(""));

SquirrelVM::CreateFunctionGlobal(s_SetDrawColor, _SC("SetDrawColor"), _SC("*"));
SquirrelVM::CreateFunctionGlobal(s_SetDrawAlpha, _SC("SetDrawAlpha"), _SC("*"));
SquirrelVM::CreateFunctionGlobal(s_SetBlend, _SC("SetBlend"), _SC("*"));
SquirrelVM::CreateFunctionGlobal(s_SetMaskColor, _SC("SetMaskColor"), _SC("*"));
SquirrelVM::CreateFunctionGlobal(s_SetClearColor, _SC("SetClearColor"), _SC("*"));
SquirrelVM::CreateFunctionGlobal(s_SetViewport, _SC("SetViewport"), _SC("*"));
SquirrelVM::CreateFunctionGlobal(s_SetOrigin, _SC("SetOrigin"), _SC("*"));
SquirrelVM::CreateFunctionGlobal(s_SetRotation, _SC("SetRotation"), _SC("*"));
SquirrelVM::CreateFunctionGlobal(s_SetHandle, _SC("SetHandle"), _SC("*"));
SquirrelVM::CreateFunctionGlobal(s_SetScale, _SC("SetScale"), _SC("*"));
SquirrelVM::CreateFunctionGlobal(s_SetVSync, _SC("SetVSync"), _SC("*"));

SquirrelVM::CreateFunctionGlobal(s_SetFont, _SC("SetFont"), _SC("*"));

SquirrelVM::CreateFunctionGlobal(s_Cls, _SC("Cls"), _SC(""));
SquirrelVM::CreateFunctionGlobal(s_Flip, _SC("Flip"), _SC(""));

SquirrelVM::CreateFunctionGlobal(s_Width, _SC("GraphicsWidth"), _SC(""));
SquirrelVM::CreateFunctionGlobal(s_Height, _SC("GraphicsHeight"), _SC(""));

SquirrelVM::CreateFunctionGlobal(s_GetDrawColorRed, _SC("GetDrawColorRed"), _SC(""));
SquirrelVM::CreateFunctionGlobal(s_GetDrawColorGreen, _SC("GetDrawColorGreen"), _SC(""));
SquirrelVM::CreateFunctionGlobal(s_GetDrawColorBlue, _SC("GetDrawColorBlue"), _SC(""));
SquirrelVM::CreateFunctionGlobal(s_GetDrawAlpha, _SC("GetDrawAlpha"), _SC(""));

SquirrelVM::CreateFunctionGlobal(s_GetClearColorRed, _SC("GetClearColorRed"), _SC(""));
SquirrelVM::CreateFunctionGlobal(s_GetClearColorGreen, _SC("GetClearColorGreen"), _SC(""));
SquirrelVM::CreateFunctionGlobal(s_GetClearColorBlue, _SC("GetClearColorBlue"), _SC(""));

SquirrelVM::CreateFunctionGlobal(s_GetXScale, _SC("GetXScale"), _SC(""));
SquirrelVM::CreateFunctionGlobal(s_GetYScale, _SC("GetYScale"), _SC(""));

SquirrelVM::CreateFunctionGlobal(s_GetXHandle, _SC("GetXHandle"), _SC(""));
SquirrelVM::CreateFunctionGlobal(s_GetYHandle, _SC("GetYHandle"), _SC(""));

SquirrelVM::CreateFunctionGlobal(s_GetRotation, _SC("GetRotation"), _SC(""));

SquirrelVM::CreateFunctionGlobal(s_DrawRect, _SC("DrawRect"), _SC("*"));
SquirrelVM::CreateFunctionGlobal(s_DrawLine, _SC("DrawLine"), _SC("*"));
SquirrelVM::CreateFunctionGlobal(s_DrawImage, _SC("DrawImage"), _SC("*"));
SquirrelVM::CreateFunctionGlobal(s_DrawAnimImage, _SC("DrawAnimImage"), _SC("*"));
SquirrelVM::CreateFunctionGlobal(s_DrawText, _SC("DrawText"), _SC("*"));

SquirrelVM::CreateFunctionGlobal(s_LoadImage, _SC("LoadImage"), _SC("*"));
SquirrelVM::CreateFunctionGlobal(s_LoadFont, _SC("LoadFont"), _SC("*"));

// Audio functions
SquirrelVM::CreateFunctionGlobal(s_LoadAudioModule, _SC("LoadAudioModule"), _SC(""));
SquirrelVM::CreateFunctionGlobal(s_UnloadAudioModule, _SC("UnloadAudioModule"), _SC(""));
SquirrelVM::CreateFunctionGlobal(s_SetAudioInterface, _SC("SetAudioInterface"), _SC("*"));

SquirrelVM::CreateFunctionGlobal(s_PlaySound, _SC("PlaySound"), _SC("*"));
SquirrelVM::CreateFunctionGlobal(s_SetVolume, _SC("SetVolume"), _SC("*"));
SquirrelVM::CreateFunctionGlobal(s_GetVolume, _SC("GetVolume"), _SC(""));

SquirrelVM::CreateFunctionGlobal(s_LoadSound, _SC("LoadSound"), _SC("*"));

// Input functions
SquirrelVM::CreateFunctionGlobal(s_LoadInputModule, _SC("LoadInputModule"), _SC(""));
SquirrelVM::CreateFunctionGlobal(s_UnloadInputModule, _SC("UnloadInputModule"), _SC(""));
SquirrelVM::CreateFunctionGlobal(s_SetInputInterface, _SC("SetInputInterface"), _SC("*"));

SquirrelVM::CreateFunctionGlobal(s_UpdateInput, _SC("UpdateInput"), _SC(""));

SquirrelVM::CreateFunctionGlobal(s_KeyHit, _SC("KeyHit"), _SC("*"));
SquirrelVM::CreateFunctionGlobal(s_KeyDown, _SC("KeyDown"), _SC("*"));
SquirrelVM::CreateFunctionGlobal(s_KeyPressed, _SC("KeyPressed"), _SC("*"));

SquirrelVM::CreateFunctionGlobal(s_MouseHit, _SC("MouseHit"), _SC("*"));
SquirrelVM::CreateFunctionGlobal(s_MouseDown, _SC("MouseDown"), _SC("*"));
SquirrelVM::CreateFunctionGlobal(s_MousePressed, _SC("MousePressed"), _SC("*"));

SquirrelVM::CreateFunctionGlobal(s_MouseX, _SC("MouseX"), _SC(""));
SquirrelVM::CreateFunctionGlobal(s_MouseY, _SC("MouseY"), _SC(""));

SquirrelVM::CreateFunctionGlobal(s_GetKey, _SC("GetKey"), _SC(""));

// Resource functions
SquirrelVM::CreateFunctionGlobal(s_UnloadResource, _SC("UnloadResource"), _SC("*"));
SquirrelVM::CreateFunctionGlobal(s_UnloadAllResources, _SC("UnloadAllResources"), _SC(""));
}

void Init()
{
RegisterFunctions();
}
}
}





Some things work differently in the scripted version (well basically only image/sound/timer loading/creation) like the image loading function which takes an extra argument as a resource name so basically it enforces resource management - which is good because I say it is so don't argue :p

Also I already said sound is in, so here is a video:



Click here to download 'video_sc1.avi' (~ 3.8mb)
Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now