moved LaunchMeteor into more general Objects.ocd/System.ocg folder

This is to prevent errors on including objects that contain global functions. I believe this will be needed more in the future, thus there is now a new System.ocg folder.
Controls
David Dormagen 2015-09-01 22:54:31 +02:00
parent 6257d9d6be
commit cc876e01ce
3 changed files with 18 additions and 13 deletions

View File

@ -82,19 +82,6 @@ public func FxIntMeteorControlSaveScen(obj, fx, props)
return true;
}
/**
Launches a meteor.
The meteor can spawn objects via spawn_id.
*/
global func LaunchMeteor(int x, int y, int size, int xdir, int ydir, id spawn_id, int spawn_amount)
{
var meteor_skin = Meteor;
if (spawn_id) meteor_skin = spawn_id->~GetMeteorSkin() ?? meteor_skin;
var meteor = CreateObject(meteor_skin);
return meteor->Launch(x, y, size, xdir, ydir, spawn_id, spawn_amount);
}
/*-- Meteor --*/
public func Launch(int x, int y, int size, int xdir, int ydir, id spawn_id, int spawn_amount)

View File

@ -0,0 +1,16 @@
/**
Contains functions that require definitions from the "disasters" folder.
*/
/**
Launches a meteor.
The meteor can spawn objects via spawn_id.
*/
global func LaunchMeteor(int x, int y, int size, int xdir, int ydir, id spawn_id, int spawn_amount)
{
var meteor_skin = Meteor;
if (spawn_id) meteor_skin = spawn_id->~GetMeteorSkin() ?? meteor_skin;
var meteor = CreateObject(meteor_skin);
return meteor->Launch(x, y, size, xdir, ydir, spawn_id, spawn_amount);
}

View File

@ -0,0 +1,2 @@
This folder contains general functions that would otherwise go into the global System.ocg but depend on definitions in Objects.ocd.
That way, the game can also be used without errors when Objects.ocd is not loaded.