source: trunk/src/platform/nacl/nacl-app.cpp @ 2222

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

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

  • Property svn:keywords set to Id
File size: 1.1 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#include "core.h"
16
17#include "nacl-app.h"
18#include "nacl-instance.h"
19
20namespace lol
21{
22
23/*
24 * PS3 App implementation class
25 */
26
27class NaClAppData
28{
29    friend class NaClApp;
30
31private:
32#if defined __native_client__
33#endif
34};
35
36/*
37 * Public NaClApp class
38 */
39
40NaClApp::NaClApp(char const *title, ivec2 res, float fps) :
41    data(new NaClAppData())
42{
43    Ticker::Setup(fps);
44#if defined __native_client__
45#endif
46}
47
48void NaClApp::ShowPointer(bool show)
49{
50    ;
51}
52
53void NaClApp::Tick()
54{
55    /* The caller should run forever */
56#if defined __native_client__
57    static int init = 0;
58    if (!init)
59    {
60        NaClInstance::MainSignal();
61        init = 1;
62    }
63#endif
64}
65
66NaClApp::~NaClApp()
67{
68#if defined __native_client__
69#endif
70    delete data;
71}
72
73} /* namespace lol */
74
Note: See TracBrowser for help on using the repository browser.