DayZ 1.24
Loading...
Searching...
No Matches
EnSystem.c
Go to the documentation of this file.
28proto void GetHourMinuteSecond(out int hour, out int minute, out int second);
29
52proto void GetYearMonthDay(out int year, out int month, out int day);
53
76proto void GetHourMinuteSecondUTC(out int hour, out int minute, out int second);
77
100proto void GetYearMonthDayUTC(out int year, out int month, out int day);
101
102proto string GetProfileName();
103proto string GetMachineName();
104
106proto native int TickCount(int prev);
107
116proto native void MemoryValidation(bool enable);
117
128proto bool GetCLIParam(string param, out string val);
129
141proto native bool IsCLIParam(string param);
142
143#ifdef ENF_DONE
144
146 proto native void StartVideo(string name);
148 proto native void StopVideo();
149#endif
150
151
157{
285
291proto native int KeyState(KeyCode key);
292
297proto native void ClearKey(KeyCode key);
301//proto native int GetDefKey(string name);
302//proto native int DefKeyState(int defkey, bool clear);
303
304
319//const int MB_PRESSED_MASK
320
326proto native int GetMouseState(MouseState index);
327
328// Gets current mouse position
329proto void GetMousePos(out int x, out int y);
330// Gets current screen size (resolution)
331proto void GetScreenSize(out int x, out int y);
332
358
368
370proto native int GetGamepadButton(GamepadButton button);
372proto native float GetGamepadAxis(GamepadAxis axis);
373
376//----------------------------------------------
388
389typedef int[] ParseHandle;
390typedef int[] FileHandle;
391
392proto native ParseHandle BeginParse(string filename);
393proto int ParseLine(ParseHandle tp, int num, string tokens[]);
394proto native void EndParse(ParseHandle file);
395
397proto bool FileExist(string name);
398
417proto FileHandle OpenFile(string name, FileMode mode);
418
425proto int ReadFile(FileHandle file, void param_array, int length);
426
443proto void CloseFile(FileHandle file);
444
462proto void FPrint(FileHandle file, void var);
463
481proto void FPrintln(FileHandle file, void var);
482
501proto int FGets(FileHandle file, string var);
502
503typedef int[] FindFileHandle;
504
512
514{
516 ARCHIVES,
517 ALL
518}
519
520proto FindFileHandle FindFile(string pattern, out string fileName, out FileAttr fileAttributes, FindFileFlags flags);
521proto bool FindNextFile(FindFileHandle handle, out string fileName, out FileAttr fileAttributes);
522proto native void CloseFindFile(FindFileHandle handle);
523
525proto native bool MakeDirectory(string name);
526
528proto native bool DeleteFile(string name);
529
531proto native bool CopyFile(string sourceName, string destName);
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
Icon x
Icon y
FileMode
Definition EnSystem.c:383
proto void CloseFile(FileHandle file)
Close the File.
int[] ParseHandle
Definition EnSystem.c:389
proto native bool MakeDirectory(string name)
Makes a directory.
proto void FPrint(FileHandle file, void var)
Write to file.
proto native void CloseFindFile(FindFileHandle handle)
proto native bool CopyFile(string sourceName, string destName)
copy file. destName must be "$profile:" or "$saves:" location
proto int FGets(FileHandle file, string var)
Get line from file, every next call of this function returns next line.
proto int ReadFile(FileHandle file, void param_array, int length)
proto FileHandle OpenFile(string name, FileMode mode)
Opens File.
enum FindFileFlags FindFile(string pattern, out string fileName, out FileAttr fileAttributes, FindFileFlags flags)
FindFileFlags
Definition EnSystem.c:514
proto bool FindNextFile(FindFileHandle handle, out string fileName, out FileAttr fileAttributes)
int[] FileHandle
Definition EnSystem.c:390
proto native void EndParse(ParseHandle file)
int[] FindFileHandle
Definition EnSystem.c:503
FileAttr
Definition EnSystem.c:506
proto bool FileExist(string name)
Check existence of file.
proto native bool DeleteFile(string name)
delete file. Works only on "$profile:" and "$saves:" locations
proto int ParseLine(ParseHandle tp, int num, string tokens[])
proto void FPrintln(FileHandle file, void var)
Write to file and add new line.
proto native ParseHandle BeginParse(string filename)
@ WRITE
Definition EnSystem.c:385
@ READ
Definition EnSystem.c:384
@ APPEND
Definition EnSystem.c:386
@ HIDDEN
File is hidden.
Definition EnSystem.c:508
@ READONLY
File is read-only.
Definition EnSystem.c:509
@ DIRECTORY
File is directory.
Definition EnSystem.c:507
@ INVALID
Invalid file.
Definition EnSystem.c:510
proto native int GetGamepadButton(GamepadButton button)
return if the button is pressed or not
GamepadAxis
Definition EnSystem.c:360
proto native float GetGamepadAxis(GamepadAxis axis)
return value in gamepad axis <-1000; 1000>
GamepadButton
Definition EnSystem.c:341
@ RIGHT_THUMB_VERTICAL
Definition EnSystem.c:364
@ LEFT_THUMB_HORIZONTAL
Definition EnSystem.c:361
@ LEFT_TRIGGER
Definition EnSystem.c:365
@ RIGHT_THUMB_HORIZONTAL
Definition EnSystem.c:363
@ LEFT_THUMB_VERTICAL
Definition EnSystem.c:362
@ RIGHT_TRIGGER
Definition EnSystem.c:366
@ PAD_RIGHT
Definition EnSystem.c:352
@ B
Definition EnSystem.c:346
@ SHOULDER_LEFT
Definition EnSystem.c:353
@ A
Definition EnSystem.c:345
@ BUTTON_NONE
Definition EnSystem.c:342
@ MENU
Definition EnSystem.c:343
@ Y
Definition EnSystem.c:316
@ VIEW
Definition EnSystem.c:344
@ X
Definition EnSystem.c:315
@ PAD_UP
Definition EnSystem.c:349
@ THUMB_RIGHT
Definition EnSystem.c:356
@ PAD_LEFT
Definition EnSystem.c:351
@ SHOULDER_RIGHT
Definition EnSystem.c:354
@ PAD_DOWN
Definition EnSystem.c:350
@ THUMB_LEFT
Definition EnSystem.c:355
proto native void ClearKey(KeyCode key)
KeyCode
Definition EnSystem.c:157
proto native int KeyState(KeyCode key)
@ KC_HOME
Home on arrow keypad.
Definition EnSystem.c:267
@ KC_MINUS
Definition EnSystem.c:169
@ KC_TAB
Definition EnSystem.c:172
@ KC_X
Definition EnSystem.c:202
@ KC_PLAYPAUSE
Play / Pause.
Definition EnSystem.c:257
@ KC_SPACE
Definition EnSystem.c:214
@ KC_NUMPAD5
Definition EnSystem.c:233
@ KC_COLON
(NEC PC98)
Definition EnSystem.c:247
@ KC_RIGHT
RightArrow on arrow keypad.
Definition EnSystem.c:271
@ KC_NUMPAD0
Definition EnSystem.c:239
@ KC_GRAVE
accent grave
Definition EnSystem.c:198
@ KC_E
Definition EnSystem.c:175
@ KC_8
Definition EnSystem.c:166
@ KC_O
Definition EnSystem.c:181
@ KC_0
Definition EnSystem.c:168
@ KC_F1
Definition EnSystem.c:216
@ KC_Z
Definition EnSystem.c:201
@ KC_LBRACKET
Definition EnSystem.c:183
@ KC_1
Definition EnSystem.c:159
@ KC_COMMA
Definition EnSystem.c:208
@ KC_MEDIASELECT
Media Select.
Definition EnSystem.c:283
@ KC_RETURN
Enter on main keyboard.
Definition EnSystem.c:185
@ KC_NUMLOCK
Definition EnSystem.c:226
@ KC_NUMPAD2
Definition EnSystem.c:237
@ KC_RBRACKET
Definition EnSystem.c:184
@ KC_UNDERLINE
(NEC PC98)
Definition EnSystem.c:248
@ KC_PREVTRACK
Previous Track (DIKC_CIRCUMFLEX on Japanese keyboard)
Definition EnSystem.c:245
@ KC_NUMPAD6
Definition EnSystem.c:234
@ KC_U
Definition EnSystem.c:179
@ KC_VOLUMEUP
Volume +.
Definition EnSystem.c:260
@ KC_SUBTRACT
Definition EnSystem.c:231
@ KC_SYSRQ
Definition EnSystem.c:264
@ KC_N
Definition EnSystem.c:206
@ KC_NEXT
PgDn on arrow keypad.
Definition EnSystem.c:274
@ KC_SLEEP
System Sleep.
Definition EnSystem.c:281
@ KC_MEDIASTOP
Media Stop.
Definition EnSystem.c:258
@ KC_CALCULATOR
Calculator.
Definition EnSystem.c:256
@ KC_VOLUMEDOWN
Volume -.
Definition EnSystem.c:259
@ KC_T
Definition EnSystem.c:177
@ KC_OEM_102
< > | on UK/Germany keyboards
Definition EnSystem.c:241
@ KC_MULTIPLY
Definition EnSystem.c:212
@ KC_MUTE
Mute.
Definition EnSystem.c:255
@ KC_DECIMAL
. on numeric keypad
Definition EnSystem.c:240
@ KC_CAPITAL
Definition EnSystem.c:215
@ KC_3
Definition EnSystem.c:161
@ KC_M
Definition EnSystem.c:207
@ KC_C
Definition EnSystem.c:203
@ KC_RSHIFT
Definition EnSystem.c:211
@ KC_LCONTROL
Definition EnSystem.c:186
@ KC_P
Definition EnSystem.c:182
@ KC_F10
Definition EnSystem.c:225
@ KC_F7
Definition EnSystem.c:222
@ KC_DELETE
Delete on arrow keypad.
Definition EnSystem.c:276
@ KC_NUMPADEQUALS
= on numeric keypad (NEC PC98)
Definition EnSystem.c:244
@ KC_NUMPAD4
Definition EnSystem.c:232
@ KC_NUMPAD9
Definition EnSystem.c:230
@ KC_DOWN
DownArrow on arrow keypad.
Definition EnSystem.c:273
@ KC_LEFT
LeftArrow on arrow keypad.
Definition EnSystem.c:270
@ KC_Q
Definition EnSystem.c:173
@ KC_F6
Definition EnSystem.c:221
@ KC_K
Definition EnSystem.c:194
@ KC_J
Definition EnSystem.c:193
@ KC_WEBHOME
Web home.
Definition EnSystem.c:261
@ KC_F8
Definition EnSystem.c:223
@ KC_L
Definition EnSystem.c:195
@ KC_APOSTROPHE
Definition EnSystem.c:197
@ KC_2
Definition EnSystem.c:160
@ KC_NUMPAD1
Definition EnSystem.c:236
@ KC_NEXTTRACK
Next Track.
Definition EnSystem.c:252
@ KC_F9
Definition EnSystem.c:224
@ KC_ADD
Definition EnSystem.c:235
@ KC_NUMPAD3
Definition EnSystem.c:238
@ KC_BACKSLASH
Definition EnSystem.c:200
@ KC_R
Definition EnSystem.c:176
@ KC_V
Definition EnSystem.c:204
@ KC_F
Definition EnSystem.c:190
@ KC_AT
(NEC PC98)
Definition EnSystem.c:246
@ KC_NUMPADCOMMA
, on numeric keypad (NEC PC98)
Definition EnSystem.c:262
@ KC_I
Definition EnSystem.c:180
@ KC_RCONTROL
Definition EnSystem.c:254
@ KC_AX
(Japan AX)
Definition EnSystem.c:250
@ KC_POWER
System Power.
Definition EnSystem.c:280
@ KC_D
Definition EnSystem.c:189
@ KC_WAKE
System Wake.
Definition EnSystem.c:282
@ KC_UP
UpArrow on arrow keypad.
Definition EnSystem.c:268
@ KC_PAUSE
Pause.
Definition EnSystem.c:266
@ KC_A
Definition EnSystem.c:187
@ KC_SCROLL
Scroll Lock.
Definition EnSystem.c:227
@ KC_LSHIFT
Definition EnSystem.c:199
@ KC_4
Definition EnSystem.c:162
@ KC_APPS
AppMenu key.
Definition EnSystem.c:279
@ KC_NUMPAD7
Definition EnSystem.c:228
@ KC_SEMICOLON
Definition EnSystem.c:196
@ KC_EQUALS
Definition EnSystem.c:170
@ KC_B
Definition EnSystem.c:205
@ KC_G
Definition EnSystem.c:191
@ KC_F4
Definition EnSystem.c:219
@ KC_PRIOR
PgUp on arrow keypad.
Definition EnSystem.c:269
@ KC_BACK
backspace
Definition EnSystem.c:171
@ KC_Y
Definition EnSystem.c:178
@ KC_LWIN
Left Windows key.
Definition EnSystem.c:277
@ KC_5
Definition EnSystem.c:163
@ KC_S
Definition EnSystem.c:188
@ KC_PERIOD
. on main keyboard
Definition EnSystem.c:209
@ KC_F5
Definition EnSystem.c:220
@ KC_F2
Definition EnSystem.c:217
@ KC_LMENU
left Alt
Definition EnSystem.c:213
@ KC_F11
Definition EnSystem.c:242
@ KC_END
End on arrow keypad.
Definition EnSystem.c:272
@ KC_F12
Definition EnSystem.c:243
@ KC_W
Definition EnSystem.c:174
@ KC_H
Definition EnSystem.c:192
@ KC_ESCAPE
Definition EnSystem.c:158
@ KC_NUMPAD8
Definition EnSystem.c:229
@ KC_RMENU
right Alt
Definition EnSystem.c:265
@ KC_DIVIDE
/ on numeric keypad
Definition EnSystem.c:263
@ KC_7
Definition EnSystem.c:165
@ KC_F3
Definition EnSystem.c:218
@ KC_STOP
(NEC PC98)
Definition EnSystem.c:249
@ KC_9
Definition EnSystem.c:167
@ KC_6
Definition EnSystem.c:164
@ KC_SLASH
/ on main keyboard
Definition EnSystem.c:210
@ KC_UNLABELED
(J3100)
Definition EnSystem.c:251
@ KC_NUMPADENTER
Enter on numeric keypad.
Definition EnSystem.c:253
@ KC_RWIN
Right Windows key.
Definition EnSystem.c:278
@ KC_INSERT
Insert on arrow keypad.
Definition EnSystem.c:275
MouseState
Definition EnSystem.c:311
proto native int GetMouseState(MouseState index)
proto void GetScreenSize(out int x, out int y)
proto void GetMousePos(out int x, out int y)
@ MIDDLE
Definition EnSystem.c:314
@ WHEEL
Definition EnSystem.c:317
@ LEFT
Definition EnSystem.c:312
@ RIGHT
Definition EnSystem.c:313
proto void GetYearMonthDay(out int year, out int month, out int day)
Returns world date.
proto native int TickCount(int prev)
performance counter. Returns number of CPU ticks between 'prev' and 'now'
proto void GetYearMonthDayUTC(out int year, out int month, out int day)
Returns UTC world date.
proto void GetHourMinuteSecond(out int hour, out int minute, out int second)
Returns world time.
proto string GetProfileName()
proto native bool IsCLIParam(string param)
Returns if command line argument is present.
proto string GetMachineName()
proto void GetHourMinuteSecondUTC(out int hour, out int minute, out int second)
Returns UTC world time.
ALL
<Looks in archives and fs directories.
Definition EnSystem.c:3
ARCHIVES
Looks for files in archive only. (.pak)
Definition EnSystem.c:1
proto bool GetCLIParam(string param, out string val)
Returns command line argument.
proto native void MemoryValidation(bool enable)
Switches memory validation (huge slowdown! Use with care only for certain section of code!...
DIRECTORIES
Looks for files in fs directories only.
Definition EnSystem.c:0