|
faluco@505
|
1 |
/** |
|
dvander@600
|
2 |
* vim: set ts=4 : |
|
ds@1330
|
3 |
* ============================================================================= |
|
dvander@1231
|
4 |
* SourceMod |
|
dvander@1231
|
5 |
* Copyright (C) 2004-2007 AlliedModders LLC. All rights reserved. |
|
ds@1330
|
6 |
* ============================================================================= |
|
dvander@600
|
7 |
* |
|
ds@1330
|
8 |
* This program is free software; you can redistribute it and/or modify it under |
|
ds@1330
|
9 |
* the terms of the GNU General Public License, version 3.0, as published by the |
|
ds@1330
|
10 |
* Free Software Foundation. |
|
dvander@1231
|
11 |
* |
|
ds@1330
|
12 |
* This program is distributed in the hope that it will be useful, but WITHOUT |
|
ds@1330
|
13 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
|
ds@1330
|
14 |
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more |
|
ds@1330
|
15 |
* details. |
|
dvander@1231
|
16 |
* |
|
ds@1330
|
17 |
* You should have received a copy of the GNU General Public License along with |
|
ds@1330
|
18 |
* this program. If not, see <http://www.gnu.org/licenses/>. |
|
dvander@1231
|
19 |
* |
|
ds@1330
|
20 |
* As a special exception, AlliedModders LLC gives you permission to link the |
|
ds@1330
|
21 |
* code of this program (as well as its derivative works) to "Half-Life 2," the |
|
ds@1330
|
22 |
* "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software |
|
ds@1330
|
23 |
* by the Valve Corporation. You must obey the GNU General Public License in |
|
ds@1330
|
24 |
* all respects for all other code used. Additionally, AlliedModders LLC grants |
|
ds@1330
|
25 |
* this exception to all derivative works. AlliedModders LLC defines further |
|
ds@1330
|
26 |
* exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007), |
|
ds@1330
|
27 |
* or <http://www.sourcemod.net/license.php>. |
|
dvander@600
|
28 |
* |
|
dvander@600
|
29 |
* Version: $Id$ |
|
dvander@600
|
30 |
*/ |
|
faluco@505
|
31 |
|
|
ds@511
|
32 |
#include "sourcemod.h" |
|
ds@511
|
33 |
#include "HandleSys.h" |
|
faluco@505
|
34 |
#include <bitbuf.h> |
|
faluco@505
|
35 |
#include <vector.h> |
|
faluco@505
|
36 |
|
|
faluco@505
|
37 |
static cell_t smn_BfWriteBool(IPluginContext *pCtx, const cell_t *params) |
|
faluco@505
|
38 |
{ |
|
faluco@505
|
39 |
Handle_t hndl = static_cast<Handle_t>(params[1]); |
|
faluco@505
|
40 |
HandleError herr; |
|
faluco@505
|
41 |
HandleSecurity sec; |
|
faluco@505
|
42 |
bf_write *pBitBuf; |
|
faluco@505
|
43 |
|
|
faluco@505
|
44 |
sec.pOwner = NULL; |
|
faluco@505
|
45 |
sec.pIdentity = g_pCoreIdent; |
|
faluco@505
|
46 |
|
|
faluco@505
|
47 |
if ((herr=g_HandleSys.ReadHandle(hndl, g_WrBitBufType, &sec, (void **)&pBitBuf)) |
|
faluco@505
|
48 |
!= HandleError_None) |
|
faluco@505
|
49 |
{ |
|
faluco@505
|
50 |
return pCtx->ThrowNativeError("Invalid bit buffer handle %x (error %d)", hndl, herr); |
|
faluco@505
|
51 |
} |
|
faluco@505
|
52 |
|
|
faluco@505
|
53 |
pBitBuf->WriteOneBit(params[2]); |
|
faluco@505
|
54 |
|
|
faluco@505
|
55 |
return 1; |
|
faluco@505
|
56 |
} |
|
faluco@505
|
57 |
|
|
faluco@505
|
58 |
static cell_t smn_BfWriteByte(IPluginContext *pCtx, const cell_t *params) |
|
faluco@505
|
59 |
{ |
|
faluco@505
|
60 |
Handle_t hndl = static_cast<Handle_t>(params[1]); |
|
faluco@505
|
61 |
HandleError herr; |
|
faluco@505
|
62 |
HandleSecurity sec; |
|
faluco@505
|
63 |
bf_write *pBitBuf; |
|
faluco@505
|
64 |
|
|
faluco@505
|
65 |
sec.pOwner = NULL; |
|
faluco@505
|
66 |
sec.pIdentity = g_pCoreIdent; |
|
faluco@505
|
67 |
|
|
faluco@505
|
68 |
if ((herr=g_HandleSys.ReadHandle(hndl, g_WrBitBufType, &sec, (void **)&pBitBuf)) |
|
faluco@505
|
69 |
!= HandleError_None) |
|
faluco@505
|
70 |
{ |
|
faluco@505
|
71 |
return pCtx->ThrowNativeError("Invalid bit buffer handle %x (error %d)", hndl, herr); |
|
faluco@505
|
72 |
} |
|
faluco@505
|
73 |
|
|
faluco@505
|
74 |
pBitBuf->WriteByte(params[2]); |
|
faluco@505
|
75 |
|
|
faluco@505
|
76 |
return 1; |
|
faluco@505
|
77 |
} |
|
faluco@505
|
78 |
|
|
faluco@505
|
79 |
static cell_t smn_BfWriteChar(IPluginContext *pCtx, const cell_t *params) |
|
faluco@505
|
80 |
{ |
|
faluco@505
|
81 |
Handle_t hndl = static_cast<Handle_t>(params[1]); |
|
faluco@505
|
82 |
HandleError herr; |
|
faluco@505
|
83 |
HandleSecurity sec; |
|
faluco@505
|
84 |
bf_write *pBitBuf; |
|
faluco@505
|
85 |
|
|
faluco@505
|
86 |
sec.pOwner = NULL; |
|
faluco@505
|
87 |
sec.pIdentity = g_pCoreIdent; |
|
faluco@505
|
88 |
|
|
faluco@505
|
89 |
if ((herr=g_HandleSys.ReadHandle(hndl, g_WrBitBufType, &sec, (void **)&pBitBuf)) |
|
faluco@505
|
90 |
!= HandleError_None) |
|
faluco@505
|
91 |
{ |
|
faluco@505
|
92 |
return pCtx->ThrowNativeError("Invalid bit buffer handle %x (error %d)", hndl, herr); |
|
faluco@505
|
93 |
} |
|
faluco@505
|
94 |
|
|
faluco@505
|
95 |
pBitBuf->WriteChar(params[2]); |
|
faluco@505
|
96 |
|
|
faluco@505
|
97 |
return 1; |
|
faluco@505
|
98 |
} |
|
faluco@505
|
99 |
|
|
faluco@505
|
100 |
static cell_t smn_BfWriteShort(IPluginContext *pCtx, const cell_t *params) |
|
faluco@505
|
101 |
{ |
|
faluco@505
|
102 |
Handle_t hndl = static_cast<Handle_t>(params[1]); |
|
faluco@505
|
103 |
HandleError herr; |
|
faluco@505
|
104 |
HandleSecurity sec; |
|
faluco@505
|
105 |
bf_write *pBitBuf; |
|
faluco@505
|
106 |
|
|
faluco@505
|
107 |
sec.pOwner = NULL; |
|
faluco@505
|
108 |
sec.pIdentity = g_pCoreIdent; |
|
faluco@505
|
109 |
|
|
faluco@505
|
110 |
if ((herr=g_HandleSys.ReadHandle(hndl, g_WrBitBufType, &sec, (void **)&pBitBuf)) |
|
faluco@505
|
111 |
!= HandleError_None) |
|
faluco@505
|
112 |
{ |
|
faluco@505
|
113 |
return pCtx->ThrowNativeError("Invalid bit buffer handle %x (error %d)", hndl, herr); |
|
faluco@505
|
114 |
} |
|
faluco@505
|
115 |
|
|
faluco@505
|
116 |
pBitBuf->WriteShort(params[2]); |
|
faluco@505
|
117 |
|
|
faluco@505
|
118 |
return 1; |
|
faluco@505
|
119 |
} |
|
faluco@505
|
120 |
|
|
faluco@505
|
121 |
static cell_t smn_BfWriteWord(IPluginContext *pCtx, const cell_t *params) |
|
faluco@505
|
122 |
{ |
|
faluco@505
|
123 |
Handle_t hndl = static_cast<Handle_t>(params[1]); |
|
faluco@505
|
124 |
HandleError herr; |
|
faluco@505
|
125 |
HandleSecurity sec; |
|
faluco@505
|
126 |
bf_write *pBitBuf; |
|
faluco@505
|
127 |
|
|
faluco@505
|
128 |
sec.pOwner = NULL; |
|
faluco@505
|
129 |
sec.pIdentity = g_pCoreIdent; |
|
faluco@505
|
130 |
|
|
faluco@505
|
131 |
if ((herr=g_HandleSys.ReadHandle(hndl, g_WrBitBufType, &sec, (void **)&pBitBuf)) |
|
faluco@505
|
132 |
!= HandleError_None) |
|
faluco@505
|
133 |
{ |
|
faluco@505
|
134 |
return pCtx->ThrowNativeError("Invalid bit buffer handle %x (error %d)", hndl, herr); |
|
faluco@505
|
135 |
} |
|
faluco@505
|
136 |
|
|
faluco@505
|
137 |
pBitBuf->WriteWord(params[2]); |
|
faluco@505
|
138 |
|
|
faluco@505
|
139 |
return 1; |
|
faluco@505
|
140 |
} |
|
faluco@505
|
141 |
|
|
faluco@505
|
142 |
static cell_t smn_BfWriteNum(IPluginContext *pCtx, const cell_t *params) |
|
faluco@505
|
143 |
{ |
|
faluco@505
|
144 |
Handle_t hndl = static_cast<Handle_t>(params[1]); |
|
faluco@505
|
145 |
HandleError herr; |
|
faluco@505
|
146 |
HandleSecurity sec; |
|
faluco@505
|
147 |
bf_write *pBitBuf; |
|
faluco@505
|
148 |
|
|
faluco@505
|
149 |
sec.pOwner = NULL; |
|
faluco@505
|
150 |
sec.pIdentity = g_pCoreIdent; |
|
faluco@505
|
151 |
|
|
faluco@505
|
152 |
if ((herr=g_HandleSys.ReadHandle(hndl, g_WrBitBufType, &sec, (void **)&pBitBuf)) |
|
faluco@505
|
153 |
!= HandleError_None) |
|
faluco@505
|
154 |
{ |
|
faluco@505
|
155 |
return pCtx->ThrowNativeError("Invalid bit buffer handle %x (error %d)", hndl, herr); |
|
faluco@505
|
156 |
} |
|
faluco@505
|
157 |
|
|
faluco@505
|
158 |
pBitBuf->WriteLong(static_cast<long>(params[2])); |
|
faluco@505
|
159 |
|
|
faluco@505
|
160 |
return 1; |
|
faluco@505
|
161 |
} |
|
faluco@505
|
162 |
|
|
faluco@505
|
163 |
static cell_t smn_BfWriteFloat(IPluginContext *pCtx, const cell_t *params) |
|
faluco@505
|
164 |
{ |
|
faluco@505
|
165 |
Handle_t hndl = static_cast<Handle_t>(params[1]); |
|
faluco@505
|
166 |
HandleError herr; |
|
faluco@505
|
167 |
HandleSecurity sec; |
|
faluco@505
|
168 |
bf_write *pBitBuf; |
|
faluco@505
|
169 |
|
|
faluco@505
|
170 |
sec.pOwner = NULL; |
|
faluco@505
|
171 |
sec.pIdentity = g_pCoreIdent; |
|
faluco@505
|
172 |
|
|
faluco@505
|
173 |
if ((herr=g_HandleSys.ReadHandle(hndl, g_WrBitBufType, &sec, (void **)&pBitBuf)) |
|
faluco@505
|
174 |
!= HandleError_None) |
|
faluco@505
|
175 |
{ |
|
faluco@505
|
176 |
return pCtx->ThrowNativeError("Invalid bit buffer handle %x (error %d)", hndl, herr); |
|
faluco@505
|
177 |
} |
|
faluco@505
|
178 |
|
|
faluco@505
|
179 |
pBitBuf->WriteFloat(sp_ctof(params[2])); |
|
faluco@505
|
180 |
|
|
faluco@505
|
181 |
return 1; |
|
faluco@505
|
182 |
} |
|
faluco@505
|
183 |
|
|
faluco@505
|
184 |
static cell_t smn_BfWriteString(IPluginContext *pCtx, const cell_t *params) |
|
faluco@505
|
185 |
{ |
|
faluco@505
|
186 |
Handle_t hndl = static_cast<Handle_t>(params[1]); |
|
faluco@505
|
187 |
HandleError herr; |
|
faluco@505
|
188 |
HandleSecurity sec; |
|
faluco@505
|
189 |
bf_write *pBitBuf; |
|
faluco@505
|
190 |
int err; |
|
faluco@505
|
191 |
|
|
faluco@505
|
192 |
sec.pOwner = NULL; |
|
faluco@505
|
193 |
sec.pIdentity = g_pCoreIdent; |
|
faluco@505
|
194 |
|
|
faluco@505
|
195 |
if ((herr=g_HandleSys.ReadHandle(hndl, g_WrBitBufType, &sec, (void **)&pBitBuf)) |
|
faluco@505
|
196 |
!= HandleError_None) |
|
faluco@505
|
197 |
{ |
|
faluco@505
|
198 |
return pCtx->ThrowNativeError("Invalid bit buffer handle %x (error %d)", hndl, herr); |
|
faluco@505
|
199 |
} |
|
faluco@505
|
200 |
|
|
faluco@505
|
201 |
char *str; |
|
faluco@505
|
202 |
if ((err=pCtx->LocalToString(params[2], &str)) != SP_ERROR_NONE) |
|
faluco@505
|
203 |
{ |
|
faluco@505
|
204 |
pCtx->ThrowNativeErrorEx(err, NULL); |
|
faluco@505
|
205 |
return 0; |
|
faluco@505
|
206 |
} |
|
faluco@505
|
207 |
|
|
faluco@505
|
208 |
pBitBuf->WriteString(str); |
|
faluco@505
|
209 |
|
|
faluco@505
|
210 |
return 1; |
|
faluco@505
|
211 |
} |
|
faluco@505
|
212 |
|
|
faluco@505
|
213 |
static cell_t smn_BfWriteEntity(IPluginContext *pCtx, const cell_t *params) |
|
faluco@505
|
214 |
{ |
|
faluco@505
|
215 |
Handle_t hndl = static_cast<Handle_t>(params[1]); |
|
faluco@505
|
216 |
HandleError herr; |
|
faluco@505
|
217 |
HandleSecurity sec; |
|
faluco@505
|
218 |
bf_write *pBitBuf; |
|
faluco@505
|
219 |
|
|
faluco@505
|
220 |
sec.pOwner = NULL; |
|
faluco@505
|
221 |
sec.pIdentity = g_pCoreIdent; |
|
faluco@505
|
222 |
|
|
faluco@505
|
223 |
if ((herr=g_HandleSys.ReadHandle(hndl, g_WrBitBufType, &sec, (void **)&pBitBuf)) |
|
faluco@505
|
224 |
!= HandleError_None) |
|
faluco@505
|
225 |
{ |
|
faluco@505
|
226 |
return pCtx->ThrowNativeError("Invalid bit buffer handle %x (error %d)", hndl, herr); |
|
faluco@505
|
227 |
} |
|
faluco@505
|
228 |
|
|
faluco@505
|
229 |
pBitBuf->WriteShort(params[2]); |
|
faluco@505
|
230 |
|
|
faluco@505
|
231 |
return 1; |
|
faluco@505
|
232 |
} |
|
faluco@505
|
233 |
|
|
faluco@505
|
234 |
static cell_t smn_BfWriteAngle(IPluginContext *pCtx, const cell_t *params) |
|
faluco@505
|
235 |
{ |
|
faluco@505
|
236 |
Handle_t hndl = static_cast<Handle_t>(params[1]); |
|
faluco@505
|
237 |
HandleError herr; |
|
faluco@505
|
238 |
HandleSecurity sec; |
|
faluco@505
|
239 |
bf_write *pBitBuf; |
|
faluco@505
|
240 |
|
|
faluco@505
|
241 |
sec.pOwner = NULL; |
|
faluco@505
|
242 |
sec.pIdentity = g_pCoreIdent; |
|
faluco@505
|
243 |
|
|
faluco@505
|
244 |
if ((herr=g_HandleSys.ReadHandle(hndl, g_WrBitBufType, &sec, (void **)&pBitBuf)) |
|
faluco@505
|
245 |
!= HandleError_None) |
|
faluco@505
|
246 |
{ |
|
faluco@505
|
247 |
return pCtx->ThrowNativeError("Invalid bit buffer handle %x (error %d)", hndl, herr); |
|
faluco@505
|
248 |
} |
|
faluco@505
|
249 |
|
|
faluco@505
|
250 |
pBitBuf->WriteBitAngle(sp_ctof(params[2]), params[3]); |
|
faluco@505
|
251 |
|
|
faluco@505
|
252 |
return 1; |
|
faluco@505
|
253 |
} |
|
faluco@505
|
254 |
|
|
faluco@505
|
255 |
static cell_t smn_BfWriteCoord(IPluginContext *pCtx, const cell_t *params) |
|
faluco@505
|
256 |
{ |
|
faluco@505
|
257 |
Handle_t hndl = static_cast<Handle_t>(params[1]); |
|
faluco@505
|
258 |
HandleError herr; |
|
faluco@505
|
259 |
HandleSecurity sec; |
|
faluco@505
|
260 |
bf_write *pBitBuf; |
|
faluco@505
|
261 |
|
|
faluco@505
|
262 |
sec.pOwner = NULL; |
|
faluco@505
|
263 |
sec.pIdentity = g_pCoreIdent; |
|
faluco@505
|
264 |
|
|
faluco@505
|
265 |
if ((herr=g_HandleSys.ReadHandle(hndl, g_WrBitBufType, &sec, (void **)&pBitBuf)) |
|
faluco@505
|
266 |
!= HandleError_None) |
|
faluco@505
|
267 |
{ |
|
faluco@505
|
268 |
return pCtx->ThrowNativeError("Invalid bit buffer handle %x (error %d)", hndl, herr); |
|
faluco@505
|
269 |
} |
|
faluco@505
|
270 |
|
|
faluco@505
|
271 |
pBitBuf->WriteBitCoord(sp_ctof(params[2])); |
|
faluco@505
|
272 |
|
|
faluco@505
|
273 |
return 1; |
|
faluco@505
|
274 |
} |
|
faluco@505
|
275 |
|
|
faluco@505
|
276 |
static cell_t smn_BfWriteVecCoord(IPluginContext *pCtx, const cell_t *params) |
|
faluco@505
|
277 |
{ |
|
faluco@505
|
278 |
Handle_t hndl = static_cast<Handle_t>(params[1]); |
|
faluco@505
|
279 |
HandleError herr; |
|
faluco@505
|
280 |
HandleSecurity sec; |
|
faluco@505
|
281 |
bf_write *pBitBuf; |
|
faluco@505
|
282 |
|
|
faluco@505
|
283 |
sec.pOwner = NULL; |
|
faluco@505
|
284 |
sec.pIdentity = g_pCoreIdent; |
|
faluco@505
|
285 |
|
|
faluco@505
|
286 |
if ((herr=g_HandleSys.ReadHandle(hndl, g_WrBitBufType, &sec, (void **)&pBitBuf)) |
|
faluco@505
|
287 |
!= HandleError_None) |
|
faluco@505
|
288 |
{ |
|
faluco@505
|
289 |
return pCtx->ThrowNativeError("Invalid bit buffer handle %x (error %d)", hndl, herr); |
|
faluco@505
|
290 |
} |
|
faluco@505
|
291 |
|
|
faluco@505
|
292 |
cell_t *pVec; |
|
faluco@505
|
293 |
pCtx->LocalToPhysAddr(params[2], &pVec); |
|
faluco@505
|
294 |
Vector vec(sp_ctof(pVec[0]), sp_ctof(pVec[1]), sp_ctof(pVec[2])); |
|
faluco@505
|
295 |
pBitBuf->WriteBitVec3Coord(vec); |
|
faluco@505
|
296 |
|
|
faluco@505
|
297 |
return 1; |
|
faluco@505
|
298 |
} |
|
faluco@505
|
299 |
|
|
faluco@505
|
300 |
static cell_t smn_BfWriteVecNormal(IPluginContext *pCtx, const cell_t *params) |
|
faluco@505
|
301 |
{ |
|
faluco@505
|
302 |
Handle_t hndl = static_cast<Handle_t>(params[1]); |
|
faluco@505
|
303 |
HandleError herr; |
|
faluco@505
|
304 |
HandleSecurity sec; |
|
faluco@505
|
305 |
bf_write *pBitBuf; |
|
faluco@505
|
306 |
|
|
faluco@505
|
307 |
sec.pOwner = NULL; |
|
faluco@505
|
308 |
sec.pIdentity = g_pCoreIdent; |
|
faluco@505
|
309 |
|
|
faluco@505
|
310 |
if ((herr=g_HandleSys.ReadHandle(hndl, g_WrBitBufType, &sec, (void **)&pBitBuf)) |
|
faluco@505
|
311 |
!= HandleError_None) |
|
faluco@505
|
312 |
{ |
|
faluco@505
|
313 |
return pCtx->ThrowNativeError("Invalid bit buffer handle %x (error %d)", hndl, herr); |
|
faluco@505
|
314 |
} |
|
faluco@505
|
315 |
|
|
faluco@505
|
316 |
cell_t *pVec; |
|
faluco@505
|
317 |
pCtx->LocalToPhysAddr(params[2], &pVec); |
|
faluco@505
|
318 |
Vector vec(sp_ctof(pVec[0]), sp_ctof(pVec[1]), sp_ctof(pVec[2])); |
|
faluco@505
|
319 |
pBitBuf->WriteBitVec3Normal(vec); |
|
faluco@505
|
320 |
|
|
faluco@505
|
321 |
return 1; |
|
faluco@505
|
322 |
} |
|
faluco@505
|
323 |
|
|
faluco@505
|
324 |
static cell_t smn_BfWriteAngles(IPluginContext *pCtx, const cell_t *params) |
|
faluco@505
|
325 |
{ |
|
faluco@505
|
326 |
Handle_t hndl = static_cast<Handle_t>(params[1]); |
|
faluco@505
|
327 |
HandleError herr; |
|
faluco@505
|
328 |
HandleSecurity sec; |
|
faluco@505
|
329 |
bf_write *pBitBuf; |
|
faluco@505
|
330 |
|
|
faluco@505
|
331 |
sec.pOwner = NULL; |
|
faluco@505
|
332 |
sec.pIdentity = g_pCoreIdent; |
|
faluco@505
|
333 |
|
|
faluco@505
|
334 |
if ((herr=g_HandleSys.ReadHandle(hndl, g_WrBitBufType, &sec, (void **)&pBitBuf)) |
|
faluco@505
|
335 |
!= HandleError_None) |
|
faluco@505
|
336 |
{ |
|
faluco@505
|
337 |
return pCtx->ThrowNativeError("Invalid bit buffer handle %x (error %d)", hndl, herr); |
|
faluco@505
|
338 |
} |
|
faluco@505
|
339 |
|
|
faluco@505
|
340 |
cell_t *pAng; |
|
faluco@505
|
341 |
pCtx->LocalToPhysAddr(params[2], &pAng); |
|
faluco@505
|
342 |
QAngle ang(sp_ctof(pAng[0]), sp_ctof(pAng[1]), sp_ctof(pAng[2])); |
|
faluco@505
|
343 |
pBitBuf->WriteBitAngles(ang); |
|
faluco@505
|
344 |
|
|
faluco@505
|
345 |
return 1; |
|
faluco@505
|
346 |
} |
|
faluco@505
|
347 |
|
|
faluco@598
|
348 |
static cell_t smn_BfReadBool(IPluginContext *pCtx, const cell_t *params) |
|
faluco@598
|
349 |
{ |
|
faluco@598
|
350 |
Handle_t hndl = static_cast<Handle_t>(params[1]); |
|
faluco@598
|
351 |
HandleError herr; |
|
faluco@598
|
352 |
HandleSecurity sec; |
|
faluco@598
|
353 |
bf_read *pBitBuf; |
|
faluco@598
|
354 |
|
|
faluco@598
|
355 |
sec.pOwner = NULL; |
|
faluco@598
|
356 |
sec.pIdentity = g_pCoreIdent; |
|
faluco@598
|
357 |
|
|
faluco@598
|
358 |
if ((herr=g_HandleSys.ReadHandle(hndl, g_RdBitBufType, &sec, (void **)&pBitBuf)) |
|
faluco@598
|
359 |
!= HandleError_None) |
|
faluco@598
|
360 |
{ |
|
faluco@598
|
361 |
return pCtx->ThrowNativeError("Invalid bit buffer handle %x (error %d)", hndl, herr); |
|
faluco@598
|
362 |
} |
|
faluco@598
|
363 |
|
|
faluco@598
|
364 |
return pBitBuf->ReadOneBit() ? 1 : 0; |
|
faluco@598
|
365 |
} |
|
faluco@598
|
366 |
|
|
faluco@598
|
367 |
static cell_t smn_BfReadByte(IPluginContext *pCtx, const cell_t *params) |
|
faluco@598
|
368 |
{ |
|
faluco@598
|
369 |
Handle_t hndl = static_cast<Handle_t>(params[1]); |
|
faluco@598
|
370 |
HandleError herr; |
|
faluco@598
|
371 |
HandleSecurity sec; |
|
faluco@598
|
372 |
bf_read *pBitBuf; |
|
faluco@598
|
373 |
|
|
faluco@598
|
374 |
sec.pOwner = NULL; |
|
faluco@598
|
375 |
sec.pIdentity = g_pCoreIdent; |
|
faluco@598
|
376 |
|
|
faluco@598
|
377 |
if ((herr=g_HandleSys.ReadHandle(hndl, g_RdBitBufType, &sec, (void **)&pBitBuf)) |
|
faluco@598
|
378 |
!= HandleError_None) |
|
faluco@598
|
379 |
{ |
|
faluco@598
|
380 |
return pCtx->ThrowNativeError("Invalid bit buffer handle %x (error %d)", hndl, herr); |
|
faluco@598
|
381 |
} |
|
faluco@598
|
382 |
|
|
faluco@598
|
383 |
return pBitBuf->ReadByte(); |
|
faluco@598
|
384 |
} |
|
faluco@598
|
385 |
|
|
faluco@598
|
386 |
static cell_t smn_BfReadChar(IPluginContext *pCtx, const cell_t *params) |
|
faluco@598
|
387 |
{ |
|
faluco@598
|
388 |
Handle_t hndl = static_cast<Handle_t>(params[1]); |
|
faluco@598
|
389 |
HandleError herr; |
|
faluco@598
|
390 |
HandleSecurity sec; |
|
faluco@598
|
391 |
bf_read *pBitBuf; |
|
faluco@598
|
392 |
|
|
faluco@598
|
393 |
sec.pOwner = NULL; |
|
faluco@598
|
394 |
sec.pIdentity = g_pCoreIdent; |
|
faluco@598
|
395 |
|
|
faluco@598
|
396 |
if ((herr=g_HandleSys.ReadHandle(hndl, g_RdBitBufType, &sec, (void **)&pBitBuf)) |
|
faluco@598
|
397 |
!= HandleError_None) |
|
faluco@598
|
398 |
{ |
|
faluco@598
|
399 |
return pCtx->ThrowNativeError("Invalid bit buffer handle %x (error %d)", hndl, herr); |
|
faluco@598
|
400 |
} |
|
faluco@598
|
401 |
|
|
faluco@598
|
402 |
return pBitBuf->ReadChar(); |
|
faluco@598
|
403 |
} |
|
faluco@598
|
404 |
|
|
faluco@598
|
405 |
static cell_t smn_BfReadShort(IPluginContext *pCtx, const cell_t *params) |
|
faluco@598
|
406 |
{ |
|
faluco@598
|
407 |
Handle_t hndl = static_cast<Handle_t>(params[1]); |
|
faluco@598
|
408 |
HandleError herr; |
|
faluco@598
|
409 |
HandleSecurity sec; |
|
faluco@598
|
410 |
bf_read *pBitBuf; |
|
faluco@598
|
411 |
|
|
faluco@598
|
412 |
sec.pOwner = NULL; |
|
faluco@598
|
413 |
sec.pIdentity = g_pCoreIdent; |
|
faluco@598
|
414 |
|
|
faluco@598
|
415 |
if ((herr=g_HandleSys.ReadHandle(hndl, g_RdBitBufType, &sec, (void **)&pBitBuf)) |
|
faluco@598
|
416 |
!= HandleError_None) |
|
faluco@598
|
417 |
{ |
|
faluco@598
|
418 |
return pCtx->ThrowNativeError("Invalid bit buffer handle %x (error %d)", hndl, herr); |
|
faluco@598
|
419 |
} |
|
faluco@598
|
420 |
|
|
faluco@598
|
421 |
return pBitBuf->ReadShort(); |
|
faluco@598
|
422 |
} |
|
faluco@598
|
423 |
|
|
faluco@598
|
424 |
static cell_t smn_BfReadWord(IPluginContext *pCtx, const cell_t *params) |
|
faluco@598
|
425 |
{ |
|
faluco@598
|
426 |
Handle_t hndl = static_cast<Handle_t>(params[1]); |
|
faluco@598
|
427 |
HandleError herr; |
|
faluco@598
|
428 |
HandleSecurity sec; |
|
faluco@598
|
429 |
bf_read *pBitBuf; |
|
faluco@598
|
430 |
|
|
faluco@598
|
431 |
sec.pOwner = NULL; |
|
faluco@598
|
432 |
sec.pIdentity = g_pCoreIdent; |
|
faluco@598
|
433 |
|
|
faluco@598
|
434 |
if ((herr=g_HandleSys.ReadHandle(hndl, g_RdBitBufType, &sec, (void **)&pBitBuf)) |
|
faluco@598
|
435 |
!= HandleError_None) |
|
faluco@598
|
436 |
{ |
|
faluco@598
|
437 |
return pCtx->ThrowNativeError("Invalid bit buffer handle %x (error %d)", hndl, herr); |
|
faluco@598
|
438 |
} |
|
faluco@598
|
439 |
|
|
faluco@598
|
440 |
return pBitBuf->ReadWord(); |
|
faluco@598
|
441 |
} |
|
faluco@598
|
442 |
|
|
faluco@598
|
443 |
static cell_t smn_BfReadNum(IPluginContext *pCtx, const cell_t *params) |
|
faluco@598
|
444 |
{ |
|
faluco@598
|
445 |
Handle_t hndl = static_cast<Handle_t>(params[1]); |
|
faluco@598
|
446 |
HandleError herr; |
|
faluco@598
|
447 |
HandleSecurity sec; |
|
faluco@598
|
448 |
bf_read *pBitBuf; |
|
faluco@598
|
449 |
|
|
faluco@598
|
450 |
sec.pOwner = NULL; |
|
faluco@598
|
451 |
sec.pIdentity = g_pCoreIdent; |
|
faluco@598
|
452 |
|
|
faluco@598
|
453 |
if ((herr=g_HandleSys.ReadHandle(hndl, g_RdBitBufType, &sec, (void **)&pBitBuf)) |
|
faluco@598
|
454 |
!= HandleError_None) |
|
faluco@598
|
455 |
{ |
|
faluco@598
|
456 |
return pCtx->ThrowNativeError("Invalid bit buffer handle %x (error %d)", hndl, herr); |
|
faluco@598
|
457 |
} |
|
faluco@598
|
458 |
|
|
faluco@598
|
459 |
return static_cast<cell_t>(pBitBuf->ReadLong()); |
|
faluco@598
|
460 |
} |
|
faluco@598
|
461 |
|
|
faluco@598
|
462 |
static cell_t smn_BfReadFloat(IPluginContext *pCtx, const cell_t *params) |
|
faluco@598
|
463 |
{ |
|
faluco@598
|
464 |
Handle_t hndl = static_cast<Handle_t>(params[1]); |
|
faluco@598
|
465 |
HandleError herr; |
|
faluco@598
|
466 |
HandleSecurity sec; |
|
faluco@598
|
467 |
bf_read *pBitBuf; |
|
faluco@598
|
468 |
|
|
faluco@598
|
469 |
sec.pOwner = NULL; |
|
faluco@598
|
470 |
sec.pIdentity = g_pCoreIdent; |
|
faluco@598
|
471 |
|
|
faluco@598
|
472 |
if ((herr=g_HandleSys.ReadHandle(hndl, g_RdBitBufType, &sec, (void **)&pBitBuf)) |
|
faluco@598
|
473 |
!= HandleError_None) |
|
faluco@598
|
474 |
{ |
|
faluco@598
|
475 |
return pCtx->ThrowNativeError("Invalid bit buffer handle %x (error %d)", hndl, herr); |
|
faluco@598
|
476 |
} |
|
faluco@598
|
477 |
|
|
faluco@598
|
478 |
return sp_ftoc(pBitBuf->ReadFloat()); |
|
faluco@598
|
479 |
} |
|
faluco@598
|
480 |
|
|
faluco@598
|
481 |
static cell_t smn_BfReadString(IPluginContext *pCtx, const cell_t *params) |
|
faluco@598
|
482 |
{ |
|
faluco@598
|
483 |
Handle_t hndl = static_cast<Handle_t>(params[1]); |
|
faluco@598
|
484 |
HandleError herr; |
|
faluco@598
|
485 |
HandleSecurity sec; |
|
faluco@598
|
486 |
bf_read *pBitBuf; |
|
dvander@1750
|
487 |
int numChars = 0; |
|
faluco@598
|
488 |
char *buf; |
|
faluco@598
|
489 |
|
|
faluco@598
|
490 |
sec.pOwner = NULL; |
|
faluco@598
|
491 |
sec.pIdentity = g_pCoreIdent; |
|
faluco@598
|
492 |
|
|
faluco@598
|
493 |
if ((herr=g_HandleSys.ReadHandle(hndl, g_RdBitBufType, &sec, (void **)&pBitBuf)) |
|
faluco@598
|
494 |
!= HandleError_None) |
|
faluco@598
|
495 |
{ |
|
faluco@598
|
496 |
return pCtx->ThrowNativeError("Invalid bit buffer handle %x (error %d)", hndl, herr); |
|
faluco@598
|
497 |
} |
|
faluco@598
|
498 |
|
|
faluco@598
|
499 |
pCtx->LocalToPhysAddr(params[2], (cell_t **)&buf); |
|
dvander@1764
|
500 |
pBitBuf->ReadString(buf, params[3], params[4] ? true : false, &numChars); |
|
dvander@1750
|
501 |
|
|
dvander@1750
|
502 |
if (pBitBuf->IsOverflowed()) |
|
faluco@598
|
503 |
{ |
|
dvander@1750
|
504 |
return -numChars - 1; |
|
faluco@598
|
505 |
} |
|
faluco@598
|
506 |
|
|
dvander@1750
|
507 |
return numChars; |
|
faluco@598
|
508 |
} |
|
faluco@598
|
509 |
|
|
faluco@598
|
510 |
static cell_t smn_BfReadEntity(IPluginContext *pCtx, const cell_t *params) |
|
faluco@598
|
511 |
{ |
|
faluco@598
|
512 |
Handle_t hndl = static_cast<Handle_t>(params[1]); |
|
faluco@598
|
513 |
HandleError herr; |
|
faluco@598
|
514 |
HandleSecurity sec; |
|
faluco@598
|
515 |
bf_read *pBitBuf; |
|
faluco@598
|
516 |
|
|
faluco@598
|
517 |
sec.pOwner = NULL; |
|
faluco@598
|
518 |
sec.pIdentity = g_pCoreIdent; |
|
faluco@598
|
519 |
|
|
faluco@598
|
520 |
if ((herr=g_HandleSys.ReadHandle(hndl, g_RdBitBufType, &sec, (void **)&pBitBuf)) |
|
faluco@598
|
521 |
!= HandleError_None) |
|
faluco@598
|
522 |
{ |
|
faluco@598
|
523 |
return pCtx->ThrowNativeError("Invalid bit buffer handle %x (error %d)", hndl, herr); |
|
faluco@598
|
524 |
} |
|
faluco@598
|
525 |
|
|
faluco@598
|
526 |
return pBitBuf->ReadShort(); |
|
faluco@598
|
527 |
} |
|
faluco@598
|
528 |
|
|
faluco@598
|
529 |
static cell_t smn_BfReadAngle(IPluginContext *pCtx, const cell_t *params) |
|
faluco@598
|
530 |
{ |
|
faluco@598
|
531 |
Handle_t hndl = static_cast<Handle_t>(params[1]); |
|
faluco@598
|
532 |
HandleError herr; |
|
faluco@598
|
533 |
HandleSecurity sec; |
|
faluco@598
|
534 |
bf_read *pBitBuf; |
|
faluco@598
|
535 |
|
|
faluco@598
|
536 |
sec.pOwner = NULL; |
|
faluco@598
|
537 |
sec.pIdentity = g_pCoreIdent; |
|
faluco@598
|
538 |
|
|
faluco@598
|
539 |
if ((herr=g_HandleSys.ReadHandle(hndl, g_RdBitBufType, &sec, (void **)&pBitBuf)) |
|
faluco@598
|
540 |
!= HandleError_None) |
|
faluco@598
|
541 |
{ |
|
faluco@598
|
542 |
return pCtx->ThrowNativeError("Invalid bit buffer handle %x (error %d)", hndl, herr); |
|
faluco@598
|
543 |
} |
|
faluco@598
|
544 |
|
|
faluco@598
|
545 |
return sp_ftoc(pBitBuf->ReadBitAngle(params[2])); |
|
faluco@598
|
546 |
} |
|
faluco@598
|
547 |
|
|
faluco@598
|
548 |
static cell_t smn_BfReadCoord(IPluginContext *pCtx, const cell_t *params) |
|
faluco@598
|
549 |
{ |
|
faluco@598
|
550 |
Handle_t hndl = static_cast<Handle_t>(params[1]); |
|
faluco@598
|
551 |
HandleError herr; |
|
faluco@598
|
552 |
HandleSecurity sec; |
|
faluco@598
|
553 |
bf_read *pBitBuf; |
|
faluco@598
|
554 |
|
|
faluco@598
|
555 |
sec.pOwner = NULL; |
|
faluco@598
|
556 |
sec.pIdentity = g_pCoreIdent; |
|
faluco@598
|
557 |
|
|
faluco@598
|
558 |
if ((herr=g_HandleSys.ReadHandle(hndl, g_RdBitBufType, &sec, (void **)&pBitBuf)) |
|
faluco@598
|
559 |
!= HandleError_None) |
|
faluco@598
|
560 |
{ |
|
faluco@598
|
561 |
return pCtx->ThrowNativeError("Invalid bit buffer handle %x (error %d)", hndl, herr); |
|
faluco@598
|
562 |
} |
|
faluco@598
|
563 |
|
|
faluco@598
|
564 |
return sp_ftoc(pBitBuf->ReadBitCoord()); |
|
faluco@598
|
565 |
} |
|
faluco@598
|
566 |
|
|
faluco@598
|
567 |
static cell_t smn_BfReadVecCoord(IPluginContext *pCtx, const cell_t *params) |
|
faluco@598
|
568 |
{ |
|
faluco@598
|
569 |
Handle_t hndl = static_cast<Handle_t>(params[1]); |
|
faluco@598
|
570 |
HandleError herr; |
|
faluco@598
|
571 |
HandleSecurity sec; |
|
faluco@598
|
572 |
bf_read *pBitBuf; |
|
faluco@598
|
573 |
|
|
faluco@598
|
574 |
sec.pOwner = NULL; |
|
faluco@598
|
575 |
sec.pIdentity = g_pCoreIdent; |
|
faluco@598
|
576 |
|
|
faluco@598
|
577 |
if ((herr=g_HandleSys.ReadHandle(hndl, g_RdBitBufType, &sec, (void **)&pBitBuf)) |
|
faluco@598
|
578 |
!= HandleError_None) |
|
faluco@598
|
579 |
{ |
|
faluco@598
|
580 |
return pCtx->ThrowNativeError("Invalid bit buffer handle %x (error %d)", hndl, herr); |
|
faluco@598
|
581 |
} |
|
faluco@598
|
582 |
|
|
faluco@598
|
583 |
cell_t *pVec; |
|
faluco@598
|
584 |
pCtx->LocalToPhysAddr(params[2], &pVec); |
|
faluco@598
|
585 |
|
|
faluco@598
|
586 |
Vector vec; |
|
faluco@598
|
587 |
pBitBuf->ReadBitVec3Coord(vec); |
|
faluco@598
|
588 |
|
|
faluco@598
|
589 |
pVec[0] = sp_ftoc(vec.x); |
|
faluco@598
|
590 |
pVec[1] = sp_ftoc(vec.y); |
|
faluco@598
|
591 |
pVec[2] = sp_ftoc(vec.z); |
|
faluco@598
|
592 |
|
|
faluco@598
|
593 |
return 1; |
|
faluco@598
|
594 |
} |
|
faluco@598
|
595 |
|
|
faluco@598
|
596 |
static cell_t smn_BfReadVecNormal(IPluginContext *pCtx, const cell_t *params) |
|
faluco@598
|
597 |
{ |
|
faluco@598
|
598 |
Handle_t hndl = static_cast<Handle_t>(params[1]); |
|
faluco@598
|
599 |
HandleError herr; |
|
faluco@598
|
600 |
HandleSecurity sec; |
|
faluco@598
|
601 |
bf_read *pBitBuf; |
|
faluco@598
|
602 |
|
|
faluco@598
|
603 |
sec.pOwner = NULL; |
|
faluco@598
|
604 |
sec.pIdentity = g_pCoreIdent; |
|
faluco@598
|
605 |
|
|
faluco@598
|
606 |
if ((herr=g_HandleSys.ReadHandle(hndl, g_RdBitBufType, &sec, (void **)&pBitBuf)) |
|
faluco@598
|
607 |
!= HandleError_None) |
|
faluco@598
|
608 |
{ |
|
faluco@598
|
609 |
return pCtx->ThrowNativeError("Invalid bit buffer handle %x (error %d)", hndl, herr); |
|
faluco@598
|
610 |
} |
|
faluco@598
|
611 |
|
|
faluco@598
|
612 |
cell_t *pVec; |
|
faluco@598
|
613 |
pCtx->LocalToPhysAddr(params[2], &pVec); |
|
faluco@598
|
614 |
|
|
faluco@598
|
615 |
Vector vec; |
|
faluco@598
|
616 |
pBitBuf->ReadBitVec3Normal(vec); |
|
faluco@598
|
617 |
|
|
faluco@598
|
618 |
pVec[0] = sp_ftoc(vec.x); |
|
faluco@598
|
619 |
pVec[1] = sp_ftoc(vec.y); |
|
faluco@598
|
620 |
pVec[2] = sp_ftoc(vec.z); |
|
faluco@598
|
621 |
|
|
faluco@598
|
622 |
return 1; |
|
faluco@598
|
623 |
} |
|
faluco@598
|
624 |
|
|
faluco@598
|
625 |
static cell_t smn_BfReadAngles(IPluginContext *pCtx, const cell_t *params) |
|
faluco@598
|
626 |
{ |
|
faluco@598
|
627 |
Handle_t hndl = static_cast<Handle_t>(params[1]); |
|
faluco@598
|
628 |
HandleError herr; |
|
faluco@598
|
629 |
HandleSecurity sec; |
|
faluco@598
|
630 |
bf_read *pBitBuf; |
|
faluco@598
|
631 |
|
|
faluco@598
|
632 |
sec.pOwner = NULL; |
|
faluco@598
|
633 |
sec.pIdentity = g_pCoreIdent; |
|
faluco@598
|
634 |
|
|
faluco@598
|
635 |
if ((herr=g_HandleSys.ReadHandle(hndl, g_RdBitBufType, &sec, (void **)&pBitBuf)) |
|
faluco@598
|
636 |
!= HandleError_None) |
|
faluco@598
|
637 |
{ |
|
faluco@598
|
638 |
return pCtx->ThrowNativeError("Invalid bit buffer handle %x (error %d)", hndl, herr); |
|
faluco@598
|
639 |
} |
|
faluco@598
|
640 |
|
|
faluco@598
|
641 |
cell_t *pAng; |
|
faluco@598
|
642 |
pCtx->LocalToPhysAddr(params[2], &pAng); |
|
faluco@598
|
643 |
|
|
faluco@598
|
644 |
QAngle ang; |
|
faluco@598
|
645 |
pBitBuf->ReadBitAngles(ang); |
|
faluco@598
|
646 |
|
|
faluco@598
|
647 |
pAng[0] = sp_ftoc(ang.x); |
|
faluco@598
|
648 |
pAng[1] = sp_ftoc(ang.y); |
|
faluco@598
|
649 |
pAng[2] = sp_ftoc(ang.z); |
|
faluco@598
|
650 |
|
|
faluco@598
|
651 |
return 1; |
|
faluco@598
|
652 |
} |
|
faluco@598
|
653 |
|
|
pred@1872
|
654 |
static cell_t smn_BfGetNumBytesLeft(IPluginContext *pCtx, const cell_t *params) |
|
pred@1872
|
655 |
{ |
|
pred@1872
|
656 |
Handle_t hndl = static_cast<Handle_t>(params[1]); |
|
pred@1872
|
657 |
HandleError herr; |
|
pred@1872
|
658 |
HandleSecurity sec; |
|
pred@1872
|
659 |
bf_read *pBitBuf; |
|
pred@1872
|
660 |
|
|
pred@1872
|
661 |
sec.pOwner = NULL; |
|
pred@1872
|
662 |
sec.pIdentity = g_pCoreIdent; |
|
pred@1872
|
663 |
|
|
pred@1872
|
664 |
if ((herr=g_HandleSys.ReadHandle(hndl, g_RdBitBufType, &sec, (void **)&pBitBuf)) |
|
pred@1872
|
665 |
!= HandleError_None) |
|
pred@1872
|
666 |
{ |
|
pred@1872
|
667 |
return pCtx->ThrowNativeError("Invalid bit buffer handle %x (error %d)", hndl, herr); |
|
pred@1872
|
668 |
} |
|
pred@1872
|
669 |
|
|
pred@1872
|
670 |
return pBitBuf->GetNumBitsLeft() >> 3; |
|
pred@1872
|
671 |
} |
|
pred@1872
|
672 |
|
|
faluco@598
|
673 |
REGISTER_NATIVES(bitbufnatives) |
|
faluco@505
|
674 |
{ |
|
faluco@505
|
675 |
{"BfWriteBool", smn_BfWriteBool}, |
|
faluco@505
|
676 |
{"BfWriteByte", smn_BfWriteByte}, |
|
faluco@505
|
677 |
{"BfWriteChar", smn_BfWriteChar}, |
|
faluco@505
|
678 |
{"BfWriteShort", smn_BfWriteShort}, |
|
faluco@505
|
679 |
{"BfWriteWord", smn_BfWriteWord}, |
|
faluco@505
|
680 |
{"BfWriteNum", smn_BfWriteNum}, |
|
faluco@505
|
681 |
{"BfWriteFloat", smn_BfWriteFloat}, |
|
faluco@505
|
682 |
{"BfWriteString", smn_BfWriteString}, |
|
faluco@505
|
683 |
{"BfWriteEntity", smn_BfWriteEntity}, |
|
faluco@505
|
684 |
{"BfWriteAngle", smn_BfWriteAngle}, |
|
faluco@505
|
685 |
{"BfWriteCoord", smn_BfWriteCoord}, |
|
faluco@505
|
686 |
{"BfWriteVecCoord", smn_BfWriteVecCoord}, |
|
faluco@505
|
687 |
{"BfWriteVecNormal", smn_BfWriteVecNormal}, |
|
faluco@505
|
688 |
{"BfWriteAngles", smn_BfWriteAngles}, |
|
faluco@598
|
689 |
{"BfReadBool", smn_BfReadBool}, |
|
faluco@598
|
690 |
{"BfReadByte", smn_BfReadByte}, |
|
faluco@598
|
691 |
{"BfReadChar", smn_BfReadChar}, |
|
faluco@598
|
692 |
{"BfReadShort", smn_BfReadShort}, |
|
faluco@598
|
693 |
{"BfReadWord", smn_BfReadWord}, |
|
faluco@598
|
694 |
{"BfReadNum", smn_BfReadNum}, |
|
faluco@598
|
695 |
{"BfReadFloat", smn_BfReadFloat}, |
|
faluco@598
|
696 |
{"BfReadString", smn_BfReadString}, |
|
faluco@598
|
697 |
{"BfReadEntity", smn_BfReadEntity}, |
|
faluco@598
|
698 |
{"BfReadAngle", smn_BfReadAngle}, |
|
faluco@598
|
699 |
{"BfReadCoord", smn_BfReadCoord}, |
|
faluco@598
|
700 |
{"BfReadVecCoord", smn_BfReadVecCoord}, |
|
faluco@598
|
701 |
{"BfReadVecNormal", smn_BfReadVecNormal}, |
|
faluco@598
|
702 |
{"BfReadAngles", smn_BfReadAngles}, |
|
pred@1872
|
703 |
{"BfGetNumBytesLeft", smn_BfGetNumBytesLeft}, |
|
faluco@505
|
704 |
{NULL, NULL} |
|
faluco@505
|
705 |
}; |