xb style.

This commit is contained in:
Ben Vanik
2015-08-07 07:56:57 -07:00
parent 5e08889d93
commit 14beb27ebc
63 changed files with 338 additions and 331 deletions

View File

@@ -7,8 +7,8 @@
******************************************************************************
*/
#ifndef XENIA_KERNEL_XBOXKRNL_APP_H_
#define XENIA_KERNEL_XBOXKRNL_APP_H_
#ifndef XENIA_KERNEL_APP_H_
#define XENIA_KERNEL_APP_H_
#include <unordered_map>
#include <vector>
@@ -53,4 +53,4 @@ class XAppManager {
} // namespace kernel
} // namespace xe
#endif // XENIA_KERNEL_XBOXKRNL_APP_H_
#endif // XENIA_KERNEL_APP_H_

View File

@@ -7,8 +7,8 @@
******************************************************************************
*/
#ifndef XENIA_KERNEL_XBOXKRNL_APPS_APPS_H_
#define XENIA_KERNEL_XBOXKRNL_APPS_APPS_H_
#ifndef XENIA_KERNEL_APPS_APPS_H_
#define XENIA_KERNEL_APPS_APPS_H_
#include "xenia/kernel/app.h"
#include "xenia/kernel/kernel_state.h"
@@ -23,4 +23,4 @@ void RegisterApps(KernelState* kernel_state, XAppManager* manager);
} // namespace kernel
} // namespace xe
#endif // XENIA_KERNEL_XBOXKRNL_APPS_APPS_H_
#endif // XENIA_KERNEL_APPS_APPS_H_

View File

@@ -7,8 +7,8 @@
******************************************************************************
*/
#ifndef XENIA_KERNEL_XBOXKRNL_APPS_XGI_APP_H_
#define XENIA_KERNEL_XBOXKRNL_APPS_XGI_APP_H_
#ifndef XENIA_KERNEL_APPS_XGI_APP_H_
#define XENIA_KERNEL_APPS_XGI_APP_H_
#include "xenia/kernel/app.h"
#include "xenia/kernel/kernel_state.h"
@@ -31,4 +31,4 @@ class XXGIApp : public XApp {
} // namespace kernel
} // namespace xe
#endif // XENIA_KERNEL_XBOXKRNL_APPS_XGI_APP_H_
#endif // XENIA_KERNEL_APPS_XGI_APP_H_

View File

@@ -7,8 +7,8 @@
******************************************************************************
*/
#ifndef XENIA_KERNEL_XBOXKRNL_APPS_XLIVEBASE_APP_H_
#define XENIA_KERNEL_XBOXKRNL_APPS_XLIVEBASE_APP_H_
#ifndef XENIA_KERNEL_APPS_XLIVEBASE_APP_H_
#define XENIA_KERNEL_APPS_XLIVEBASE_APP_H_
#include "xenia/kernel/app.h"
#include "xenia/kernel/kernel_state.h"
@@ -31,4 +31,4 @@ class XXLiveBaseApp : public XApp {
} // namespace kernel
} // namespace xe
#endif // XENIA_KERNEL_XBOXKRNL_APPS_XLIVEBASE_APP_H_
#endif // XENIA_KERNEL_APPS_XLIVEBASE_APP_H_

View File

@@ -7,8 +7,8 @@
******************************************************************************
*/
#ifndef XENIA_KERNEL_XBOXKRNL_APPS_XMP_APP_H_
#define XENIA_KERNEL_XBOXKRNL_APPS_XMP_APP_H_
#ifndef XENIA_KERNEL_APPS_XMP_APP_H_
#define XENIA_KERNEL_APPS_XMP_APP_H_
#include <memory>
#include <mutex>
@@ -112,4 +112,4 @@ class XXMPApp : public XApp {
} // namespace kernel
} // namespace xe
#endif // XENIA_KERNEL_XBOXKRNL_APPS_XMP_APP_H_
#endif // XENIA_KERNEL_APPS_XMP_APP_H_

View File

@@ -7,8 +7,8 @@
******************************************************************************
*/
#ifndef XENIA_KERNEL_XBOXKRNL_ASYNC_REQUEST_H_
#define XENIA_KERNEL_XBOXKRNL_ASYNC_REQUEST_H_
#ifndef XENIA_KERNEL_ASYNC_REQUEST_H_
#define XENIA_KERNEL_ASYNC_REQUEST_H_
#include <vector>
@@ -50,4 +50,4 @@ class XAsyncRequest {
} // namespace kernel
} // namespace xe
#endif // XENIA_KERNEL_XBOXKRNL_ASYNC_REQUEST_H_
#endif // XENIA_KERNEL_ASYNC_REQUEST_H_

