engine_open (char* commandline)
Opens the engine (acknex.dll) and passes a command line string to it.
commandline - normally NULL. Alternatively, a level or model to view, a script to compile or run, and/or any other command line parameters can be given.
Pointer to an ENGINE_VARS struct that contains all engine variables in avars.h, or NULL when acknex.dll could not be found.
- Can only be called from an external application, not from a script or plugin.
- The engine must be closed through engine_close(). It can be opened and closed repeatedly
when no script is given in the command line.
- No engine variable or other engine function except engine_status can be used before opening or after closing the engine.
int APIENTRY WinMain(HINSTANCE hInstance, // application instance handle
HINSTANCE hPrevInstance, // always zero
LPTSTR lpCmdLine, // application command line
int nCmdShow) // window flags
engine_open("arena.wmb"); // engine opens as viewer for arena.wmb (physics and script disabled)
Command Line, Programming Lesson, engine_close, engine_frame,
► latest version online