Odamex
Setting the Standard in Multiplayer Doom
Xbox/i_xbox.h
Go to the documentation of this file.
00001 // Emacs style mode select   -*- C++ -*- 
00002 //-----------------------------------------------------------------------------
00003 //
00004 // $Id: i_xbox.h 2133 2011-03-06 01:15:47Z hypereye $
00005 //
00006 // Copyright (C) 2006-2010 by The Odamex Team.
00007 //
00008 // This program is free software; you can redistribute it and/or
00009 // modify it under the terms of the GNU General Public License
00010 // as published by the Free Software Foundation; either version 2
00011 // of the License, or (at your option) any later version.
00012 //
00013 // This program is distributed in the hope that it will be useful,
00014 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00015 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016 // GNU General Public License for more details.
00017 //
00018 //
00019 // DESCRIPTION:
00020 //      Xbox Support
00021 //
00022 //-----------------------------------------------------------------------------
00023 
00024 #ifndef _I_XBOX_H
00025 #define _I_XBOX_H
00026 
00027 #ifdef _XBOX
00028 
00029 #include <SDL.h>
00030 
00031 struct hostent
00032 {
00033         char  *h_name;       /* canonical name of host */
00034         char **h_aliases;    /* alias list */
00035         int    h_addrtype;   /* host address type */
00036         int    h_length;     /* length of address */
00037         char **h_addr_list;  /* list of addresses */
00038 #define h_addr h_addr_list[0]
00039 };
00040 
00041 // Xbox function overrides
00042 #undef getenv
00043 #define getenv xbox_Getenv
00044 #undef putenv
00045 #define putenv xbox_Putenv
00046 #undef getcwd
00047 #define getcwd xbox_GetCWD
00048 #undef exit
00049 #define exit xbox_Exit
00050 #undef atexit
00051 #define atexit xbox_AtExit
00052 #define inet_ntoa xbox_InetNtoa
00053 #define gethostbyname xbox_GetHostByName
00054 #define gethostname xbox_GetHostname
00055 
00056 // Xbox function override declarations
00057 char *xbox_Getenv(const char *);
00058 int xbox_Putenv(const char *);
00059 char *xbox_GetCWD(char *buf, size_t size);
00060 char *xbox_InetNtoa(struct in_addr in);
00061 struct hostent *xbox_GetHostByName(const char *name);
00062 int xbox_GetHostname(char *name, int namelen);
00063 void xbox_Exit(int status);
00064 void xbox_AtExit(void (*function)(void));
00065 
00066 // Print useful memory information for debugging
00067 void xbox_PrintMemoryDebug();
00068 
00069 // Set the x, y screen starting position in relation to 0,0
00070 int xbox_SetScreenPosition(float x, float y);
00071 // Stretch the image to some percentage of its full resolution - 1.0 = 100%
00072 int xbox_SetScreenStretch(float xs, float ys);
00073 
00074 // Write a SaveMeta.xbx file
00075 void xbox_WriteSaveMeta(std::string path, std::string text);
00076 
00077 // Get a unique save path for a save slot
00078 std::string xbox_GetSavePath(std::string file, int slot);
00079 
00080 #endif // _XBOX
00081 
00082 #endif // _I_XBOX_H
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends