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