View File

@@ -7,8 +7,8 @@
******************************************************************************
*/
#ifndef XENIA_KERNEL_XBOXKRNL_DISPATCHER_H_
#define XENIA_KERNEL_XBOXKRNL_DISPATCHER_H_
#ifndef XENIA_KERNEL_DISPATCHER_H_
#define XENIA_KERNEL_DISPATCHER_H_
#include <mutex>
@@ -44,4 +44,4 @@ class Dispatcher {
} // namespace kernel
} // namespace xe
#endif // XENIA_KERNEL_XBOXKRNL_DISPATCHER_H_
#endif // XENIA_KERNEL_DISPATCHER_H_

View File

@@ -7,8 +7,8 @@
******************************************************************************
*/
#ifndef XENIA_KERNEL_XBOXKRNL_NATIVE_LIST_H_
#define XENIA_KERNEL_XBOXKRNL_NATIVE_LIST_H_
#ifndef XENIA_KERNEL_NATIVE_LIST_H_
#define XENIA_KERNEL_NATIVE_LIST_H_
#include "xenia/memory.h"
#include "xenia/xbox.h"
@@ -47,4 +47,4 @@ class NativeList {
} // namespace kernel
} // namespace xe
#endif // XENIA_KERNEL_XBOXKRNL_NATIVE_LIST_H_
#endif // XENIA_KERNEL_NATIVE_LIST_H_

View File

@@ -7,8 +7,8 @@
******************************************************************************
*/
#ifndef XENIA_KERNEL_XBOXKRNL_OBJECT_TABLE_H_
#define XENIA_KERNEL_XBOXKRNL_OBJECT_TABLE_H_
#ifndef XENIA_KERNEL_OBJECT_TABLE_H_
#define XENIA_KERNEL_OBJECT_TABLE_H_
#include <mutex>
#include <string>
@@ -74,4 +74,4 @@ class ObjectTable {
} // namespace kernel
} // namespace xe
#endif // XENIA_KERNEL_XBOXKRNL_OBJECT_TABLE_H_
#endif // XENIA_KERNEL_OBJECT_TABLE_H_

View File

@@ -7,8 +7,8 @@
******************************************************************************
*/
#ifndef XENIA_KERNEL_XBOXKRNL_XENUMERATOR_H_
#define XENIA_KERNEL_XBOXKRNL_XENUMERATOR_H_
#ifndef XENIA_KERNEL_OBJECTS_XENUMERATOR_H_
#define XENIA_KERNEL_OBJECTS_XENUMERATOR_H_
#include <cstring>
#include <vector>
@@ -82,4 +82,4 @@ class XStaticEnumerator : public XEnumerator {
} // namespace kernel
} // namespace xe
#endif // XENIA_KERNEL_XBOXKRNL_XENUMERATOR_H_
#endif // XENIA_KERNEL_OBJECTS_XENUMERATOR_H_

View File

@@ -7,8 +7,8 @@
******************************************************************************
*/
#ifndef XENIA_KERNEL_XBOXKRNL_XEVENT_H_
#define XENIA_KERNEL_XBOXKRNL_XEVENT_H_
#ifndef XENIA_KERNEL_OBJECTS_XEVENT_H_
#define XENIA_KERNEL_OBJECTS_XEVENT_H_
#include "xenia/base/threading.h"
#include "xenia/kernel/xobject.h"
@@ -44,4 +44,4 @@ class XEvent : public XObject {
} // namespace kernel
} // namespace xe
#endif // XENIA_KERNEL_XBOXKRNL_XEVENT_H_
#endif // XENIA_KERNEL_OBJECTS_XEVENT_H_

View File

@@ -7,8 +7,8 @@
******************************************************************************
*/
#ifndef XENIA_KERNEL_XBOXKRNL_XFILE_H_
#define XENIA_KERNEL_XBOXKRNL_XFILE_H_
#ifndef XENIA_KERNEL_OBJECTS_XFILE_H_
#define XENIA_KERNEL_OBJECTS_XFILE_H_
#include "xenia/base/filesystem.h"
#include "xenia/kernel/objects/xevent.h"
@@ -130,4 +130,4 @@ class XFile : public XObject {
} // namespace kernel
} // namespace xe
#endif // XENIA_KERNEL_XBOXKRNL_XFILE_H_
#endif // XENIA_KERNEL_OBJECTS_XFILE_H_

View File

