[RESOLVED] Standalone project

edited November 2008 in Help request
Hi,

now my project is on track, I want to have a standalone version.

I created a new project, everything (almost) is set up correctly.

Just happen to have a little problem with the orx_Execute() function.
/* Main program function */
int main(int argc, char **argv)
{
 /* Inits and runs orx using our self-defined functions */
 orx_Execute(argc, argv, Init, Run, Exit);
 
 /* Done! */
 return EXIT_SUCCESS;
}

The debug output tells me a function has been called without being loaded:
[2008-11-09 21:15:27] <ALL> The function <orxSystem_Init() - C:/Documents and Settings/xxxxx/My Documents/workspace/orx2/code/src/core/orxSystem.c:60> has been called before being loaded!
Please verify that the corresponding plugin has been correctly loaded and that it contains this function.

and here's the point from which i have problems, from orx.h
  /* Sends the command line arguments to orxParam module */
  if(orxParam_SetArgs(_u32NbParams, _azParams) == orxSTATUS_SUCCESS)
  {
    /* Inits the engine */
    if(orxModule_Init(orxMODULE_ID_MAIN) == orxSTATUS_SUCCESS)

The second condition is never met. Codelite debugger also states a syntax problem near "if", though i don't think it's relevant ... Hope the first message will be enough to troubleshoot this :)

Thanks for your help!

PS: the include path is weird also, i do have orx in this path but for the standalone version I also have another copy in c:workspaceorx, from which I'm working.

Comments

  • edited November 2008
    Hello!

    As stated by the error message, it means plugins (system one) aren't loaded. It's probably something missing in your .ini file. =)
  • edited November 2008
    here's my ini file, i tried adding the core pluggin but didn't have any effect as i remember

    [Config]
    History=false;

    [Display]
    ScreenWidth=800;
    ScreenHeight=600;
    Title=Asteroid_Redux;
    VSync=true;

    [Render]
    ShowFPS=1

    [Mouse]
    ShowCursor=false;

    [Param]
    plugin=plugins/core plugins/orxSystem_SFML plugins/orxFile_LibC plugins/orxFileSystem_LibC plugins/orxDisplay_SFML plugins/orxKeyboard_SFML plugins/orxMouse_SFML plugins/orxRender_Home;

    [Viewport]
    Camera=Camera;

    [Camera]
    FrustumWidth=800.0;
    FrustumHeight=600.0;
    FrustumFar=1.0;
    FrustumNear=0.0;
    ;Position={0.0, 0.0, -1.0};
    Position=(400, 300, -1);

    [Physics]
    Gravity={0.0, 9.81, 0.0};
    WorldLowerBound={-1000.0, -1000.0, 0.0};
    WorldUpperBound={1000.0, 1000.0, 0.0};
    AllowSleep=True;
    IterationsPerStep=10;
    SimulationFrequency=60.0;
    DimensionRatio=0.01;
    FixedDT=true;

    [Asteroid]
    Graphic=AsteroidGraphic;
    Smoothing=true;
    Position={100,100,0};
    Speed={55,28,0};
    AngularVelocity=-90 ~ 90;
    Body=AsteroidBody;

    [AsteroidGraphic]
    Texture=../data/objects/disasteroids2_master.bmp;
    Pivot=centered;
    TextureCorner={304,20,0};
    TextureSize={47,42,0};

    [AsteroidBody]
    Part1=AsteroidSphereLeft;
    Part2=AsteroidSphereTopAndRight;
    Part3=AsteroidSphereBottom;

    [AsteroidSphereLeft]
    Type=Sphere;
    Center={12,22,0};
    Radius=12.5;
    ;Friction=1.0;
    ;Restitution=0.999;
    Solid=true;
    [AsteroidSphereTopAndRight]
    Type=Sphere;
    Center={30,18,0};
    Radius=17;
    ;Friction=1.0;
    ;Restitution=0.999;
    Solid=true;
    [AsteroidSphereBottom]
    Type=Sphere;
    Center={26,24,0};
    Radius=18.5;
    ;Friction=1.0;
    ;Restitution=0.999;
    Solid=true;

    [Ship]
    Graphic=ShipGraphic;
    AnimationSet=ShipAnimSet;
    Smoothing=true;
    Position=(400, 300, 0);
    ;Body=ShipBody;

    [ShipGraphic]
    Texture=../data/objects/disasteroids2_master.bmp;
    Pivot=centered;
    TextureCorner={250, 400, 0};
    TextureSize={30, 35, 0};
    Flip=both;

    [ShipBody]

    [ShipAnimSet]
    Animation1=noAccel;
    Animation2=AccelOn;

    Link1=noAccel-noAccel;
    Link2=noAccel-AccelOn;
    LinkProperty2=immediate;
    Link3=AccelOn-noAccel;
    LinkProperty3=immediate;
    LinkPriority3=9;
    Link4=AccelOn-AccelOn;

    [noAccel]
    KeyData1=NoReactor;
    KeyDuration1=0.1;

    [AccelOn]
    KeyData1=ReactorOn;
    KeyDuration1=0.1;

    [NoReactor@ShipGraphic]

    [ReactorOn@ShipGraphic]
    TextureCorner={248, 354, 0};
    Flip=y;
  • edited November 2008
    I see 2 things:

    - First plugins/core at the beginning of the line is probably not a valid plugin. That's probably your issue there.

    - Second check if you have all these plugins in your folder. You're also not loading sound and physics plugins, which won't stop execution, but you might need them for asrx as far as I know. ;)
  • edited November 2008
    Yeah right I'll need those for sure!

    So you were right, the plugins were not in the good directory.

    It all works fine thanks to the corrections you made to my workspace and folder structure =)

    Thanks!
Sign In or Register to comment.