DayZ 1.29
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ GetControlMappingInfo()

array< ref JsonControlMappingInfo > GetControlMappingInfo ( )
protected

См. определение в файле ControlsXbox.c строка 285

286 {
288
289 string file_path = "xbox/pagedatacontroller.json";
290 #ifdef PLATFORM_PS4
291 file_path = "ps4/pagedatacontroller.json";
292 #endif
293 FileHandle file_handle = OpenFile(file_path, FileMode.READ);
295
296 string js_error = "";
297 string line_content = "";
298 string content = "";
299 if (file_handle)
300 {
301 while (FGets(file_handle, line_content) >= 0)
302 {
303 content += line_content;
304 }
305 CloseFile(file_handle);
306
307 if (js.ReadFromString(control_mapping_info, content, js_error))
308 {
309 return control_mapping_info;
310 }
311 else
312 {
313 ErrorEx("JSON ERROR => [ControlMappingInfo.json]: "+ js_error,ErrorExSeverity.INFO);
314 }
315 }
316
317 return control_mapping_info;
318 }
proto bool ReadFromString(void variable_in, string jsonString, out string error)
Json string deserialization to script variable.
Class for sending RPC over network.
Определения gameplay.c:50
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
ErrorExSeverity
Определения EnDebug.c:62
enum ShapeType ErrorEx
FileMode
Определения EnSystem.c:383
proto void CloseFile(FileHandle file)
Close the File.
proto int FGets(FileHandle file, string var)
Get line from file, every next call of this function returns next line.
proto FileHandle OpenFile(string name, FileMode mode)
Opens File.
int[] FileHandle
Определения EnSystem.c:390

Перекрестные ссылки CloseFile(), ErrorEx, FGets(), OpenFile() и JsonSerializer::ReadFromString().