Polyphase Game Engine
Loading...
Searching...
No Matches
SystemConstants.h
Go to the documentation of this file.
1
#pragma once
2
3
// ENDIAN_SWAP — file format (asset .oct) is little-endian per editor-host
4
// convention. Big-endian platforms (GameCube/Wii via libogc, N64, PS3/Cell
5
// PPU) need to swap on read/write through Stream<T>. Enable for any platform
6
// whose CPU is big-endian: the explicit platform list PLUS a compiler-detected
7
// big-endian check (covers PS3, which is a POLYPHASE_PLATFORM_ADDON with no
8
// Platform enum value). The `defined(__BYTE_ORDER__)` guard keeps MSVC (which
9
// doesn't define it) on the little-endian default.
10
#if PLATFORM_DOLPHIN || PLATFORM_N64 || \
11
(defined(__BYTE_ORDER__) && defined(__ORDER_BIG_ENDIAN__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
12
#define ENDIAN_SWAP 1
13
#else
14
#define ENDIAN_SWAP 0
15
#endif
Engine
Source
System
SystemConstants.h
Generated by
1.9.8