gwnavruntime/kernel/SF_Config.h Source File

SF_Config.h
Go to the documentation of this file.
1 /*
2 * Copyright 2015 Autodesk, Inc. All rights reserved.
3 * Use of this software is subject to the terms of the Autodesk license agreement and any attachments or Appendices thereto provided at the time of installation or download,
4 * or which otherwise accompanies this software in either electronic or hard copy form, or which is signed by you and accepted by Autodesk.
5 */
6 
7 /**************************************************************************
8 
9 PublicHeader: None
10 Filename : GFxConfig.h
11 Content : GFx configuration file - contains #ifdefs for
12  the optional components of the library
13 Created : June 15, 2005
14 Authors : All Scaleform Engineers
15 
16 **************************************************************************/
17 
18 #ifndef INC_KY_SF_Config_H
19 #define INC_KY_SF_Config_H
20 
21 // ***** Prerequisites
22 //---------------------------------------------------------------------------
23 
24 // KY_BUILD_DEBUG, KY_BUILD_RELEASE, KY_BUILD_SHIPPING
25 // have to be defined explicitly by users in their projects
26 // to ensure synchronization between linked libraries and header files
27 
28 #include "gwnavruntime/kernel/SF_Types.h" // reqd for KY_OS_*** macros
29 
30 
31 // ***** General Scaleform options
32 //---------------------------------------------------------------------------
33 
34 // This macro needs to be defined if it is necessary to avoid the use of Double.
35 // In that case Double in defined as float and thus extra #ifdef checks on
36 // overloads need to be done.
37 // NOTE: By default, PS2 and PSP define this if not manually defined here.
38 //#define KY_NO_DOUBLE
39 
40 // Define this macro to eliminate custom wctype tables for functions such as
41 // G_iswspace, SFtowlower, g_towupper and so on. If this macro is defined GFx
42 // will use system Unicode functions (which are incredibly slow on Microsoft
43 // Windows).
44 //#define KY_NO_WCTYPE
45 
46 // Enable thread support
47 #define KY_ENABLE_THREADS
48 
49 #if defined(KY_OS_WINMETRO)
50 // Use standard C++11 thread library
51 #ifdef KY_ENABLE_THREADS
52 #define KY_USE_STD11_THREADS
53 #endif
54 #endif
55 
56 // Define this to disable statistics tracking; this is useful for the final build.
57 #define KY_ENABLE_STATS
58 
59 
60 // Define this macro if whole JPEGLIB is compiled as C++ code (CPP-ize).
61 // By default libjpeg is pure C library and public names are not mangled.
62 // Though, it might be necessary to mangle jpeglib's names in order to
63 // resolve names clashing issues (for example, with XBox360's xmedia.lib).
64 //#define KY_CPP_LIBJPEG
65 
66 // Enable use of ZLIB and GZLibFile class.
67 // When disabled, compressed SWF files will no longer load.
68 // Disabling saves roughly 20k in release build.
69 //#define KY_ENABLE_ZLIB
70 
71 // Enable the use of SIMD optimized functions, if available. If the platform does
72 // not support a SIMD instruction set, then this option will be disabled in KY_SIMD.h.
73 // SIMD instructions are disabled in debug builds, because without function inlining,
74 // they are considerably slower.
75 #ifndef KY_BUILD_DEBUG
76  #define KY_ENABLE_SIMD
77 #endif
78 
79 // Enable the use of TCP/IP sockets
80 // This is needed for AMP
81 #ifndef KY_BUILD_SHIPPING
82  #define KY_ENABLE_SOCKETS
83  #define KY_WIIU_SOCKET_USE_HIO
84 #endif
85 
86 // ***** Memory/Allocation Configuration
87 //---------------------------------------------------------------------------
88 
89 // These defines control memory tracking used for statistics and leak detection.
90 // By default, memory debug functionality is enabled automatically by KY_BUILD_DEBUG.
91 #ifdef KY_BUILD_DEBUG
92  // Enable debug memory tracking. This passes __FILE__ and __LINE__ data into
93  // allocations and enabled DebugStorage in the memory heap used to track
94  // statistics and memory leaks.
95  #define KY_MEMORY_ENABLE_DEBUG_INFO
96 
97  // Wipe memory in the allocator; this is useful for debugging.
98  #define KY_MEMORY_MEMSET_ALL
99 
100  // Keeps a record of the stack of each allocation.
101 #if defined(_MSC_VER) && (_MSC_VER > 1400) && !defined(KY_OS_WINMETRO) && defined(KY_OS_WIN32)
102  #define KY_ENABLE_STACK_REGISTRY
103 #endif
104  // Check for corrupted memory in the free chunks. May significantly
105  // slow down the allocations.
106  //#define KY_MEMORY_CHECK_CORRUPTION
107 #else
108  // Enable debug memory tracking even in the release mode.
109  //#define KY_MEMORY_ENABLE_DEBUG_INFO
110 #endif
111 
112 // Use for extreme debug only! This define enforces the use of system
113 // memory allocator as much as possible. That is: no granulator; absolute
114 // minimal heap and system granularities; no reserve; no segment caching.
115 // It increases the chances of early memory corruption detection on
116 // segmentation fault. Works only with GSysAllocWinAPI and GSysAllocMMAP.
117 //#define KY_MEMORY_FORCE_SYSALLOC
118 
119 // Use for extreme debug only! Enforces the use of _aligned_malloc/_aligned_free
120 // No memory heaps functionality, no statistics, no heap memory limits.
121 //#define KY_MEMORY_FORCE_MALLOC
122 
123 // Trace all essential operations: CreateHeap, DestroyHeap, Alloc, Free, Realloc.
124 // See MemoryHeap::HeapTracer for details.
125 //#define KY_MEMORY_TRACE_ALL
126 
127 
128 
129 
130 
131 // ***** Example defines for lightweight GFX on small consoles
132 //---------------------------------------------------------------------------
133 
134 #ifdef KY_BUILD_LITE
135  #undef KY_ENABLE_ZLIB
136  #undef KY_ENABLE_STATS
137 #endif
138 
139 
140 #endif