source: trunk/src/core.h @ 909

Last change on this file since 909 was 909, checked in by sam, 11 years ago

core: implement the FP_USE() macro on x86, amd64 and powerpc.

  • Property svn:keywords set to Id
File size: 1.9 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://sam.zoy.org/projects/COPYING.WTFPL for more details.
9//
10
11//
12// The main header
13// ---------------
14//
15
16#if !defined __LOL_CORE_H__
17#define __LOL_CORE_H__
18
19// CPU features
20#undef LOL_FEATURE_CHEAP_BRANCHES
21#undef LOL_FEATURE_VERY_CHEAP_BRANCHES
22
23#if !defined __CELLOS_LV2__
24#   define LOL_FEATURE_CHEAP_BRANCHES
25#endif
26
27// Optimisation helpers
28#if defined __GNUC__
29#   define __likely(x)   __builtin_expect(!!(x), 1)
30#   define __unlikely(x) __builtin_expect(!!(x), 0)
31#   define INLINEATTR __attribute__((always_inline))
32#   if defined __CELLOS_LV2__
33#      define FP_USE(x) __asm__("" : "+f" (x))
34#   elif defined __x86_64__
35#      define FP_USE(x) __asm__("" : "+x" (x))
36#   elif defined __i386__
37#      define FP_USE(x) __asm__("" : "+t" (x))
38#   endif
39#else
40#   define __likely(x)   x
41#   define __unlikely(x) x
42#   define INLINEATTR
43#   define FP_USE(x) (void)(x)
44#endif
45
46// Base types
47#include "trig.h"
48#include "half.h"
49#include "matrix.h"
50#include "numeric.h"
51#include "timer.h"
52
53// Static classes
54#include "log.h"
55#include "platform.h"
56#include "video.h"
57#include "audio.h"
58#include "scene.h"
59#include "input.h"
60#include "profiler.h"
61
62// Entities
63#include "entity.h"
64#include "worldentity.h"
65
66#include "emitter.h"
67#include "font.h"
68#include "gradient.h"
69#include "sample.h"
70#include "sprite.h"
71#include "text.h"
72#include "tileset.h"
73#include "world.h"
74
75// Other objects
76#include "hash.h"
77#include "dict.h"
78#include "map.h"
79#include "layer.h"
80#include "shader/shader.h"
81#include "image/image.h"
82
83// Managers
84#include "ticker.h"
85#include "forge.h"
86#include "tiler.h"
87#include "sampler.h"
88
89#endif // __LOL_CORE_H__
90
Note: See TracBrowser for help on using the repository browser.