@@ -7,8 +7,8 @@
******************************************************************************
*/
#ifndef XENIA_KERNEL_XBOXKRNL_XKERNEL_MODULE_H_
#define XENIA_KERNEL_XBOXKRNL_XKERNEL_MODULE_H_
#ifndef XENIA_KERNEL_OBJECTS_XKERNEL_MODULE_H_
#define XENIA_KERNEL_OBJECTS_XKERNEL_MODULE_H_
#include "xenia/emulator.h"
#include "xenia/kernel/objects/xmodule.h"
@@ -35,4 +35,4 @@ class XKernelModule : public XModule {
} // namespace kernel
} // namespace xe
#endif // XENIA_KERNEL_XBOXKRNL_XKERNEL_MODULE_H_
#endif // XENIA_KERNEL_OBJECTS_XKERNEL_MODULE_H_

View File

@@ -7,8 +7,8 @@
******************************************************************************
*/
#ifndef XENIA_KERNEL_XBOXKRNL_XMODULE_H_
#define XENIA_KERNEL_XBOXKRNL_XMODULE_H_
#ifndef XENIA_KERNEL_OBJECTS_XMODULE_H_
#define XENIA_KERNEL_OBJECTS_XMODULE_H_
#include <string>
@@ -100,4 +100,4 @@ class XModule : public XObject {
} // namespace kernel
} // namespace xe
#endif // XENIA_KERNEL_XBOXKRNL_XMODULE_H_
#endif // XENIA_KERNEL_OBJECTS_XMODULE_H_

View File

@@ -7,8 +7,8 @@
******************************************************************************
*/
#ifndef XENIA_KERNEL_XBOXKRNL_XMUTANT_H_
#define XENIA_KERNEL_XBOXKRNL_XMUTANT_H_
#ifndef XENIA_KERNEL_OBJECTS_XMUTANT_H_
#define XENIA_KERNEL_OBJECTS_XMUTANT_H_
#include "xenia/base/threading.h"
#include "xenia/kernel/xobject.h"
@@ -36,4 +36,4 @@ class XMutant : public XObject {
} // namespace kernel
} // namespace xe
#endif // XENIA_KERNEL_XBOXKRNL_XMUTANT_H_
#endif // XENIA_KERNEL_OBJECTS_XMUTANT_H_

View File

@@ -7,8 +7,8 @@
******************************************************************************
*/
#ifndef XENIA_KERNEL_XBOXKRNL_XNOTIFY_LISTENER_H_
#define XENIA_KERNEL_XBOXKRNL_XNOTIFY_LISTENER_H_
#ifndef XENIA_KERNEL_OBJECTS_XNOTIFY_LISTENER_H_
#define XENIA_KERNEL_OBJECTS_XNOTIFY_LISTENER_H_
#include <memory>
#include <unordered_map>
@@ -49,4 +49,4 @@ class XNotifyListener : public XObject {
} // namespace kernel
} // namespace xe
#endif // XENIA_KERNEL_XBOXKRNL_XNOTIFY_LISTENER_H_
#endif // XENIA_KERNEL_OBJECTS_XNOTIFY_LISTENER_H_

View File

@@ -7,8 +7,8 @@
******************************************************************************
*/
#ifndef XENIA_KERNEL_XBOXKRNL_XSEMAPHORE_H_
#define XENIA_KERNEL_XBOXKRNL_XSEMAPHORE_H_
#ifndef XENIA_KERNEL_OBJECTS_XSEMAPHORE_H_
#define XENIA_KERNEL_OBJECTS_XSEMAPHORE_H_
#include "xenia/base/threading.h"
#include "xenia/kernel/xobject.h"
@@ -43,4 +43,4 @@ class XSemaphore : public XObject {
} // namespace kernel
} // namespace xe
#endif // XENIA_KERNEL_XBOXKRNL_XSEMAPHORE_H_
#endif // XENIA_KERNEL_OBJECTS_XSEMAPHORE_H_

View File

@@ -7,8 +7,8 @@
******************************************************************************
*/
#ifndef XENIA_KERNEL_XBOXKRNL_XTHREAD_H_
#define XENIA_KERNEL_XBOXKRNL_XTHREAD_H_
#ifndef XENIA_KERNEL_OBJECTS_XTHREAD_H_
#define XENIA_KERNEL_OBJECTS_XTHREAD_H_
#include <atomic>
#include <mutex>
@@ -208,4 +208,4 @@ class XHostThread : public XThread {
} // namespace kernel
} // namespace xe
#endif // XENIA_KERNEL_XBOXKRNL_XTHREAD_H_
#endif // XENIA_KERNEL_OBJECTS_XTHREAD_H_

