AppEventHandler() in main.c, code that handles the rsFILELOAD event.
Currently in response to the F1 key we call DffLoad() and then execute some additional code to position the loaded clump in the world. We require the same code to be executed when a clump is dropped on the view.
HandleKeyDown() function (in win/events.c) to the rsFILELOAD case statement:
case rsFILELOAD:
{
RpClump *clump = DffLoad("models/cube.dff");
if (clump) { RwV3d v = {0.0f, 0.0f, 5.0f}; RwFrameTranslate(RpClumpGetFrame(clump), &v, rwCOMBINEREPLACE); RpWorldAddClump(World, clump); } return rsEVENTPROCESSED;
}
default:
{
AppEventHandler() function.
DffLoad() function call.
case rsFILELOAD: { RwChar *s = (RwChar *)param; RpClump *clump = DffLoad(s); if (clump) { RwV3d v = {0.0f, 0.0f, 5.0f}; RwFrameTranslate(RpClumpGetFrame(clump), &v, rwCOMBINEREPLACE); RpWorldAddClump(World, clump); } return rsEVENTPROCESSED; } default:
banana.dff clump.)

© 1993-2004 Criterion Software Limited. All rights reserved. Built Thu Feb 12 13:46:58 2004.
Send Feedback