Adding ordinal enums to kernel modules.
Access via xe::kernel::modules::xboxkrnl::ordinals::MyFunction (or just ordinals::MyFunction when in the namespace). Some collisions occurred - just added random suffixes for now.
This commit is contained in:
13
src/xenia/kernel/util/ordinal_table_post.inc
Normal file
13
src/xenia/kernel/util/ordinal_table_post.inc
Normal file
@@ -0,0 +1,13 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* Xenia : Xbox 360 Emulator Research Project *
|
||||
******************************************************************************
|
||||
* Copyright 2013 Ben Vanik. All rights reserved. *
|
||||
* Released under the BSD license - see LICENSE in the root for more details. *
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
// Post-include file for an ordinal table.
|
||||
|
||||
|
||||
#undef XE_EXPORT
|
||||
27
src/xenia/kernel/util/ordinal_table_pre.inc
Normal file
27
src/xenia/kernel/util/ordinal_table_pre.inc
Normal file
@@ -0,0 +1,27 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* Xenia : Xbox 360 Emulator Research Project *
|
||||
******************************************************************************
|
||||
* Copyright 2013 Ben Vanik. All rights reserved. *
|
||||
* Released under the BSD license - see LICENSE in the root for more details. *
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
/**
|
||||
* Pre-include file for an ordinal table.
|
||||
* Use this to build tables of constants describing the ordinals:
|
||||
*
|
||||
* // Build an ordinal enum to make it easy to lookup ordinals.
|
||||
* #include <xenia/kernel/util/ordinal_table_pre.inc>
|
||||
* namespace ordinals {
|
||||
* enum {
|
||||
* #include <xenia/kernel/modules/my_module/my_module_table.inc>
|
||||
* };
|
||||
* } // namespace ordinals
|
||||
* #include <xenia/kernel/util/ordinal_table_post.inc>
|
||||
*/
|
||||
|
||||
|
||||
#define XE_EXPORT(module, ordinal, name, signature, type, flags) \
|
||||
name = ordinal
|
||||
|
||||
@@ -3,5 +3,7 @@
|
||||
'sources': [
|
||||
'export_table_post.inc',
|
||||
'export_table_pre.inc',
|
||||
'ordinal_table_post.inc',
|
||||
'ordinal_table_pre.inc',
|
||||
],
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user