View File

@@ -7,8 +7,8 @@
******************************************************************************
*/
#ifndef XENIA_KERNEL_XBOXKRNL_XTIMER_H_
#define XENIA_KERNEL_XBOXKRNL_XTIMER_H_
#ifndef XENIA_KERNEL_OBJECTS_XTIMER_H_
#define XENIA_KERNEL_OBJECTS_XTIMER_H_
#include "xenia/base/threading.h"
#include "xenia/kernel/xobject.h"
@@ -41,4 +41,4 @@ class XTimer : public XObject {
} // namespace kernel
} // namespace xe
#endif // XENIA_KERNEL_XBOXKRNL_TIMER_H_
#endif // XENIA_KERNEL_OBJECTS_TIMER_H_

View File

@@ -7,8 +7,8 @@
******************************************************************************
*/
#ifndef XENIA_KERNEL_XBOXKRNL_XUSER_MODULE_H_
#define XENIA_KERNEL_XBOXKRNL_XUSER_MODULE_H_
#ifndef XENIA_KERNEL_OBJECTS_XUSER_MODULE_H_
#define XENIA_KERNEL_OBJECTS_XUSER_MODULE_H_
#include <string>
@@ -80,4 +80,4 @@ class XUserModule : public XModule {
} // namespace kernel
} // namespace xe
#endif // XENIA_KERNEL_XBOXKRNL_XUSER_MODULE_H_
#endif // XENIA_KERNEL_OBJECTS_XUSER_MODULE_H_

View File

@@ -7,8 +7,8 @@
******************************************************************************
*/
#ifndef XENIA_KERNEL_XBOXKRNL_USER_PROFILE_H_
#define XENIA_KERNEL_XBOXKRNL_USER_PROFILE_H_
#ifndef XENIA_KERNEL_USER_PROFILE_H_
#define XENIA_KERNEL_USER_PROFILE_H_
#include <memory>
#include <string>
@@ -196,4 +196,4 @@ class UserProfile {
} // namespace kernel
} // namespace xe
#endif // XENIA_KERNEL_XBOXKRNL_USER_PROFILE_H_
#endif // XENIA_KERNEL_USER_PROFILE_H_

View File

