Language:EN
Pages: 2
Rating : ⭐⭐⭐⭐⭐
Price: $10.99
Page 1 Preview
heres the code call from the host let the script i

Heres the code call from the host let the script initialize the restg pydict

280 6. INTEGRATION: USING EXISTING SCRIPTING SYSTEMS

// Initialize Python
InitPython ();

// Load your script and get a pointer to its dictionary g_pName = PyString_FromString ( "script" );
g_pModule = PyImport_Import ( g_pName );
if ( ! g_pModule )
W_ExitOnError ( "Could not open script.\n" );
g_pDict = PyModule_GetDict ( g_pModule );

Team-Fly®

// Start the main loop
MainLoop
{
// Start the current loop iteration
HandleLoop
{
// Let Python handle the frame
PyObject_CallObject ( g_pFunc, NULL );

// Check for the Escape key and exit if it's down if ( W_GetKeyState ( W_KEY_ESC ) )
W_Exit ();
}
}

ALIEN_COUNT = 12 # Number of aliens onscreen MIN_VEL = 2 # Minimum velocity
MAX_VEL = 8 # Maximum velocity

You are viewing 1/3rd of the document.Purchase the document to get full access instantly

Immediately available after payment
Both online and downloadable
No strings attached
How It Works
Login account
Login Your Account
Place in cart
Add to Cart
send in the money
Make payment
Document download
Download File
img

Uploaded by : Sylvia Morales

PageId: DOC16C60BB