MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / Load

Method Load

ogsr_engine/xrGame/PDA.cpp:60–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58}
59
60void CPda::Load(LPCSTR section)
61{
62 this_is_3d_pda = pSettings->line_exist(section, "hud");
63 if (this_is_3d_pda)
64 inherited::Load(section);
65 else
66 CInventoryItemObject::Load(section);
67
68 m_fRadius = pSettings->r_float(section, "radius");
69
70 if (!this_is_3d_pda)
71 return;
72
73 m_joystick_bone = READ_IF_EXISTS(pSettings, r_string, section, "joystick_bone", nullptr);
74 HUD_SOUND::LoadSound(section, "snd_draw", sndShow, SOUND_TYPE_ITEM_TAKING);
75 HUD_SOUND::LoadSound(section, "snd_holster", sndHide, SOUND_TYPE_ITEM_HIDING);
76
77 m_screen_on_delay = READ_IF_EXISTS(pSettings, r_float, section, "screen_on_delay", 0.f);
78 m_screen_off_delay = READ_IF_EXISTS(pSettings, r_float, section, "screen_off_delay", 0.f);
79
80 HUD_SOUND::LoadSound(section, "snd_btn_press", sndBtnPress, SOUND_TYPE_ITEM_USING);
81 HUD_SOUND::LoadSound(section, "snd_btn_release", sndBtnRelease, SOUND_TYPE_ITEM_USING);
82
83 m_thumb_rot[0] = READ_IF_EXISTS(pSettings, r_float, section, "thumb_rot_x", 0.f);
84 m_thumb_rot[1] = READ_IF_EXISTS(pSettings, r_float, section, "thumb_rot_y", 0.f);
85
86 m_fZoomRotateTime = READ_IF_EXISTS(pSettings, r_float, hud_sect, "zoom_rotate_time", 0.25f);
87}
88
89void CPda::shedule_Update(u32 dt)
90{

Callers 1

NameMethod · 0.45

Calls 3

LoadFunction · 0.85
line_existMethod · 0.80
r_floatMethod · 0.45

Tested by

no test coverage detected