├── include ├── GamerServices │ ├── GamerServices.h │ ├── StorageDeviceAsyncResult.h │ └── GamerServicesComponent.h ├── Net.h ├── Keys.h ├── Audio │ ├── Cue.h │ ├── XACT.h │ ├── AudioStopOptions.h │ ├── SoundState.h │ ├── Soundbank.h │ ├── WaveBank.h │ ├── wave.h │ ├── AudioListener.h │ ├── AudioCategory.h │ ├── AudioEmitter.h │ ├── AudioEngine.h │ └── Enums.h ├── GamePadDPad.h ├── GamePadTriggers.h ├── BoundingFrustrum.h ├── GamePadThumbSticks.h ├── System │ ├── Exception.h │ ├── Text │ │ ├── Decoder.h │ │ ├── Encoding.h │ │ ├── ASCIIEncoding.h │ │ └── Encoder.h │ ├── IO │ │ ├── IOException.h │ │ ├── FileSystemInfo.h │ │ ├── TextReader.h │ │ └── StreamReader.h │ ├── ValueType.h │ ├── Threading │ │ ├── ThreadState.h │ │ ├── WaitHandle.h │ │ └── Enums.h │ ├── Xml │ │ ├── Xsl │ │ │ └── XsltException.h │ │ ├── XPath │ │ │ ├── XPathException.h │ │ │ └── Interfaces.h │ │ └── Schema │ │ │ └── Interfaces.h │ ├── Windows │ │ ├── DependencyProperty.h │ │ ├── Input │ │ │ ├── KeyEventArgs.h │ │ │ ├── MouseButtonEventArgs.h │ │ │ ├── MouseEventArgs.h │ │ │ └── Enums.h │ │ ├── Controls │ │ │ ├── Primitives │ │ │ │ ├── DragDeltaEventArgs.h │ │ │ │ ├── DragStartedEventArgs.h │ │ │ │ ├── Popup.h │ │ │ │ └── DragCompletedEventArgs.h │ │ │ ├── INavigate.h │ │ │ ├── UIElementCollection.h │ │ │ ├── TextChangedEventArgs.h │ │ │ ├── Image.h │ │ │ ├── StackPanel.h │ │ │ ├── Enums.h │ │ │ ├── RowDefinition.h │ │ │ ├── ColumnDefinition.h │ │ │ ├── Button.h │ │ │ ├── TextBlock.h │ │ │ ├── Border.h │ │ │ ├── Canvas.h │ │ │ ├── Panel.h │ │ │ ├── TextBox.h │ │ │ └── ContentControl.h │ │ ├── MessageBox.h │ │ ├── RoutedEventArgs.h │ │ ├── Media │ │ │ ├── Brush.h │ │ │ └── SolidColorBrush.h │ │ ├── Point.h │ │ ├── SystemColors.h │ │ ├── Size.h │ │ ├── RoutedPropertyChangedEventArgs.h │ │ ├── PropertyMetaData.h │ │ ├── CornerRadius.h │ │ ├── GridLength.h │ │ └── Window.h │ ├── Collections │ │ ├── Generic │ │ │ ├── KeyNotFoundException.h │ │ │ ├── Comparer.h │ │ │ ├── EqualityComparer.h │ │ │ └── KeyValuePair.h │ │ ├── IList.h │ │ ├── Interfaces.h │ │ └── Stack.h │ ├── Threading.h │ ├── Delegates.h │ ├── EventArgs.h │ ├── XKUtils │ │ ├── XKFlash.h │ │ └── APICompat.h │ ├── Stack.h │ ├── misc.h │ ├── ComponentModel │ │ ├── ClosingEventArgs.h │ │ └── CancelEventArgs.h │ ├── Diagnostics │ │ └── Stopwatch.h │ ├── Environment.h │ ├── Net │ │ ├── NetworkInformation │ │ │ ├── NetworkInterface.h │ │ │ └── NetworkChange.h │ │ ├── EndPoint.h │ │ ├── SocketAddress.h │ │ ├── DnsEndPoint.h │ │ └── IPEndPoint.h │ ├── Globalization │ │ ├── Calendar.h │ │ ├── DaylightTime.h │ │ └── CultureInfo.h │ ├── Runtime │ │ └── InteropServices │ │ │ └── ExternalException.h │ ├── Nullable.h │ ├── TimeZone.h │ ├── Byte.h │ ├── Boolean.h │ ├── Int16.h │ ├── UInt32.h │ ├── Int32.h │ ├── SByte.h │ ├── UInt64.h │ ├── UInt16.h │ ├── OperatingSystem.h │ ├── Int64.h │ ├── FrameworkResources.h │ ├── Console.h │ ├── Types.h │ └── Single.h ├── GamePadCapabilities.h ├── Graphics │ ├── Exceptions.h │ ├── RenderTarget.h │ ├── TextureInformation.h │ ├── BasicDirectionalLight.h │ ├── GraphicsDeviceCapabilities.h │ ├── TextureCreationParameters.h │ ├── GraphicsDeviceCreationParameters.h │ ├── IVertexType.h │ ├── IPackedVector.h │ ├── ModelMeshPartCollection.h │ ├── EffectParameter.h │ ├── ModelEffectCollection.h │ ├── PackedVector │ │ └── IPackedVector.h │ ├── IGraphicsDeviceService.h │ ├── EffectPass.h │ ├── DirectionalLight.h │ ├── Texture.h │ ├── DisplayMode.h │ ├── TextureCollection.h │ ├── DisplayModeCollection.h │ ├── EffectTechnique.h │ ├── GraphicsResource.h │ ├── StateBlock.h │ ├── VertexDeclaration.h │ ├── DepthStencilBuffer.h │ ├── VertexElement.h │ ├── VertexBuffer.h │ ├── AlphaTestEffect.h │ ├── VertexPositionColor.h │ ├── VertexPositionTexture.h │ ├── PresentationParameters.h │ ├── ModelMeshCollection.h │ └── ModelBoneCollection.h ├── Content.h ├── Media.h ├── GamerServices.h ├── Content │ ├── ContentLoadException.h │ └── ContentTypeReader.h ├── Storage.h ├── sassert.h ├── Input.h ├── XFX.Game.h ├── XFX.h ├── Audio.h ├── Net │ ├── PacketWriter.h │ ├── PacketReader.h │ └── NetworkException.h ├── GameServiceContainer.h ├── Point.h ├── GameComponentCollectionEventArgs.h ├── GraphicsDeviceInformation.h ├── Input │ ├── GamePad.h │ ├── Mouse.h │ ├── Keyboard.h │ ├── GamePadTriggers.h │ ├── GamePadThumbSticks.h │ └── GamePadDPad.h ├── Storage │ ├── StorageDeviceNotConnectedException.h │ ├── StorageDevice.h │ └── StorageContainer.h ├── System.h ├── BoundingSphere.h ├── GameTime.h ├── Media │ ├── Enums.h │ ├── Video.h │ └── VideoPlayer.h ├── CurveKey.h ├── Ray.h ├── CurveKeyCollection.h ├── Graphics.h ├── GameComponentCollection.h └── Curve.h ├── src ├── libXFX │ ├── ps.h │ ├── vs.h │ ├── XNBFile.h │ ├── StorageDeviceAsyncResult.cpp │ ├── Texture2DReader.h │ ├── ModelReader.h │ └── StorageDeviceAsyncResult.h ├── libSystem │ ├── pktdrv.h │ └── Stopwatch.cpp ├── xnbbuild │ ├── src │ │ ├── TryCatchFinally.h │ │ ├── Path.h │ │ └── main.c │ └── xnbbuild.vcxproj.filters ├── libSystem.Windows │ ├── SystemColors.cpp │ ├── MessageBox.cpp │ └── memutil.h ├── libmscorlib │ ├── sassert.c │ ├── DaylightTime.cpp │ └── HashHelpers.h └── libSystem.Xml │ └── makefile ├── .gitattributes └── README.md /include/GamerServices/GamerServices.h: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /include/Net.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Halofreak1990/XFXFramework/HEAD/include/Net.h -------------------------------------------------------------------------------- /include/Keys.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Halofreak1990/XFXFramework/HEAD/include/Keys.h -------------------------------------------------------------------------------- /include/Audio/Cue.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Halofreak1990/XFXFramework/HEAD/include/Audio/Cue.h -------------------------------------------------------------------------------- /include/Audio/XACT.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Halofreak1990/XFXFramework/HEAD/include/Audio/XACT.h -------------------------------------------------------------------------------- /include/GamePadDPad.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Halofreak1990/XFXFramework/HEAD/include/GamePadDPad.h -------------------------------------------------------------------------------- /include/GamePadTriggers.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Halofreak1990/XFXFramework/HEAD/include/GamePadTriggers.h -------------------------------------------------------------------------------- /include/BoundingFrustrum.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Halofreak1990/XFXFramework/HEAD/include/BoundingFrustrum.h -------------------------------------------------------------------------------- /include/GamePadThumbSticks.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Halofreak1990/XFXFramework/HEAD/include/GamePadThumbSticks.h -------------------------------------------------------------------------------- /include/System/Exception.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Halofreak1990/XFXFramework/HEAD/include/System/Exception.h -------------------------------------------------------------------------------- /include/GamePadCapabilities.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Halofreak1990/XFXFramework/HEAD/include/GamePadCapabilities.h -------------------------------------------------------------------------------- /include/Graphics/Exceptions.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Halofreak1990/XFXFramework/HEAD/include/Graphics/Exceptions.h -------------------------------------------------------------------------------- /include/System/Text/Decoder.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Halofreak1990/XFXFramework/HEAD/include/System/Text/Decoder.h -------------------------------------------------------------------------------- /include/System/Text/Encoding.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Halofreak1990/XFXFramework/HEAD/include/System/Text/Encoding.h -------------------------------------------------------------------------------- /include/Audio/AudioStopOptions.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Halofreak1990/XFXFramework/HEAD/include/Audio/AudioStopOptions.h -------------------------------------------------------------------------------- /include/Graphics/RenderTarget.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Halofreak1990/XFXFramework/HEAD/include/Graphics/RenderTarget.h -------------------------------------------------------------------------------- /include/System/IO/IOException.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Halofreak1990/XFXFramework/HEAD/include/System/IO/IOException.h -------------------------------------------------------------------------------- /include/System/ValueType.h: -------------------------------------------------------------------------------- 1 | #ifndef _SYSTEM_VALUETYPE_ 2 | #define _SYSTEM_VALUETYPE_ 3 | 4 | #endif // _SYSTEM_VALUETYPE_ 5 | -------------------------------------------------------------------------------- /include/System/Text/ASCIIEncoding.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Halofreak1990/XFXFramework/HEAD/include/System/Text/ASCIIEncoding.h -------------------------------------------------------------------------------- /include/Graphics/TextureInformation.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Halofreak1990/XFXFramework/HEAD/include/Graphics/TextureInformation.h -------------------------------------------------------------------------------- /include/System/Threading/ThreadState.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Halofreak1990/XFXFramework/HEAD/include/System/Threading/ThreadState.h -------------------------------------------------------------------------------- /include/System/Threading/WaitHandle.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Halofreak1990/XFXFramework/HEAD/include/System/Threading/WaitHandle.h -------------------------------------------------------------------------------- /include/System/Xml/Xsl/XsltException.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Halofreak1990/XFXFramework/HEAD/include/System/Xml/Xsl/XsltException.h -------------------------------------------------------------------------------- /include/Graphics/BasicDirectionalLight.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Halofreak1990/XFXFramework/HEAD/include/Graphics/BasicDirectionalLight.h -------------------------------------------------------------------------------- /include/System/Windows/DependencyProperty.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Halofreak1990/XFXFramework/HEAD/include/System/Windows/DependencyProperty.h -------------------------------------------------------------------------------- /include/System/Windows/Input/KeyEventArgs.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Halofreak1990/XFXFramework/HEAD/include/System/Windows/Input/KeyEventArgs.h -------------------------------------------------------------------------------- /include/System/Xml/XPath/XPathException.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Halofreak1990/XFXFramework/HEAD/include/System/Xml/XPath/XPathException.h -------------------------------------------------------------------------------- /include/Graphics/GraphicsDeviceCapabilities.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Halofreak1990/XFXFramework/HEAD/include/Graphics/GraphicsDeviceCapabilities.h -------------------------------------------------------------------------------- /include/Graphics/TextureCreationParameters.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Halofreak1990/XFXFramework/HEAD/include/Graphics/TextureCreationParameters.h -------------------------------------------------------------------------------- /include/Graphics/GraphicsDeviceCreationParameters.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Halofreak1990/XFXFramework/HEAD/include/Graphics/GraphicsDeviceCreationParameters.h -------------------------------------------------------------------------------- /include/System/Collections/Generic/KeyNotFoundException.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Halofreak1990/XFXFramework/HEAD/include/System/Collections/Generic/KeyNotFoundException.h -------------------------------------------------------------------------------- /include/System/Windows/Controls/Primitives/DragDeltaEventArgs.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace System 4 | { 5 | namespace Windows 6 | { 7 | namespace Controls 8 | { 9 | namespace Primitives 10 | { 11 | } 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /include/System/Windows/Controls/Primitives/DragStartedEventArgs.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace System 4 | { 5 | namespace Windows 6 | { 7 | namespace Controls 8 | { 9 | namespace Primitives 10 | { 11 | } 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /include/Audio/SoundState.h: -------------------------------------------------------------------------------- 1 | #ifndef XFRAMEWORK_SOUNDSTATE_H 2 | #define XFRAMEWORK_SOUNDSTATE_H 3 | 4 | namespace XFramework::Audio 5 | { 6 | enum SoundState 7 | { 8 | Paused, 9 | Playing, 10 | Stopped 11 | }; 12 | } 13 | 14 | #endif //XFRAMEWORK_SOUNDSTATE_H 15 | -------------------------------------------------------------------------------- /src/libXFX/ps.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by Microsoft (R) D3DX9 Shader Assembler 3 | // 4 | // Source: ps.psh 5 | // Flags: /Vd 6 | // 7 | 8 | 9 | const DWORD g_ps11_main[] = 10 | { 11 | 0xffff0101, 0x00000042, 0xb00f0000, 0x00000001, 0x800f0000, 0xb0e40000, 12 | 0x0000ffff 13 | }; 14 | -------------------------------------------------------------------------------- /include/System/Windows/Input/MouseButtonEventArgs.h: -------------------------------------------------------------------------------- 1 | #include "MouseEventArgs.h" 2 | 3 | namespace System 4 | { 5 | namespace Windows 6 | { 7 | namespace Input 8 | { 9 | class MouseButtonEventArgs : public MouseEventArgs 10 | { 11 | public: 12 | 13 | }; 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/libSystem/pktdrv.h: -------------------------------------------------------------------------------- 1 | #ifndef _Pktdrv_ 2 | #define _Pktdrv_ 3 | 4 | int Pktdrv_Init(void); 5 | void Pktdrv_Quit(void); 6 | int Pktdrv_ReceivePackets(void); 7 | void Pktdrv_SendPacket(unsigned char *buffer,int length); 8 | void Pktdrv_GetEthernetAddr(unsigned char *address); 9 | int Pktdrv_GetQueuedTxPkts(void); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /src/libXFX/vs.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by Microsoft (R) D3DX9 Shader Assembler 3 | // 4 | // Source: vs.vsh 5 | // Flags: /Vd 6 | // 7 | 8 | 9 | const DWORD g_vs11_main[] = 10 | { 11 | 0xfffe0101, 0x00000001, 0xe00f0000, 0x90e40007, 0x00000001, 0x800f0000, 12 | 0xa0e40000, 0x00000004, 0xc00f0000, 0x90e40000, 0x80e40000, 0xa0e40001, 13 | 0x0000ffff 14 | }; 15 | -------------------------------------------------------------------------------- /include/System/Windows/Controls/INavigate.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace System 6 | { 7 | namespace Windows 8 | { 9 | namespace Controls 10 | { 11 | // Defines a method for internal navigation in an application. 12 | class INavigate 13 | { 14 | public: 15 | bool Navigate(const Uri& source) =0; 16 | }; 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /include/System/Windows/Controls/UIElementCollection.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | namespace System 7 | { 8 | namespace Windows 9 | { 10 | namespace Controls 11 | { 12 | class UIElementCollection : public PresentationFrameworkCollection 13 | { 14 | }; 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /include/System/Windows/Controls/TextChangedEventArgs.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace System 6 | { 7 | namespace Windows 8 | { 9 | namespace Controls 10 | { 11 | class TextChangedEventArgs : public RoutedEventArgs 12 | { 13 | 14 | }; 15 | 16 | typedef Event TextChangedEventHandler; 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /include/System/Windows/Controls/Image.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace System 6 | { 7 | namespace Windows 8 | { 9 | namespace Controls 10 | { 11 | // Represents a control that displays an image in the JPEG or PNG file formats. 12 | class Image : public FrameworkElement 13 | { 14 | public: 15 | Image(); 16 | }; 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/xnbbuild/src/TryCatchFinally.h: -------------------------------------------------------------------------------- 1 | #ifndef _TRYCATCHFINALLY_H 2 | #define _TRYCATCHFINALLY_H 3 | 4 | #include 5 | #include 6 | 7 | #define TRY do{ jmp_buf ex_buf__; switch(setjmp(ex_buf__) ){ case 0: while(1){ 8 | #define CATCH(x) break; case x: 9 | #define FINALLY break; } default: 10 | #define ETRY } }while(0) 11 | #define THROW(x) longjmp(ex_buf__, x) 12 | 13 | #endif //_TRYCATCHFINALLY_H 14 | -------------------------------------------------------------------------------- /src/libSystem.Windows/SystemColors.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | namespace System 4 | { 5 | namespace Windows 6 | { 7 | const Color SystemColors::WindowColor = Color::FromARGB(0xA0, 0x00, 0x00, 0x00); 8 | const Color SystemColors::WindowFrameColor = Color::FromARGB(0xA0, 0x00, 0x00, 0x00); 9 | const Color SystemColors::WindowTextColor = Color::FromARGB(0xA0, 0xFF, 0xFF, 0xFF); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/libmscorlib/sassert.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include 4 | #include 5 | 6 | void __sassert(const char *fileName, int lineNumber, const char* conditionString, const char* message) 7 | { 8 | debugClearScreen(); 9 | debugPrint("\tAssertion!\n\tFile: \n%s\n\nLine: %d\n\nCondition:\n%s\n\n\t%s", fileName, lineNumber, conditionString, message); 10 | 11 | XSleep(100); 12 | 13 | __asm__ ("cli\nhlt"); 14 | } 15 | -------------------------------------------------------------------------------- /src/xnbbuild/src/Path.h: -------------------------------------------------------------------------------- 1 | #ifndef _PATH_H 2 | #define _PATH_H 3 | 4 | struct _path 5 | { 6 | const char * (*Combine)(char const * const, char const * const); 7 | const char * (*GetDirectory)(char const * const); 8 | const char * (*GetExtension)(char const * const); 9 | const char * (*GetFileName)(char const * const); 10 | const char * (*GetFileNameWithoutExtension)(char const * const); 11 | }; 12 | 13 | extern struct _path Path; 14 | 15 | #endif //_PATH_H 16 | -------------------------------------------------------------------------------- /include/System/Collections/IList.h: -------------------------------------------------------------------------------- 1 | #ifndef _ILIST_ 2 | #define _ILIST_ 3 | 4 | #include "../System/Types.h" 5 | 6 | using namespace System; 7 | 8 | namespace System 9 | { 10 | namespace Collections 11 | { 12 | interface IList : virtual ICollection, virtual IEnumerable 13 | { 14 | public: 15 | virtual int IsFixedSize(); 16 | virtual int IsReadOnly(); 17 | 18 | virtual void Clear(); 19 | virtual void RemoveAt(); 20 | }; 21 | } 22 | } 23 | 24 | #endif //_ILIST_ 25 | -------------------------------------------------------------------------------- /include/Content.h: -------------------------------------------------------------------------------- 1 | /******************************************************** 2 | * Content.h * 3 | * * 4 | * XFX::Content namespace include file * 5 | * Copyright (c) XFX Team. All Rights Reserved * 6 | ********************************************************/ 7 | #ifndef _XFX_CONTENT_ 8 | #define _XFX_CONTENT_ 9 | 10 | // 11 | //Classes 12 | // 13 | #include "Content/ContentManager.h" 14 | #include "Content/ContentReader.h" 15 | 16 | #endif //_XFX_CONTENT_ 17 | -------------------------------------------------------------------------------- /include/System/IO/FileSystemInfo.h: -------------------------------------------------------------------------------- 1 | #ifndef _SYSTEM_IO_FILESYSTEMINFO_ 2 | #define _SYSTEM_IO_FILESYSTEMINFO_ 3 | 4 | #include 5 | 6 | namespace System 7 | { 8 | namespace IO 9 | { 10 | class FileSystemInfo : public virtual Object 11 | { 12 | protected: 13 | virtual ~FileSystemInfo() {} 14 | String FullPath; 15 | String OriginalPath; 16 | 17 | public: 18 | virtual const char* FullName(); 19 | }; 20 | } 21 | } 22 | 23 | #endif //_IO_FILESYSTEMINFO_ 24 | -------------------------------------------------------------------------------- /include/System/Collections/Interfaces.h: -------------------------------------------------------------------------------- 1 | #ifndef _SYSTEM_COLLECTIONS_INTERFACES_ 2 | #define _SYSTEM_COLLECTIONS_INTERFACES_ 3 | 4 | #include 5 | #include 6 | 7 | namespace System 8 | { 9 | namespace Collections 10 | { 11 | interface ICollection 12 | { 13 | public: 14 | virtual void CopyTo(Object** array, int index)=0; 15 | 16 | virtual int Count()=0; 17 | virtual bool IsSynchronized()=0; 18 | }; 19 | } 20 | } 21 | 22 | #endif //_SYSTEM_COLLECTIONS_INTERFACES_ 23 | -------------------------------------------------------------------------------- /include/Media.h: -------------------------------------------------------------------------------- 1 | /******************************************************** 2 | * Media.h * 3 | * * 4 | * XFX::Media namespace include file * 5 | * Copyright (c) XFX Team. All Rights Reserved * 6 | ********************************************************/ 7 | #ifndef _XFX_MEDIA_ 8 | #define _XFX_MEDIA_ 9 | 10 | // 11 | //Classes 12 | // 13 | #include "Media/Video.h" 14 | #include "Media/VideoPlayer.h" 15 | // 16 | //Enums 17 | // 18 | #include "Media/Enums.h" 19 | 20 | #endif //_XFX_MEDIA_ 21 | -------------------------------------------------------------------------------- /src/libSystem.Windows/MessageBox.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | namespace System 5 | { 6 | namespace Windows 7 | { 8 | MessageBoxResult_t MessageBox::Show(const String& messageBoxText) 9 | { 10 | return Show(messageBoxText, String::Empty, MessageBoxButton::Ok); 11 | } 12 | 13 | MessageBoxResult_t MessageBox::Show(const String& messageBoxText, const String& caption, const MessageBoxButton_t buttons) 14 | { 15 | //! TODO: implement 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /include/Graphics/IVertexType.h: -------------------------------------------------------------------------------- 1 | #ifndef _XFX_GRAPHICS_IVERTEXTYPE_ 2 | #define _XFX_GRAPHICS_IVERTEXTYPE_ 3 | 4 | #include 5 | 6 | namespace XFX 7 | { 8 | namespace Graphics 9 | { 10 | // Vertex type interface which is implemented by a custom vertex type structure. 11 | interface IVertexType 12 | { 13 | public: 14 | // Vertex declaration, which defines per-vertex data. 15 | VertexDeclaration getVertexDeclaration() const; 16 | }; 17 | } 18 | } 19 | 20 | #endif //_XFX_GRAPHICS_IVERTEXTYPE_ 21 | -------------------------------------------------------------------------------- /include/System/Windows/Input/MouseEventArgs.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | namespace System 7 | { 8 | namespace Windows 9 | { 10 | class UIElement; 11 | 12 | namespace Input 13 | { 14 | // 15 | class MouseEventArgs : public RoutedEventArgs 16 | { 17 | public: 18 | Point GetPosition(UIElement const * const relativeTo) const; 19 | }; 20 | 21 | typedef Event MouseEventHandler; 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /include/GamerServices.h: -------------------------------------------------------------------------------- 1 | /******************************************************** 2 | * GamerServices.h * 3 | * * 4 | * XFX::GamerServices namespace include file * 5 | * Copyright (c) XFX Team. All Rights Reserved * 6 | ********************************************************/ 7 | #ifndef _XFX_GAMERSERVICES_ 8 | #define _XFX_GAMERSERVICES_ 9 | 10 | // 11 | //Classes 12 | // 13 | #include "GamerServices/Guide.h" 14 | 15 | // 16 | //Enums 17 | // 18 | #include "GamerServices/Enums.h" 19 | 20 | #endif //_XFX_GAMERSERVICES_ 21 | -------------------------------------------------------------------------------- /include/Content/ContentLoadException.h: -------------------------------------------------------------------------------- 1 | #ifndef _CONTENT_CONTENTLOADEXCEPTION_ 2 | #define _CONTENT_CONTENTLOADEXCEPTION_ 3 | 4 | #include 5 | #include 6 | 7 | using namespace System; 8 | 9 | namespace XFX 10 | { 11 | namespace Content 12 | { 13 | class ContentLoadException : public Exception 14 | { 15 | public: 16 | ContentLoadException(); 17 | ContentLoadException(char* message); 18 | ContentLoadException(char* message, Exception innerException); 19 | }; 20 | } 21 | } 22 | 23 | #endif //_CONTENT_CONTENTLOADEXCEPTION_ 24 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | *.sln merge=union 7 | *.csproj merge=union 8 | *.vbproj merge=union 9 | *.fsproj merge=union 10 | *.dbproj merge=union 11 | 12 | # Standard to msysgit 13 | *.doc diff=astextplain 14 | *.DOC diff=astextplain 15 | *.docx diff=astextplain 16 | *.DOCX diff=astextplain 17 | *.dot diff=astextplain 18 | *.DOT diff=astextplain 19 | *.pdf diff=astextplain 20 | *.PDF diff=astextplain 21 | *.rtf diff=astextplain 22 | *.RTF diff=astextplain 23 | -------------------------------------------------------------------------------- /include/Storage.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * Storage.h * 3 | * * 4 | * XFX::Storage namespace include file * 5 | * Copyright (c) XFX Team. All Rights Reserved * 6 | *****************************************************************************/ 7 | #ifndef _XFX_STORAGE_ 8 | #define _XFX_STORAGE_ 9 | 10 | #include "Storage/StorageContainer.h" 11 | #include "Storage/StorageDevice.h" 12 | #include "Storage/StorageDeviceNotConnectedException.h" 13 | 14 | #endif //_XFX_STORAGE_ 15 | -------------------------------------------------------------------------------- /include/System/Threading.h: -------------------------------------------------------------------------------- 1 | /******************************************************** 2 | * Threading.h * 3 | * * 4 | * XFX System::Threading namespace include file * 5 | * Copyright (c) XFX Team. All Rights Reserved * 6 | ********************************************************/ 7 | #ifndef _SYSTEM_THREADING_ 8 | #define _SYSTEM_THREADING_ 9 | 10 | // 11 | // Enums 12 | // 13 | #include "Threading/Enums.h" 14 | 15 | // 16 | // Classes 17 | // 18 | #include "Threading/Thread.h" 19 | #include "Threading/WaitHandle.h" 20 | 21 | #endif //_SYSTEM_THREADING_ 22 | -------------------------------------------------------------------------------- /src/libSystem.Windows/memutil.h: -------------------------------------------------------------------------------- 1 | #ifndef _MEMUTIL_H 2 | #define _MEMUTIL_H 3 | 4 | // sets count dwords of dest to value 5 | inline void* memsetd(void* dest, const unsigned int value, const int count) 6 | { 7 | __asm__ __volatile__("rep stosl"::"c" (count),"a" (value),"D" (dest): "memory"); 8 | return dest; 9 | } 10 | 11 | // sets count words of dest to value 12 | inline void* memsetw(void* dest, const unsigned short value, const int count) 13 | { 14 | __asm__ __volatile__("rep stosw"::"c" (count),"a" (value),"D" (dest): "memory"); 15 | return dest; 16 | } 17 | 18 | #endif //_MEMUTIL_H 19 | -------------------------------------------------------------------------------- /include/System/Windows/Controls/StackPanel.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | namespace System 7 | { 8 | namespace Windows 9 | { 10 | struct Size; 11 | 12 | namespace Controls 13 | { 14 | class StackPanel : public Panel 15 | { 16 | protected: 17 | Size ArrangeOverride(const Size arrangeSize); 18 | Size MeasureOverride(const Size constraint); 19 | 20 | public: 21 | Orientation_t Orientation; 22 | 23 | StackPanel(); 24 | 25 | static const Type& GetType(); 26 | }; 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /include/Audio/Soundbank.h: -------------------------------------------------------------------------------- 1 | #ifndef XFRAMEWORK_SOUNDBANK_H 2 | #define XFRAMEWORK_SOUNDBANK_H 3 | 4 | #include "AudioEmitter.h" 5 | #include "AudioEngine.h" 6 | #include "AudioListener.h" 7 | #include "Cue.h" 8 | 9 | namespace XFramework::Audio 10 | { 11 | class SoundBank 12 | { 13 | protected: 14 | void Dispose(int disposing); 15 | public: 16 | int IsInUse; 17 | 18 | void Dispose(); 19 | Cue GetCue(char* name); 20 | void PlayCue(char* name); 21 | void PlayCue(char *name, AudioListener listener, AudioEmitter emitter); 22 | SoundBank(AudioEngine audioEngine, char* filename); 23 | }; 24 | } 25 | 26 | #endif //XFRAMEWORK_SOUNDBANK_H 27 | -------------------------------------------------------------------------------- /include/Graphics/IPackedVector.h: -------------------------------------------------------------------------------- 1 | #ifndef _IPACKEDVECTOR_ 2 | #define _IPACKEDVECTOR_ 3 | 4 | #include 5 | #include "TPacked.h" 6 | #include "Vector4.h" 7 | 8 | using namespace XFX; 9 | 10 | namespace XFX 11 | { 12 | namespace Graphics 13 | { 14 | namespace PackedVector 15 | { 16 | interface IPackedVector 17 | { 18 | public: 19 | void PackFromVector4(Vector4 &vector); 20 | Vector4 ToVector4(); 21 | }; 22 | 23 | template 24 | interface IPackedVector : IPackedVector 25 | { 26 | public: 27 | TPacked PackedValue; 28 | }; 29 | } 30 | } 31 | } 32 | 33 | #endif //_IPACKEDVECTOR_ 34 | -------------------------------------------------------------------------------- /include/Graphics/ModelMeshPartCollection.h: -------------------------------------------------------------------------------- 1 | #ifndef _XFX_GRAPHICS_MODELMESHPARTCOLLECTION_ 2 | #define _XFX_GRAPHICS_MODELMESHPARTCOLLECTION_ 3 | 4 | #include "ModelMeshPart.h" 5 | #include 6 | 7 | using namespace System::Collections::ObjectModel; 8 | 9 | namespace XFX 10 | { 11 | namespace Graphics 12 | { 13 | /** 14 | * 15 | */ 16 | class ModelMeshPartCollection : public ReadOnlyCollection 17 | { 18 | private: 19 | ModelMeshPartCollection(IList list); 20 | 21 | public: 22 | 23 | }; 24 | } 25 | } 26 | 27 | #endif //_XFX_GRAPHICS_MODELMESHPARTCOLLECTION_ 28 | -------------------------------------------------------------------------------- /include/System/Windows/Controls/Primitives/Popup.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace System 6 | { 7 | namespace Windows 8 | { 9 | namespace Controls 10 | { 11 | namespace Primitives 12 | { 13 | // Displays content on top of existing content, within the bounds of the control. 14 | class Popup : public FrameworkElement 15 | { 16 | public: 17 | UIElement* Child; 18 | bool getIsOpen() const; 19 | void setIsOpen(const bool value); 20 | int HorizontalOffset; 21 | int VerticalOffset 22 | 23 | Popup(); 24 | 25 | 26 | }; 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /include/sassert.h: -------------------------------------------------------------------------------- 1 | #ifndef _SASSERT_H 2 | #define _SASSERT_H 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #include "_ansi.h" 9 | 10 | #undef sassert 11 | 12 | #ifdef NDEBUG /* required by ANSI standard */ 13 | #define sassert(e,msg) ((void)0) 14 | #else 15 | // Causes a blue screen of death if e is not true with the msg "msg" displayed 16 | #define sassert(e,msg) ((e) ? (void)0 : __sassert(__FILE__, __LINE__, #e, msg)) 17 | 18 | #endif /* NDEBUG */ 19 | 20 | void __sassert(const char *fileName, int lineNumber, const char* conditionString, const char* message); 21 | 22 | #ifdef __cplusplus 23 | } 24 | #endif 25 | 26 | #endif //_SASSERT_H 27 | -------------------------------------------------------------------------------- /include/Input.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * Input.h * 3 | * * 4 | * XFX::Input namespace include file * 5 | * Copyright (c) XFX Team. All Rights Reserved * 6 | *****************************************************************************/ 7 | #ifndef _XFX_INPUT_ 8 | #define _XFX_INPUT_ 9 | 10 | // 11 | //Data Types 12 | // 13 | #include "Input/GamePad.h" 14 | #include "Input/GamePadButtons.h" 15 | #include "Input/GamePadState.h" 16 | #include "Input/Keyboard.h" 17 | #include "Input/Mouse.h" 18 | // 19 | //Enums 20 | // 21 | #include "Input/Enums.h" 22 | 23 | #endif //_XFX_INPUT_ 24 | -------------------------------------------------------------------------------- /include/XFX.Game.h: -------------------------------------------------------------------------------- 1 | /******************************************************** 2 | * XFX.Game.h * 3 | * * 4 | * XFX namespace include file for libXFX.Game.a * 5 | * Copyright (c) XFX Team. All Rights Reserved * 6 | ********************************************************/ 7 | #ifndef _XFX_GAME_H 8 | #define _XFX_GAME_H 9 | 10 | // 11 | //Data Types 12 | // 13 | #include "Game.h" 14 | #include "GamerServices/GamerServicesComponent.h" 15 | #include "GameComponentCollection.h" 16 | #include "GameServiceContainer.h" 17 | #include "GameTime.h" 18 | #include "GraphicsDeviceManager.h" 19 | // 20 | //Interfaces 21 | // 22 | #include "Interfaces.h" 23 | 24 | #endif //_XFX_GAME_ 25 | -------------------------------------------------------------------------------- /include/Audio/WaveBank.h: -------------------------------------------------------------------------------- 1 | #ifndef XFRAMEWORK_WAVEBANK_H 2 | #define XFRAMEWORK_WAVEBANK_H 3 | 4 | #include "AudioEngine.h" 5 | #include "../Net_Framework/System.h" 6 | 7 | namespace XFramework::Audio 8 | { 9 | class WaveBank 10 | { 11 | private: 12 | int isDisposed; 13 | int isInUse; 14 | int isPrepared; 15 | 16 | protected: 17 | void Dispose(int disposing); 18 | 19 | public: 20 | int IsDisposed(); 21 | int IsInUse(); 22 | int IsPrepared(); 23 | 24 | void Dispose(); 25 | WaveBank(AudioEngine audioEngine, char* nonStreamingWaveBankFilename); 26 | WaveBank(AudioEngine audioEngine, char* streamingWaveBankFilename, int offset, short packetsize); 27 | } 28 | } 29 | 30 | #endif //XFRAMEWORK_WAVEBANK_H 31 | -------------------------------------------------------------------------------- /include/XFX.h: -------------------------------------------------------------------------------- 1 | /******************************************************** 2 | * XFX.h * 3 | * * 4 | * XFX namespace include file * 5 | * Copyright (c) XFX Team. All Rights Reserved * 6 | ********************************************************/ 7 | #ifndef _XFX_ 8 | #define _XFX_ 9 | 10 | // 11 | //Data types 12 | // 13 | #include "BoundingBox.h" 14 | #include "BoundingSphere.h" 15 | #include "GameTime.h" 16 | #include "MathHelper.h" 17 | #include "Matrix.h" 18 | #include "Point.h" 19 | #include "Quaternion.h" 20 | #include "Ray.h" 21 | #include "Rectangle.h" 22 | #include "Vector2.h" 23 | #include "Vector3.h" 24 | #include "Vector4.h" 25 | // 26 | //Enums 27 | // 28 | #include "Enums.h" 29 | 30 | #endif //_XFX_ 31 | -------------------------------------------------------------------------------- /include/Audio/wave.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #pragma pack(1) 5 | struct WAV_Head 6 | { 7 | char ChunkID[4]; //"RIFF" 8 | unsigned int ChunkSize; 9 | char Format[4]; //"WAVE" 10 | char Subchunk1ID[4]; //"fmt " 11 | unsigned int Subchunk1Size; 12 | short int AudioFormat; 13 | short int NumChannels; 14 | unsigned int SampleRate; 15 | unsigned int ByteRate; 16 | short int BlockAlign; 17 | short int BitsPerSample; 18 | char Subchunk2ID[4]; //"data" 19 | unsigned int Subchunk2Size; 20 | }; 21 | #pragma pack() 22 | 23 | void Load_Wave(char* fileName, WAV_Head wavHead) 24 | { 25 | // Read in our header information 26 | FILE* fp = fopen("test.wav", "rb"); 27 | 28 | fread(&wavHead, 1, sizeof(wavHead), fp); 29 | 30 | fclose(fp); 31 | } 32 | -------------------------------------------------------------------------------- /include/System/Windows/MessageBox.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace System 6 | { 7 | class String; 8 | 9 | namespace Windows 10 | { 11 | // Displays a message to the user and optionally prompts for a response. 12 | class MessageBox 13 | { 14 | private: 15 | MessageBox(); 16 | MessageBox(const MessageBox &obj); 17 | 18 | public: 19 | // Displays a message box that contains the specified text and an OK button. 20 | static MessageBoxResult_t Show(const String& messageBoxText); 21 | // Displays a message box that contains the specified text, title bar caption, and response buttons. 22 | static MessageBoxResult_t Show(const String& messageBoxText, const String& caption, const MessageBoxButton_t button); 23 | }; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /include/Content/ContentTypeReader.h: -------------------------------------------------------------------------------- 1 | #ifndef _XFX_CONTENT_CONTENTTYPEREADER_ 2 | #define _XFX_CONTENT_CONTENTTYPEREADER_ 3 | 4 | #include 5 | 6 | using namespace System; 7 | 8 | namespace XFX 9 | { 10 | namespace Content 11 | { 12 | class ContentReader; 13 | 14 | template 15 | class ContentTypeReader 16 | { 17 | protected: 18 | // Creates a new instance of ContentTypeReader. 19 | ContentTypeReader(); 20 | 21 | // Reads an object from the current stream. 22 | Object* Read(ContentReader * const input, Object * const existingInstance); 23 | 24 | // Reads a strongly typed object from the current stream. 25 | T* Read(ContentReader * const input, T* existingInstance) =0; 26 | }; 27 | } 28 | } 29 | 30 | #endif //_XFX_CONTENT_CONTENTTYPEREADER_ 31 | -------------------------------------------------------------------------------- /include/System/Delegates.h: -------------------------------------------------------------------------------- 1 | /******************************************************** 2 | * Delegates.h * 3 | * * 4 | * Defines delegates within the System namespace * 5 | * Copyright (c) XFX Team. All Rights Reserved * 6 | ********************************************************/ 7 | #ifndef _SYSTEM_DELEGATES_ 8 | #define _SYSTEM_DELEGATES_ 9 | 10 | #include "EventArgs.h" 11 | #include "Object.h" 12 | #include "Interfaces.h" 13 | 14 | namespace System 15 | { 16 | // References a method to be called when a corresponding asynchronous operation completes. 17 | typedef void (*AsyncCallback)(IAsyncResult* ar); 18 | 19 | // Represents the method that will handle an event that has no event data. 20 | //typedef void (*EventHandler)(Object* sender, EventArgs e); 21 | } 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /include/GamerServices/StorageDeviceAsyncResult.h: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include 4 | 5 | using namespace System; 6 | using namespace System::Threading; 7 | 8 | namespace XFX 9 | { 10 | namespace GamerServices 11 | { 12 | class Guide; 13 | 14 | class StorageDeviceAsyncResult : public IAsyncResult 15 | { 16 | friend class Guide; 17 | 18 | private: 19 | Object* syncObject; 20 | int playerIndex; 21 | 22 | StorageDeviceAsyncResult(Object* stateObject, int player); 23 | StorageDeviceAsyncResult(const StorageDeviceAsyncResult &obj); 24 | StorageDeviceAsyncResult(IAsyncResult* &obj); 25 | 26 | public: 27 | Object* AsyncState(); 28 | bool CompletedSynchronously(); 29 | bool IsCompleted(); 30 | WaitHandle* AsyncWaitHandle(); 31 | }; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /include/System/EventArgs.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * EventArgs.h * 3 | * * 4 | * System::EventArgs class definition file * 5 | * Copyright (c) XFX Team. All Rights Reserved * 6 | *****************************************************************************/ 7 | #ifndef _SYSTEM_EVENTARGS_ 8 | #define _SYSTEM_EVENTARGS_ 9 | 10 | #include "Object.h" 11 | 12 | namespace System 13 | { 14 | /** 15 | * EventArgs is the base class for classes containing event data. 16 | */ 17 | class EventArgs : public Object 18 | { 19 | public: 20 | static EventArgs * const Empty; 21 | 22 | EventArgs(); 23 | virtual ~EventArgs() { } 24 | 25 | static const Type& GetType(); 26 | }; 27 | } 28 | 29 | #endif //_SYSTEM_EVENTARGS_ 30 | -------------------------------------------------------------------------------- /include/Audio.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * Audio.h * 3 | * * 4 | * XFX::Audio namespace include file * 5 | * Copyright (c) XFX Team. All Rights Reserved * 6 | *****************************************************************************/ 7 | #ifndef _XFX_AUDIO_ 8 | #define _XFX_AUDIO_ 9 | 10 | // 11 | // Enums 12 | // 13 | #include "Audio/Enums.h" 14 | 15 | // 16 | // Classes 17 | // 18 | #include "Audio/AudioCategory.h" 19 | #include "Audio/AudioEmitter.h" 20 | #include "Audio/AudioEngine.h" 21 | #include "Audio/AudioListener.h" 22 | #include "Audio/DynamicSoundEffectInstance.h" 23 | #include "Audio/SoundEffect.h" 24 | #include "Audio/SoundEffectInstance.h" 25 | 26 | // 27 | // Structs 28 | // 29 | 30 | #endif //_XFX_AUDIO_ 31 | -------------------------------------------------------------------------------- /include/Audio/AudioListener.h: -------------------------------------------------------------------------------- 1 | /******************************************************** 2 | * AudioListener.h * 3 | * * 4 | * XFX::Audio::AudioListener definition file * 5 | * Copyright (c) XFX Team. All Rights Reserved * 6 | ********************************************************/ 7 | #ifndef _XFX_AUDIO_AUDIOLISTENER_ 8 | #define _XFX_AUDIO_AUDIOLISTENER_ 9 | 10 | #include 11 | #include 12 | 13 | using namespace System; 14 | 15 | namespace XFX 16 | { 17 | namespace Audio 18 | { 19 | class AudioListener : public Object 20 | { 21 | public: 22 | Vector3 Forward; 23 | Vector3 Position; 24 | Vector3 Up; 25 | Vector3 Velocity; 26 | 27 | AudioListener() { } 28 | 29 | inline int GetType() const { } 30 | }; 31 | } 32 | } 33 | 34 | #endif //_XFX_AUDIO_AUDIOLISTENER_ 35 | -------------------------------------------------------------------------------- /include/System/Collections/Generic/Comparer.h: -------------------------------------------------------------------------------- 1 | #ifndef _SYSTEM_COLLECTIONS_GENERIC_COMPARER_ 2 | #define _SYSTEM_COLLECTIONS_GENERIC_COMPARER_ 3 | 4 | #include 5 | #include "Interfaces.h" 6 | 7 | namespace System 8 | { 9 | namespace Collections 10 | { 11 | namespace Generic 12 | { 13 | // Provides a base class for implementations of the System::Collections::Generic::IComparer generic interface. 14 | template 15 | class Comparer : public IComparer 16 | { 17 | private: 18 | static Comparer defaultComparer; 19 | static Comparer CreateComparer(); 20 | 21 | protected: 22 | Comparer(); 23 | 24 | public: 25 | static Comparer Default(); 26 | 27 | virtual int Compare(T x, T y)=0; 28 | }; 29 | } 30 | } 31 | } 32 | 33 | #endif //_SYSTEM_COLLECTIONS_GENERIC_COMPARER_ 34 | -------------------------------------------------------------------------------- /src/libmscorlib/DaylightTime.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | namespace System 4 | { 5 | namespace Globalization 6 | { 7 | DaylightTime::DaylightTime(const DateTime start, const DateTime end, const TimeSpan delta) 8 | : Delta(delta), End(end), Start(start) 9 | { 10 | } 11 | 12 | DaylightTime::DaylightTime(const DaylightTime &obj) 13 | : Delta(obj.Delta), End(obj.End), Start(obj.Start) 14 | { 15 | } 16 | 17 | bool DaylightTime::Equals(const DaylightTime other) const 18 | { 19 | return ((Delta == other.Delta) && (End == other.End) && (Start == other.Start)); 20 | } 21 | 22 | bool DaylightTime::operator !=(const DaylightTime& right) const 23 | { 24 | return !Equals(right); 25 | } 26 | 27 | bool DaylightTime::operator ==(const DaylightTime& right) const 28 | { 29 | return Equals(right); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/libmscorlib/HashHelpers.h: -------------------------------------------------------------------------------- 1 | /******************************************************** 2 | * HashHelpers.h * 3 | * * 4 | * XFX HashHelpers class definition file * 5 | * Copyright (c) XFX Team. All Rights Reserved * 6 | ********************************************************/ 7 | #ifndef _SYSTEM_COLLECTIONS_HASHHELPERS_ 8 | #define _SYSTEM_COLLECTIONS_HASHHELPERS_ 9 | 10 | namespace System 11 | { 12 | namespace Collections 13 | { 14 | // This helper class is not meant to be used by the end user. 15 | // Only XFX source files should reference this class. 16 | class HashHelpers 17 | { 18 | private: 19 | static const int primes[]; 20 | 21 | HashHelpers(); 22 | 23 | public: 24 | static int GetPrime(int min); 25 | static bool IsPrime(int candidate); 26 | }; 27 | } 28 | } 29 | 30 | #endif //_SYSTEM_COLLECTIONS_HASHHELPERS_ 31 | -------------------------------------------------------------------------------- /include/System/XKUtils/XKFlash.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef XBOXFLASH_H 3 | #define XBOXFLASH_H 4 | 5 | extern "C" { 6 | #include 7 | #include 8 | } 9 | 10 | typedef struct fci_s { 11 | unsigned char mfct; 12 | unsigned char devc; 13 | const char *text; 14 | unsigned long size; 15 | } fci_t; 16 | 17 | class CXBoxFlash 18 | { 19 | 20 | public: 21 | CXBoxFlash(void); 22 | ~CXBoxFlash(void); 23 | 24 | bool ReadFromXbox(char *path); 25 | bool WriteToXbox(char *path); 26 | 27 | protected: 28 | fci_t* FindFCI(BYTE manuf, BYTE code); 29 | inline void Write(DWORD address,BYTE data); 30 | inline BYTE Read(DWORD address); 31 | void SetReadMode2(void); 32 | fci_t* CheckID2(void); 33 | fci_t* CheckID(void) ; 34 | void SetReadMode(void); 35 | bool EraseBlock(int block); 36 | bool EraseDevice(fci_t* fci); 37 | bool WaitOnToggle(void); 38 | }; 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /include/System/IO/TextReader.h: -------------------------------------------------------------------------------- 1 | #ifndef _SYSTEM_IO_TEXTREADER_ 2 | #define _SYSTEM_IO_TEXTREADER_ 3 | 4 | #include "../Interfaces.h" 5 | #include "../String.h" 6 | 7 | namespace System 8 | { 9 | namespace IO 10 | { 11 | // Represents a reader that can read a sequential series of characters. 12 | class TextReader : public IDisposable 13 | { 14 | protected: 15 | void Dispose(bool disposing); 16 | 17 | TextReader(); 18 | 19 | public: 20 | static const TextReader Null; 21 | 22 | virtual void Close(); 23 | void Dispose(); 24 | virtual int Peek() const; 25 | virtual int Read(); 26 | virtual int Read(char buffer[], const int index, const int count); 27 | virtual int ReadBlock(char buffer[], const int index, const int count); 28 | virtual String ReadLine(); 29 | virtual String ReadToEnd(); 30 | }; 31 | } 32 | } 33 | 34 | #endif //_SYSTEM_IO_TEXTREADER_ 35 | -------------------------------------------------------------------------------- /include/Net/PacketWriter.h: -------------------------------------------------------------------------------- 1 | #ifndef _XFX_NET_PACKETWRITER_ 2 | #define _XFX_NET_PACKETWRITER_ 3 | 4 | #include 5 | 6 | using namespace System::IO; 7 | 8 | namespace XFX 9 | { 10 | struct Matrix; 11 | struct Quaternion; 12 | struct Vector2; 13 | struct Vector3; 14 | struct Vector4; 15 | 16 | namespace Net 17 | { 18 | // Provides common functionality for efficiently formatting outgoing network packets. 19 | class PacketWriter : public BinaryWriter 20 | { 21 | public: 22 | int Length(); 23 | int Position(); 24 | void Position(int newValue); 25 | 26 | PacketWriter(); 27 | PacketWriter(int capacity); 28 | 29 | void Write(Matrix value); 30 | void Write(Quaternion value); 31 | void Write(Vector2 value); 32 | void Write(Vector3 value); 33 | void Write(Vector4 value); 34 | }; 35 | } 36 | } 37 | 38 | #endif //_XFX_NET_PACKETWRITER_ 39 | -------------------------------------------------------------------------------- /include/System/Windows/RoutedEventArgs.h: -------------------------------------------------------------------------------- 1 | #ifndef _SYSTEM_WINDOWS_ROUTEDEVENTARGS_ 2 | #define _SYSTEM_WINDOWS_ROUTEDEVENTARGS_ 3 | 4 | #include 5 | 6 | namespace System 7 | { 8 | namespace Windows 9 | { 10 | // Contains state information and event data associated with a routed event. 11 | class RoutedEventArgs : public EventArgs 12 | { 13 | private: 14 | Object* _originalSource; 15 | 16 | friend class FrameworkElement; 17 | 18 | RoutedEventArgs(Object * const originalSource) : _originalSource(originalSource) { } 19 | 20 | public: 21 | Object* getOriginalSource() const { return _originalSource; } 22 | 23 | RoutedEventArgs() : _originalSource(null) { } 24 | virtual ~RoutedEventArgs() { } 25 | }; 26 | 27 | typedef Event RoutedEventHandler; 28 | } 29 | } 30 | 31 | #endif //_SYSTEM_WINDOWS_ROUTEDEVENTARGS_ 32 | -------------------------------------------------------------------------------- /src/libXFX/XNBFile.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * XNBFile.h * 3 | * * 4 | * XNA Binary Resource file header definition * 5 | * Copyright (c) XFX Team. All rights reserved * 6 | *****************************************************************************/ 7 | #ifndef _XNBFILE_ 8 | #define _XNBFILE_ 9 | 10 | #include 11 | 12 | using namespace System; 13 | 14 | namespace XFX 15 | { 16 | namespace Content 17 | { 18 | /** 19 | * Represents the header of an *.xnb file 20 | */ 21 | struct XNBFile 22 | { 23 | byte FormatID1; 24 | byte FormatID2; 25 | byte FormatID3; 26 | byte TargetPlatform; 27 | byte XNBVersion; 28 | byte FlagBits; 29 | uint CompressedSize; 30 | uint UncompressedSize; 31 | }; 32 | } 33 | } 34 | 35 | #endif //_XNBFILE_ 36 | -------------------------------------------------------------------------------- /src/libXFX/StorageDeviceAsyncResult.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | 4 | namespace XFX 5 | { 6 | namespace GamerServices 7 | { 8 | Object* StorageDeviceAsyncResult::AsyncState() 9 | { 10 | return syncObject; 11 | } 12 | 13 | bool StorageDeviceAsyncResult::CompletedSynchronously() 14 | { 15 | // TODO: implement 16 | return true; 17 | } 18 | 19 | StorageDeviceAsyncResult::StorageDeviceAsyncResult(Object * const stateObject, int player) 20 | { 21 | syncObject = stateObject; 22 | playerIndex = player; 23 | } 24 | 25 | StorageDeviceAsyncResult::StorageDeviceAsyncResult(const StorageDeviceAsyncResult &obj) 26 | { 27 | syncObject = obj.syncObject; 28 | playerIndex = obj.playerIndex; 29 | } 30 | 31 | StorageDeviceAsyncResult::StorageDeviceAsyncResult(IAsyncResult* &obj) 32 | { 33 | // TODO: implement 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/libXFX/Texture2DReader.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * Texture2DReader.h * 3 | * * 4 | * XFX::Content::Texture2DReader class definition file * 5 | * Copyright (c) XFX Team. All Rights Reserved * 6 | *****************************************************************************/ 7 | #ifndef _XFX_CONTENT_TEXTURE2DREADER_ 8 | #define _XFX_CONTENT_TEXTURE2DREADER_ 9 | 10 | #include 11 | #include 12 | 13 | using namespace XFX::Graphics; 14 | 15 | namespace XFX 16 | { 17 | namespace Content 18 | { 19 | class Texture2DReader : public ContentTypeReader 20 | { 21 | protected: 22 | Texture2D* Read(ContentReader * const input, Texture2D* existingInstance); 23 | }; 24 | } 25 | } 26 | 27 | #endif //_XFX_CONTENT_TEXTURE2DREADER_ 28 | -------------------------------------------------------------------------------- /include/Net/PacketReader.h: -------------------------------------------------------------------------------- 1 | #ifndef _XFX_NET_PACKETREADER_ 2 | #define _XFX_NET_PACKETREADER_ 3 | 4 | #include 5 | 6 | using namespace System::IO; 7 | 8 | namespace XFX 9 | { 10 | struct Matrix; 11 | struct Quaternion; 12 | struct Vector2; 13 | struct Vector3; 14 | struct Vector4; 15 | 16 | namespace Net 17 | { 18 | /** 19 | * Provides common functionality for efficiently reading incoming network packets. 20 | */ 21 | class PacketReader : public BinaryReader 22 | { 23 | public: 24 | int Length(); 25 | int getPosition(); 26 | void setPosition(int newValue); 27 | 28 | PacketReader(); 29 | PacketReader(int capacity); 30 | 31 | Matrix ReadMatrix(); 32 | Quaternion ReadQuaternion(); 33 | Vector2 ReadVector2(); 34 | Vector3 ReadVector3(); 35 | Vector4 ReadVector4(); 36 | }; 37 | } 38 | } 39 | 40 | #endif //_XFX_NET_PACKETREADER_ 41 | -------------------------------------------------------------------------------- /include/System/Stack.h: -------------------------------------------------------------------------------- 1 | #ifndef _STACK_ 2 | #define _STACK_ 3 | 4 | #include "ICollection.h" 5 | #include "IEnumerable.h" 6 | 7 | using namespace System; 8 | 9 | namespace System 10 | { 11 | namespace Collections 12 | { 13 | namespace Generic 14 | { 15 | template 16 | class Stack : virtual IEnumerable, virtual System::Collections::ICollection 17 | { 18 | private: 19 | T internalArray[]; 20 | 21 | public: 22 | struct Enumerator; 23 | 24 | Stack(); 25 | Stack(IEnumerable collection); 26 | Stack(int capacity); 27 | 28 | int Count(); 29 | 30 | void Clear(); 31 | int Contains(T item); 32 | void CopyTo(T array[], int arrayIndex); 33 | T Peek(); 34 | T Pop(); 35 | void Push(T item); 36 | T *ToArray(); 37 | void TrimExcess(); 38 | }; 39 | } 40 | } 41 | } 42 | 43 | #endif //_LIST_ 44 | -------------------------------------------------------------------------------- /include/System/misc.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************/ 2 | /* */ 3 | /* File: misc.h */ 4 | /* Author: bkenwright@xbdev.net */ 5 | /* Desc: Misc functions, making our usb/gamepad code lib independent */ 6 | /* Modified and SSE optimized by Halofreak1990 */ 7 | /* */ 8 | /******************************************************************************/ 9 | #ifndef _MISC_H 10 | #define _MISC_H 11 | 12 | #include 13 | 14 | void *memcpy(void *dest, const void *src, size_t count) __attribute__((nonnull (1, 2))); 15 | 16 | void *malloc(size_t size); 17 | 18 | void *memset(void *s, char c, size_t count) __attribute__((nonnull (1))); 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /include/Graphics/EffectParameter.h: -------------------------------------------------------------------------------- 1 | /******************************************************** 2 | * EffectParameter.h * 3 | * * 4 | * XFX::Graphics::EffectParameter definition file * 5 | * Copyright (c) XFX Team. All Rights Reserved * 6 | ********************************************************/ 7 | #ifndef _XFX_GRAPHICS_EFFECTPARAMETER_ 8 | #define _XFX_GRAPHICS_EFFECTPARAMETER_ 9 | 10 | #include 11 | 12 | using namespace System; 13 | 14 | namespace XFX 15 | { 16 | namespace Graphics 17 | { 18 | // Represents an Effect parameter. 19 | class EffectParameter : public Object 20 | { 21 | public: 22 | int GetType() const; 23 | 24 | bool GetValueBoolean() const; 25 | bool* GetValueBooleanArray(int count) const; 26 | int GetValueInt32() const; 27 | int* GetValueInt32Array(int count) const; 28 | }; 29 | } 30 | } 31 | 32 | #endif //_XFX_GRAPHICS_EFFECTPARAMETER_ 33 | -------------------------------------------------------------------------------- /include/System/ComponentModel/ClosingEventArgs.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * ClosingEventArgs.h * 3 | * * 4 | * System::ComponentModel::ClosingEventArgs definition file * 5 | * Copyright (c) XFX Team. All rights reserved * 6 | *****************************************************************************/ 7 | #ifndef _SYSTEM_COMPONENTMODEL_CLOSINGEVENTARGS_ 8 | #define _SYSTEM_COMPONENTMODEL_CLOSINGEVENTARGS_ 9 | 10 | #include 11 | 12 | namespace System 13 | { 14 | namespace ComponentModel 15 | { 16 | /** 17 | * 18 | */ 19 | class ClosingEventArgs : public CancelEventArgs 20 | { 21 | public: 22 | ClosingEventArgs(); 23 | bool IsCancelable; 24 | 25 | static const Type& GetType(); 26 | }; 27 | } 28 | } 29 | 30 | #endif //_SYSTEM_COMPONENTMODEL_CLOSINGEVENTARGS_ 31 | -------------------------------------------------------------------------------- /include/System/Windows/Controls/Enums.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace System 4 | { 5 | namespace Windows 6 | { 7 | namespace Controls 8 | { 9 | // Specifies when the System::Windows::Controls::Primitives::ButtonBase::Click event should be raised for a control. 10 | struct ClickMode 11 | { 12 | enum type 13 | { 14 | Release, 15 | Press, 16 | Hover 17 | }; 18 | }; 19 | 20 | // Defines the different orientations that a control or layout can have. 21 | struct Orientation 22 | { 23 | enum type 24 | { 25 | Horizontal, 26 | Vertical 27 | }; 28 | }; 29 | 30 | // Specifies when the System::Windows::Controls::Primitives::ButtonBase::Click event should be raised for a control. 31 | typedef ClickMode::type ClickMode_t; 32 | // Defines the different orientations that a control or layout can have. 33 | typedef Orientation::type Orientation_t; 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /include/System/Windows/Controls/RowDefinition.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | namespace System 7 | { 8 | namespace Windows 9 | { 10 | namespace Controls 11 | { 12 | // Defines row-specific properties that apply to System::Windows::Controls::Grid elements. 13 | class RowDefinition 14 | { 15 | public: 16 | RowDefinition(); 17 | 18 | int getActualHeight() const; 19 | int MaxHeight; 20 | int MinHeight; 21 | GridLength Height; 22 | 23 | bool operator ==(const RowDefinition& right) const; 24 | bool operator !=(const RowDefinition& right) const; 25 | }; 26 | 27 | // Provides access to an ordered, strongly typed collection of System::Windows::Controls::RowDefinition objects. 28 | class RowDefinitionCollection : PresentationFrameworkCollection 29 | { 30 | }; 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /include/System/Windows/Input/Enums.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace System 4 | { 5 | namespace Windows 6 | { 7 | namespace Input 8 | { 9 | struct Keys 10 | { 11 | enum type 12 | { 13 | A = 0x41, 14 | B = 0x42, 15 | Back = 0x08, 16 | C = 0x43, 17 | D = 0x44, 18 | Down = 0x28, 19 | E = 0x45, 20 | End = 0x23, 21 | Enter = 0x0D, 22 | Escape = 0x1B, 23 | F = 0x46, 24 | G = 0x47, 25 | H = 0x48, 26 | I = 0x49, 27 | J = 0x4A, 28 | K = 0x4B, 29 | L = 0x4C, 30 | M = 0x4D, 31 | N = 0x4E, 32 | None = 0x00, 33 | O = 0x4F, 34 | P = 0x50, 35 | Q = 0x51, 36 | R = 0x52, 37 | S = 0x53, 38 | Space = 0x20, 39 | T = 0x54, 40 | U = 0x55, 41 | V = 0x56, 42 | W = 0x57, 43 | X = 0x58, 44 | Y = 0x59, 45 | Z = 0x5A 46 | }; 47 | }; 48 | 49 | typedef Keys::type Keys_t; 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/libXFX/ModelReader.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * ModelReader.h * 3 | * * 4 | * XFX::Content::ModelReader class definition file * 5 | * Copyright (c) XFX Team. All Rights Reserved * 6 | *****************************************************************************/ 7 | #ifndef _XFX_CONTENT_MODELREADER_ 8 | #define _XFX_CONTENT_MODELREADER_ 9 | 10 | #include 11 | #include 12 | 13 | using namespace XFX::Graphics; 14 | 15 | namespace XFX 16 | { 17 | namespace Content 18 | { 19 | class ModelReader : public ContentTypeReader 20 | { 21 | private: 22 | void ReadBoneReference(ContentReader * const input, uint boneCount); 23 | 24 | public: 25 | Model* Read(ContentReader * const input, Model* existingInstance); 26 | }; 27 | } 28 | } 29 | 30 | #endif //_XFX_CONTENT_MODELREADER_ 31 | -------------------------------------------------------------------------------- /include/System/Diagnostics/Stopwatch.h: -------------------------------------------------------------------------------- 1 | #ifndef _SYSTEM_DIAGNOSTICS_STOPWATCH_ 2 | #define _SYSTEM_DIAGNOSTICS_STOPWATCH_ 3 | 4 | #include 5 | 6 | namespace System 7 | { 8 | namespace Diagnostics 9 | { 10 | /** 11 | * 12 | */ 13 | class Stopwatch 14 | { 15 | private: 16 | bool isRunning; 17 | long long elapsedTicks; 18 | 19 | public: 20 | static const long long Frequency; 21 | 22 | TimeSpan getElapsed() const; 23 | /** 24 | * Gets the total elapsed time measured by the current instance, in milliseconds. 25 | */ 26 | long long getElapsedMilliseconds() const; 27 | long long getElapsedTicks() const; 28 | bool IsRunning() const; 29 | 30 | Stopwatch(); 31 | 32 | static long long GetTimestamp(); 33 | void Reset(); 34 | void Restart(); 35 | void Start(); 36 | static const Stopwatch& StartNew(); 37 | void Stop(); 38 | }; 39 | } 40 | } 41 | 42 | #endif //_SYSTEM_DIAGNOSTICS_STOPWATCH_ 43 | -------------------------------------------------------------------------------- /include/System/XKUtils/APICompat.h: -------------------------------------------------------------------------------- 1 | #ifndef __APICompat_H__ 2 | 3 | #define __APICompat_H__ 4 | 5 | 6 | #include 7 | 8 | #include 9 | 10 | 11 | extern "C" { 12 | 13 | #include 14 | 15 | #include 16 | 17 | #include 18 | 19 | } 20 | 21 | 22 | #define Sleep XSleep 23 | 24 | 25 | 26 | /* Port IO */ 27 | 28 | unsigned char _outp(unsigned short port, unsigned char databyte); 29 | 30 | unsigned short _outpw(unsigned short port, unsigned short dataword); 31 | 32 | unsigned long _outpd(unsigned short port, unsigned long dataword); 33 | 34 | unsigned char _inp(unsigned short port); 35 | 36 | unsigned short _inpw(unsigned short port); 37 | 38 | unsigned long _inpd(unsigned short port); 39 | 40 | 41 | 42 | /* Misc */ 43 | 44 | #define min(A, B) ((A) < (B)) ? (A) : (B) 45 | 46 | char *itoa(int value, char *buffer, int radix); 47 | 48 | void *ZeroMemory(void *s, size_t n); 49 | 50 | #endif 51 | -------------------------------------------------------------------------------- /include/System/ComponentModel/CancelEventArgs.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * CancelEventArgs.h * 3 | * * 4 | * System::ComponentModel::CancelEventArgs definition file * 5 | * Copyright (c) XFX Team. All rights reserved * 6 | *****************************************************************************/ 7 | #ifndef _SYSTEM_COMPONENTMODEL_CANCELEVENTARGS_ 8 | #define _SYSTEM_COMPONENTMODEL_CANCELEVENTARGS_ 9 | 10 | #include 11 | 12 | namespace System 13 | { 14 | namespace ComponentModel 15 | { 16 | /** 17 | * Provides data for a cancelable event. 18 | */ 19 | class CancelEventArgs : public EventArgs 20 | { 21 | public: 22 | bool Cancel; 23 | 24 | CancelEventArgs(); 25 | CancelEventArgs(const bool value); 26 | 27 | static const Type& GetType(); 28 | }; 29 | } 30 | } 31 | 32 | #endif //_SYSTEM_COMPONENTMODEL_CANCELEVENTARGS_ 33 | -------------------------------------------------------------------------------- /include/Audio/AudioCategory.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * AudioCategory.h * 3 | * * 4 | * XFX XFX::Audio::AudioCategory definition file * 5 | * Copyright (c) XFX Team. All Rights Reserved * 6 | *****************************************************************************/ 7 | #ifndef XFX_AUDIO_AUDIOCATEGORY_H 8 | #define XFX_AUDIO_AUDIOCATEGORY_H 9 | 10 | #include 11 | 12 | using namespace System; 13 | 14 | namespace XFX 15 | { 16 | namespace Audio 17 | { 18 | struct AudioCategory : Object 19 | { 20 | String Name; 21 | 22 | static const Type& GetType(); 23 | void Pause(); 24 | void Resume(); 25 | void SetVolume(float volume); 26 | void Stop(); 27 | 28 | bool operator!=(const AudioCategory& other) const; 29 | bool operator==(const AudioCategory& other) const; 30 | }; 31 | } 32 | } 33 | 34 | #endif // XFX_AUDIO_AUDIOCATEGORY_H 35 | -------------------------------------------------------------------------------- /include/System/Environment.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | #ifndef _SYSTEM_ENVIRONMENT_ 4 | #define _SYSTEM_ENVIRONMENT_ 5 | 6 | namespace System 7 | { 8 | class OperatingSystem; 9 | class String; 10 | class Version; 11 | 12 | class Environment 13 | { 14 | private: 15 | Environment(); 16 | 17 | public: 18 | // Specifies enumerated constants used to retrieve directory paths to system special folders. 19 | struct SpecialFolder 20 | { 21 | enum type 22 | { 23 | ApplicationData = 26, 24 | Favorites = 22, 25 | Personal = 5, 26 | Programs = 2, 27 | StartMenu = 11, 28 | Startup = 7 29 | }; 30 | }; 31 | 32 | typedef SpecialFolder::type SpecialFolder_t; 33 | 34 | static const char* NewLine; 35 | 36 | static const char* GetFolderPath(const SpecialFolder_t folder); 37 | static OperatingSystem OSVersion(); 38 | static int ProcessorCount(); 39 | static int TickCount(); 40 | static Version getVersion(); 41 | }; 42 | } 43 | 44 | #endif //_SYSTEM_ENVIRONMENT_ 45 | -------------------------------------------------------------------------------- /include/System/Collections/Stack.h: -------------------------------------------------------------------------------- 1 | #ifndef _SYSTEM_COLLECTIONS_STACK_ 2 | #define _SYSTEM_COLLECTIONS_STACK_ 3 | 4 | #include 5 | #include 6 | 7 | namespace System 8 | { 9 | namespace Collections 10 | { 11 | class Stack : public ICollection, virtual Object 12 | { 13 | private: 14 | Object** _bottom; 15 | Object** _top; 16 | static const int _defaultCapacity; 17 | int _size; 18 | int _version; 19 | 20 | public: 21 | int Count(); 22 | bool IsSynchronized(); 23 | 24 | Stack(); 25 | Stack(ICollection* col); 26 | Stack(int initialCapacity); 27 | virtual ~Stack(); 28 | 29 | virtual void Clear(); 30 | virtual bool Contains(Object* obj); 31 | virtual void CopyTo(Object* array[], int index); 32 | virtual Object* Peek(); 33 | virtual Object* Pop(); 34 | virtual void Push(Object* obj); 35 | virtual Object** ToArray(); 36 | }; 37 | } 38 | } 39 | 40 | #endif //_SYSTEM_COLLECTIONS_STACK_ 41 | -------------------------------------------------------------------------------- /include/GamerServices/GamerServicesComponent.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * GamerServicesComponent.h * 3 | * * 4 | * XFX::GamerServicesComponent class definition file * 5 | * Copyright (c) XFX Team. All Rights Reserved * 6 | *****************************************************************************/ 7 | #ifndef _XFX_GAMERSERVICES_GAMERSERVICESCOMPONENT_ 8 | #define _XFX_GAMERSERVICES_GAMERSERVICESCOMPONENT_ 9 | 10 | #include "../Game.h" 11 | 12 | namespace XFX 13 | { 14 | namespace GamerServices 15 | { 16 | /** 17 | * Creates a new GamerServicesComponent. 18 | */ 19 | class GamerServicesComponent : public GameComponent 20 | { 21 | public: 22 | GamerServicesComponent(Game * const game); 23 | 24 | static const Type& GetType(); 25 | void Initialize(); 26 | void Update(GameTime gameTime); 27 | }; 28 | } 29 | } 30 | 31 | #endif //_XFX_GAMERSERVICES_GAMERSERVICESCOMPONENT_ 32 | -------------------------------------------------------------------------------- /include/System/Net/NetworkInformation/NetworkInterface.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * NetworkInterface.h * 3 | * * 4 | * System::Net::Sockets::NetworkInterface class definition file. * 5 | * Copyright (c) XFX Team. All rights reserved. * 6 | *****************************************************************************/ 7 | #ifndef _SYSTEM_NET_NETWORKINFORMATION_NETWORKINTERFACE_ 8 | #define _SYSTEM_NET_NETWORKINFORMATION_NETWORKINTERFACE_ 9 | 10 | namespace System 11 | { 12 | namespace Net 13 | { 14 | namespace NetworkInformation 15 | { 16 | /** 17 | * Provides availability information for a network interface. 18 | */ 19 | class NetworkInterface 20 | { 21 | protected: 22 | NetworkInterface(); 23 | virtual ~NetworkInterface(); 24 | 25 | public: 26 | static bool GetIsNetworkAvailable(); 27 | }; 28 | } 29 | } 30 | } 31 | 32 | #endif //_SYSTEM_NET_NETWORKINFORMATION_NETWORKINTERFACE_ 33 | -------------------------------------------------------------------------------- /include/System/Windows/Media/Brush.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * Brush.h * 3 | * * 4 | * System::Windows::Media::Brush definition file * 5 | * Copyright (c) XFX Team. All rights reserved * 6 | *****************************************************************************/ 7 | #ifndef _SYSTEM_WINDOWS_MEDIA_BRUSH_ 8 | #define _SYSTEM_WINDOWS_MEDIA_BRUSH_ 9 | 10 | #include 11 | 12 | namespace System 13 | { 14 | namespace Windows 15 | { 16 | namespace Media 17 | { 18 | /** 19 | * Defines objects used to paint graphical objects. Classes that derive from System::Windows::Media::Brush describe how the area is painted. 20 | */ 21 | class Brush : public Object 22 | { 23 | protected: 24 | Brush(); 25 | 26 | public: 27 | int Opacity; 28 | 29 | virtual ~Brush(); 30 | 31 | static const Type& GetType(); 32 | }; 33 | } 34 | } 35 | } 36 | 37 | #endif //_SYSTEM_WINDOWS_MEDIA_BRUSH_ 38 | -------------------------------------------------------------------------------- /src/libXFX/StorageDeviceAsyncResult.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * StorageDeviceAsyncResult.h * 3 | * * 4 | * XFX::Storage::StorageDeviceAsyncResult class definition file * 5 | * Copyright (c) XFX Team. All Rights Reserved * 6 | *****************************************************************************/ 7 | #ifndef _XFX_STORAGE_STORAGEDEVICEASYNCRESULT_ 8 | #define _XFX_STORAGE_STORAGEDEVICEASYNCRESULT_ 9 | 10 | #include 11 | 12 | using namespace System; 13 | 14 | namespace XFX 15 | { 16 | namespace Storage 17 | { 18 | class StorageDeviceAsyncResult : public IAsyncResult 19 | { 20 | private: 21 | Object* _state; 22 | 23 | public: 24 | StorageDeviceAsyncResult(Object* state); 25 | 26 | Object* AsyncState(); 27 | Threading::WaitHandle* AsyncWaitHandle(); 28 | bool CompletedSynchronously() const; 29 | bool IsCompleted() const; 30 | }; 31 | } 32 | } 33 | 34 | #endif //_XFX_STORAGE_STORAGEDEVICEASYNCRESULT_ 35 | -------------------------------------------------------------------------------- /include/Graphics/ModelEffectCollection.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * ModelEffectCollection.h * 3 | * * 4 | * XFX::Graphics::ModelEffectCollection class definition file * 5 | * Copyright (c) XFX Team. All Rights Reserved * 6 | *****************************************************************************/ 7 | #ifndef _XFX_GRAPHICS_MODELEFFECTCOLLECTION_ 8 | #define _XFX_GRAPHICS_MODELEFFECTCOLLECTION_ 9 | 10 | #include "Effect.h" 11 | #include 12 | 13 | using namespace System::Collections::ObjectModel; 14 | 15 | namespace XFX 16 | { 17 | namespace Graphics 18 | { 19 | /** 20 | * Represents a collection of effects associated with a model. 21 | */ 22 | class ModelEffectCollection : public ReadOnlyCollection 23 | { 24 | private: 25 | friend class Model; 26 | 27 | ModelEffectCollection(IList* list); 28 | }; 29 | } 30 | } 31 | 32 | #endif //_XFX_GRAPHICS_MODELEFFECTCOLLECTION_ 33 | -------------------------------------------------------------------------------- /include/System/Xml/XPath/Interfaces.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * Enums.h * 3 | * * 4 | * System::Xml::XPath Interfaces definition file. * 5 | * Copyright (c) XFX Team. All rights reserved. * 6 | *****************************************************************************/ 7 | #ifndef _SYSTEM_XML_XPATH_XPATHNAVIGATOR_ 8 | #define _SYSTEM_XML_XPATH_XPATHNAVIGATOR_ 9 | 10 | #include 11 | 12 | namespace System 13 | { 14 | namespace Xml 15 | { 16 | namespace XPath 17 | { 18 | class XPathNavigator; 19 | 20 | /** 21 | * Provides an accessor to the System::Xml::XPath::XPathNavigator class. 22 | */ 23 | interface IXPathNavigable 24 | { 25 | public: 26 | /** 27 | * Returns a new System.Xml.XPath.XPathNavigator object. 28 | */ 29 | virtual XPathNavigator* CreateNavigator(); 30 | 31 | virtual ~IXPathNavigable() { } 32 | }; 33 | } 34 | } 35 | } 36 | 37 | #endif //_SYSTEM_XML_XPATH_XPATHNAVIGATOR_ 38 | -------------------------------------------------------------------------------- /include/Graphics/PackedVector/IPackedVector.h: -------------------------------------------------------------------------------- 1 | /******************************************************** 2 | * IPackedVector.h * 3 | * * 4 | * XFX IPackedVector definition file * 5 | * Copyright (c) XFX Team. All Rights Reserved * 6 | ********************************************************/ 7 | #ifndef _XFX_GRAPHICS_PACKEDVECTOR_IPACKEDVECTOR_ 8 | #define _XFX_GRAPHICS_PACKEDVECTOR_IPACKEDVECTOR_ 9 | 10 | #include 11 | 12 | namespace XFX 13 | { 14 | struct Vector4; 15 | 16 | namespace Graphics 17 | { 18 | namespace PackedVector 19 | { 20 | interface IPackedVector_ 21 | { 22 | public: 23 | virtual void PackFromVector4(Vector4 &vector) = 0; 24 | virtual Vector4 ToVector4() = 0; 25 | }; 26 | 27 | template 28 | interface IPackedVector : virtual public IPackedVector_ 29 | { 30 | public: 31 | virtual TPacked PackedValue() = 0; 32 | virtual void PackedValue(TPacked value) = 0; 33 | }; 34 | } 35 | } 36 | } 37 | 38 | #endif //_XFX_GRAPHICS_PACKEDVECTOR_IPACKEDVECTOR_ 39 | -------------------------------------------------------------------------------- /include/System/Text/Encoder.h: -------------------------------------------------------------------------------- 1 | #ifndef _TEXT_ENCODER_ 2 | #define _TEXT_ENCODER_ 3 | 4 | #include 5 | 6 | namespace System 7 | { 8 | namespace Text 9 | { 10 | /// 11 | /// Converts a set of characters into a sequence of bytes. 12 | /// 13 | class Encoder 14 | { 15 | public: 16 | Encoder(); 17 | 18 | virtual void Convert(char* chars, int charCount, byte* bytes, int byteCount, bool flush, int charsUsed, int bytesUsed, bool completed); 19 | virtual void Convert(char chars[], int charIndex, int charCount, byte bytes[], int byteIndex, int byteCount, bool flush, int charsUsed, int bytesUsed, bool completed); 20 | virtual int GetByteCount(char* chars, int count, bool flush); 21 | virtual int GetByteCount(char chars[], int index, int count, bool flush); 22 | virtual int GetBytes(char* chars, int charCount, byte* bytes, int byteCount, bool flush); 23 | virtual int GetBytes(char chars[], int charIndex, int charCount, byte bytes[], int byteIndex, bool flush); 24 | }; 25 | } 26 | } 27 | 28 | #endif //_TEXT_ENCODER_ 29 | -------------------------------------------------------------------------------- /include/System/Windows/Media/SolidColorBrush.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * SolidColorBrush.h * 3 | * * 4 | * System::Windows::Media::SolidColorBrush definition file * 5 | * Copyright (c) XFX Team. All rights reserved * 6 | *****************************************************************************/ 7 | #ifndef _SYSTEM_WINDOWS_MEDIA_SOLIDCOLORBRUSH_ 8 | #define _SYSTEM_WINDOWS_MEDIA_SOLIDCOLORBRUSH_ 9 | 10 | #include 11 | #include 12 | 13 | namespace System 14 | { 15 | namespace Windows 16 | { 17 | namespace Media 18 | { 19 | /** 20 | * Paints an area with a solid color. 21 | */ 22 | class SolidColorBrush : public Brush 23 | { 24 | public: 25 | System::Windows::Media::Color Color; 26 | 27 | SolidColorBrush(); 28 | SolidColorBrush(const System::Windows::Media::Color color); 29 | 30 | static const Type& GetType(); 31 | }; 32 | } 33 | } 34 | } 35 | 36 | #endif //_SYSTEM_WINDOWS_MEDIA_SOLIDCOLORBRUSH_ -------------------------------------------------------------------------------- /include/GameServiceContainer.h: -------------------------------------------------------------------------------- 1 | /******************************************************** 2 | * GameServiceContainer.h * 3 | * * 4 | * XFX GameServiceContainer definition file * 5 | * Copyright (c) XFX Team. All Rights Reserved * 6 | ********************************************************/ 7 | #ifndef _XFX_GAMESERVICECONTAINER_ 8 | #define _XFX_GAMESERVICECONTAINER_ 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | using namespace System; 15 | using namespace System::Collections::Generic; 16 | 17 | namespace XFX 18 | { 19 | // A collection of game services. 20 | class GameServiceContainer : public IServiceProvider 21 | { 22 | private: 23 | Dictionary _services; 24 | 25 | public: 26 | GameServiceContainer(); 27 | virtual ~GameServiceContainer() {} 28 | 29 | void AddService(const Type& serviceType, Object* provider); 30 | Object* GetService(const Type& ServiceType); 31 | void RemoveService(const Type& type); 32 | }; 33 | } 34 | 35 | #endif //_XFX_GAMESERVICECONTAINER_ 36 | -------------------------------------------------------------------------------- /include/Point.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * Point.h * 3 | * * 4 | * XFX::Point structure definition file * 5 | * Copyright (c) XFX Team. All Rights Reserved * 6 | *****************************************************************************/ 7 | #ifndef _XFX_POINT_ 8 | #define _XFX_POINT_ 9 | 10 | #include 11 | 12 | using namespace System; 13 | 14 | namespace XFX 15 | { 16 | /** 17 | * Defines a point in 2D space. 18 | */ 19 | struct Point : IEquatable, Object 20 | { 21 | int X; 22 | int Y; 23 | static const Point Zero; 24 | 25 | Point(const int x, const int y); 26 | Point(const Point &obj); 27 | Point(); 28 | 29 | bool Equals(Object const * const obj) const; 30 | bool Equals(const Point other) const; 31 | int GetHashCode() const; 32 | static const Type& GetType(); 33 | const String ToString() const; 34 | 35 | bool operator==(const Point& right) const; 36 | bool operator!=(const Point& right) const; 37 | }; 38 | } 39 | 40 | #endif //_XFX_POINT_ 41 | -------------------------------------------------------------------------------- /include/GameComponentCollectionEventArgs.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * GameComponentCollectionEventArgs.h * 3 | * * 4 | * XFX GameComponentCollectionEventArgs definition * 5 | * Copyright (c) XFX Team. All Rights Reserved * 6 | *****************************************************************************/ 7 | #ifndef _XFX_GAMECOMPONENTCOLLECTIONEVENTARGS_ 8 | #define _XFX_GAMECOMPONENTCOLLECTIONEVENTARGS_ 9 | 10 | #include "Interfaces.h" 11 | #include 12 | 13 | namespace XFX 14 | { 15 | /** 16 | * Arguments used with events from the GameComponentCollection. 17 | */ 18 | class GameComponentCollectionEventArgs : public EventArgs 19 | { 20 | private: 21 | IGameComponent* _gameComponent; 22 | 23 | public: 24 | IGameComponent* getGameComponent() const; 25 | 26 | GameComponentCollectionEventArgs(IGameComponent * const gameComponent); 27 | virtual ~GameComponentCollectionEventArgs() { } 28 | 29 | static const Type& GetType(); 30 | }; 31 | } 32 | 33 | #endif //_XFX_GAMECOMPONENTCOLLECTIONEVENTARGS_ 34 | -------------------------------------------------------------------------------- /include/System/Net/EndPoint.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * EndPoint.h * 3 | * * 4 | * System::Net::EndPoint class definition file. * 5 | * Copyright (c) XFX Team. All rights reserved. * 6 | *****************************************************************************/ 7 | #ifndef _SYSTEM_NET_ENDPOINT_ 8 | #define _SYSTEM_NET_ENDPOINT_ 9 | 10 | #include "Sockets/Enums.h" 11 | #include "../Object.h" 12 | 13 | using namespace System::Net::Sockets; 14 | 15 | namespace System 16 | { 17 | namespace Net 18 | { 19 | class SocketAddress; 20 | 21 | /** 22 | * Identifies a network address. This is an abstract class. 23 | */ 24 | class EndPoint : public Object 25 | { 26 | protected: 27 | EndPoint(); 28 | 29 | public: 30 | AddressFamily_t getAddressFamily() const; 31 | 32 | virtual ~EndPoint(); 33 | 34 | virtual EndPoint* Create(SocketAddress * const socketAddress); 35 | static const Type& GetType(); 36 | virtual SocketAddress* Serialize(); 37 | }; 38 | } 39 | } 40 | 41 | #endif //_SYSTEM_NET_ENDPOINT_ 42 | -------------------------------------------------------------------------------- /include/Audio/AudioEmitter.h: -------------------------------------------------------------------------------- 1 | /******************************************************** 2 | * AudioEmitter.h * 3 | * * 4 | * XFX::Audio::AudioEmitter definition file * 5 | * Copyright (c) XFX Team. All Rights Reserved * 6 | ********************************************************/ 7 | #ifndef _XFX_AUDIO_AUDIOEMITTER_ 8 | #define _XFX_AUDIO_AUDIOEMITTER_ 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | using namespace System; 15 | 16 | namespace XFX 17 | { 18 | namespace Audio 19 | { 20 | class AudioEmitter : public Object 21 | { 22 | private: 23 | static const Type AudioEmitterTypeInfo; 24 | 25 | public: 26 | float DopplerScale; 27 | Vector3 Forward; 28 | Vector3 Position; 29 | Vector3 Up; 30 | Vector3 Velocity; 31 | 32 | AudioEmitter() { } 33 | 34 | const Type& GetType() 35 | { 36 | return AudioEmitterTypeInfo; 37 | } 38 | }; 39 | 40 | const Type AudioEmitter::AudioEmitterTypeInfo = Type("AudioEmitter", "XFX::Audio::AudioEmitter", TypeCode::Object); 41 | } 42 | } 43 | 44 | #endif //XFX_AUDIO_AUDIOEMITTER_H 45 | -------------------------------------------------------------------------------- /include/System/Windows/Controls/ColumnDefinition.h: -------------------------------------------------------------------------------- 1 | #ifndef _SYSTEM_WINDOWS_CONTROLS_COLUMNDEFINITION_ 2 | #define _SYSTEM_WINDOWS_CONTROLS_COLUMNDEFINITION_ 3 | 4 | #include 5 | #include 6 | 7 | namespace System 8 | { 9 | namespace Windows 10 | { 11 | namespace Controls 12 | { 13 | /** 14 | * Defines row-specific properties that apply to System::Windows::Controls::Grid elements. 15 | */ 16 | class ColumnDefinition 17 | { 18 | public: 19 | ColumnDefinition(); 20 | 21 | int getActualWidth() const; 22 | int MaxWidth; 23 | int MinWidth; 24 | GridLength Width; 25 | 26 | bool operator==(const ColumnDefinition& right) const; 27 | bool operator!=(const ColumnDefinition& right) const; 28 | }; 29 | 30 | // Provides access to an ordered, strongly typed collection of System::Windows::Controls::RowDefinition objects. 31 | class ColumnDefinitionCollection : public PresentationFrameworkCollection 32 | { 33 | }; 34 | } 35 | } 36 | } 37 | 38 | #endif //_SYSTEM_WINDOWS_CONTROLS_COLUMNDEFINITION_ 39 | -------------------------------------------------------------------------------- /include/Graphics/IGraphicsDeviceService.h: -------------------------------------------------------------------------------- 1 | /******************************************************** 2 | * IGraphicsDeviceService.h * 3 | * * 4 | * XFX IGraphicsDeviceService definition file * 5 | * Copyright (c) XFX Team. All Rights Reserved * 6 | ********************************************************/ 7 | #ifndef _XFX_GRAPHICS_IGRAPHICSDEVICESERVICE_ 8 | #define _XFX_GRAPHICS_IGRAPHICSDEVICESERVICE_ 9 | 10 | #include 11 | #include 12 | 13 | using namespace System; 14 | 15 | namespace XFX 16 | { 17 | namespace Graphics 18 | { 19 | class GraphicsDevice; 20 | 21 | // Defines a mechanism for retrieving GraphicsDevice objects. 22 | interface IGraphicsDeviceService : public Object 23 | { 24 | public: 25 | EventHandler DeviceCreated; 26 | EventHandler DeviceDisposing; 27 | EventHandler DeviceReset; 28 | EventHandler DeviceResetting; 29 | 30 | virtual ~IGraphicsDeviceService() {} 31 | 32 | virtual GraphicsDevice* getGraphicsDevice() const =0; 33 | 34 | static const Type& GetType(); 35 | }; 36 | } 37 | } 38 | 39 | #endif //_XFX_GRAPHICS_IGRAPHICSDEVICESERVICE_ 40 | -------------------------------------------------------------------------------- /include/System/Globalization/Calendar.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * Calendar.h * 3 | * * 4 | * XFX System::Globalization::Calendar class definition file * 5 | * Copyright (c) XFX Team. All Rights Reserved * 6 | *****************************************************************************/ 7 | #ifndef _SYSTEM_GLOBALIZATION_CALENDAR_ 8 | #define _SYSTEM_GLOBALIZATION_CALENDAR_ 9 | 10 | #include 11 | 12 | namespace System 13 | { 14 | struct DateTime; 15 | 16 | namespace Globalization 17 | { 18 | /** 19 | * Represents time in divisions, such as weeks, months, and years. 20 | */ 21 | class Calendar : public Object 22 | { 23 | public: 24 | DateTime AddDays(DateTime time, int days); 25 | DateTime AddHours(DateTime time, int hours); 26 | DateTime AddMilliseconds(DateTime time, double milliseconds); 27 | DateTime AddMinutes(DateTime time, int minutes); 28 | DateTime AddMonths(DateTime time, int months); 29 | static const Type& GetType(); 30 | }; 31 | } 32 | } 33 | 34 | #endif //_SYSTEM_GLOBALIZATION_CALENDAR_ 35 | -------------------------------------------------------------------------------- /include/System/Windows/Controls/Button.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * Button.h * 3 | * * 4 | * System::Windows::Controls::Button definition file * 5 | * Copyright (c) XFX Team. All rights reserved * 6 | *****************************************************************************/ 7 | #ifndef _SYSTEM_WINDOWS_CONTROLS_BUTTON_ 8 | #define _SYSTEM_WINDOWS_CONTROLS_BUTTON_ 9 | 10 | #include 11 | 12 | using namespace System::Windows::Controls::Primitives; 13 | 14 | namespace System 15 | { 16 | namespace Windows 17 | { 18 | namespace Controls 19 | { 20 | /** 21 | * Represents a button control. 22 | */ 23 | class Button : public ButtonBase 24 | { 25 | protected: 26 | void OnClick(); 27 | 28 | public: 29 | Button(); 30 | ~Button(); 31 | 32 | static const Type& GetType(); 33 | 34 | bool operator ==(const Button& right) const; 35 | bool operator !=(const Button& right) const; 36 | }; 37 | } 38 | } 39 | } 40 | 41 | #endif //_SYSTEM_WINDOWS_CONTROLS_BUTTON_ 42 | -------------------------------------------------------------------------------- /include/GraphicsDeviceInformation.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * GraphicsDeviceInformation.h * 3 | * * 4 | * XFX GraphicsDeviceInformation class definition file * 5 | * Copyright (c) XFX Team. All Rights Reserved * 6 | *****************************************************************************/ 7 | #ifndef _XFX_GRAPHICSDEVICEINFORMATION_ 8 | #define _XFX_GRAPHICSDEVICEINFORMATION_ 9 | 10 | #include 11 | #include 12 | 13 | using namespace System; 14 | using namespace XFX::Graphics; 15 | 16 | namespace XFX 17 | { 18 | /** 19 | * Holds the settings for creating a graphics device. 20 | */ 21 | class GraphicsDeviceInformation : public Object 22 | { 23 | public: 24 | GraphicsAdapter Adapter; 25 | XFX::Graphics::PresentationParameters PresentationParameters; 26 | 27 | GraphicsDeviceInformation(); 28 | 29 | GraphicsDeviceInformation Clone() const; 30 | bool Equals(Object const * const obj) const; 31 | static const Type& GetType(); 32 | }; 33 | } 34 | 35 | #endif //_XFX_GRAPHICSDEVICEINFORMATION_ 36 | -------------------------------------------------------------------------------- /include/System/Runtime/InteropServices/ExternalException.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * ExternalException.h * 3 | * * 4 | * System::Runtime::InteropServices::ExternalException definition file. * 5 | * Copyright (c) XFX Team. All Rights Reserved * 6 | *****************************************************************************/ 7 | #ifndef _SYSTEM_RUNTIME_INTEROPSERVICES_ExternalException_ 8 | #define _SYSTEM_RUNTIME_INTEROPSERVICES_ExternalException_ 9 | 10 | #include 11 | 12 | namespace System 13 | { 14 | namespace Runtime 15 | { 16 | namespace InteropServices 17 | { 18 | /** 19 | * The base exception type for all COM interop exceptions and structured exception handling (SEH) exceptions. 20 | */ 21 | class ExternalException : public SystemException 22 | { 23 | public: 24 | ExternalException(); 25 | ExternalException(const String& message); 26 | ExternalException(const String& message, Exception * const inner); 27 | }; 28 | } 29 | } 30 | } 31 | 32 | #endif //_SYSTEM_RUNTIME_INTEROPSERVICES_ExternalException_ 33 | -------------------------------------------------------------------------------- /src/xnbbuild/src/main.c: -------------------------------------------------------------------------------- 1 | #if _MSC_VER 2 | #define _CRT_SECURE_NO_WARNINGS 3 | #endif 4 | 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | #include "Path.h" 12 | #include "TryCatchFinally.h" 13 | 14 | /** 15 | * Application entry point 16 | * 17 | * @param argc 18 | * The amount of values passed in argv. 19 | * 20 | * @param argv 21 | * An array of strings that contains the command-line arguments. 22 | * 23 | * @return 24 | * Application error code 25 | */ 26 | int main(int argc, char** argv) 27 | { 28 | FILE *fpIn = NULL; 29 | FILE *fpOut = NULL; 30 | const char * inFile = NULL; 31 | const char * outDir = NULL; 32 | int i; 33 | 34 | if (argc == 0) 35 | { 36 | printf(""); 37 | } 38 | 39 | for (i = 0; i < argc; i++) 40 | { 41 | if (strncmp(argv[i], "-outdir", 7) == 0) 42 | { 43 | 44 | } 45 | 46 | if (argc > 0) 47 | { 48 | inFile = Path.GetFileName(argv[argc - 1]); 49 | } 50 | } 51 | 52 | TRY 53 | fpIn = fopen(inFile, "rb"); 54 | fpOut = fopen(Path.Combine(outDir, inFile), "wb"); 55 | 56 | 57 | FINALLY 58 | break; 59 | ETRY; 60 | 61 | return 0; 62 | } 63 | -------------------------------------------------------------------------------- /include/System/Collections/Generic/EqualityComparer.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * EqualityComparer.h * 3 | * * 4 | * XFX System::Collections::Generic::EqualityComparer class definition file * 5 | * Copyright (c) XFX Team. All rights reserved * 6 | *****************************************************************************/ 7 | #ifndef _SYSTEM_COLLECTIONS_GENERIC_EQUALITYCOMPARER_ 8 | #define _SYSTEM_COLLECTIONS_GENERIC_EQUALITYCOMPARER_ 9 | 10 | #include 11 | #include "Interfaces.h" 12 | 13 | namespace System 14 | { 15 | namespace Collections 16 | { 17 | namespace Generic 18 | { 19 | template 20 | class EqualityComparer : public IEqualityComparer, public Object 21 | { 22 | private: 23 | static EqualityComparer defaultComparer; 24 | 25 | public: 26 | static EqualityComparer Default(); 27 | 28 | bool Equals(const T x, const T y) const; 29 | int GetHashCode(const T obj) const; 30 | static const Type& GetType(); 31 | }; 32 | } 33 | } 34 | } 35 | 36 | #endif //_SYSTEM_COLLECTIONS_GENERIC_EQUALITYCOMPARER_ 37 | -------------------------------------------------------------------------------- /include/Graphics/EffectPass.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * EffectPass.h * 3 | * * 4 | * XFX::Graphics::EffectPass definition file * 5 | * Copyright (c) XFX Team. All Rights Reserved * 6 | *****************************************************************************/ 7 | #ifndef _XFX_GRAPHICS_EFFECTPASS_ 8 | #define _XFX_GRAPHICS_EFFECTPASS_ 9 | 10 | #include 11 | #include 12 | 13 | using namespace System; 14 | 15 | namespace XFX 16 | { 17 | namespace Graphics 18 | { 19 | /** 20 | * Contains rendering state for drawing with an effect; an effect can contain one or more passes. 21 | */ 22 | class EffectPass 23 | { 24 | public: 25 | /** 26 | * Gets the set of EffectAnnotation objects for this EffectPass. 27 | */ 28 | EffectAnnotationCollection& getAnnotations() const; 29 | /** 30 | * Gets the name of this pass. 31 | */ 32 | String& getName(); 33 | 34 | /** 35 | * Begins this pass. 36 | */ 37 | void Apply(); 38 | }; 39 | } 40 | } 41 | 42 | #endif //_XFX_GRAPHICS_EFFECTPASS_ 43 | -------------------------------------------------------------------------------- /include/Input/GamePad.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * GamePad.h * 3 | * * 4 | * XFX::Input::GamePad class definition file * 5 | * Copyright (c) XFX Team. All Rights Reserved * 6 | *****************************************************************************/ 7 | #ifndef _XFX_INPUT_GAMEPAD_ 8 | #define _XFX_INPUT_GAMEPAD_ 9 | 10 | #include 11 | #include "Enums.h" 12 | #include "GamePadState.h" 13 | 14 | namespace XFX 15 | { 16 | namespace Input 17 | { 18 | /** 19 | * Allows retrieval of user interaction with an XBOX Controller 20 | * and setting of controller vibration motors. 21 | */ 22 | class GamePad 23 | { 24 | private: 25 | GamePad(); // Private constructor to prevent instantiation. 26 | 27 | public: 28 | static GamePadState GetState(const PlayerIndex_t playerIndex); 29 | static GamePadState GetState(const PlayerIndex_t playerIndex, const GamePadDeadZone_t deadZoneMode); 30 | static bool SetVibration(const PlayerIndex_t playerIndex, const float leftMotor, const float rightMotor); 31 | }; 32 | } 33 | } 34 | 35 | #endif //_XFX_INPUT_GAMEPAD_ 36 | -------------------------------------------------------------------------------- /include/Storage/StorageDeviceNotConnectedException.h: -------------------------------------------------------------------------------- 1 | /******************************************************** 2 | * StorageDeviceNotConnectedException.h * 3 | * * 4 | * XFX StorageDeviceNotConnectedException definition * 5 | * Copyright (c) XFX Team. All Rights Reserved * 6 | ********************************************************/ 7 | #ifndef _XFX_STORAGE_STORAGEDEVICENOTCONNECTEDEXCEPTION_ 8 | #define _XFX_STORAGE_STORAGEDEVICENOTCONNECTEDEXCEPTION_ 9 | 10 | #include 11 | 12 | using namespace System; 13 | using namespace System::Runtime::InteropServices; 14 | 15 | namespace XFX 16 | { 17 | namespace Storage 18 | { 19 | /** 20 | * The exception that is thrown when the requested StorageDevice is not connected 21 | */ 22 | class StorageDeviceNotConnectedException : public ExternalException 23 | { 24 | public: 25 | StorageDeviceNotConnectedException(); 26 | StorageDeviceNotConnectedException(const String& message); 27 | StorageDeviceNotConnectedException(const String& message, Exception * const innerException); 28 | }; 29 | } 30 | } 31 | 32 | #endif //_XFX_STORAGE_STORAGEDEVICENOTCONNECTEDEXCEPTION_ 33 | -------------------------------------------------------------------------------- /include/System/Nullable.h: -------------------------------------------------------------------------------- 1 | 2 | namespace System 3 | { 4 | // Represents an object whose underlying type is a value type that can also be assigned null like a reference type. 5 | template 6 | class Nullable 7 | { 8 | private: 9 | T* data; 10 | 11 | public: 12 | static const Nullable Null; 13 | 14 | Nullable() 15 | : data(null) 16 | { 17 | } 18 | 19 | Nullable(const T& newData) 20 | : data(const_cast(&newData)) 21 | { 22 | } 23 | 24 | Nullable(T const * const newData) 25 | : data(const_cast(newData)) 26 | { 27 | } 28 | 29 | Nullable(const Nullable &obj) 30 | : data(obj.data) 31 | { 32 | } 33 | 34 | bool HasValue() const { return (data != null); } 35 | T getValue() const { return *data; } 36 | 37 | operator T() const { return *data; } 38 | 39 | Nullable& operator =(const T * newVal) 40 | { 41 | data = newVal; 42 | return *this; 43 | } 44 | 45 | Nullable& operator =(const Nullable& right) 46 | { 47 | if (right == *this) 48 | goto end; 49 | 50 | *data = *right.data; 51 | end: 52 | return *this; 53 | } 54 | }; 55 | 56 | template 57 | const Nullable Nullable::Null = Nullable(); 58 | } 59 | -------------------------------------------------------------------------------- /include/Graphics/DirectionalLight.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * DirectionalLight.h * 3 | * * 4 | * XFX::Graphics::DirectionalLight class definition file * 5 | * Copyright (c) XFX Team. All Rights Reserved * 6 | *****************************************************************************/ 7 | #ifndef _XFX_GRAPHICS_DIRECTIONALLIGHT_ 8 | #define _XFX_GRAPHICS_DIRECTIONALLIGHT_ 9 | 10 | #include 11 | #include "EffectParameter.h" 12 | #include 13 | 14 | using namespace System; 15 | 16 | namespace XFX 17 | { 18 | namespace Graphics 19 | { 20 | /** 21 | * Creates a DirectionalLight object. 22 | */ 23 | class DirectionalLight : public Object 24 | { 25 | public: 26 | Vector3 DiffuseColor; 27 | Vector3 Direction; 28 | bool Enabled; 29 | Vector3 SpecularColor; 30 | 31 | DirectionalLight(EffectParameter * const directionParameter, EffectParameter * const diffuseColorParameter, EffectParameter * const specularColorParameter, DirectionalLight const * const cloneSource); 32 | 33 | static const Type& GetType(); 34 | }; 35 | } 36 | } 37 | 38 | #endif //_XFX_GRAPHICS_DIRECTIONALLIGHT_ 39 | -------------------------------------------------------------------------------- /include/System.h: -------------------------------------------------------------------------------- 1 | /******************************************************** 2 | * System.h * 3 | * * 4 | * XFX System namespace include file * 5 | * Copyright (c) XFX Team. All Rights Reserved * 6 | ********************************************************/ 7 | #ifndef _SYSTEM_ 8 | #define _SYSTEM_ 9 | 10 | // Type definitions 11 | #include "System/Types.h" 12 | 13 | // 14 | //Interfaces 15 | // 16 | #include "System/Interfaces.h" 17 | 18 | // 19 | //Classes 20 | // 21 | #include "System/Array.h" 22 | #include "System/BitConverter.h" 23 | #include "System/Buffer.h" 24 | #include "System/Console.h" 25 | #include "System/DateTime.h" 26 | #include "System/Delegates.h" 27 | #include "System/Environment.h" 28 | #include "System/EventArgs.h" 29 | #include "System/Math.h" 30 | #include "System/Object.h" 31 | #include "System/OperatingSystem.h" 32 | #include "System/String.h" 33 | #include "System/TimeSpan.h" 34 | #include "System/TimeZone.h" 35 | #include "System/Version.h" 36 | 37 | // 38 | //Enums 39 | // 40 | #include "System/Enums.h" 41 | 42 | // 43 | //Structs 44 | // 45 | #include "System/Byte.h" 46 | #include "System/Boolean.h" 47 | #include "System/Double.h" 48 | #include "System/Single.h" 49 | 50 | #endif //_SYSTEM_ 51 | -------------------------------------------------------------------------------- /include/Graphics/Texture.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * Texture.h * 3 | * * 4 | * XFX::Graphics::Texture class definition file * 5 | * Copyright (c) XFX Team. All Rights Reserved * 6 | *****************************************************************************/ 7 | #ifndef _XFX_GRAPHICS_TEXTURE_ 8 | #define _XFX_GRAPHICS_TEXTURE_ 9 | 10 | #include 11 | #include 12 | #include "GraphicsResource.h" 13 | 14 | namespace XFX 15 | { 16 | namespace Graphics 17 | { 18 | /** 19 | * Represents a texture resource. 20 | */ 21 | class Texture : public GraphicsResource 22 | { 23 | private: 24 | static ImageFileFormat_t ILimageformat2XNAimageformat(int ILFormat); 25 | int _levelCount; 26 | 27 | protected: 28 | void Dispose(bool disposing); 29 | 30 | public: 31 | SurfaceFormat_t getFormat() const; 32 | int getLevelCount() const; 33 | virtual bool MustClamp() const; 34 | 35 | Texture(); 36 | ~Texture(); 37 | 38 | void GenerateMipMaps(const TextureFilter_t filterType); 39 | static const Type& GetType(); 40 | }; 41 | } 42 | } 43 | 44 | #endif //_XFX_GRAPHICS_TEXTURE_ 45 | -------------------------------------------------------------------------------- /include/BoundingSphere.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * BoundingSphere.h * 3 | * * 4 | * XFX::BoundingSphere definition file * 5 | * Copyright (c) XFX Team. All Rights Reserved * 6 | *****************************************************************************/ 7 | #ifndef _XFX_BOUNDINGSPHERE_ 8 | #define _XFX_BOUNDINGSPHERE_ 9 | 10 | #include 11 | #include "Vector3.h" 12 | 13 | using namespace System; 14 | 15 | namespace XFX 16 | { 17 | /** 18 | * Defines a sphere. 19 | */ 20 | struct BoundingSphere : IEquatable, Object 21 | { 22 | Vector3 Center; 23 | float Radius; 24 | 25 | BoundingSphere(const Vector3 center, const float radius); 26 | BoundingSphere(const BoundingSphere &obj); 27 | BoundingSphere(); 28 | 29 | bool Equals(Object const * const obj) const; 30 | bool Equals(const BoundingSphere other) const; 31 | int GetHashCode() const; 32 | static const Type& GetType(); 33 | const String ToString() const; 34 | 35 | bool operator==(const BoundingSphere& other) const; 36 | bool operator!=(const BoundingSphere& other) const; 37 | }; 38 | } 39 | 40 | #endif //_XFX_BOUNDINGSPHERE_ 41 | -------------------------------------------------------------------------------- /include/GameTime.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * GameTime.h * 3 | * * 4 | * XFX GameTime class definition file * 5 | * Copyright (c) XFX Team. All Rights Reserved * 6 | *****************************************************************************/ 7 | #ifndef _XFX_GAMETIME_ 8 | #define _XFX_GAMETIME_ 9 | 10 | #include 11 | 12 | using namespace System; 13 | 14 | namespace XFX 15 | { 16 | /** 17 | * Snapshot of the game timing state expressed in values that can be used by variable-step (real time) or fixed- step (game time) games. 18 | */ 19 | class GameTime : public Object 20 | { 21 | private: 22 | TimeSpan _elapsedGameTime; 23 | bool _isRunningSlowly; 24 | TimeSpan _totalGameTime; 25 | 26 | public: 27 | TimeSpan getElapsedGameTime() const; 28 | bool IsRunningSlowly() const; 29 | TimeSpan getTotalGameTime() const; 30 | 31 | GameTime(const TimeSpan totalGameTime, const TimeSpan elapsedGameTime); 32 | GameTime(const TimeSpan totalGameTime, const TimeSpan elapsedGameTime, const bool isRunningSlowly); 33 | GameTime(); 34 | 35 | static const Type& GetType(); 36 | }; 37 | } 38 | 39 | #endif //_XFX_GAMETIME_ 40 | -------------------------------------------------------------------------------- /include/System/Windows/Point.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * Point.h * 3 | * * 4 | * System::Windows::Point definition file * 5 | * Copyright (c) XFX Team. All rights reserved * 6 | *****************************************************************************/ 7 | #ifndef _SYSTEM_WINDOWS_POINT_ 8 | #define _SYSTEM_WINDOWS_POINT_ 9 | 10 | #include 11 | 12 | namespace System 13 | { 14 | namespace Windows 15 | { 16 | /** 17 | * Represents an x- and y-coordinate pair in two-dimensional space. Can also represent a logical point for certain property usages. 18 | */ 19 | struct Point : IEquatable, Object 20 | { 21 | public: 22 | int X; 23 | int Y; 24 | 25 | Point(); 26 | Point(int x, int y); 27 | Point(const Point &obj); 28 | 29 | bool Equals(Object const * const obj) const; 30 | bool Equals(const Point other) const; 31 | int GetHashCode() const; 32 | static const Type& GetType(); 33 | const String ToString() const; 34 | 35 | bool operator==(const Point& right) const; 36 | bool operator!=(const Point& right) const; 37 | }; 38 | } 39 | } 40 | 41 | #endif // _SYSTEM_WINDOWS_POINT_ 42 | -------------------------------------------------------------------------------- /include/Graphics/DisplayMode.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * DisplayMode.h * 3 | * * 4 | * XFX::Graphics::DisplayMode structure definition file * 5 | * Copyright (c) XFX Team. All Rights Reserved * 6 | *****************************************************************************/ 7 | #ifndef _XFX_GRAPHICS_DISPLAYMODE_ 8 | #define _XFX_GRAPHICS_DISPLAYMODE_ 9 | 10 | #include "Enums.h" 11 | #include 12 | 13 | using namespace System; 14 | 15 | namespace XFX 16 | { 17 | struct Rectangle; 18 | 19 | namespace Graphics 20 | { 21 | /** 22 | * Describes the display mode. 23 | */ 24 | struct DisplayMode : Object 25 | { 26 | float getAspectRatio() const; 27 | int Height; 28 | SurfaceFormat_t Format; 29 | int RefreshRate; 30 | Rectangle getTitleSafeArea() const; 31 | int Width; 32 | 33 | DisplayMode(); 34 | 35 | bool Equals(Object const * const obj) const; 36 | int GetHashCode() const; 37 | static const Type& GetType(); 38 | 39 | bool operator!=(const DisplayMode& other) const; 40 | bool operator==(const DisplayMode& other) const; 41 | }; 42 | } 43 | } 44 | 45 | #endif //_XFX_GRAPHICS_DISPLAYMODE_ 46 | -------------------------------------------------------------------------------- /include/System/Windows/Controls/TextBlock.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * TextBlock.h * 3 | * * 4 | * System::Windows::Controls::TextBlock definition file * 5 | * Copyright (c) XFX Team. All rights reserved * 6 | *****************************************************************************/ 7 | #ifndef _SYSTEM_WINDOWS_CONTROLS_TEXTBLOCK_ 8 | #define _SYSTEM_WINDOWS_CONTROLS_TEXTBLOCK_ 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | using namespace System::Windows::Media; 16 | 17 | namespace System 18 | { 19 | namespace Windows 20 | { 21 | namespace Controls 22 | { 23 | /** 24 | * Provides a lightweight control for displaying small amounts of text. 25 | */ 26 | class TextBlock : public FrameworkElement 27 | { 28 | public: 29 | Brush* Foreground; 30 | Thickness Padding; 31 | String Text; 32 | 33 | TextBlock(); 34 | ~TextBlock(); 35 | 36 | static const Type& GetType(); 37 | const String ToString() const; 38 | }; 39 | } 40 | } 41 | } 42 | 43 | #endif //_SYSTEM_WINDOWS_CONTROLS_TEXTBLOCK_ 44 | -------------------------------------------------------------------------------- /include/Graphics/TextureCollection.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * TextureCollection.h * 3 | * * 4 | * XFX::Graphics::TextureCollection class definition file * 5 | * Copyright (c) XFX Team. All Rights Reserved * 6 | *****************************************************************************/ 7 | #ifndef _XFX_GRAPHICS_TEXTURECOLLECTION_ 8 | #define _XFX_GRAPHICS_TEXTURECOLLECTION_ 9 | 10 | #include 11 | #include "Texture.h" 12 | 13 | using namespace System; 14 | using namespace System::Collections::Generic; 15 | 16 | namespace XFX 17 | { 18 | namespace Graphics 19 | { 20 | class Texture2D; 21 | 22 | /** 23 | * Represents a collection of Texture objects. 24 | */ 25 | class TextureCollection : public Object 26 | { 27 | private: 28 | friend class Texture2D; 29 | 30 | bool disposed; 31 | List textures; 32 | void Dispose(bool disposing); 33 | 34 | public: 35 | TextureCollection(); 36 | virtual ~TextureCollection(); 37 | 38 | void Dispose(); 39 | static const Type& GetType(); 40 | 41 | Texture* operator[](const int index); 42 | }; 43 | } 44 | } 45 | 46 | #endif //_XFX_GRAPHICS_TEXTURECOLLECTION_ 47 | -------------------------------------------------------------------------------- /include/System/Windows/Controls/Border.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * Border.h * 3 | * * 4 | * System::Windows::Controls::Border definition file * 5 | * Copyright (c) XFX Team. All rights reserved * 6 | *****************************************************************************/ 7 | #ifndef _SYSTEM_WINDOWS_CONTROLS_BORDER_ 8 | #define _SYSTEM_WINDOWS_CONTROLS_BORDER_ 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | using namespace System::Windows::Media; 15 | 16 | namespace System 17 | { 18 | namespace Windows 19 | { 20 | namespace Controls 21 | { 22 | /** 23 | * Draws a border, background, or both around another object. 24 | */ 25 | class Border : public FrameworkElement 26 | { 27 | public: 28 | Border(); 29 | ~Border(); 30 | 31 | Brush* Background; 32 | Brush* BorderBrush; 33 | Thickness BorderThickness; 34 | UIElement* Child; 35 | System::Windows::CornerRadius CornerRadius; 36 | Thickness Padding; 37 | 38 | static const Type& GetType(); 39 | }; 40 | } 41 | } 42 | } 43 | 44 | #endif //_SYSTEM_WINDOWS_CONTROLS_BORDER_ 45 | -------------------------------------------------------------------------------- /src/libSystem/Stopwatch.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #if ENABLE_XBOX 4 | #include 5 | #else 6 | #endif 7 | 8 | namespace System 9 | { 10 | namespace Diagnostics 11 | { 12 | const long long Stopwatch::Frequency = KeQueryPerformanceFrequency(); 13 | 14 | TimeSpan Stopwatch::getElapsed() const 15 | { 16 | return TimeSpan::FromTicks(elapsedTicks); 17 | } 18 | 19 | long long Stopwatch::getElapsedMilliseconds() const 20 | { 21 | return getElapsed().Milliseconds(); 22 | } 23 | 24 | long long Stopwatch::getElapsedTicks() const 25 | { 26 | return elapsedTicks; 27 | } 28 | 29 | bool Stopwatch::IsRunning() const 30 | { 31 | return isRunning; 32 | } 33 | 34 | Stopwatch::Stopwatch() 35 | { 36 | } 37 | 38 | long long Stopwatch::GetTimestamp() 39 | { 40 | return KeQueryPerformanceCounter(); 41 | } 42 | 43 | void Stopwatch::Restart() 44 | { 45 | Reset(); 46 | Start(); 47 | } 48 | 49 | void Stopwatch::Start() 50 | { 51 | 52 | isRunning = true; 53 | } 54 | 55 | const Stopwatch& Stopwatch::StartNew() 56 | { 57 | Stopwatch sw = Stopwatch(); 58 | sw.Start(); 59 | return sw; 60 | } 61 | 62 | void Stopwatch::Stop() 63 | { 64 | 65 | isRunning = false; 66 | } 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /include/Media/Enums.h: -------------------------------------------------------------------------------- 1 | /******************************************************** 2 | * Enums.h * 3 | * * 4 | * XFX::Media enumeration definition file * 5 | * Copyright (c) XFX Team. All Rights Reserved * 6 | ********************************************************/ 7 | #ifndef _XFX_MEDIA_ENUMS_H_ 8 | #define _XFX_MEDIA_ENUMS_H_ 9 | 10 | namespace XFX 11 | { 12 | namespace Media 13 | { 14 | // Type of the media source. 15 | struct MediaSourceType 16 | { 17 | enum type 18 | { 19 | LocalDevice, 20 | WindowsMediaConnect 21 | }; 22 | }; 23 | 24 | // Media playback state (playing, paused, or stopped). 25 | struct MediaState 26 | { 27 | enum type 28 | { 29 | Paused, 30 | Playing, 31 | Stopped 32 | }; 33 | }; 34 | 35 | // Type of sounds in a video 36 | struct VideoSoundtrackType 37 | { 38 | enum type 39 | { 40 | Dialog, 41 | Music, 42 | MusicAndDialog 43 | }; 44 | }; 45 | 46 | typedef MediaSourceType::type MediaSourceType_t; // Type of the media source. 47 | typedef MediaState::type MediaState_t; // Media playback state (playing, paused, or stopped). 48 | typedef VideoSoundtrackType::type VideoSoundtrackType_t; // Type of sounds in a video 49 | } 50 | } 51 | 52 | #endif //_XFX_MEDIA_ENUMS_H_ 53 | -------------------------------------------------------------------------------- /include/System/IO/StreamReader.h: -------------------------------------------------------------------------------- 1 | /******************************************************** 2 | * StreamReader.h * 3 | * * 4 | * XFX StreamReader definition file * 5 | * Copyright (c) XFX Team. All Rights Reserved * 6 | ********************************************************/ 7 | #ifndef _SYSTEM_IO_STREAMREADER_ 8 | #define _SYSTEM_IO_STREAMREADER_ 9 | 10 | #include "TextReader.h" 11 | 12 | namespace System 13 | { 14 | namespace IO 15 | { 16 | class Stream; 17 | 18 | // Implements a System::IO::TextReader that reads characters from a byte stream. 19 | class StreamReader : public TextReader 20 | { 21 | protected: 22 | void Dispose(bool disposing); 23 | 24 | public: 25 | static const StreamReader Null; 26 | Stream* BaseStream(); 27 | bool EndOfStream() const; 28 | 29 | StreamReader(Stream* stream); 30 | StreamReader(Stream* stream, const int bufferSize); 31 | StreamReader(const String& path); 32 | StreamReader(const String& path, const int bufferSize); 33 | 34 | void Close(); 35 | void DiscardBufferedData(); 36 | int Peek() const; 37 | int Read(); 38 | int Read(char buffer[], const int index, const int count); 39 | String ReadLine(); 40 | String ReadToEnd(); 41 | }; 42 | } 43 | } 44 | 45 | #endif //_SYSTEM_IO_STREAMREADER_ 46 | -------------------------------------------------------------------------------- /include/System/TimeZone.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * TimeZone.h * 3 | * * 4 | * XFX System::TimeZone definition file * 5 | * Copyright (c) XFX Team. All Rights Reserved * 6 | *****************************************************************************/ 7 | #ifndef _SYSTEM_TIMEZONE_ 8 | #define _SYSTEM_TIMEZONE_ 9 | 10 | #include 11 | #include 12 | 13 | using namespace System::Globalization; 14 | 15 | namespace System 16 | { 17 | struct DateTime; 18 | class String; 19 | struct TimeSpan; 20 | 21 | /** 22 | * Represents a time zone. 23 | */ 24 | class TimeZone : public Object 25 | { 26 | protected: 27 | TimeZone(); 28 | 29 | public: 30 | static TimeZone CurrentTimeZone(); 31 | String DaylightName(); 32 | String StandardName(); 33 | 34 | DaylightTime GetDaylightChanges(int year); 35 | static const Type& GetType(); 36 | TimeSpan GetUtcOffset(DateTime time); 37 | bool IsDaylightSavingTime(DateTime time); 38 | static bool IsDaylightSavingTime(DateTime time, DaylightTime daylightTimes); 39 | DateTime ToLocalTime(DateTime time); 40 | DateTime ToUniversalTime(DateTime time); 41 | }; 42 | } 43 | 44 | #endif //_SYSTEM_TIMEZONE_ 45 | -------------------------------------------------------------------------------- /include/Audio/AudioEngine.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * AudioEngine.h * 3 | * * 4 | * XFX AudioEngine definition file * 5 | * Copyright (c) XFX Team. All Rights Reserved * 6 | *****************************************************************************/ 7 | #ifndef XFX_AUDIO_AUDIOENGINE_H 8 | #define XFX_AUDIO_AUDIOENGINE_H 9 | 10 | #include 11 | #include 12 | 13 | using namespace System; 14 | 15 | namespace XFX 16 | { 17 | namespace Audio 18 | { 19 | class AudioCategory; 20 | 21 | class AudioEngine 22 | { 23 | protected: 24 | virtual void Dispose(int disposing); 25 | 26 | public: 27 | const int ContentVersion; //XACT version supported 28 | 29 | AudioEngine(); //Initialize the audio engine for direct wav play. 30 | AudioEngine(String& settingsFile); //Initialize the audio engine for XACT 31 | AudioEngine(String& settingsFile, TimeSpan lookAheadTime, String& rendererId); 32 | 33 | void Dispose(); 34 | AudioCategory GetCategory(String& name); 35 | float GetGlobalVariable(String& name); 36 | void SetGlobalVariable(String& name, float value); 37 | void Update(); 38 | }; 39 | } 40 | } 41 | 42 | #endif // XFX_AUDIO_AUDIOENGINE_H 43 | -------------------------------------------------------------------------------- /include/System/Byte.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * Byte.h * 3 | * * 4 | * XFX System::Byte structure definition file * 5 | * Copyright (c) XFX Team. All Rights Reserved * 6 | *****************************************************************************/ 7 | #ifndef _SYSTEM_BYTE_ 8 | #define _SYSTEM_BYTE_ 9 | 10 | #include "Interfaces.h" 11 | #include "Object.h" 12 | 13 | namespace System 14 | { 15 | class String; 16 | 17 | /** 18 | * Represents an 8-bit unsigned integer. 19 | */ 20 | struct Byte : IComparable, IEquatable, Object 21 | { 22 | private: 23 | byte value; 24 | 25 | public: 26 | static const byte MaxValue; 27 | static const byte MinValue; 28 | 29 | Byte(); 30 | Byte(const Byte &obj); 31 | Byte(const byte &obj); 32 | 33 | int CompareTo(const Byte other) const; 34 | bool Equals(const Byte other) const; 35 | static const Type& GetType(); 36 | const String ToString() const; 37 | static const String ToString(const byte value); 38 | static bool TryParse(const String& str, out byte* result); 39 | 40 | operator byte() const; 41 | bool operator!=(const Byte& right) const; 42 | bool operator==(const Byte& right) const; 43 | }; 44 | } 45 | 46 | #endif //_SYSTEM_BYTE_ 47 | -------------------------------------------------------------------------------- /include/System/Globalization/DaylightTime.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * DaylightTime.h * 3 | * * 4 | * XFX System::Globalization::DaylightTime class definition file * 5 | * Copyright (c) XFX Team. All rights reserved * 6 | *****************************************************************************/ 7 | #ifndef _SYSTEM_GLOBALIZATION_DAYLIGHTTIME_ 8 | #define _SYSTEM_GLOBALIZATION_DAYLIGHTTIME_ 9 | 10 | #include 11 | #include 12 | 13 | namespace System 14 | { 15 | namespace Globalization 16 | { 17 | /** 18 | * Defines the period of daylight saving time. 19 | */ 20 | class DaylightTime : public IEquatable, public Object 21 | { 22 | public: 23 | const TimeSpan Delta; 24 | const DateTime End; 25 | const DateTime Start; 26 | 27 | DaylightTime(const DateTime start, const DateTime end, const TimeSpan delta); 28 | DaylightTime(const DaylightTime &obj); 29 | 30 | bool Equals(const DaylightTime other) const; 31 | static const Type& GetType(); 32 | 33 | bool operator !=(const DaylightTime& right) const; 34 | bool operator ==(const DaylightTime& right) const; 35 | }; 36 | } 37 | } 38 | 39 | #endif //_SYSTEM_GLOBALIZATION_DAYLIGHTTIME_ 40 | -------------------------------------------------------------------------------- /include/System/Windows/Controls/Primitives/DragCompletedEventArgs.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace System 6 | { 7 | namespace Windows 8 | { 9 | namespace Controls 10 | { 11 | namespace Primitives 12 | { 13 | // Provides data for the System::Windows::Controls::Primitives::Thumb::DragCompleted event that occurs when a user completes a drag operation with the mouse of a System::Windows::Controls::Primitives::Thumb control. 14 | class DragCompletedEventArgs : public RoutedEventArgs 15 | { 16 | private: 17 | bool _canceled; 18 | int _horizontalChange; 19 | int _verticalChange; 20 | 21 | public: 22 | bool Canceled() const 23 | { 24 | return _canceled; 25 | } 26 | 27 | int getHorizontalChange() const 28 | { 29 | return _horizontalChange; 30 | } 31 | 32 | int getVerticalChange() const 33 | { 34 | return _verticalChange; 35 | } 36 | 37 | DragCompletedEventArgs(int horizontalChange, int verticalChange, bool canceled) 38 | : _canceled(canceled), _horizontalChange(horizontalChange), _verticalChange(verticalChange) 39 | { 40 | } 41 | }; 42 | 43 | typedef Event DragCompletedEventHandler; 44 | } 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /include/System/Boolean.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * Boolean.h * 3 | * * 4 | * XFX System::Boolean definition file * 5 | * Copyright (c) XFX Team. All Rights Reserved * 6 | *****************************************************************************/ 7 | #ifndef _SYSTEM_BOOLEAN_ 8 | #define _SYSTEM_BOOLEAN_ 9 | 10 | #include "Interfaces.h" 11 | 12 | namespace System 13 | { 14 | class String; 15 | 16 | // Represents a Boolean value. 17 | struct Boolean : IComparable, IEquatable, Object 18 | { 19 | private: 20 | bool value; 21 | 22 | public: 23 | Boolean(); 24 | Boolean(const Boolean &obj); 25 | Boolean(const bool &obj); 26 | 27 | static const char* TrueString; 28 | static const char* FalseString; 29 | 30 | int CompareTo(const Boolean other) const; 31 | bool Equals(Object const * const obj) const; 32 | bool Equals(const Boolean other) const; 33 | static Type GetType(); 34 | static bool Parse(const String& str); 35 | const String ToString() const; 36 | static const String ToString(bool value); 37 | 38 | operator bool() const; 39 | bool operator!=(const Boolean& right) const; 40 | bool operator==(const Boolean& right) const; 41 | }; 42 | } 43 | 44 | #endif //_SYSTEM_BOOLEAN_ 45 | -------------------------------------------------------------------------------- /include/Media/Video.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * Video.h * 3 | * * 4 | * XFX::Media::Video class definition file * 5 | * Copyright (c) XFX Team. All Rights Reserved * 6 | *****************************************************************************/ 7 | #ifndef _XFX_MEDIA_VIDEO_H_ 8 | #define _XFX_MEDIA_VIDEO_H_ 9 | 10 | #include 11 | #include "Enums.h" 12 | 13 | using namespace System; 14 | 15 | namespace XFX 16 | { 17 | namespace Media 18 | { 19 | /** 20 | * Represents a video. 21 | */ 22 | class Video : public Object 23 | { 24 | public: 25 | /** 26 | * Gets the duration of the Video. 27 | */ 28 | TimeSpan getDuration() const; 29 | /** 30 | * Gets the frame rate of this video. 31 | */ 32 | float getFramesPerSecond() const; 33 | /** 34 | * Gets the height of this video, in pixels. 35 | */ 36 | int getHeight() const; 37 | /** 38 | * Gets the VideoSoundtrackType for this video. 39 | */ 40 | VideoSoundtrackType_t getVideoSoundtrackType() const; 41 | /** 42 | * Gets the width of this video, in pixels. 43 | */ 44 | int getWidth() const; 45 | 46 | static const Type& GetType(); 47 | }; 48 | } 49 | } 50 | 51 | #endif //_XFX_MEDIA_VIDEO_H_ 52 | -------------------------------------------------------------------------------- /include/System/Windows/SystemColors.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | using namespace System::Windows::Media; 6 | 7 | namespace System 8 | { 9 | namespace Windows 10 | { 11 | // Contains system colors, system brushes, and system resource keys that correspond to system display elements. 12 | class SystemColors 13 | { 14 | private: 15 | SystemColors(); 16 | 17 | public: 18 | static const Color ControlColor; 19 | static const Color ControlDarkColor; 20 | static const Color ControlDarkDarkColor; 21 | static const Color ControlLightColor; 22 | static const Color ControlLightLightColor; 23 | static const Color ControlTextColor; 24 | static const Color DeskTopColor; 25 | static const Color GrayTextColor; 26 | static const Color HighlightColor; 27 | static const Color HighlightTextColor; 28 | static const Color InactiveBorderColor; 29 | static const Color InactiveCaptionColor; 30 | static const Color InactiveCaptionTextColor; 31 | static const Color InfoColor; 32 | static const Color InfoTextColor; 33 | static const Color MenuColor; 34 | static const Color MenuTextColor; 35 | static const Color ScrollBarColor; 36 | static const Color WindowColor; 37 | static const Color WindowFrameColor; 38 | static const Color WindowTextColor; 39 | }; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /include/Graphics/DisplayModeCollection.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * DisplayModeCollection.h * 3 | * * 4 | * XFX::Graphics::DisplayModeCollection class definition file * 5 | * Copyright (c) XFX Team. All Rights Reserved * 6 | *****************************************************************************/ 7 | #ifndef _XFX_GRAPHICS_DISPLAYMODECOLLECTION_ 8 | #define _XFX_GRAPHICS_DISPLAYMODECOLLECTION_ 9 | 10 | #include 11 | #include 12 | #include "DisplayMode.h" 13 | 14 | using namespace System; 15 | using namespace System::Collections::Generic; 16 | 17 | namespace XFX 18 | { 19 | namespace Graphics 20 | { 21 | /** 22 | * Manipulates a collection of DisplayMode structures. 23 | */ 24 | class DisplayModeCollection : IEnumerable, Object 25 | { 26 | private: 27 | int adapterOrdinal; 28 | List displayModes; 29 | SurfaceFormat_t currentFormat; 30 | int count; 31 | 32 | public: 33 | DisplayModeCollection(); 34 | 35 | IEnumerator* GetEnumerator(); 36 | static const Type& GetType(); 37 | 38 | DisplayMode& operator[](const SurfaceFormat_t format) const; 39 | }; 40 | } 41 | } 42 | 43 | #endif //_XFX_GRAPHICS_DISPLAYMODECOLLECTION_ 44 | -------------------------------------------------------------------------------- /include/Graphics/EffectTechnique.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * EffectTechnique.h * 3 | * * 4 | * XFX::Graphics::EffectTechnique definition file * 5 | * Copyright (c) XFX Team. All Rights Reserved * 6 | *****************************************************************************/ 7 | #ifndef _XFX_GRAPHICS_EFFECTTECHNIQUE_ 8 | #define _XFX_GRAPHICS_EFFECTTECHNIQUE_ 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | using namespace System; 15 | 16 | namespace XFX 17 | { 18 | namespace Graphics 19 | { 20 | /** 21 | * Represents an effect technique. 22 | */ 23 | class EffectTechnique 24 | { 25 | private: 26 | EffectAnnotationCollection _annotations; 27 | 28 | public: 29 | /** 30 | * Gets the EffectAnnotation objects associated with this technique. 31 | */ 32 | EffectAnnotationCollection& getAnnotations() const; 33 | /** 34 | * Gets the name of this technique. 35 | */ 36 | String& getName() const; 37 | /** 38 | * Gets the collection of EffectPass objects this rendering technique requires. 39 | */ 40 | EffectPassCollection& getPasses() const; 41 | }; 42 | } 43 | } 44 | 45 | #endif //_XFX_GRAPHICS_EFFECTTECHNIQUE_ 46 | -------------------------------------------------------------------------------- /include/Graphics/GraphicsResource.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * GraphicsResource.h * 3 | * * 4 | * XFX GraphicsResource definition file * 5 | * Copyright (c) XFX Team. All Rights Reserved * 6 | *****************************************************************************/ 7 | #ifndef _XFX_GRAPHICS_GRAPHICSRESOURCE_ 8 | #define _XFX_GRAPHICS_GRAPHICSRESOURCE_ 9 | 10 | #include 11 | #include 12 | #include "Enums.h" 13 | 14 | using namespace System; 15 | 16 | namespace XFX 17 | { 18 | namespace Graphics 19 | { 20 | class GraphicsDevice; 21 | 22 | /** 23 | * Queries and prepares resources. 24 | */ 25 | class GraphicsResource : public IDisposable, public Object 26 | { 27 | private: 28 | bool isDisposed; 29 | 30 | protected: 31 | GraphicsDevice* graphicsDevice; 32 | 33 | virtual void Dispose(bool disposing); 34 | 35 | public: 36 | virtual GraphicsDevice* getGraphicsDevice(); 37 | bool IsDisposed(); 38 | String Name; 39 | Object* Tag; 40 | 41 | EventHandler Disposing; 42 | 43 | virtual ~GraphicsResource(); 44 | GraphicsResource(); 45 | 46 | void Dispose(); 47 | static const Type& GetType(); 48 | }; 49 | } 50 | } 51 | 52 | #endif //_XFX_GRAPHICS_GRAPHICSRESOURCE_ 53 | -------------------------------------------------------------------------------- /include/System/Windows/Size.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * Size.h * 3 | * * 4 | * System::Windows::Size definition file * 5 | * Copyright (c) XFX Team. All rights reserved * 6 | *****************************************************************************/ 7 | #ifndef _SYSTEM_WINDOWS_SIZE_ 8 | #define _SYSTEM_WINDOWS_SIZE_ 9 | 10 | #include 11 | #include 12 | 13 | namespace System 14 | { 15 | namespace Windows 16 | { 17 | /** 18 | * Describes the width and height of an object. 19 | */ 20 | struct Size : IEquatable, Object 21 | { 22 | public: 23 | /** 24 | * Represents a static empty System::Windows::Size. 25 | */ 26 | static const Size Empty; 27 | int Height; 28 | bool IsEmpty() const; 29 | int Width; 30 | 31 | Size(); 32 | Size(const int Width, const int Height); 33 | Size(const Size &obj); 34 | 35 | bool Equals(Object const * const obj) const; 36 | bool Equals(const Size other) const; 37 | int GetHashCode() const; 38 | static const Type& GetType(); 39 | const String ToString() const; 40 | 41 | bool operator ==(const Size& right) const; 42 | bool operator !=(const Size& right) const; 43 | }; 44 | } 45 | } 46 | 47 | #endif //_SYSTEM_WINDOWS_SIZE_ 48 | -------------------------------------------------------------------------------- /include/System/Xml/Schema/Interfaces.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * Interfaces.h * 3 | * * 4 | * System::Xml::Schema Interfaces definition file. * 5 | * Copyright (c) XFX Team. All rights reserved. * 6 | *****************************************************************************/ 7 | #ifndef _SYSTEM_XML_SCHEMA_INTERFACES_H 8 | #define _SYSTEM_XML_SCHEMA_INTERFACES_H 9 | 10 | #include 11 | 12 | #include "Enums.h" 13 | 14 | namespace System 15 | { 16 | namespace Xml 17 | { 18 | namespace Schema 19 | { 20 | class XmlSchemaAttribute; 21 | class XmlSchemaElement; 22 | class XmlSchemaSimpleType; 23 | class XmlSchemaType; 24 | 25 | // Defines the post-schema-validation infoset of a validated XML node. 26 | interface IXmlSchemaInfo 27 | { 28 | public: 29 | virtual bool IsDefault() =0; 30 | virtual bool IsNil() =0; 31 | virtual XmlSchemaSimpleType* getMemberType() =0; 32 | virtual XmlSchemaAttribute* getSchemaAttribute() =0; 33 | virtual XmlSchemaElement* getSchemaElement() =0; 34 | virtual XmlSchemaType* SchemaType() =0; 35 | virtual XmlSchemaValidity_t getValidity() =0; 36 | 37 | virtual ~IXmlSchemaInfo() { } 38 | }; 39 | } 40 | } 41 | } 42 | 43 | #endif // _SYSTEM_XML_SCHEMA_INTERFACES_H 44 | -------------------------------------------------------------------------------- /include/System/Int16.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * Int16.h * 3 | * * 4 | * XFX System::Int16 definition file * 5 | * Copyright (c) XFX Team. All Rights Reserved * 6 | *****************************************************************************/ 7 | #ifndef _SYSTEM_INT16_ 8 | #define _SYSTEM_INT16_ 9 | 10 | #include 11 | 12 | namespace System 13 | { 14 | class String; 15 | 16 | // Represents a signed, 16-bit integer. 17 | struct Int16 : IComparable, IEquatable, Object 18 | { 19 | private: 20 | short value; 21 | 22 | public: 23 | static const short MaxValue; 24 | static const short MinValue; 25 | 26 | Int16(); 27 | Int16(const Int16 &obj); 28 | Int16(const short &obj); 29 | 30 | int CompareTo(const Int16 other) const; 31 | bool Equals(Object const * const obj) const; 32 | bool Equals(const Int16 other) const; 33 | int GetHashCode() const; 34 | static Type GetType(); 35 | const String ToString() const; 36 | static String ToString(const short value); 37 | static bool TryParse(const String& str, out short* result); 38 | 39 | operator short() const; 40 | bool operator==(const Int16& right) const; 41 | bool operator!=(const Int16& right) const; 42 | }; 43 | } 44 | 45 | #endif //_SYSTEM_INT16_ 46 | -------------------------------------------------------------------------------- /include/System/Net/NetworkInformation/NetworkChange.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * NetworkInterface.h * 3 | * * 4 | * System::Net::Sockets::NetworkInterface class definition file. * 5 | * Copyright (c) XFX Team. All rights reserved. * 6 | *****************************************************************************/ 7 | #ifndef _SYSTEM_NET_NETWORKINFORMATION_NETWORKCHANGE_ 8 | #define _SYSTEM_NET_NETWORKINFORMATION_NETWORKCHANGE_ 9 | 10 | #include 11 | 12 | namespace System 13 | { 14 | namespace Net 15 | { 16 | namespace NetworkInformation 17 | { 18 | /** 19 | * Allows applications to receive notification when the Internet Protocol (IP) address of a network interface, also called a network card or adapter, changes. 20 | */ 21 | class NetworkChange 22 | { 23 | protected: 24 | NetworkChange(); 25 | virtual ~NetworkChange(); 26 | 27 | public: 28 | NetworkAddressChangedEventHandler NetworkAddressChanged; 29 | }; 30 | 31 | /** 32 | * References one or more methods to be called when the address of a network interface changes. 33 | */ 34 | typedef Event NetworkAddressChangedEventHandler; 35 | } 36 | } 37 | } 38 | 39 | #endif //_SYSTEM_NET_NETWORKINFORMATION_NETWORKCHANGE_ 40 | -------------------------------------------------------------------------------- /include/System/UInt32.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * UInt32.h * 3 | * * 4 | * XFX System::UInt32 definition file * 5 | * Copyright (c) XFX Team. All Rights Reserved * 6 | *****************************************************************************/ 7 | #ifndef _SYSTEM_UINT32_ 8 | #define _SYSTEM_UINT32_ 9 | 10 | #include 11 | 12 | namespace System 13 | { 14 | /** 15 | * Represents an unsigned, 32-bit integer. 16 | */ 17 | struct UInt32 : IComparable, IEquatable, Object 18 | { 19 | private: 20 | uint value; 21 | 22 | public: 23 | static const uint MaxValue; 24 | static const uint MinValue; 25 | 26 | UInt32(const UInt32 &obj); 27 | UInt32(const uint &obj); 28 | 29 | int CompareTo(const UInt32 other) const; 30 | bool Equals(Object const * const obj) const; 31 | bool Equals(const UInt32 other) const; 32 | int GetHashCode() const; 33 | static const Type& GetType(); 34 | const String ToString() const; 35 | static const String ToString(const uint value); 36 | static bool TryParse(const char* str, out uint* result); 37 | 38 | operator uint() const; 39 | bool operator==(const UInt32& right) const; 40 | bool operator!=(const UInt32& right) const; 41 | }; 42 | } 43 | 44 | #endif //_SYSTEM_UINT32_ 45 | -------------------------------------------------------------------------------- /include/System/Globalization/CultureInfo.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * CultureInfo.h * 3 | * * 4 | * XFX System::Globalization::CultureInfo class definition file. * 5 | * Copyright (c) XFX Team. All Rights Reserved. * 6 | *****************************************************************************/ 7 | #ifndef _SYSTEM_GLOBALIZATION_CULTUREINFO_ 8 | #define _SYSTEM_GLOBALIZATION_CULTUREINFO_ 9 | 10 | #include 11 | 12 | namespace System 13 | { 14 | class String; 15 | 16 | namespace Globalization 17 | { 18 | /** 19 | * Provides information about a specific culture (called a "locale" for unmanaged code development). The information includes the names for the culture, the writing system, the calendar used, and formatting for dates and sort strings. 20 | */ 21 | class CultureInfo : public IFormatProvider, public Object 22 | { 23 | public: 24 | static CultureInfo * const InvariantCulture; 25 | 26 | CultureInfo(int culture); 27 | CultureInfo(int culture, bool useUserOverride); 28 | CultureInfo(const String& name); 29 | CultureInfo(const String& name, bool useUserOverride); 30 | 31 | void ClearCacheData(); 32 | bool Equals(Object const * const obj) const; 33 | }; 34 | } 35 | } 36 | 37 | #endif //_SYSTEM_GLOBALIZATION_CULTUREINFO_ 38 | -------------------------------------------------------------------------------- /include/System/Int32.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * Int32.h * 3 | * * 4 | * XFX System::Int32 structure definition file * 5 | * Copyright (c) XFX Team. All Rights Reserved * 6 | *****************************************************************************/ 7 | #ifndef _SYSTEM_INT32_ 8 | #define _SYSTEM_INT32_ 9 | 10 | #include "Interfaces.h" 11 | 12 | namespace System 13 | { 14 | class String; 15 | 16 | /** 17 | * Represents a signed, 32-bit integer. 18 | */ 19 | struct Int32 : IComparable, IEquatable, Object 20 | { 21 | private: 22 | int value; 23 | 24 | public: 25 | static const int MaxValue; 26 | static const int MinValue; 27 | 28 | Int32(); 29 | Int32(const Int32 &obj); 30 | Int32(const int &obj); 31 | 32 | int CompareTo(const Int32 other) const; 33 | bool Equals(Object const * const obj) const; 34 | bool Equals(const Int32 other) const; 35 | int GetHashCode() const; 36 | static const Type& GetType(); 37 | const String ToString() const; 38 | static const String ToString(const int value); 39 | static bool TryParse(const String& str, out int* result); 40 | 41 | operator int() const; 42 | bool operator !=(const Int32& right) const; 43 | bool operator ==(const Int32& right) const; 44 | }; 45 | } 46 | 47 | #endif //_SYSTEM_INT32_ 48 | -------------------------------------------------------------------------------- /src/xnbbuild/xnbbuild.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | Source Files 23 | 24 | 25 | 26 | 27 | Header Files 28 | 29 | 30 | Header Files 31 | 32 | 33 | -------------------------------------------------------------------------------- /include/System/SByte.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * SByte.h * 3 | * * 4 | * XFX System::SByte definition file * 5 | * Copyright (c) XFX Team. All Rights Reserved * 6 | *****************************************************************************/ 7 | #ifndef _SYSTEM_SBYTE_ 8 | #define _SYSTEM_SBYTE_ 9 | 10 | #include 11 | 12 | namespace System 13 | { 14 | class String; 15 | 16 | /** 17 | * Represents a signed 8-bit integer. 18 | */ 19 | struct SByte : IComparable, IEquatable, Object 20 | { 21 | private: 22 | sbyte value; 23 | 24 | public: 25 | static const sbyte MaxValue; 26 | static const sbyte MinValue; 27 | 28 | SByte(); 29 | SByte(const SByte &obj); 30 | SByte(const sbyte &obj); 31 | 32 | int CompareTo(const SByte other) const; 33 | bool Equals(Object const * const obj) const; 34 | bool Equals(const SByte other) const; 35 | int GetHashCode() const; 36 | static const Type& GetType(); 37 | const String ToString() const; 38 | static const String ToString(const sbyte value); 39 | static bool TryParse(const String& str, out sbyte* value); 40 | 41 | operator sbyte() const; 42 | bool operator==(const SByte& right) const; 43 | bool operator!=(const SByte& right) const; 44 | }; 45 | } 46 | 47 | #endif //_SYSTEM_SBYTE_ 48 | -------------------------------------------------------------------------------- /include/Graphics/StateBlock.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * StateBlock.h * 3 | * * 4 | * XFX::Graphics::StateBlock definition file * 5 | * Copyright (c) XFX Team. All Rights Reserved * 6 | *****************************************************************************/ 7 | #ifndef _XFX_GRAPHICS_STATEBLOCK_ 8 | #define _XFX_GRAPHICS_STATEBLOCK_ 9 | 10 | #include 11 | #include "GraphicsDevice.h" 12 | 13 | using namespace System; 14 | 15 | namespace XFX 16 | { 17 | namespace Graphics 18 | { 19 | class StateBlock : public IDisposable, public Object 20 | { 21 | private: 22 | GraphicsDevice* device; 23 | 24 | protected: 25 | void Dispose(bool disposing); 26 | 27 | public: 28 | EventHandler Disposing; 29 | 30 | StateBlock(GraphicsDevice * const graphiceDevice); 31 | StateBlock(const StateBlock &obj); 32 | virtual ~StateBlock() { delete device; } 33 | 34 | void Apply(); 35 | void Capture(); 36 | void Dispose(); 37 | bool Equals(Object const * const obj) const; 38 | int GetHashCode() const; 39 | static const Type& GetType(); 40 | const String ToString() const; 41 | 42 | bool operator!=(const StateBlock& right) const; 43 | bool operator==(const StateBlock& right) const; 44 | }; 45 | } 46 | } 47 | 48 | #endif //_XFX_GRAPHICS_STATEBLOCK_ 49 | -------------------------------------------------------------------------------- /include/System/UInt64.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * UInt64.h * 3 | * * 4 | * XFX System::UInt64 definition file * 5 | * Copyright (c) XFX Team. All Rights Reserved * 6 | *****************************************************************************/ 7 | #ifndef _SYSTEM_UINT64_ 8 | #define _SYSTEM_UINT64_ 9 | 10 | #include 11 | 12 | namespace System 13 | { 14 | class String; 15 | 16 | /** 17 | * Represents an unsigned, 64-bit integer. 18 | */ 19 | struct UInt64 : IComparable, IEquatable, Object 20 | { 21 | private: 22 | ulong value; 23 | 24 | public: 25 | static const ulong MaxValue; 26 | static const ulong MinValue; 27 | 28 | UInt64(const UInt64 &obj); 29 | UInt64(const ulong &obj); 30 | 31 | int CompareTo(const UInt64 other) const; 32 | bool Equals(Object const * const obj) const; 33 | bool Equals(const UInt64 other) const; 34 | int GetHashCode() const; 35 | static const Type& GetType(); 36 | const String ToString() const; 37 | static const String ToString(const ulong value); 38 | static bool TryParse(const String& str, out ulong* value); 39 | 40 | operator ulong() const; 41 | bool operator==(const UInt64& right) const; 42 | bool operator!=(const UInt64& right) const; 43 | }; 44 | } 45 | 46 | #endif //_SYSTEM_UINT64_ 47 | -------------------------------------------------------------------------------- /include/Net/NetworkException.h: -------------------------------------------------------------------------------- 1 | /******************************************************** 2 | * NetworkException.h * 3 | * * 4 | * XFX NetworkException definition file * 5 | * Copyright (c) XFX Team. All Rights Reserved * 6 | ********************************************************/ 7 | #ifndef _XFX_NET_NETWORKEXCEPTION_ 8 | #define _XFX_NET_NETWORKEXCEPTION_ 9 | 10 | #include 11 | #include "Enums.h" 12 | 13 | using namespace System; 14 | 15 | namespace XFX 16 | { 17 | namespace Net 18 | { 19 | // Thrown if there is a network communication failure. 20 | class NetworkException : public Exception 21 | { 22 | public: 23 | NetworkException(); 24 | NetworkException(char* message); 25 | NetworkException(char* message, Exception innerException); 26 | }; 27 | 28 | // Thrown if an error was encountered while joining a session. 29 | class NetworkSessionJoinException : public NetworkException 30 | { 31 | public: 32 | NetworkSessionJoinException(); 33 | NetworkSessionJoinException(char* message); 34 | NetworkSessionJoinException(char* message, NetworkSessionJoinError joinError); 35 | NetworkSessionJoinException(char* message, Exception innerException); 36 | 37 | NetworkSessionJoinError JoinError(); //! get 38 | void JoinError(NetworkSessionJoinError joinError); //! set 39 | }; 40 | } 41 | } 42 | 43 | #endif //_XFX_NET_NETWORKEXCEPTION_ 44 | -------------------------------------------------------------------------------- /include/System/Net/SocketAddress.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * SocketAddress.h * 3 | * * 4 | * System::Net::SocketAddress class definition file. * 5 | * Copyright (c) XFX Team. All rights reserved. * 6 | *****************************************************************************/ 7 | #ifndef _SYSTEM_NET_SOCKETADDRESS_ 8 | #define _SYSTEM_NET_SOCKETADDRESS_ 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | using namespace System::Net::Sockets; 16 | 17 | namespace System 18 | { 19 | namespace Net 20 | { 21 | /** 22 | * Stores serialized information from System::Net::EndPoint derived classes. 23 | */ 24 | class SocketAddress : public Object 25 | { 26 | private: 27 | Array data; 28 | 29 | public: 30 | AddressFamily_t getFamily(); 31 | int getSize(); 32 | 33 | SocketAddress(AddressFamily_t family); 34 | SocketAddress(AddressFamily_t family, int size); 35 | 36 | bool Equals(Object const * const obj) const; 37 | int GetHashCode() const; 38 | static const Type& GetType(); 39 | const String ToString(); 40 | 41 | const byte& operator[](const int index) const; 42 | byte& operator[](const int index); 43 | }; 44 | } 45 | } 46 | 47 | #endif //_SYSTEM_NET_SOCKETADDRESS_ 48 | -------------------------------------------------------------------------------- /include/Graphics/VertexDeclaration.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * Rectangle.h * 3 | * * 4 | * XFX::Graphics::VertexDeclaration class definition file * 5 | * Copyright (c) XFX Team. All Rights Reserved * 6 | *****************************************************************************/ 7 | #ifndef _XFX_GRAPHICS_VERTEXDECLARATION_ 8 | #define _XFX_GRAPHICS_VERTEXDECLARATION_ 9 | 10 | #include "GraphicsResource.h" 11 | #include "VertexElement.h" 12 | 13 | namespace XFX 14 | { 15 | namespace Graphics 16 | { 17 | /** 18 | * A vertex declaration, which defines per-vertex data. 19 | */ 20 | class VertexDeclaration : public GraphicsResource 21 | { 22 | private: 23 | int vertexStride; 24 | int elementCount; 25 | VertexElement* vertexElements; 26 | 27 | protected: 28 | void Dispose(bool disposing); 29 | 30 | public: 31 | int getVertexStride() const; 32 | 33 | VertexDeclaration(int vertexStride, VertexElement const * const elements, const int elementCount); 34 | VertexDeclaration(VertexElement const * const elements, const int elementCount); 35 | VertexDeclaration(const VertexDeclaration &obj); 36 | ~VertexDeclaration(); 37 | 38 | static const Type& GetType(); 39 | VertexElement* GetVertexElements() const; 40 | }; 41 | } 42 | } 43 | 44 | #endif //_XFX_GRAPHICS_VERTEXDECLARATION_ 45 | -------------------------------------------------------------------------------- /include/Input/Mouse.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * Mouse.h * 3 | * * 4 | * XFX::Input::Mouse class definition file * 5 | * Copyright (c) XFX Team. All Rights Reserved * 6 | *****************************************************************************/ 7 | #ifndef _XFX_INPUT_MOUSE_ 8 | #define _XFX_INPUT_MOUSE_ 9 | 10 | #include "Enums.h" 11 | #include 12 | 13 | using namespace System; 14 | 15 | namespace XFX 16 | { 17 | namespace Input 18 | { 19 | /** 20 | * Represents the state of a mouse input device, including mouse cursor position and buttons pressed. 21 | */ 22 | struct MouseState 23 | { 24 | ButtonState_t LeftButton; 25 | ButtonState_t MiddleButton; 26 | ButtonState_t RightButton; 27 | int X; 28 | ButtonState_t XButton1; 29 | ButtonState_t XButton2; 30 | int Y; 31 | 32 | bool operator!=(const MouseState& other) const; 33 | bool operator==(const MouseState& other) const; 34 | }; 35 | 36 | /** 37 | * Allows retrieval of position and button clicks from a mouse input device. 38 | */ 39 | class Mouse 40 | { 41 | private: 42 | Mouse(); //Private constructor to prevent instantiation. 43 | 44 | public: 45 | static MouseState GetState(); 46 | static void SetPosition(int x, int y); 47 | }; 48 | } 49 | } 50 | 51 | #endif //_XFX_INPUT_MOUSE_ 52 | -------------------------------------------------------------------------------- /include/System/Net/DnsEndPoint.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * DnsEndPoint.h * 3 | * * 4 | * System::Net::DnsEndPoint class definition file. * 5 | * Copyright (c) XFX Team. All rights reserved. * 6 | *****************************************************************************/ 7 | #ifndef _SYSTEM_NET_DNSENDPOINT_ 8 | #define _SYSTEM_NET_DNSENDPOINT_ 9 | 10 | #include "EndPoint.h" 11 | #include 12 | #include 13 | 14 | using namespace System::Net::Sockets; 15 | 16 | namespace System 17 | { 18 | namespace Net 19 | { 20 | /** 21 | * Represents a network endpoint as a host name or a string representation of an IP address and a port number. 22 | */ 23 | class DnsEndPoint : public EndPoint 24 | { 25 | private: 26 | AddressFamily_t addressFamily; 27 | int port; 28 | String host; 29 | 30 | public: 31 | AddressFamily_t getAddressFamily() const; 32 | const String getHost() const; 33 | int getPort() const; 34 | 35 | DnsEndPoint(const String& host, const int port); 36 | DnsEndPoint(const String& host, const int port, const AddressFamily_t addressFamily); 37 | 38 | bool Equals(Object const * const obj) const; 39 | int GetHashCode() const; 40 | const String ToString() const; 41 | }; 42 | } 43 | } 44 | 45 | #endif //_SYSTEM_NET_DNSENDPOINT_ 46 | -------------------------------------------------------------------------------- /include/System/UInt16.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * UInt16.h * 3 | * * 4 | * XFX System::UInt16 definition file * 5 | * Copyright (c) XFX Team. All Rights Reserved * 6 | *****************************************************************************/ 7 | #ifndef _SYSTEM_UINT16_ 8 | #define _SYSTEM_UINT16_ 9 | 10 | #include 11 | 12 | namespace System 13 | { 14 | class String; 15 | 16 | /** 17 | * Represents an unsigned, 16-bit integer. 18 | */ 19 | struct UInt16 : IComparable, IEquatable, Object 20 | { 21 | private: 22 | ushort value; 23 | 24 | public: 25 | static const ushort MaxValue; 26 | static const ushort MinValue; 27 | 28 | UInt16(); 29 | UInt16(const UInt16 &obj); 30 | UInt16(const ushort &obj); 31 | 32 | int CompareTo(const UInt16 other) const; 33 | bool Equals(Object const * const obj) const; 34 | bool Equals(const UInt16 other) const; 35 | int GetHashCode() const; 36 | static const Type& GetType(); 37 | const String ToString() const; 38 | static const String ToString(const ushort value); 39 | static bool TryParse(const String& str, out ushort* result); 40 | 41 | operator ushort() const; 42 | bool operator==(const UInt16& right) const; 43 | bool operator!=(const UInt16& right) const; 44 | }; 45 | } 46 | 47 | #endif //_SYSTEM_UINT16_ 48 | -------------------------------------------------------------------------------- /include/System/OperatingSystem.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * OperatingSystem.h * 3 | * * 4 | * XFX System::OperatingSystem class definition file * 5 | * Copyright (c) XFX Team. All Rights Reserved * 6 | *****************************************************************************/ 7 | #ifndef _SYSTEM_OPERATINGSYSTEM_ 8 | #define _SYSTEM_OPERATINGSYSTEM_ 9 | 10 | #include "Enums.h" 11 | #include 12 | #include 13 | 14 | namespace System 15 | { 16 | /** 17 | * Represents information about an operating system, such as the version and platform identifier. This class cannot be inherited. 18 | */ 19 | class OperatingSystem : public Object 20 | { 21 | private: 22 | OperatingSystem(); 23 | 24 | public: 25 | const PlatformID_t Platform; 26 | const System::Version Version; 27 | 28 | OperatingSystem(const PlatformID_t platform, const System::Version version); 29 | OperatingSystem(const OperatingSystem &obj); 30 | 31 | OperatingSystem Clone() const; 32 | bool Equals(const OperatingSystem other) const; 33 | int GetHashCode() const; 34 | static const Type& GetType(); 35 | const String ToString() const; 36 | 37 | bool operator !=(const OperatingSystem& right) const; 38 | bool operator ==(const OperatingSystem& right) const; 39 | }; 40 | } 41 | 42 | #endif //_SYSTEM_OPERATINGSYSTEM_ 43 | -------------------------------------------------------------------------------- /include/System/Windows/RoutedPropertyChangedEventArgs.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * RoutedPropertyChangedEventArgs.h * 3 | * * 4 | * System::Windows::RoutedPropertyChangedEventArgs definition file * 5 | * Copyright (c) XFX Team. All rights reserved * 6 | *****************************************************************************/ 7 | #ifndef _SYSTEM_WINDOWS_ROUTEDPROPERTYCHANGEDEVENTARGS_ 8 | #define _SYSTEM_WINDOWS_ROUTEDPROPERTYCHANGEDEVENTARGS_ 9 | 10 | #include 11 | 12 | namespace System 13 | { 14 | namespace Windows 15 | { 16 | template 17 | class RoutedPropertyChangedEventArgs : public RoutedEventArgs 18 | { 19 | public: 20 | const T OldValue; 21 | const T NewValue; 22 | 23 | RoutedPropertyChangedEventArgs(const T oldValue, const T newValue) 24 | : OldValue(oldValue), NewValue(newValue) 25 | { 26 | } 27 | }; 28 | 29 | template 30 | class RoutedPropertyChangedEventArgs : public RoutedEventArgs 31 | { 32 | public: 33 | T const * const OldValue; 34 | T const * const NewValue; 35 | 36 | RoutedPropertyChangedEventArgs(T const * const oldValue, T const * const newValue) 37 | : OldValue(oldValue), NewValue(newValue) 38 | { 39 | } 40 | }; 41 | } 42 | } 43 | 44 | #endif //_SYSTEM_WINDOWS_ROUTEDPROPERTYCHANGEDEVENTARGS_ 45 | -------------------------------------------------------------------------------- /include/Media/VideoPlayer.h: -------------------------------------------------------------------------------- 1 | /******************************************************** 2 | * VideoPlayer.h * 3 | * * 4 | * XFX VideoPlayer file * 5 | * Copyright (c) XFX Team. All Rights Reserved * 6 | ********************************************************/ 7 | #ifndef _XFX_MEDIA_VIDEOPLAYER_ 8 | #define _XFX_MEDIA_VIDEOPLAYER_ 9 | 10 | #include "Enums.h" 11 | #include 12 | #include 13 | 14 | using namespace System; 15 | using namespace XFX::Graphics; 16 | 17 | namespace XFX 18 | { 19 | namespace Media 20 | { 21 | class Video; 22 | 23 | /** 24 | * Provides methods and properties to playback, pause, resume, and stop video. VideoPlayer also exposes repeat, volume, and play position information. 25 | */ 26 | class VideoPlayer 27 | { 28 | private: 29 | bool isDisposed; 30 | Video* playingVideo; 31 | 32 | void Dispose(bool disposing); 33 | 34 | protected: 35 | ~VideoPlayer(); 36 | 37 | public: 38 | bool IsDisposed(); 39 | bool IsLooped; 40 | bool IsMuted; 41 | TimeSpan getPlayPosition(); 42 | MediaState_t getState(); 43 | Video* getVideo(); 44 | float Volume; 45 | 46 | VideoPlayer(); 47 | 48 | void Dispose(); 49 | Texture2D* GetTexture(); 50 | void Pause(); 51 | void Play(Video* video); 52 | void Resume(); 53 | void Stop(); 54 | }; 55 | } 56 | } 57 | 58 | #endif //_XFX_MEDIA_VIDEOPLAYER_ 59 | -------------------------------------------------------------------------------- /include/Storage/StorageDevice.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * StorageDevice.h * 3 | * * 4 | * XFX::Storage::StorageDevice class definition file * 5 | * Copyright (c) XFX Team. All Rights Reserved * 6 | *****************************************************************************/ 7 | #ifndef _XFX_STORAGE_STORAGEDEVICE_ 8 | #define _XFX_STORAGE_STORAGEDEVICE_ 9 | 10 | #include 11 | #include "../Enums.h" 12 | 13 | using namespace System; 14 | 15 | namespace XFX 16 | { 17 | namespace GamerServices 18 | { 19 | class Guide; 20 | } 21 | 22 | namespace Storage 23 | { 24 | class StorageContainer; 25 | 26 | /** 27 | * Represents a storage device for user data, such as a memory unit or hard drive. 28 | */ 29 | class StorageDevice : public Object 30 | { 31 | private: 32 | friend class XFX::GamerServices::Guide; 33 | 34 | PlayerIndex_t _playerIndex; 35 | unsigned int _deviceIndex; 36 | 37 | StorageDevice(unsigned int deviceIndex, PlayerIndex_t playerIndex); 38 | virtual ~StorageDevice(); 39 | 40 | public: 41 | long long FreeSpace() const; 42 | bool IsConnected() const; 43 | long long TotalSpace() const; 44 | 45 | static const Type& GetType(); 46 | StorageContainer* OpenContainer(const String& titleName); 47 | }; 48 | } 49 | } 50 | 51 | #endif //_XFX_STORAGE_STORAGEDEVICE_ 52 | -------------------------------------------------------------------------------- /include/System/Int64.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * Int64.h * 3 | * * 4 | * XFX System::Int64 structure definition file * 5 | * Copyright (c) XFX Team. All Rights Reserved * 6 | *****************************************************************************/ 7 | #ifndef _SYSTEM_INT64_ 8 | #define _SYSTEM_INT64_ 9 | 10 | #include 11 | 12 | namespace System 13 | { 14 | class String; 15 | 16 | /** 17 | * Represents a signed, 64-bit integer. 18 | */ 19 | struct Int64 : IComparable, IEquatable, Object 20 | { 21 | private: 22 | long long value; 23 | 24 | public: 25 | static const long long MaxValue; 26 | static const long long MinValue; 27 | 28 | Int64(); 29 | Int64(const Int64 &obj); 30 | Int64(const long long &obj); 31 | 32 | int CompareTo(const Int64 other) const; 33 | bool Equals(Object const * const obj) const; 34 | bool Equals(const Int64 other) const; 35 | int GetHashCode() const; 36 | static const Type& GetType(); 37 | const String ToString() const; 38 | static const String ToString(const long long value); 39 | static bool TryParse(const String& str, out long long* result); 40 | 41 | operator long long() const; 42 | bool operator==(const Int64& right) const; 43 | bool operator!=(const Int64& right) const; 44 | }; 45 | } 46 | 47 | #endif //_SYSTEM_INT64_ 48 | -------------------------------------------------------------------------------- /include/System/Windows/Controls/Canvas.h: -------------------------------------------------------------------------------- 1 | #ifndef _SYSTEM_WINDOWS_CONTROLS_CANVAS_ 2 | #define _SYSTEM_WINDOWS_CONTROLS_CANVAS_ 3 | 4 | #include 5 | 6 | namespace System 7 | { 8 | namespace Windows 9 | { 10 | namespace Controls 11 | { 12 | /** 13 | * Defines an area within which you can explicitly position child objects by using coordinates that are relative to the area. 14 | */ 15 | class Canvas : public Panel 16 | { 17 | protected: 18 | Size ArrangeOverride(const Size arrangeSize); 19 | Size MeasureOverride(const Size constraint); 20 | 21 | public: 22 | static const DependencyProperty LeftProperty; 23 | static const DependencyProperty TopProperty; 24 | static const DependencyProperty ZIndexProperty; 25 | 26 | Canvas(); 27 | 28 | static int GetLeft(UIElement * const element); 29 | static int GetTop(UIElement * const element); 30 | static int GetZIndex(UIElement * const element); 31 | static const Type& GetType(); 32 | static void SetLeft(UIElement * const element, const int left); 33 | static void SetTop(UIElement * const element, const int top); 34 | static void SetZIndex(UIElement * const element, const int zIndex); 35 | 36 | bool operator==(const Canvas& right) const; 37 | bool operator!=(const Canvas& right) const; 38 | }; 39 | } 40 | } 41 | } 42 | 43 | #endif //_SYSTEM_WINDOWS_CONTROLS_CANVAS_ 44 | -------------------------------------------------------------------------------- /include/System/FrameworkResources.h: -------------------------------------------------------------------------------- 1 | #ifndef _SYSTEM_FRAMEWORKRESOURCES_ 2 | #define _SYSTEM_FRAMEWORKRESOURCES_ 3 | 4 | namespace System 5 | { 6 | class FrameworkResources 7 | { 8 | private: 9 | FrameworkResources(); 10 | 11 | public: 12 | static const char* Arg_ParamName_Name; 13 | static const char* Argument_InvalidOffLen; 14 | static const char* Argument_InvalidSeekOrigin; 15 | static const char* ArgumentNull_Buffer; 16 | static const char* ArgumentNull_FileName; 17 | static const char* ArgumentNull_Generic; 18 | static const char* ArgumentNull_Path; 19 | static const char* ArgumentOutOfRange_Index; 20 | static const char* ArgumentOutOfRange_NeedNonNegNum; 21 | static const char* ArgumentOutOfRange_NeedPosNum; 22 | static const char* ArgumentOutOfRange_NegativeCapacity; 23 | static const char* ArgumentOutOfRange_SmallCapacity; 24 | static const char* ArgumentOutOfRange_StreamLength; 25 | static const char* IO_SeekBeforeBegin; 26 | static const char* IO_StreamTooLong; 27 | static const char* ObjectDisposed_FileClosed; 28 | static const char* ObjectDisposed_StreamClosed; 29 | static const char* NotSupported_MemStreamNotExpandable; 30 | static const char* NotSupported_UnreadableStream; 31 | static const char* NotSupported_UnseekableStream; 32 | static const char* NotSupported_UnwritableStream; 33 | static const char* UnauthorizedAccess_MemStreamBuffer; 34 | }; 35 | } 36 | 37 | #endif //_SYSTEM_FRAMEWORKRESOURCES_ 38 | -------------------------------------------------------------------------------- /include/System/Windows/Controls/Panel.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * Panel.h * 3 | * * 4 | * XFX System::Windows::Controls::Panel class definition file * 5 | * Copyright (c) XFX Team. All rights reserved * 6 | *****************************************************************************/ 7 | #ifndef _SYSTEM_WINDOWS_CONTROLS_PANEL_ 8 | #define _SYSTEM_WINDOWS_CONTROLS_PANEL_ 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | using namespace System::Windows::Media; 15 | 16 | namespace System 17 | { 18 | namespace Windows 19 | { 20 | namespace Controls 21 | { 22 | /** 23 | * Provides a base class for all System::Windows::Controls::Panel elements. Use System::Windows::Controls::Panel elements to position and arrange child objects in applications. 24 | */ 25 | class Panel : public FrameworkElement 26 | { 27 | protected: 28 | Panel(); 29 | 30 | public: 31 | Brush* Background; 32 | UIElementCollection Children; 33 | bool IsItemsHost() const; 34 | 35 | virtual ~Panel(); 36 | 37 | static const Type& GetType(); 38 | 39 | bool operator==(const Panel& right) const; 40 | bool operator!=(const Panel& right) const; 41 | }; 42 | } 43 | } 44 | } 45 | 46 | #endif //_SYSTEM_WINDOWS_CONTROLS_PANEL_ 47 | -------------------------------------------------------------------------------- /include/Graphics/DepthStencilBuffer.h: -------------------------------------------------------------------------------- 1 | #ifndef _XFX_GRAPHICS_DEPTHSTENCILBUFFER_ 2 | #define _XFX_GRAPHICS_DEPTHSTENCILBUFFER_ 3 | 4 | #include 5 | #include 6 | #include "Enums.h" 7 | 8 | using namespace System; 9 | 10 | namespace XFX 11 | { 12 | namespace Graphics 13 | { 14 | class GraphicsDevice; 15 | 16 | // Queries and prepares depth stencil buffers. 17 | class DepthStencilBuffer : public IDisposable, virtual Object 18 | { 19 | private: 20 | GraphicsDevice* _graphicsDevice; 21 | DepthFormat_t _format; 22 | bool isDisposed; 23 | int _multiSampleQuality; 24 | MultiSampleType_t _multiSampleType; 25 | 26 | protected: 27 | virtual void Dispose(bool __p1); 28 | 29 | public: 30 | DepthFormat_t Format(); 31 | GraphicsDevice* getGraphicsDevice(); 32 | bool IsDisposed(); 33 | int MultiSampleQuality(); 34 | MultiSampleType_t getMultiSampleType(); 35 | const int Height; 36 | const int Width; 37 | 38 | DepthStencilBuffer(GraphicsDevice* graphicsDevice, const int width, const int height, DepthFormat_t format); 39 | DepthStencilBuffer(GraphicsDevice* graphicsDevice, const int width, const int height, DepthFormat_t format, MultiSampleType_t multiSampleType, int multiSampleQuality); 40 | DepthStencilBuffer(const DepthStencilBuffer &obj); 41 | virtual ~DepthStencilBuffer(); 42 | 43 | void Dispose(); 44 | }; 45 | } 46 | } 47 | 48 | #endif //_XFX_GRAPHICS_DEPTHSTENCILBUFFER_ 49 | -------------------------------------------------------------------------------- /include/Graphics/VertexElement.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * VertexElement.h * 3 | * * 4 | * XFX::Graphics::VertexElement structure definition file * 5 | * Copyright (c) XFX Team. All Rights Reserved * 6 | *****************************************************************************/ 7 | #ifndef _XFX_GRAPHICS_VERTEXELEMENT_ 8 | #define _XFX_GRAPHICS_VERTEXELEMENT_ 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | using namespace System; 15 | 16 | namespace XFX 17 | { 18 | namespace Graphics 19 | { 20 | /** 21 | * Defines input vertex data to the pipeline. 22 | */ 23 | struct VertexElement : Object 24 | { 25 | int Offset; 26 | int UsageIndex; 27 | VertexElementFormat_t VertexElementFormat; 28 | VertexElementUsage_t VertexElementUsage; 29 | 30 | VertexElement(const int offset, const VertexElementFormat_t elementFormat, const VertexElementUsage_t elementUsage, const int usageIndex); 31 | VertexElement(const VertexElement &obj); 32 | 33 | bool Equals(Object const * const obj) const; 34 | int GetHashCode() const; 35 | static const Type& GetType(); 36 | const String ToString() const; 37 | 38 | bool operator!=(const VertexElement& other) const; 39 | bool operator==(const VertexElement& other) const; 40 | }; 41 | } 42 | } 43 | 44 | #endif //_XFX_GRAPHICS_VERTEXELEMENT_ 45 | -------------------------------------------------------------------------------- /include/Graphics/VertexBuffer.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * Rectangle.h * 3 | * * 4 | * XFX::Graphics::VertexBuffer class definition file * 5 | * Copyright (c) XFX Team. All Rights Reserved * 6 | *****************************************************************************/ 7 | #ifndef _XFX_GRAPHICS_VERTEXBUFFER_ 8 | #define _XFX_GRAPHICS_VERTEXBUFFER_ 9 | 10 | #include "GraphicsResource.h" 11 | #include "VertexDeclaration.h" 12 | 13 | namespace XFX 14 | { 15 | namespace Graphics 16 | { 17 | /** 18 | * Represents a list of 3D vertices to be streamed to the graphics device. 19 | */ 20 | class VertexBuffer : public GraphicsResource 21 | { 22 | public: 23 | VertexBuffer(); 24 | VertexBuffer(GraphicsDevice * const graphicsDevice, VertexDeclaration vertexDeclaration, int vertexCount, BufferUsage_t usage); 25 | 26 | template 27 | void GetData(int offsetInBytes, T data[], int startIndex, int elementCount, int vertexStride); 28 | template 29 | void GetData(T data[], int startIndex, int elementCount); 30 | static const Type& GetType(); 31 | template 32 | void SetData(int offsetInBytes, T data[], int startIndex, int elementCount, int vertexStride); 33 | template 34 | void SetData(T data[], int startIndex, int elementCount); 35 | }; 36 | } 37 | } 38 | 39 | #endif //_XFX_GRAPHICS_VERTEXBUFFER_ 40 | -------------------------------------------------------------------------------- /include/System/Net/IPEndPoint.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * IPEndPoint.h * 3 | * * 4 | * System::Net::IPEndPoint class definition file. * 5 | * Copyright (c) XFX Team. All rights reserved. * 6 | *****************************************************************************/ 7 | #ifndef _SYSTEM_NET_IPENDPOINT_ 8 | #define _SYSTEM_NET_IPENDPOINT_ 9 | 10 | #include 11 | #include 12 | 13 | namespace System 14 | { 15 | namespace Net 16 | { 17 | /** 18 | * Represents a network endpoint as an IP address and a port number. 19 | */ 20 | class IPEndPoint : public EndPoint 21 | { 22 | private: 23 | IPAddress address; 24 | int port; 25 | 26 | public: 27 | IPAddress getAddress() const; 28 | void setAddress(IPAddress value); 29 | AddressFamily_t getAddressFamily() const; 30 | int getPort() const; 31 | void setPort(const int value); 32 | 33 | static const int MaxPort = 65535; 34 | static const int MinPort = 0; 35 | 36 | IPEndPoint(const long long address, const int port); 37 | IPEndPoint(IPAddress * const address, const int port); 38 | 39 | EndPoint * Create(SocketAddress * const socketAddress); 40 | bool Equals(Object const * const obj) const; 41 | int GetHashCode() const; 42 | SocketAddress * Serialize(); 43 | const String ToString() const; 44 | }; 45 | } 46 | } 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /include/System/Windows/PropertyMetaData.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * PropertyMetaData.h * 3 | * * 4 | * System::Windows::PropertyMetaData definition file * 5 | * Copyright (c) XFX Team. All rights reserved * 6 | *****************************************************************************/ 7 | #ifndef _SYSTEM_WINDOWS_PROPERTYMETADATA_ 8 | #define _SYSTEM_WINDOWS_PROPERTYMETADATA_ 9 | 10 | namespace System 11 | { 12 | namespace Windows 13 | { 14 | /** 15 | * Defines certain behavior aspects of a dependency property, including conditions it was registered with. 16 | */ 17 | template 18 | class PropertyMetadata 19 | { 20 | public: 21 | /** 22 | * Gets the default value for the dependency property. 23 | */ 24 | T const DefaultValue; 25 | 26 | /** 27 | * Creates a new instance of the PropertyMetaData class using a property default value. 28 | * 29 | * @param defaultValue 30 | * A default value for the property where this System::Windows::PropertyMetadata is applied. 31 | */ 32 | PropertyMetadata(T defaultValue); 33 | }; 34 | 35 | /////////////////////////////////////////////////////////////////////// 36 | 37 | template 38 | PropertyMetadata::PropertyMetadata(T const defaultValue) 39 | : DefaultValue(defaultValue) 40 | { 41 | } 42 | } 43 | } 44 | 45 | #endif //_SYSTEM_WINDOWS_PROPERTYMETADATA_ 46 | -------------------------------------------------------------------------------- /include/Input/Keyboard.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * Keyboard.h * 3 | * * 4 | * XFX::Input::Keyboard class definition file. * 5 | * Copyright (c) XFX Team. All Rights Reserved. * 6 | *****************************************************************************/ 7 | #ifndef _XFX_INPUT_KEYBOARD_ 8 | #define _XFX_INPUT_KEYBOARD_ 9 | 10 | #include "Enums.h" 11 | 12 | namespace XFX 13 | { 14 | namespace Input 15 | { 16 | /** 17 | * Represents a state of keystrokes recorded by a keyboard input device. 18 | */ 19 | struct KeyboardState 20 | { 21 | KeyboardState(); 22 | KeyboardState(Keys_t keys[]); 23 | KeyboardState(const KeyboardState &obj); 24 | 25 | Keys_t* GetPressedKeys(); 26 | bool IsKeyDown(Keys_t key); 27 | bool IsKeyUp(Keys_t key); 28 | 29 | /** 30 | * Returns the state of a particular key. 31 | * 32 | * @param key 33 | * Enumerated value representing the key to query. 34 | */ 35 | const KeyState_t operator[](const Keys_t key) const; 36 | 37 | private: 38 | Keys_t* pressedKeys; 39 | }; 40 | 41 | /** 42 | * Allows retrieval of keystrokes from a keyboard input device. 43 | */ 44 | class Keyboard 45 | { 46 | private: 47 | Keyboard(); //Private constructor to prevent instantiation. 48 | 49 | public: 50 | static KeyboardState GetState(); 51 | }; 52 | } 53 | } 54 | 55 | #endif //_XFX_INPUT_KEYBOARD_ 56 | -------------------------------------------------------------------------------- /include/System/Collections/Generic/KeyValuePair.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * KeyValuePair.h * 3 | * * 4 | * XFX System::Collections::Generic::KeyValuePair structure definition file * 5 | * Copyright (c) XFX Team. All Rights Reserved * 6 | *****************************************************************************/ 7 | #ifndef _SYSTEM_COLLECTIONS_GENERIC_KEYVALUEPAIR_ 8 | #define _SYSTEM_COLLECTIONS_GENERIC_KEYVALUEPAIR_ 9 | 10 | #include 11 | #include 12 | 13 | namespace System 14 | { 15 | namespace Collections 16 | { 17 | namespace Generic 18 | { 19 | /** 20 | * Defines a key/value pair that can be set or retrieved. 21 | */ 22 | template 23 | struct KeyValuePair : public Object 24 | { 25 | public: 26 | const TKey Key; 27 | const TValue Value; 28 | 29 | KeyValuePair(const TKey& key, const TValue& value) 30 | : Key(key), Value(value) 31 | { 32 | } 33 | 34 | KeyValuePair(const KeyValuePair &obj) 35 | : Key(obj.Key), Value(obj.Value) 36 | { 37 | } 38 | 39 | const Type& GetType() 40 | { 41 | static const Type KeyValuePairTypeInfo("KeyValuePair", "System::Collections::Generic::KeyValuePair", TypeCode::Object, true); 42 | 43 | return KeyValuePairTypeInfo; 44 | } 45 | }; 46 | } 47 | } 48 | } 49 | 50 | #endif //_SYSTEM_COLLECTIONS_GENERIC_KEYVALUEPAIR_ 51 | -------------------------------------------------------------------------------- /include/System/Windows/CornerRadius.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * CornerRadius.h * 3 | * * 4 | * System::Windows::CornerRadius definition file * 5 | * Copyright (c) XFX Team. All rights reserved * 6 | *****************************************************************************/ 7 | #ifndef _SYSTEM_WINDOWS_CORNERRADIUS_ 8 | #define _SYSTEM_WINDOWS_CORNERRADIUS_ 9 | 10 | #include 11 | 12 | namespace System 13 | { 14 | namespace Windows 15 | { 16 | /** 17 | * Describes the characteristics of a rounded corner, such as can be applied to a System::Windows::Controls::Border. 18 | */ 19 | struct CornerRadius : IEquatable, Object 20 | { 21 | public: 22 | int BottomLeft; 23 | int BottomRight; 24 | int TopLeft; 25 | int TopRight; 26 | 27 | CornerRadius(); 28 | CornerRadius(const int uniformValue); 29 | CornerRadius(const int bottomLeft, const int bottomRight, const int topLeft, const int topRight); 30 | CornerRadius(const CornerRadius &obj); 31 | 32 | bool Equals(Object const * const obj) const; 33 | bool Equals(const CornerRadius other) const; 34 | int GetHashCode() const; 35 | static const Type& GetType(); 36 | const String ToString() const; 37 | 38 | bool operator==(const CornerRadius& right) const; 39 | bool operator!=(const CornerRadius& right) const; 40 | }; 41 | } 42 | } 43 | 44 | #endif //_SYSTEM_WINDOWS_CORNERRADIUS_ 45 | -------------------------------------------------------------------------------- /include/Input/GamePadTriggers.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * GamePadTriggers.h * 3 | * * 4 | * XFX::Input::GamePadTriggers structure definition file * 5 | * Copyright (c) XFX Team. All Rights Reserved * 6 | *****************************************************************************/ 7 | #ifndef _XFX_INPUT_GAMEPADTRIGGERS_ 8 | #define _XFX_INPUT_GAMEPADTRIGGERS_ 9 | 10 | #include 11 | 12 | using namespace System; 13 | 14 | namespace XFX 15 | { 16 | namespace Input 17 | { 18 | /** 19 | * Structure that defines the position of the left and right triggers on an Xbox Controller. 20 | */ 21 | struct GamePadTriggers : Object 22 | { 23 | const float Left; 24 | const float Right; 25 | 26 | GamePadTriggers(const float left, const float right); 27 | GamePadTriggers(); 28 | GamePadTriggers(const GamePadTriggers &obj); 29 | 30 | bool Equals(Object const * const obj) const; 31 | bool Equals(const GamePadTriggers obj) const; 32 | int GetHashCode() const; 33 | static const Type& GetType(); 34 | const String ToString() const; 35 | 36 | bool operator!=(const GamePadTriggers& right) const; 37 | bool operator==(const GamePadTriggers& right) const; 38 | 39 | inline GamePadTriggers operator=(const GamePadTriggers& right) 40 | { 41 | return (right == *this) ? *this : GamePadTriggers(right); 42 | } 43 | }; 44 | } 45 | } 46 | 47 | #endif //_XFX_INPUT_GAMEPADTRIGGERS_ 48 | -------------------------------------------------------------------------------- /include/Audio/Enums.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * Enums.h * 3 | * * 4 | * XFX::Audio enumerations definition file * 5 | * Copyright (c) XFX Team. All Rights Reserved * 6 | *****************************************************************************/ 7 | #ifndef _XFX_AUDIO_ENUMS_ 8 | #define _XFX_AUDIO_ENUMS_ 9 | 10 | namespace XFX 11 | { 12 | namespace Audio 13 | { 14 | struct AudioChannels 15 | { 16 | enum type 17 | { 18 | // Indicates audio data is contained in one channel. 19 | Mono = 1, 20 | // Indicates audio data is contained in two channels. 21 | Stereo = 2 22 | }; 23 | }; 24 | 25 | struct AudioStopOptions 26 | { 27 | enum type 28 | { 29 | AsAuthored, 30 | Immediate 31 | }; 32 | }; 33 | 34 | struct SoundState 35 | { 36 | enum type 37 | { 38 | // The SoundEffectInstance is playing. 39 | Playing, 40 | // The SoundEffectInstance is paused. 41 | Paused, 42 | // The SoundEffectInstance is stopped. 43 | Stopped 44 | }; 45 | }; 46 | 47 | typedef AudioChannels::type AudioChannels_t; // Defines the number of audio channels in the audio data. 48 | typedef AudioStopOptions::type AudioStopOptions_t; // Controls how Cue objects should stop when Cue::Stop is called. 49 | typedef SoundState::type SoundState_t; // Current state (playing, paused, or stopped) of a SoundEffectInstance. 50 | } 51 | } 52 | 53 | #endif //_XFX_AUDIO_ENUMS_ 54 | -------------------------------------------------------------------------------- /include/CurveKey.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * CurveKey.h * 3 | * * 4 | * XFX::CurveKey class declaration file * 5 | * Copyright (c) XFX Team. All Rights Reserved * 6 | *****************************************************************************/ 7 | #ifndef _XFX_CURVEKEY_ 8 | #define _XFX_CURVEKEY_ 9 | 10 | #include 11 | #include "Enums.h" 12 | 13 | using namespace System; 14 | 15 | namespace XFX 16 | { 17 | /** 18 | * Represents a point in a multi-point curve. 19 | */ 20 | class CurveKey : public IComparable, public IEquatable, public Object 21 | { 22 | private: 23 | float position; 24 | 25 | public: 26 | CurveContinuity_t Continuity; 27 | float getPosition() const; 28 | float TangentIn; 29 | float TangentOut; 30 | float Value; 31 | 32 | CurveKey(float position, float value); 33 | CurveKey(float position, float value, float tangentIn, float tangentOut); 34 | CurveKey(float position, float value, float tangentIn, float tangentOut, CurveContinuity_t continuity); 35 | 36 | CurveKey Clone(); 37 | int CompareTo(const CurveKey other) const; 38 | bool Equals(Object const * const obj) const; 39 | bool Equals(const CurveKey other) const; 40 | int GetHashCode() const; 41 | static const Type& GetType(); 42 | 43 | bool operator!=(const CurveKey& right) const; 44 | bool operator==(const CurveKey& right) const; 45 | }; 46 | } 47 | 48 | #endif //_XFX_CURVEKEY_ 49 | -------------------------------------------------------------------------------- /include/Ray.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * Ray.h * 3 | * * 4 | * XFX::Ray definition file * 5 | * Copyright (c) XFX Team. All Rights Reserved * 6 | *****************************************************************************/ 7 | #ifndef _XFX_RAY_ 8 | #define _XFX_RAY_ 9 | 10 | #include 11 | 12 | using namespace System; 13 | 14 | namespace XFX 15 | { 16 | struct BoundingBox; 17 | struct BoundingSphere; 18 | struct Plane; 19 | struct Vector3; 20 | 21 | /** 22 | * Defines a ray. 23 | */ 24 | struct Ray : IEquatable, Object 25 | { 26 | Vector3 Direction; 27 | Vector3 Position; 28 | 29 | Ray(const Vector3 direction, const Vector3 position); 30 | Ray(const Ray &obj); 31 | Ray(); 32 | 33 | bool Equals(Object const * const obj) const; 34 | bool Equals(const Ray other) const; 35 | int GetHashCode() const; 36 | static const Type& GetType(); 37 | float Intersects(BoundingBox boundingbox) const; 38 | void Intersects(BoundingBox boundingbox, out float& result) const; 39 | float Intersects(BoundingSphere sphere) const; 40 | void Intersects(BoundingSphere sphere, out float& result) const; 41 | float Intersects(Plane plane) const; 42 | void Intersects(Plane plane, out float& result) const; 43 | const String ToString() const; 44 | 45 | bool operator==(const Ray& right) const; 46 | bool operator!=(const Ray& right) const; 47 | }; 48 | } 49 | 50 | #endif //_XFX_RAY_ 51 | -------------------------------------------------------------------------------- /include/CurveKeyCollection.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * CurveKeyCollection.h * 3 | * * 4 | * XFX::CurveKeyCollection class declaration file * 5 | * Copyright (c) XFX Team. All Rights Reserved * 6 | *****************************************************************************/ 7 | #ifndef _XFX_CURVEKEYCOLLECTION_ 8 | #define _XFX_CURVEKEYCOLLECTION_ 9 | 10 | #include "CurveKey.h" 11 | #include 12 | 13 | using namespace System; 14 | using namespace System::Collections::Generic; 15 | 16 | namespace XFX 17 | { 18 | /** 19 | * Contains the CurveKeys making up a Curve. 20 | */ 21 | class CurveKeyCollection : public ICollection 22 | { 23 | private: 24 | bool isReadOnly; 25 | List innerList; 26 | 27 | public: 28 | int Count() const; 29 | bool IsReadOnly() const; 30 | 31 | CurveKeyCollection(); 32 | 33 | void Add(const CurveKey& item); 34 | void Clear(); 35 | CurveKeyCollection Clone() const; 36 | bool Contains(const CurveKey& item) const; 37 | void CopyTo(CurveKey array[], int arrayIndex) const; 38 | static const Type& GetType(); 39 | int IndexOf(const CurveKey& item) const; 40 | bool Remove(const CurveKey& item); 41 | void RemoveAt(int index); 42 | 43 | CurveKey& operator [](int index) const; 44 | void set(int index, const CurveKey& value); // function to set, because custom action is needed 45 | }; 46 | } 47 | 48 | #endif //_XFX_CURVEKEYCOLLECTION_ 49 | -------------------------------------------------------------------------------- /include/Graphics/AlphaTestEffect.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * AlphaTestEffect.h * 3 | * * 4 | * XFX::Graphics::AlphaTestEffect definition file * 5 | * Copyright (c) XFX Team. All Rights Reserved * 6 | *****************************************************************************/ 7 | #ifndef _XFX_GRAPHICS_ALPHATESTEFFECT_ 8 | #define _XFX_GRAPHICS_ALPHATESTEFFECT_ 9 | 10 | #include "Effect.h" 11 | #include 12 | #include 13 | 14 | using namespace System; 15 | 16 | namespace XFX 17 | { 18 | namespace Graphics 19 | { 20 | class Texture2D; 21 | 22 | /** 23 | * Contains a configurable effect that supports alpha testing. 24 | */ 25 | class AlphaTestEffect : public Effect 26 | { 27 | private: 28 | static byte effectCode[]; 29 | 30 | protected: 31 | AlphaTestEffect(AlphaTestEffect const * const cloneSource); 32 | 33 | void OnApply(); 34 | 35 | public: 36 | float Alpha; 37 | CompareFunction_t AlphaFunction; 38 | Vector3 DiffuseColor; 39 | Vector3 FogColor; 40 | bool FogEnabled; 41 | float FogEnd; 42 | float FogStart; 43 | Matrix Projection; 44 | int ReferenceAlpha; 45 | Texture2D* Texture; 46 | bool VertexColorEnabled; 47 | Matrix View; 48 | Matrix World; 49 | 50 | AlphaTestEffect(GraphicsDevice * const device); 51 | 52 | Effect* Clone() const; 53 | static const Type& GetType(); 54 | }; 55 | } 56 | } 57 | 58 | #endif //_XFX_GRAPHICS_ALPHATESTEFFECT_ 59 | -------------------------------------------------------------------------------- /include/System/Console.h: -------------------------------------------------------------------------------- 1 | #ifndef _SYSTEM_CONSOLE_ 2 | #define _SYSTEM_CONSOLE_ 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | namespace System 9 | { 10 | class Console 11 | { 12 | private: 13 | Console(); 14 | 15 | public: 16 | static void Clear(); 17 | static void Write(const bool value); 18 | static void Write(const byte value); 19 | static void Write(const char value); 20 | static void Write(const char value[]); 21 | static void Write(const char value[], const int index, const int count); 22 | static void Write(const double value); 23 | static void Write(const int value); 24 | static void Write(const long long value); 25 | static void Write(const Object* value); 26 | static void Write(const float value); 27 | static void Write(const short value); 28 | static void Write(const String& value); 29 | static void WriteLine(); 30 | static void WriteLine(const bool value); 31 | static void WriteLine(const byte value); 32 | static void WriteLine(const char value); 33 | static void WriteLine(const char value[]); 34 | static void WriteLine(const char value[], const int index, const int count); 35 | static void WriteLine(const double value); 36 | static void WriteLine(const int value); 37 | static void WriteLine(const long long value); 38 | static void WriteLine(const Object* value); 39 | static void WriteLine(const float value); 40 | static void WriteLine(const short value); 41 | static void WriteLine(const String& value); 42 | }; 43 | } 44 | 45 | #endif //_SYSTEM_CONSOLE_ 46 | -------------------------------------------------------------------------------- /src/libSystem.Xml/makefile: -------------------------------------------------------------------------------- 1 | # 2 | # update this variable to wherever you installed the OpenXDK libraries 3 | # 4 | ######################################################################### 5 | PREFIX = /openxdk 6 | 7 | CC = xbox-gcc 8 | CCAS = xbox-gcc 9 | CPP = xbox-g++ 10 | AR = xbox-ar rcu 11 | RANLIB = xbox-ranlib 12 | CXBE = $(PREFIX)/bin/cxbe 13 | 14 | SDLFLAGS = -DENABLE_XBOX -DDEBUG 15 | CC_FLAGS = -c -g -std=gnu99 -ffreestanding -nostdlib -fno-builtin -fno-exceptions -march=i686 $(SDLFLAGS) 16 | CCAS_FLAGS = -g -O2 17 | CPP_FLAGS = -c -O2 -Wall -nostdlib -fno-builtin -mno-cygwin -march=i686 $(SDLFLAGS) 18 | INCLUDE = -I$(PREFIX)/i386-pc-xbox/include -I$(PREFIX)/include -I$(PREFIX)/include/SDL -I../../include 19 | 20 | CLINK = -nostdlib 21 | ALIGN = -Wl,--file-alignment,0x20 -Wl,--section-alignment,0x20 22 | SHARED = -shared 23 | ENTRYPOINT = -Wl,--entry,_WinMainCRTStartup 24 | STRIP = -Wl,--strip-all 25 | LD_FLAGS = $(CLINK) $(ALIGN) $(SHARED) $(ENTRYPOINT) $(STRIP) 26 | LD_DIRS = -L$(PREFIX)/i386-pc-xbox/lib -L$(PREFIX)/lib 27 | LD_LIBS = $(LD_DIRS) -lmscorlib -lm -lopenxdk -lhal -lc -lusb -lc -lxboxkrnl -lc -lhal -lxboxkrnl -lhal -lopenxdk -lc -lgcc -lstdc++ 28 | 29 | OBJS = 30 | 31 | all: libSystem.Xml.a 32 | 33 | rebuild: clean libSystem.Xml.a 34 | 35 | libSystem.Xml.a: $(OBJS) 36 | $(AR) $@ $(OBJS) 37 | $(RANLIB) $@ 38 | 39 | .c.o: 40 | $(CC) -c $< $(CC_FLAGS) $(INCLUDE) 41 | 42 | .cpp.o: 43 | $(CPP) -c $< $(CPP_FLAGS) $(INCLUDE) 44 | 45 | .s.o: 46 | $(CCAS) -c $< $(CCAS_FLAGS) 47 | 48 | clean: 49 | rm -f *.o *.exe *.dll *.xbe *.cxbe *.lib *.a 50 | -------------------------------------------------------------------------------- /include/Graphics.h: -------------------------------------------------------------------------------- 1 | /******************************************************** 2 | * Graphics.h * 3 | * * 4 | * XFX::Graphics namespace include file * 5 | * Copyright (c) XFX Team. All Rights Reserved * 6 | ********************************************************/ 7 | #ifndef _XFX_GRAPHICS_ 8 | #define _XFX_GRAPHICS_ 9 | 10 | // 11 | //Data Types 12 | // 13 | #include "Graphics/BasicEffect.h" 14 | #include "Graphics/BlendState.h" 15 | #include "Graphics/Color.h" 16 | #include "Graphics/DepthStencilState.h" 17 | #include "Graphics/DirectionalLight.h" 18 | #include "Graphics/DisplayMode.h" 19 | #include "Graphics/DisplayModeCollection.h" 20 | #include "Graphics/Effect.h" 21 | #include "Graphics/EffectParameter.h" 22 | #include "Graphics/GraphicsAdapter.h" 23 | #include "Graphics/GraphicsDevice.h" 24 | #include "Graphics/GraphicsResource.h" 25 | #include "Graphics/PresentationParameters.h" 26 | #include "Graphics/RenderTarget.h" 27 | #include "Graphics/RenderTarget2D.h" 28 | #include "Graphics/SpriteBatch.h" 29 | #include "Graphics/SpriteFont.h" 30 | #include "Graphics/Texture.h" 31 | #include "Graphics/Texture2D.h" 32 | #include "Graphics/TextureCollection.h" 33 | #include "Graphics/VertexElement.h" 34 | #include "Graphics/VertexPositionColor.h" 35 | #include "Graphics/VertexPositionNormalTexture.h" 36 | #include "Graphics/VertexPositionTexture.h" 37 | #include "Graphics/Viewport.h" 38 | // 39 | //Enums 40 | // 41 | #include "Graphics/Enums.h" 42 | // 43 | //Interfaces 44 | // 45 | #include "Graphics/IGraphicsDeviceService.h" 46 | 47 | #endif //_GRAPHICS_ 48 | -------------------------------------------------------------------------------- /include/Graphics/VertexPositionColor.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * VertexPositionColor.h * 3 | * * 4 | * XFX::Graphics::VertexPositionColor structure definition file * 5 | * Copyright (c) XFX Team. All Rights Reserved * 6 | *****************************************************************************/ 7 | #ifndef _XFX_GRAPHICS_VERTEXPOSITIONCOLOR_ 8 | #define _XFX_GRAPHICS_VERTEXPOSITIONCOLOR_ 9 | 10 | #include "Color.h" 11 | #include 12 | #include "IVertexType.h" 13 | #include "VertexElement.h" 14 | 15 | using namespace System; 16 | 17 | namespace XFX 18 | { 19 | namespace Graphics 20 | { 21 | /** 22 | * Describes a custom vertex format structure that contains position and color information. 23 | */ 24 | struct VertexPositionColor : IVertexType, Object 25 | { 26 | private: 27 | static const VertexElement vertexArray[]; 28 | 29 | public: 30 | Vector3 Position; 31 | XFX::Graphics::Color Color; 32 | 33 | VertexDeclaration getVertexDeclaration() const; 34 | 35 | VertexPositionColor(); 36 | VertexPositionColor(const Vector3 position, const XFX::Graphics::Color color); 37 | 38 | bool Equals(Object const * const obj) const; 39 | int GetHashCode() const; 40 | static const Type& GetType(); 41 | const String ToString() const; 42 | 43 | bool operator!=(const VertexPositionColor& other) const; 44 | bool operator==(const VertexPositionColor& other) const; 45 | }; 46 | } 47 | } 48 | 49 | #endif //_XFX_GRAPHICS_VERTEXPOSITIONCOLOR_ 50 | -------------------------------------------------------------------------------- /include/Graphics/VertexPositionTexture.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * VertexPositionTexture.h * 3 | * * 4 | * XFX::Graphics::VertexPositionTexture structure definition file * 5 | * Copyright (c) XFX Team. All Rights Reserved * 6 | *****************************************************************************/ 7 | #ifndef _XFX_GRAPHICS_VERTEXPOSITIONTEXTURE_ 8 | #define _XFX_GRAPHICS_VERTEXPOSITIONTEXTURE_ 9 | 10 | #include "IVertexType.h" 11 | #include "VertexDeclaration.h" 12 | 13 | namespace XFX 14 | { 15 | struct Vector2; 16 | struct Vector3; 17 | 18 | namespace Graphics 19 | { 20 | /** 21 | * Describes a custom vertex format structure that contains position and one set of texture coordinates. 22 | */ 23 | struct VertexPositionTexture : IVertexType, Object 24 | { 25 | private: 26 | static const VertexElement vertexArray[]; 27 | 28 | public: 29 | Vector3 Position; 30 | Vector2 TextureCoordinate; 31 | VertexDeclaration getVertexDeclaration() const; 32 | 33 | VertexPositionTexture(); 34 | VertexPositionTexture(const Vector3 position, const Vector2 textureCoordinate); 35 | 36 | bool Equals(Object const * const obj) const; 37 | int GetHashCode() const; 38 | static const Type& GetType(); 39 | const String ToString() const; 40 | 41 | bool operator!=(const VertexPositionTexture& other) const; 42 | bool operator==(const VertexPositionTexture& other) const; 43 | }; 44 | } 45 | } 46 | 47 | #endif //_XFX_GRAPHICS_VERTEXPOSITIONTEXTURE_ 48 | -------------------------------------------------------------------------------- /include/System/Types.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * Types.h * 3 | * * 4 | * Defines types for the entire XFX Framework * 5 | * Copyright (c) XFX Team. All Rights Reserved * 6 | *****************************************************************************/ 7 | #ifndef _SYSTEM_TYPES_ 8 | #define _SYSTEM_TYPES_ 9 | 10 | #ifndef NULL 11 | #define NULL 0 12 | #endif 13 | 14 | namespace System 15 | { 16 | // Type definitions 17 | // 18 | /* SIGNED */ 19 | typedef signed char sbyte; 20 | typedef signed int IntPtr; 21 | /* UNSIGNED */ 22 | typedef unsigned char byte; 23 | typedef unsigned short ushort; 24 | typedef unsigned int uint; 25 | typedef unsigned long long ulong; 26 | typedef unsigned int UIntPtr; 27 | 28 | /* OTHER */ 29 | #define null NULL 30 | } 31 | 32 | // Other typedefs 33 | // 34 | #define interface class 35 | 36 | // Hints that the following parameter is an output 37 | #define out 38 | 39 | #if _MSC_VER 40 | #define __attribute__(x) 41 | #endif 42 | 43 | // Aligning Data types 44 | // 45 | #define ALIGNED4 __attribute__((aligned (4))) 46 | #define ALIGNED8 __attribute__((aligned (8))) 47 | #define ALIGNED16 __attribute__((aligned (16))) 48 | 49 | #if _MSC_VER 50 | #define FORMAT(...) __attribute__((format(__VA_ARGS__))) 51 | #define NONNULL(...) __attribute__((nonnull(__VA_ARGS__))) 52 | #else 53 | #define FORMAT(x...) __attribute__((format(x))) 54 | #define NONNULL(x...) __attribute__((nonnull(x))) 55 | #endif 56 | 57 | #endif //_SYSTEM_TYPES_ 58 | -------------------------------------------------------------------------------- /include/Storage/StorageContainer.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * StorageContainer.h * 3 | * * 4 | * XFX::Storage::StorageContainer class definition file * 5 | * Copyright (c) XFX Team. All Rights Reserved * 6 | *****************************************************************************/ 7 | #ifndef _XFX_STORAGE_STORAGECONTAINER_ 8 | #define _XFX_STORAGE_STORAGECONTAINER_ 9 | 10 | #include 11 | #include 12 | #include 13 | #include "../Enums.h" 14 | 15 | using namespace System; 16 | using namespace System::IO; 17 | 18 | namespace XFX 19 | { 20 | namespace Storage 21 | { 22 | class StorageDevice; 23 | 24 | /** 25 | * Represents a logical collection of storage files. 26 | */ 27 | class StorageContainer : public IDisposable, public Object 28 | { 29 | friend class StorageDevice; 30 | 31 | private: 32 | bool isDisposed; 33 | DirectoryInfo containerFolder; 34 | StorageDevice* device; 35 | PlayerIndex_t playerIndex; 36 | String titleName; 37 | 38 | void Dispose(bool disposing); 39 | virtual ~StorageContainer(); 40 | 41 | public: 42 | EventHandler Disposing; 43 | 44 | bool IsDisposed() const; 45 | const String Path() const; 46 | StorageDevice* getStorageDevice() const; 47 | static const String TitleLocation(); 48 | const String TitleName() const; 49 | 50 | void Delete(); 51 | void Dispose(); 52 | }; 53 | } 54 | } 55 | 56 | #endif //_XFX_STORAGE_STORAGECONTAINER_ 57 | -------------------------------------------------------------------------------- /include/GameComponentCollection.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * GameComponentCollection.h * 3 | * * 4 | * XFX GameComponentCollection definition file * 5 | * Copyright (c) XFX Team. All Rights Reserved * 6 | *****************************************************************************/ 7 | #ifndef _XFX_GAMECOMPONENTCOLLECTION_ 8 | #define _XFX_GAMECOMPONENTCOLLECTION_ 9 | 10 | #include "Interfaces.h" 11 | #include 12 | #include 13 | #include 14 | 15 | using namespace System; 16 | using namespace System::Collections::Generic; 17 | 18 | namespace XFX 19 | { 20 | /** 21 | * A collection of game components. 22 | */ 23 | class GameComponentCollection : public Object 24 | { 25 | private: 26 | List _components; 27 | 28 | protected: 29 | void ClearItems(); 30 | void InsertItem(const int index, IGameComponent * const item); 31 | void RemoveItem(const int index); 32 | void SetItem(const int index, IGameComponent * const item); 33 | 34 | public: 35 | int Count() const; 36 | 37 | GameComponentCollection(); 38 | virtual ~GameComponentCollection(); 39 | IGameComponent* operator[](const int index); 40 | 41 | static const Type& GetType(); 42 | 43 | Event ComponentAdded; 44 | Event ComponentRemoved; 45 | }; 46 | } 47 | 48 | #endif //_XFX_GAMECOMPONENTCOLLECTION_ 49 | -------------------------------------------------------------------------------- /include/System/Windows/Controls/TextBox.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * TextBox.h * 3 | * * 4 | * System::Windows::Controls::TextBox definition file * 5 | * Copyright (c) XFX Team. All rights reserved * 6 | *****************************************************************************/ 7 | #ifndef _SYSTEM_WINDOWS_CONTROLS_TEXTBOX_ 8 | #define _SYSTEM_WINDOWS_CONTROLS_TEXTBOX_ 9 | 10 | #include 11 | #include 12 | 13 | namespace System 14 | { 15 | namespace Windows 16 | { 17 | namespace Controls 18 | { 19 | class TextBox : public Control 20 | { 21 | private: 22 | int selectionLength; 23 | int selectionStart; 24 | String _text; 25 | 26 | public: 27 | /** 28 | * Gets a value that determines if the user can change the text in the text box. 29 | */ 30 | bool getIsReadOnly() const; 31 | /** 32 | * Sets a value that determines if the user can change the text in the text box. 33 | */ 34 | void setIsReadOnly(const bool value); 35 | 36 | static const DependencyProperty IsReadOnlyProperty; 37 | 38 | String getSelectedText() const; 39 | String getText() const; 40 | void setText(const String& value); 41 | 42 | TextBox(); 43 | 44 | static const Type& GetType(); 45 | void Select(const int start, const int length); 46 | void SelectAll(); 47 | const String ToString() const; 48 | }; 49 | } 50 | } 51 | } 52 | 53 | #endif //_SYSTEM_WINDOWS_CONTROLS_TEXTBOX_ 54 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # XFXFramework 2 | ## C++ implementation of XNA For XBOX 3 | 4 | XFX, or [XNA](http://en.wikipedia.org/wiki/Microsoft_XNA) for [XBOX](http://en.wikipedia.org/wiki/Xbox_(console)) is an implementation of [XNA](http://en.wikipedia.org/wiki/Microsoft_XNA) 4.0, written in C++ for Microsofts [XBOX](http://en.wikipedia.org/wiki/Xbox_(console)) console. 5 | It's written on top of [OpenXDK](http://sourceforge.net/projects/openxdk/), the open source, free, legal XBOX Development Kit. 6 | 7 | XFX is an attempt to bring development for the original [XBOX](http://en.wikipedia.org/wiki/Xbox_(console)) console to the masses by wrapping all low-level code in the familiar XNA classes. 8 | Being written in C++ allows XFX to be lightweight and as close to the hardware as possible. 9 | 10 | Compiling XFX requires at least OpenXDK version 0.7 11 | 12 | ## Contents 13 | As of this writing, XFX Contains the following libraries: 14 | * libmscorlib - Provides the necessary classes found in mscorlib.dll to support the other libraries 15 | * libSystem - Implements any types in the System.dll required by the other libs 16 | * libSystem.Windows - A re-implementation of the System.Windows.dll found on Windows Phone, to allow the creation of GUI-driven applications 17 | * libSystem.Xml - Implements the functions found in System.Xml.dll and System.Xml.Serialization.dll 18 | * libXFX - Implements the functions found in Microsoft.Xna.Framework.dll 19 | * libXFX.Game - Implements the functions found in Microsoft.Xna.Framework.Game.dll 20 | 21 | XFX Supports loading assets both from precompiled .XNB files and most XNA-compatible formats. 22 | -------------------------------------------------------------------------------- /include/Graphics/PresentationParameters.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * PresentationParameters.h * 3 | * * 4 | * XFX::Graphics::PresentationParameters class definition file * 5 | * Copyright (c) XFX Team. All Rights Reserved * 6 | *****************************************************************************/ 7 | #ifndef _XFX_GRAPHICS_PRESENTATIONPARAMETERS_ 8 | #define _XFX_GRAPHICS_PRESENTATIONPARAMETERS_ 9 | 10 | #include 11 | #include "Enums.h" 12 | 13 | using namespace System; 14 | 15 | namespace XFX 16 | { 17 | struct Rectangle; 18 | 19 | namespace Graphics 20 | { 21 | /** 22 | * Contains presentation parameters. 23 | */ 24 | class PresentationParameters : public Object 25 | { 26 | public: 27 | SurfaceFormat_t BackBufferFormat; 28 | int BackBufferHeight; 29 | int BackBufferWidth; 30 | Rectangle getBounds() const; 31 | DepthFormat_t DepthStencilFormat; 32 | bool IsFullScreen; 33 | int MultiSampleCount; 34 | PresentInterval_t PresentationInterval; 35 | RenderTargetUsage_t RenderTargetUsage; 36 | 37 | PresentationParameters(); 38 | 39 | PresentationParameters* Clone() const; 40 | bool Equals(Object const * const obj) const; 41 | bool Equals(const PresentationParameters other) const; 42 | static const Type& GetType(); 43 | 44 | bool operator!=(const PresentationParameters& other) const; 45 | bool operator==(const PresentationParameters& other) const; 46 | }; 47 | } 48 | } 49 | 50 | #endif //_XFX_GRAPHICS_PRESENTATIONPARAMETERS_ 51 | -------------------------------------------------------------------------------- /include/Curve.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * Curve.h * 3 | * * 4 | * XFX::Curve class declaration file * 5 | * Copyright (c) XFX Team. All Rights Reserved * 6 | *****************************************************************************/ 7 | #ifndef _XFX_CURVE_ 8 | #define _XFX_CURVE_ 9 | 10 | #include 11 | #include "CurveKeyCollection.h" 12 | 13 | using namespace System; 14 | 15 | namespace XFX 16 | { 17 | /** 18 | * Stores an arbitrary collection of 2D CurveKey points, and provides methods for evaluating features of the curve they define. 19 | */ 20 | class Curve 21 | { 22 | private: 23 | CurveKeyCollection keys; 24 | 25 | float GetCurvePosition(float position); 26 | int GetNumberOfCycle(float position); 27 | 28 | public: 29 | bool IsConstant() const; 30 | CurveKeyCollection getKeys() const; 31 | CurveLoopType_t PostLoop; 32 | CurveLoopType_t PreLoop; 33 | 34 | Curve(); 35 | 36 | Curve Clone() const; 37 | void ComputeTangent(int keyIndex, CurveTangent_t tangentInType, CurveTangent_t tangentOutType); 38 | inline void ComputeTangent(int keyIndex, CurveTangent_t tangentType) { ComputeTangent(keyIndex, tangentType, tangentType); } 39 | void ComputeTangents(CurveTangent_t tangentInType, CurveTangent_t tangentOutType); 40 | inline void ComputeTangents(CurveTangent_t tangentType) { ComputeTangents(tangentType, tangentType); } 41 | float Evaluate(float position); 42 | static const Type& GetType(); 43 | }; 44 | } 45 | 46 | #endif //_XFX_CURVE_ 47 | -------------------------------------------------------------------------------- /include/System/Single.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * Single.h * 3 | * * 4 | * XFX System::Single structure definition file * 5 | * Copyright (c) XFX Team. All Rights Reserved * 6 | *****************************************************************************/ 7 | #ifndef _SYSTEM_SINGLE_ 8 | #define _SYSTEM_SINGLE_ 9 | 10 | #include 11 | #include 12 | 13 | namespace System 14 | { 15 | class String; 16 | 17 | /** 18 | * Represents a single precision floating point value. 19 | */ 20 | struct Single : IComparable, IEquatable, Object 21 | { 22 | private: 23 | float value; 24 | 25 | public: 26 | static const float Epsilon; 27 | static const float MaxValue; 28 | static const float MinValue; 29 | static const float NaN; 30 | static const float NegativeInfinity; 31 | static const float PositiveInfinity; 32 | 33 | Single(); 34 | Single(const Single &obj); 35 | Single(const float &obj); 36 | 37 | int CompareTo(const Single other) const; 38 | bool Equals(Object const * const obj) const; 39 | bool Equals(const Single other) const; 40 | int GetHashCode() const; 41 | static const Type& GetType(); 42 | const String ToString() const; 43 | static const String ToString(const float value); 44 | static bool TryParse(const String& str, out float* result); 45 | 46 | operator float() const; 47 | bool operator !=(const Single& right) const; 48 | bool operator ==(const Single& right) const; 49 | }; 50 | } 51 | 52 | #endif //_SYSTEM_SINGLE_ 53 | -------------------------------------------------------------------------------- /include/Input/GamePadThumbSticks.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * GamePadThumbSticks.h * 3 | * * 4 | * XFX::Input::GamePadThumbSticks structure definition file * 5 | * Copyright (c) XFX Team. All Rights Reserved * 6 | *****************************************************************************/ 7 | #ifndef _XFX_INPUT_GAMEPADTHUMBSTICKS_ 8 | #define _XFX_INPUT_GAMEPADTHUMBSTICKS_ 9 | 10 | #include "Enums.h" 11 | #include 12 | 13 | using namespace System; 14 | 15 | namespace XFX 16 | { 17 | namespace Input 18 | { 19 | /** 20 | * Structure that represents the position of left and right sticks (thumbsticks) on an Xbox Controller. 21 | */ 22 | struct GamePadThumbSticks : Object 23 | { 24 | const Vector2 Left; 25 | const Vector2 Right; 26 | 27 | GamePadThumbSticks(const Vector2 leftThumbstick, const Vector2 rightThumbstick); 28 | GamePadThumbSticks(); 29 | GamePadThumbSticks(const GamePadThumbSticks &obj); 30 | 31 | bool Equals(Object const * const obj) const; 32 | bool Equals(const GamePadThumbSticks obj) const; 33 | int GetHashCode() const; 34 | static const Type& GetType(); 35 | const String ToString() const; 36 | 37 | bool operator!=(const GamePadThumbSticks& right) const; 38 | bool operator==(const GamePadThumbSticks& right) const; 39 | 40 | inline GamePadThumbSticks operator=(const GamePadThumbSticks& right) 41 | { 42 | return (right == *this) ? *this : GamePadThumbSticks(right); 43 | } 44 | }; 45 | } 46 | } 47 | 48 | #endif //_XFX_INPUT_GAMEPADTHUMBSTICKS_ 49 | -------------------------------------------------------------------------------- /include/Graphics/ModelMeshCollection.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * ModelMeshCollection.h * 3 | * * 4 | * XFX::Graphics::ModelMeshCollection class definition file * 5 | * Copyright (c) XFX Team. All Rights Reserved * 6 | *****************************************************************************/ 7 | #ifndef _XFX_GRAPHICS_MODELMESHCOLLECTION_ 8 | #define _XFX_GRAPHICS_MODELMESHCOLLECTION_ 9 | 10 | #include "ModelMesh.h" 11 | #include 12 | 13 | using namespace System::Collections::ObjectModel; 14 | 15 | namespace XFX 16 | { 17 | namespace Graphics 18 | { 19 | /** 20 | * Represents a collection of ModelMesh objects. 21 | */ 22 | class ModelMeshCollection : public ReadOnlyCollection 23 | { 24 | private: 25 | friend class Model; 26 | 27 | ModelMeshCollection(IList* list); 28 | 29 | public: 30 | /** 31 | * Finds a mesh with a given name if it exists in the collection. 32 | * 33 | * @param boneName 34 | * The name of the mesh to find. 35 | * 36 | * @param value 37 | * [OutAttribute] The bone named boneName, if found. 38 | */ 39 | bool TryGetValue(const String& meshName, out ModelMesh * value); 40 | 41 | /** 42 | * Retrieves a ModelMesh from the collection, given the name of the mesh. 43 | * 44 | * @param name 45 | * The name of the bone to retrieve. 46 | */ 47 | ModelMesh& operator[](const String& name) const; 48 | }; 49 | } 50 | } 51 | 52 | #endif //_XFX_GRAPHICS_MODELMESHCOLLECTION_ 53 | -------------------------------------------------------------------------------- /include/System/Windows/GridLength.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * GridLength.h * 3 | * * 4 | * System::Windows::GridLength definition file * 5 | * Copyright (c) XFX Team. All rights reserved * 6 | *****************************************************************************/ 7 | #ifndef _SYSTEM_WINDOWS_GRIDLENGTH_ 8 | #define _SYSTEM_WINDOWS_GRIDLENGTH_ 9 | 10 | #include 11 | 12 | #include 13 | 14 | namespace System 15 | { 16 | namespace Windows 17 | { 18 | /** 19 | * Represents the length of elements that explicitly support Star unit types. 20 | */ 21 | struct GridLength : IEquatable, Object 22 | { 23 | private: 24 | int value; 25 | GridUnitType_t gridUnitType; 26 | 27 | public: 28 | static const GridLength Auto; 29 | bool IsAbsolute() const; 30 | bool IsAuto() const; 31 | GridUnitType_t getGridUnitType() const; 32 | int getValue() const; 33 | bool IsStar() const; 34 | 35 | GridLength(); 36 | GridLength(const int pixels); 37 | GridLength(const int value, const GridUnitType_t unitType); 38 | GridLength(const GridLength &obj); 39 | 40 | bool Equals(Object const * const obj) const; 41 | bool Equals(const GridLength other) const; 42 | int GetHashCode() const; 43 | static const Type& GetType(); 44 | const String ToString() const; 45 | 46 | bool operator==(const GridLength& right) const; 47 | bool operator!=(const GridLength& right) const; 48 | }; 49 | } 50 | } 51 | 52 | #endif //_SYSTEM_WINDOWS_GRIDLENGTH_ 53 | -------------------------------------------------------------------------------- /include/Graphics/ModelBoneCollection.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * ModelBoneCollection.h * 3 | * * 4 | * XFX::Graphics::ModelBoneCollection class definition file * 5 | * Copyright (c) XFX Team. All Rights Reserved * 6 | *****************************************************************************/ 7 | #ifndef _XFX_GRAPHICS_MODELBONECOLLECTION_ 8 | #define _XFX_GRAPHICS_MODELBONECOLLECTION_ 9 | 10 | #include "ModelBone.h" 11 | #include 12 | 13 | using namespace System::Collections::ObjectModel; 14 | 15 | namespace XFX 16 | { 17 | namespace Graphics 18 | { 19 | /** 20 | * Represents a set of bones associated with a model. 21 | */ 22 | class ModelBoneCollection : public ReadOnlyCollection 23 | { 24 | private: 25 | friend class Model; 26 | 27 | ModelBoneCollection(IList * const list); 28 | 29 | public: 30 | /** 31 | * Finds a bone with a given name if it exists in the collection. 32 | * 33 | * @param boneName 34 | * The name of the bone to find. 35 | * 36 | * @param value 37 | * [OutAttribute] The bone named boneName, if found. 38 | */ 39 | bool TryGetValue(const String& boneName, out ModelBone * value); 40 | 41 | /** 42 | * Retrieves a ModelBone from the collection, given the name of the bone. 43 | * 44 | * @param name 45 | * The name of the bone to retrieve. 46 | */ 47 | ModelBone& operator[](const String& name) const; 48 | }; 49 | } 50 | } 51 | 52 | #endif //_XFX_GRAPHICS_MODELBONECOLLECTION_ 53 | -------------------------------------------------------------------------------- /include/System/Windows/Controls/ContentControl.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * ContentControl.h * 3 | * * 4 | * System::Windows::Controls::ContentControl definition file * 5 | * Copyright (c) XFX Team. All rights reserved * 6 | *****************************************************************************/ 7 | #ifndef _SYSTEM_WINDOWS_CONTROLS_CONTENTCONTROL_ 8 | #define _SYSTEM_WINDOWS_CONTROLS_CONTENTCONTROL_ 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | namespace System 15 | { 16 | namespace Windows 17 | { 18 | namespace Controls 19 | { 20 | /** 21 | * Represents a control with a single piece of content. Controls such as Button, CheckBox, and ScrollViewer directly, or indirectly inherit from this class. 22 | */ 23 | class ContentControl : public Control 24 | { 25 | protected: 26 | virtual void AddChild(Object * const value); 27 | virtual void AddText(const String& text); 28 | virtual void OnContentChanged(Object * oldContent, Object * newContent); 29 | virtual void OnContentStringFormatChanged(String& oldContentStringFormat, String& newContentStringFormat); 30 | 31 | public: 32 | Object* Content; 33 | static const DependencyProperty ContentProperty; 34 | String ContentStringFormat; 35 | static const DependencyProperty ContentStringFormatProperty; 36 | bool HasContent() const; 37 | 38 | ContentControl(); 39 | 40 | static const Type& GetType(); 41 | }; 42 | } 43 | } 44 | } 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /include/Input/GamePadDPad.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * GamePadDPad.h * 3 | * * 4 | * XFX::Input::GamePadDPad structure definition file * 5 | * Copyright (c) XFX Team. All Rights Reserved * 6 | *****************************************************************************/ 7 | #ifndef _XFX_INPUT_GAMEPADDPAD_ 8 | #define _XFX_INPUT_GAMEPADDPAD_ 9 | 10 | #include "Enums.h" 11 | #include 12 | 13 | using namespace System; 14 | 15 | namespace XFX 16 | { 17 | namespace Input 18 | { 19 | /** 20 | * Identifies which directions on the directional pad of an Xbox Controller are being pressed. 21 | */ 22 | struct GamePadDPad : Object 23 | { 24 | const ButtonState_t Down; 25 | const ButtonState_t Left; 26 | const ButtonState_t Right; 27 | const ButtonState_t Up; 28 | 29 | GamePadDPad(const ButtonState_t upValue, const ButtonState_t downValue, const ButtonState_t leftValue, const ButtonState_t rightValue); 30 | GamePadDPad(); 31 | GamePadDPad(const GamePadDPad &obj); 32 | 33 | bool Equals(Object const * const obj) const; 34 | bool Equals(const GamePadDPad obj) const; 35 | int GetHashCode() const; 36 | static const Type& GetType(); 37 | const String ToString() const; 38 | 39 | bool operator!=(const GamePadDPad& right) const; 40 | bool operator==(const GamePadDPad& right) const; 41 | 42 | inline GamePadDPad operator=(const GamePadDPad& right) 43 | { 44 | return (right == *this) ? *this : GamePadDPad(right); 45 | } 46 | }; 47 | } 48 | } 49 | 50 | #endif //_XFX_INPUT_GAMEPADDPAD_ 51 | -------------------------------------------------------------------------------- /include/System/Windows/Window.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * Window.h * 3 | * * 4 | * System::Windows::Window definition file * 5 | * Copyright (c) XFX Team. All rights reserved * 6 | *****************************************************************************/ 7 | #ifndef _SYSTEM_WINDOWS_WINDOW_ 8 | #define _SYSTEM_WINDOWS_WINDOW_ 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | 17 | using namespace System::ComponentModel; 18 | 19 | namespace System 20 | { 21 | namespace Windows 22 | { 23 | class Window : public DependencyObject 24 | { 25 | private: 26 | static const Size MaxSize; 27 | uint* renderBuffer; 28 | 29 | public: 30 | FrameworkElement* Content; 31 | int Height; 32 | bool IsActive() const; 33 | int Left; 34 | String Title; 35 | int Top; 36 | bool TopMost; 37 | Visibility_t Visibility; 38 | int Width; 39 | WindowState_t WindowState; 40 | WindowStyle_t WindowStyle; 41 | 42 | Event Closing; 43 | 44 | Window(); 45 | ~Window(); 46 | 47 | void Close(); 48 | static Window* Create(const int left, const int top, const String& title); 49 | static const Type& GetType(); 50 | void Hide(); 51 | void Render(); 52 | void Show(); 53 | const String ToString() const; 54 | }; 55 | } 56 | } 57 | 58 | #endif //_SYSTEM_WINDOWS_WINDOW_ 59 | -------------------------------------------------------------------------------- /include/System/Threading/Enums.h: -------------------------------------------------------------------------------- 1 | /******************************************************** 2 | * Enums.h * 3 | * * 4 | * System::Threading enumerations definition file * 5 | * Copyright (c) XFX Team. All Rights Reserved * 6 | ********************************************************/ 7 | #ifndef _SYSTEM_THREADING_ENUMS_ 8 | #define _SYSTEM_THREADING_ENUMS_ 9 | 10 | namespace System 11 | { 12 | namespace Threading 13 | { 14 | // Indicates whether an System::Threading::EventWaitHandle is reset automatically or manually after receiving a signal. 15 | struct EventResetMode 16 | { 17 | enum type 18 | { 19 | AutoReset, 20 | ManualReset 21 | }; 22 | }; 23 | 24 | // The System::Threading::Thread can be scheduled after threads with Highest priority and before those with Normal priority. 25 | struct ThreadPriority 26 | { 27 | enum type 28 | { 29 | AboveNormal, 30 | BelowNormal, 31 | Highest = 32, 32 | Lowest = 0, 33 | Normal, 34 | }; 35 | }; 36 | 37 | struct ThreadState 38 | { 39 | enum type 40 | { 41 | Running = 0x00000000, 42 | StopRequested = 0x00000001, 43 | SuspendRequested = 0x00000002, 44 | Background = 0x00000004, 45 | Unstarted = 0x00000008, 46 | Stopped = 0x00000010, 47 | WaitSleepJoin = 0x00000020, 48 | Suspended = 0x00000040, 49 | AbortRequested = 0x00000080, 50 | Aborted = 0x00000100 51 | }; 52 | }; 53 | 54 | typedef EventResetMode::type EventResetMode_t; 55 | typedef ThreadPriority::type ThreadPriority_t; 56 | typedef ThreadState::type ThreadState_t; 57 | } 58 | } 59 | 60 | #endif //_SYSTEM_THREADING_ENUMS_ 61 | --------------------------------------------------------------------------------