1 // $Header: x:/prj/tech/libsrc/lgd3d/RCS/comshell.c 1.3 1997/10/29 15:51:02 KEVIN Exp $
13 tResult LGAPI
AppCreateObjects (int argc
, const char *argv
[])
15 // Parse commmandline arguments
16 GUID
*ddraw_guid
= d3dtestParseArgs(argc
, argv
);
18 // Create the application object
19 GenericApplicationCreate(argc
, argv
, "d3dtest", NULL
);
21 // Create the display device
22 DisplayDeviceCreate2(kDispFullScreen
, kDispAttempt3D
|kDispAttemptFlippable
);
24 if (ddraw_guid
!= NULL
) {
25 IDisplayDevice
*pDD
= AppGetObj(IDisplayDevice
);
26 pDD
->lpVtbl
->SetKind2(pDD
, kDispFullScreen
, kDispAttempt3D
|kDispAttemptFlippable
, ddraw_guid
);
29 // Create the game shell
30 GameShellCreate(kGameShellDefault
& ~kLockFrame
);
32 // Init the input library
38 tResult LGAPI
AppInit ()
45 tResult LGAPI
AppExit ()
53 int LGAPI
AppMain (int argc
, const char *argv
[])
55 IGameShell
* pGameShell
= AppGetObj (IGameShell
);
58 IGameShell_PumpEvents(pGameShell
, kPumpAll
);
59 } while (d3dtestLoop());
64 // goofy abstraction needed because input lib doesn't work under dos
65 // and getch() doesn't work under windows, unless, of course,
66 // we're a console app, but we're not.
67 bool AppGetKey(char *c
)
71 if ((!kb_get_cooked(&key
))||
72 (!(key
&KB_FLAG_DOWN
)))