User:Monster Iestyn/Source Code Documentation/i_system.h
Jump to navigation
Jump to search
This article or section is incomplete. It doesn't have all of the necessary core information on this topic. Please help the SRB2 Wiki by finishing this article. |
Online link | GitHub entry |
---|---|
File type | C header file |
#include guard | __I_SYSTEM__
|
Includes
- p_mobj.h (unless
NOMUMBLE
is defined) - s_sound.h (unless
NOMUMBLE
is defined)
Macros
Macro | Defined as | Description |
---|---|---|
MAX_QUIT_FUNCS
|
16 | Maximum number of shutdown functions that can be called by I_ShutdownSystem
|
Externs
Data name | Data type | Non-extern location(s) | Description |
---|---|---|---|
graphics_started
|
UINT8 |
|
|
keyboard_started
|
UINT8 |
|
Function prototypes
Function name | Return type | Params | Defined in | Attributes | Description |
---|---|---|---|---|---|
I_GetFreeMem
|
UINT32 | UINT32 *total
|
|
Gets and returns the amount of physical memory currently free, in bytes. If total is a pointer to a UINT32 variable, the variable will be set to the total amount of physical memory in bytes
| |
I_GetTime
|
tic_t
|
none |
|
Gets and returns the current time in tics | |
I_Sleep
|
void | none |
|
Tells the program to sleep for a set period of time. The exact period of time to sleep is controlled by the cpusleep console variable
| |
I_GetEvent
|
void | none |
|
||
I_OsPolling
|
void | none |
|
||
I_BaseTiccmd
|
ticcmd_t *
|
none |
|
||
I_BaseTiccmd2
|
ticcmd_t *
|
none |
|
||
I_Quit
|
void | none |
|
FUNCNORETURN
|
Quits the game |
I_Tactile
|
void | FFType Type ,const JoyFF_t *Effect
|
|
Forcefeedback for the first joystick | |
I_Tactile2
|
void | FFType Type ,const JoyFF_t *Effect
|
|
Forcefeedback for the second joystick | |
I_JoyScale
|
void | none |
|
Sets up the first joystick scale | |
I_JoyScale2
|
void | none |
|
Sets up the second joystick scale | |
I_InitJoystick
|
void | none |
|
Starts up the first joystick | |
I_InitJoystick2
|
void | none |
|
Starts up the second joystick | |
I_NumJoys
|
INT32 | none |
|
The number of joysticks on the system | |
I_GetJoyName
|
const char *
|
INT32 joyindex
|
|
Gets and returns the name of the joystick | |
I_UpdateMumble
|
void | const mobj_t *mobj ,const listener_t listener
|
|
Defined only if NOMUMBLE is not defined
Updates Mumble with the current positions of the player's mobj and the point that the player can hear sounds from | |
I_StartupMouse
|
void | none |
|
Starts up the first mouse | |
I_StartupMouse2
|
void | none |
|
Starts up the second mouse | |
I_StartupKeyboard
|
void | none |
|
Starts up the keyboard | |
I_StartupTimer
|
void | none |
|
Starts up the timer | |
I_AddExitFunc
|
void | void (*func)()
|
|
Adds a function to the list of shutdown functions to be called by I_SystemShutdown
| |
I_RemoveExitFunc
|
void | void (*func)()
|
|
Removes a function to the list of shutdown functions to be called by I_SystemShutdown
| |
I_StartupSystem
|
INT32 | none |
|
Starts up the system: Setup signal handler, plus stuff for trapping errors and cleanly exit | |
I_ShutdownSystem
|
void | none |
|
Shuts down the system, calls the shutdown functions | |
I_GetDiskFreeSpace
|
void | INT64 *freespace
|
|
Gets the total amount of free space in bytes on the disk volume | |
I_GetUserName
|
char *
|
none |
|
Gets and returns the name of the user on the system | |
I_mkdir
|
INT32 | const char *dirname ,INT32 unixright
|
|
Creates a directory | |
I_CPUInfo
|
const CPUInfoFlags *
|
none |
|
Returns info about CPU | |
I_LocateWad
|
const char *
|
none |
|
Finds and returns the path to the main WAD | |
I_GetJoystickEvents
|
void | none |
|
Gets events for the first joystick | |
I_GetJoystick2Events
|
void | none |
|
Gets events for the second joystick | |
I_GetMouseEvents
|
void | none |
|
Gets events for the mouse | |
I_GetEnv
|
char *
|
const char *name
|
|
Gets and returns the value of an environment variable, if it exists | |
I_PutEnv
|
INT32 | char *variable
|
|
Creates, modifies, or removes environment variables | |
I_ClipboardCopy
|
INT32 | const char *data ,size_t size
|
|
Put data in system clipboard | |
I_ClipboardPaste
|
const char *
|
none |
|
Retrieve data from system clipboard | |
I_RegisterSysCommands
|
void | none |
|
Registers the cpuaffinity console variable (only for Win32 with DirectX)
|
Typedefs
Name | Type | Description |
---|---|---|
FFType
|
enum
|
|
JoyFF_t struct JoyFF_s
|
struct
|
|
quitfuncptr
|
void (*function)()
|
The shutdown function typedef – this is only used to help define the shutdown function list in the corresponding i_system.c or win_sys.c source file for the port SRB2 is being compiled for.
|
CPUInfoFlags
|
struct
|
Enumerations
FFType
Value | Name | Description |
---|---|---|
-1 | EvilForce
|
|
0 | ConstantForce
|
|
1 | RampForce
|
|
2 | SquareForce
|
|
3 | SineForce
|
|
4 | TriangleForce
|
|
5 | SawtoothUpForce
|
|
6 | SawtoothDownForce
|
|
7 | NumberofForces
|
Structs
JoyFF_t
Data name | Data type | Description |
---|---|---|
ForceX
|
INT32 | |
ForceY
|
INT32 | |
Duration
|
UINT32 | |
Gain
|
INT32 | |
Magnitude
|
INT32 | |
Start
|
INT32 | |
End
|
INT32 | |
Offset
|
INT32 | |
Phase
|
UINT32 | |
Period
|
UINT32 |
CPUInfoFlags
Data name | Data type | Width (bits) | Description |
---|---|---|---|
FPU
|
int | 1 | FPU available |
CPUID
|
int | 1 | CPUID instruction available
|
RDTSC
|
int | 1 | RDTSC instruction available
|
MMX
|
int | 1 | MMX instruction set available |
MMXExt
|
int | 1 | AMD MMX extensions available |
CMOV
|
int | 1 | CMOVcc (conditional move) instructions available
|
AMD3DNow
|
int | 1 | 3DNow! instruction set available |
AMD3DNowExt
|
int | 1 | 3DNow! extensions available |
SSE
|
int | 1 | SSE instruction set available |
SSE2
|
int | 1 | SSE2 instruction set available |
SSE3
|
int | 1 | SSE3 instruction set available |
IA64
|
int | 1 | Running on IA-64 architecture |
AMD64
|
int | 1 | Running on x86-64 |
AltiVec
|
int | 1 | AltiVec instruction set available |
FPPE
|
int | 1 | Floating-point precision errata (for Pentium) |
PFC
|
int | 1 | Processor channels are enabled |
cmpxchg
|
int | 1 | cmpxchg (compare and exchange) instruction available
|
cmpxchg16b
|
int | 1 | cmpxchg16b (compare and exchange 128-bit) instruction available
|
cmp8xchg16
|
int | 1 | cmp8xchg16 (compare 64 and exchange 128-bit) instruction available
|
FPE
|
int | 1 | Floating-point operations are emulated |
DEP
|
int | 1 | DEP is enabled |
PPCMM64
|
int | 1 | PowerPC Movemem 64bit ok (?) |
ALPHAbyte
|
int | 1 | DEC Alpha (?) |
PAE
|
int | 1 | PAE is enabled |
CPUs
|
int | 8 | Number of logical processors |