source: trunk/src/platform/xbox/xboxapp.cpp @ 2222

Last change on this file since 2222 was 2222, checked in by sam, 7 years ago

core: you can now while(app.MustTick()) { Tick(); } instead of app.Run().

File size: 1.3 KB
Line 
1//
2// Lol Engine
3//
4// Copyright: (c) 2010-2011 Sam Hocevar <sam@hocevar.net>
5//   This program is free software; you can redistribute it and/or
6//   modify it under the terms of the Do What The Fuck You Want To
7//   Public License, Version 2, as published by Sam Hocevar. See
8//   http://www.wtfpl.net/ for more details.
9//
10
11#if defined HAVE_CONFIG_H
12#   include "config.h"
13#endif
14
15#if defined _XBOX
16#   include <xtl.h>
17#endif
18
19#include "core.h"
20#include "xboxapp.h"
21#include "xboxinput.h"
22
23#if defined _XBOX
24extern D3DDevice *g_d3ddevice;
25#endif
26
27namespace lol
28{
29
30/*
31 * XboxApp implementation class
32 */
33
34class XboxAppData
35{
36    friend class XboxApp;
37
38private:
39#if defined _XBOX
40#endif
41};
42
43/*
44 * Public XboxApp class
45 */
46
47XboxApp::XboxApp(char const *title, ivec2 res, float fps) :
48    data(new XboxAppData())
49{
50#if defined _XBOX
51    Ticker::Setup(fps);
52    Video::Setup(res);
53
54    /* Autoreleased objects */
55    new XboxInput();
56#endif
57}
58
59void XboxApp::ShowPointer(bool show)
60{
61    ;
62}
63
64void XboxApp::Tick()
65{
66    /* Tick the renderer, show the frame and clamp to desired framerate. */
67    Ticker::TickDraw();
68
69#if defined _XBOX
70    g_d3ddevice->Present(NULL, NULL, NULL, NULL);
71#endif
72}
73
74XboxApp::~XboxApp()
75{
76#if defined _XBOX
77#endif
78    delete data;
79}
80
81} /* namespace lol */
82
Note: See TracBrowser for help on using the repository browser.