@@ -78,7 +78,7 @@ inline uint64_t get_arg_64(PPCContext* ppc_context, uint8_t index) {
uint32_t stack_address = get_arg_stack_ptr(ppc_context, index - 8);
return SHIM_MEM_64(stack_address);
}
}
} // namespace util
#define SHIM_GET_ARG_8(n) util::get_arg_8(ppc_context, n)
#define SHIM_GET_ARG_16(n) util::get_arg_16(ppc_context, n)
@@ -123,7 +123,8 @@ class Param {
};
template <>
inline void Param::LoadValue<float>(Param::Init& init, float* out_value) {
*out_value = float(init.ppc_context->f[1 + ++init.float_ordinal]);
*out_value =
static_cast<float>(init.ppc_context->f[1 + ++init.float_ordinal]);
}
template <>
inline void Param::LoadValue<double>(Param::Init& init, double* out_value) {
@@ -322,10 +323,10 @@ inline void AppendParam(StringBuffer& string_buffer, qword_t param) {
string_buffer.AppendFormat("%.16llX", uint64_t(param));
}
inline void AppendParam(StringBuffer& string_buffer, float_t param) {
string_buffer.AppendFormat("%G", float(param));
string_buffer.AppendFormat("%G", static_cast<float>(param));
}
inline void AppendParam(StringBuffer& string_buffer, double_t param) {
string_buffer.AppendFormat("%G", double(param));
string_buffer.AppendFormat("%G", static_cast<double>(param));
}
inline void AppendParam(StringBuffer& string_buffer, lpvoid_t param) {
string_buffer.AppendFormat("%.8X", uint32_t(param));

View File

@@ -9,12 +9,12 @@
#include "xenia/kernel/util/xex2.h"
#include <gflags/gflags.h>
#include <algorithm>
#include <cstring>
#include <vector>
#include <gflags/gflags.h>
#include "third_party/crypto/rijndael-alg-fst.h"
#include "third_party/crypto/rijndael-alg-fst.c"
#include "third_party/mspack/lzx.h"

View File

@@ -7,8 +7,8 @@
******************************************************************************
*/
#ifndef XENIA_KERNEL_XEX2_INFO_H_
#define XENIA_KERNEL_XEX2_INFO_H_
#ifndef XENIA_KERNEL_UTIL_XEX2_INFO_H_
#define XENIA_KERNEL_UTIL_XEX2_INFO_H_
#include <cstdint>
@@ -91,7 +91,7 @@ enum xe_xex2_system_flags : uint32_t {
XEX_SYSTEM_ALLOW_AVATAR_GET_METADATA_BY_XUID = 0x20000000,
XEX_SYSTEM_ALLOW_CONTROLLER_SWAPPING = 0x40000000,
XEX_SYSTEM_DASH_EXTENSIBILITY_MODULE = 0x80000000,
// TODO: figure out how stored
// TODO(benvanik): figure out how stored.
/*XEX_SYSTEM_ALLOW_NETWORK_READ_CANCEL = 0x0,
XEX_SYSTEM_UNINTERRUPTABLE_READS = 0x0,
XEX_SYSTEM_REQUIRE_FULL_EXPERIENCE = 0x0,
@@ -645,4 +645,4 @@ struct X_IMAGE_EXPORT_DIRECTORY {
} // namespace xe
#endif // XENIA_KERNEL_XEX2_INFO_H_
#endif // XENIA_KERNEL_UTIL_XEX2_INFO_H_

View File

@@ -7,8 +7,8 @@
******************************************************************************
*/
#ifndef XENIA_KERNEL_XBOXKRNL_MODULE_H_
#define XENIA_KERNEL_XBOXKRNL_MODULE_H_
#ifndef XENIA_KERNEL_MODULE_H_
#define XENIA_KERNEL_MODULE_H_
#include <memory>
@@ -41,4 +41,4 @@ class XboxkrnlModule : public XKernelModule {
} // namespace kernel
} // namespace xe
#endif // XENIA_KERNEL_XBOXKRNL_MODULE_H_
#endif // XENIA_KERNEL_MODULE_H_

View File

@@ -7,8 +7,8 @@
******************************************************************************
*/
#ifndef XENIA_KERNEL_XBOXKRNL_ORDINALS_H_
#define XENIA_KERNEL_XBOXKRNL_ORDINALS_H_
#ifndef XENIA_KERNEL_ORDINALS_H_
#define XENIA_KERNEL_ORDINALS_H_
#include "xenia/cpu/export_resolver.h"
@@ -21,4 +21,4 @@ enum {
} // namespace ordinals
#include "xenia/kernel/util/ordinal_table_post.inc"
#endif // XENIA_KERNEL_XBOXKRNL_ORDINALS_H_
#endif // XENIA_KERNEL_ORDINALS_H_

View File

@@ -7,8 +7,8 @@
******************************************************************************
*/
#ifndef XENIA_KERNEL_XBOXKRNL_PRIVATE_H_
#define XENIA_KERNEL_XBOXKRNL_PRIVATE_H_
#ifndef XENIA_KERNEL_PRIVATE_H_
#define XENIA_KERNEL_PRIVATE_H_
#include "xenia/kernel/xboxkrnl_ordinals.h"
@@ -58,4 +58,4 @@ void RegisterVideoExports(xe::cpu::ExportResolver* export_resolver,
} // namespace kernel
} // namespace xe
#endif // XENIA_KERNEL_XBOXKRNL_PRIVATE_H_
#endif // XENIA_KERNEL_PRIVATE_H_

View File

@@ -7,8 +7,8 @@
******************************************************************************
*/
#ifndef XENIA_KERNEL_XBOXKRNL_RTL_H_
#define XENIA_KERNEL_XBOXKRNL_RTL_H_
#ifndef XENIA_KERNEL_RTL_H_
#define XENIA_KERNEL_RTL_H_
#include "xenia/xbox.h"
@@ -26,4 +26,4 @@ X_STATUS xeRtlInitializeCriticalSectionAndSpinCount(X_RTL_CRITICAL_SECTION* cs,
} // namespace kernel
} // namespace xe
#endif // XENIA_KERNEL_XBOXKRNL_RTL_H_
#endif // XENIA_KERNEL_RTL_H_

View File

@@ -7,8 +7,8 @@
******************************************************************************
*/
#ifndef XENIA_KERNEL_XBOXKRNL_XOBJECT_H_
#define XENIA_KERNEL_XBOXKRNL_XOBJECT_H_
#ifndef XENIA_KERNEL_XOBJECT_H_
#define XENIA_KERNEL_XOBJECT_H_
#include <atomic>
@@ -323,4 +323,4 @@ object_ref<T> retain_object(T* ptr) {
} // namespace kernel
} // namespace xe
#endif // XENIA_KERNEL_XBOXKRNL_XOBJECT_H_
#endif // XENIA_KERNEL_XOBJECT_H_