|
| 1 | +use crate::interface::common::SkyboxVisibility; |
1 | 2 | use crate::interface::{MaterialSystem, NetChannelInfo}; |
2 | 3 |
|
3 | 4 | use super::common::ButtonCode; |
@@ -33,10 +34,10 @@ pub struct ClientTextMessage { |
33 | 34 | #[vtable] |
34 | 35 | pub struct EngineClient { |
35 | 36 | #[offset(1)] |
36 | | - #[cfg(feature = "userdata")] |
| 37 | + |
37 | 38 | pub GetLightForPoint: extern "C" fn(pos: &Vector, bClamp: bool) -> Vector, |
38 | 39 |
|
39 | | - #[cfg(feature = "userdata")] |
| 40 | + |
40 | 41 | pub TraceLineMaterialAndLighting: extern "C" fn( |
41 | 42 | start: &Vector, |
42 | 43 | end: &Vector, |
@@ -114,35 +115,47 @@ pub struct EngineClient { |
114 | 115 | pub SaveAllocMemory: extern "C" fn(num: usize, size: usize) -> *mut c_void, |
115 | 116 | pub SaveFreeMemory: extern "C" fn(pSaveMem: *mut c_void), |
116 | 117 |
|
117 | | - #[offset(72)] |
| 118 | + #[check(72)] |
118 | 119 | pub GetNetChannelInfo: extern "C" fn() -> *mut NetChannelInfo, |
119 | | - |
120 | | - #[offset(76)] |
| 120 | + #[skip(1)] |
| 121 | + pub CheckPoint: extern "C" fn(pname: *const c_char), |
| 122 | + pub DrawPortals: extern "C" fn(), |
| 123 | + #[check(76)] |
121 | 124 | pub IsPlayingDemo: extern "C" fn() -> bool, |
122 | 125 | pub IsRecordingDemo: extern "C" fn() -> bool, |
123 | | - |
124 | | - #[offset(84)] |
| 126 | + pub IsPlayingTimeDemo: extern "C" fn() -> bool, |
| 127 | + pub GetDemoRecordingTick: extern "C" fn() -> c_int, |
| 128 | + pub GetDemoPlaybackTick: extern "C" fn() -> c_int, |
| 129 | + pub GetDemoPlaybackStartTick: extern "C" fn() -> c_int, |
| 130 | + pub GetDemoPlaybackTimeScale: extern "C" fn() -> c_float, |
| 131 | + pub GetDemoPlaybackTotalTicks: extern "C" fn() -> c_int, |
| 132 | + #[check(84)] |
125 | 133 | pub IsPaused: extern "C" fn() -> bool, |
126 | 134 | pub IsTakingScreenshot: extern "C" fn() -> bool, |
127 | 135 | pub IsHLTV: extern "C" fn() -> bool, |
128 | 136 | pub IsLevelMainMenuBackground: extern "C" fn() -> bool, |
129 | 137 | pub GetMainMenuBackgroundName: extern "C" fn(dest: *mut c_char, destlen: c_int), |
130 | 138 |
|
131 | | - #[offset(91)] |
| 139 | + #[skip(2)] |
| 140 | + #[check(91)] |
132 | 141 | pub GetUILanguage: extern "C" fn(dest: *mut c_char, destlen: c_int), |
133 | | - |
134 | | - #[offset(94)] |
| 142 | + pub IsSkyboxVisibleFromPoint: extern "C" fn(vecPoint: &Vector) -> SkyboxVisibility, |
| 143 | + pub GetMapEntitiesString: extern "C" fn() -> *const c_char, |
135 | 144 | pub IsInEditMode: extern "C" fn() -> bool, |
136 | 145 | pub GetScreenAspectRatio: extern "C" fn() -> c_float, |
137 | 146 |
|
138 | | - #[offset(101)] |
| 147 | + #[skip(2)] |
| 148 | + pub GetEngineBuildNumber: extern "C" fn() -> c_uint, |
| 149 | + pub GetProductVersionString: extern "C" fn() -> *const c_char, |
| 150 | + pub GrabPreColorCorrectedFrame: extern "C" fn(x: c_int, y: c_int, width: c_int, height: c_int), |
| 151 | + #[check(101)] |
139 | 152 | pub IsHammerRunning: extern "C" fn() -> bool, |
140 | 153 | /// This is NOT checked against the FCVAR_CLIENTCMD_CAN_EXECUTE vars |
141 | 154 | pub ExecuteClientCmd: extern "C" fn(cmd: *const c_char), |
142 | 155 | pub MapHasHDRLighting: extern "C" fn() -> bool, |
143 | 156 | pub GetAppID: extern "C" fn() -> c_int, |
144 | 157 |
|
145 | | - #[cfg(feature = "userdata")] |
| 158 | + |
146 | 159 | pub GetLightForPointFast: extern "C" fn(pos: &Vector, bClamp: bool) -> Vector, |
147 | 160 |
|
148 | 161 | #[offset(106)] |
|
0 commit comments