1.1 --- a/plugins/include/bitbuffer.inc Mon Dec 03 02:43:42 2007 +0000
1.2 +++ b/plugins/include/bitbuffer.inc Mon Dec 03 03:19:21 2007 +0000
1.3 @@ -1,312 +1,316 @@
1.4 -/**
1.5 - * vim: set ts=4 :
1.6 - * =============================================================================
1.7 - * SourceMod (C)2004-2007 AlliedModders LLC. All rights reserved.
1.8 - * =============================================================================
1.9 - *
1.10 - * This file is part of the SourceMod/SourcePawn SDK.
1.11 - *
1.12 - * This program is free software; you can redistribute it and/or modify it under
1.13 - * the terms of the GNU General Public License, version 3.0, as published by the
1.14 - * Free Software Foundation.
1.15 - *
1.16 - * This program is distributed in the hope that it will be useful, but WITHOUT
1.17 - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
1.18 - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
1.19 - * details.
1.20 - *
1.21 - * You should have received a copy of the GNU General Public License along with
1.22 - * this program. If not, see <http://www.gnu.org/licenses/>.
1.23 - *
1.24 - * As a special exception, AlliedModders LLC gives you permission to link the
1.25 - * code of this program (as well as its derivative works) to "Half-Life 2," the
1.26 - * "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
1.27 - * by the Valve Corporation. You must obey the GNU General Public License in
1.28 - * all respects for all other code used. Additionally, AlliedModders LLC grants
1.29 - * this exception to all derivative works. AlliedModders LLC defines further
1.30 - * exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
1.31 - * or <http://www.sourcemod.net/license.php>.
1.32 - *
1.33 - * Version: $Id$
1.34 - */
1.35 -
1.36 -#if defined _bitbuffer_included
1.37 - #endinput
1.38 -#endif
1.39 -#define _bitbuffer_included
1.40 -
1.41 -/**
1.42 - * Writes a single bit to a writable bitbuffer (bf_write).
1.43 - *
1.44 - * @param bf bf_write handle to write to.
1.45 - * @param bit Bit to write (true for 1, false for 0).
1.46 - * @noreturn
1.47 - * @error Invalid or incorrect Handle.
1.48 - */
1.49 -native BfWriteBool(Handle:bf, bool:bit);
1.50 -
1.51 -/**
1.52 - * Writes a byte to a writable bitbuffer (bf_write).
1.53 - *
1.54 - * @param bf bf_write handle to write to.
1.55 - * @param byte Byte to write (value will be written as 8bit).
1.56 - * @noreturn
1.57 - * @error Invalid or incorrect Handle.
1.58 - */
1.59 -native BfWriteByte(Handle:bf, byte);
1.60 -
1.61 -/**
1.62 - * Writes a byte to a writable bitbuffer (bf_write).
1.63 - *
1.64 - * @param bf bf_write handle to write to.
1.65 - * @param chr Character to write.
1.66 - * @noreturn
1.67 - * @error Invalid or incorrect Handle.
1.68 - */
1.69 -native BfWriteChar(Handle:bf, chr);
1.70 -
1.71 -/**
1.72 - * Writes a 16bit integer to a writable bitbuffer (bf_write).
1.73 - *
1.74 - * @param bf bf_write handle to write to.
1.75 - * @param num Integer to write (value will be written as 16bit).
1.76 - * @noreturn
1.77 - * @error Invalid or incorrect Handle.
1.78 - */
1.79 -native BfWriteShort(Handle:bf, num);
1.80 -
1.81 -/**
1.82 - * Writes a 16bit unsigned integer to a writable bitbuffer (bf_write).
1.83 - *
1.84 - * @param bf bf_write handle to write to.
1.85 - * @param num Integer to write (value will be written as 16bit).
1.86 - * @noreturn
1.87 - * @error Invalid or incorrect Handle.
1.88 - */
1.89 -native BfWriteWord(Handle:bf, num);
1.90 -
1.91 -/**
1.92 - * Writes a normal integer to a writable bitbuffer (bf_write).
1.93 - *
1.94 - * @param bf bf_write handle to write to.
1.95 - * @param num Integer to write (value will be written as 32bit).
1.96 - * @noreturn
1.97 - * @error Invalid or incorrect Handle.
1.98 - */
1.99 -native BfWriteNum(Handle:bf, num);
1.100 -
1.101 -/**
1.102 - * Writes a floating point number to a writable bitbuffer (bf_write).
1.103 - *
1.104 - * @param bf bf_write handle to write to.
1.105 - * @param num Number to write.
1.106 - * @noreturn
1.107 - * @error Invalid or incorrect Handle.
1.108 - */
1.109 -native BfWriteFloat(Handle:bf, Float:num);
1.110 -
1.111 -/**
1.112 - * Writes a string to a writable bitbuffer (bf_write).
1.113 - *
1.114 - * @param bf bf_write handle to write to.
1.115 - * @param string Text string to write.
1.116 - * @noreturn
1.117 - * @error Invalid or incorrect Handle.
1.118 - */
1.119 -native BfWriteString(Handle:bf, const String:string[]);
1.120 -
1.121 -/**
1.122 - * Writes an entity to a writable bitbuffer (bf_write).
1.123 - * @note This is a wrapper around BfWriteShort().
1.124 - *
1.125 - * @param bf bf_write handle to write to.
1.126 - * @param ent Entity index to write.
1.127 - * @noreturn
1.128 - * @error Invalid or incorrect Handle, or invalid entity.
1.129 - */
1.130 -native BfWriteEntity(Handle:bf, ent);
1.131 -
1.132 -/**
1.133 - * Writes a bit angle to a writable bitbuffer (bf_write).
1.134 - *
1.135 - * @param bf bf_write handle to write to.
1.136 - * @param angle Angle to write.
1.137 - * @param numBits Optional number of bits to use.
1.138 - * @noreturn
1.139 - * @error Invalid or incorrect Handle.
1.140 - */
1.141 -native BfWriteAngle(Handle:bf, Float:angle, numBits=8);
1.142 -
1.143 -/**
1.144 - * Writes a coordinate to a writable bitbuffer (bf_write).
1.145 - *
1.146 - * @param bf bf_write handle to write to.
1.147 - * @param coord Coordinate to write.
1.148 - * @noreturn
1.149 - * @error Invalid or incorrect Handle.
1.150 - */
1.151 -native BfWriteCoord(Handle:bf, Float:coord);
1.152 -
1.153 -/**
1.154 - * Writes a 3D vector of coordinates to a writable bitbuffer (bf_write).
1.155 - *
1.156 - * @param bf bf_write handle to write to.
1.157 - * @param coord Coordinate array to write.
1.158 - * @noreturn
1.159 - * @error Invalid or incorrect Handle.
1.160 - */
1.161 -native BfWriteVecCoord(Handle:bf, Float:coord[3]);
1.162 -
1.163 -/**
1.164 - * Writes a 3D normal vector to a writable bitbuffer (bf_write).
1.165 - *
1.166 - * @param bf bf_write handle to write to.
1.167 - * @param vec Vector to write.
1.168 - * @noreturn
1.169 - * @error Invalid or incorrect Handle.
1.170 - */
1.171 -native BfWriteVecNormal(Handle:bf, Float:vec[3]);
1.172 -
1.173 -/**
1.174 - * Writes a 3D angle vector to a writable bitbuffer (bf_write).
1.175 - *
1.176 - * @param bf bf_write handle to write to.
1.177 - * @param angles Angle vector to write.
1.178 - * @noreturn
1.179 - * @error Invalid or incorrect Handle.
1.180 - */
1.181 -native BfWriteAngles(Handle:bf, Float:angles[3]);
1.182 -
1.183 -/**
1.184 - * Reads a single bit from a readable bitbuffer (bf_read).
1.185 - *
1.186 - * @param bf bf_read handle to read from.
1.187 - * @return Bit value read.
1.188 - * @error Invalid or incorrect Handle.
1.189 - */
1.190 -native bool:BfReadBool(Handle:bf);
1.191 -
1.192 -/**
1.193 - * Reads a byte from a readable bitbuffer (bf_read).
1.194 - *
1.195 - * @param bf bf_read handle to read from.
1.196 - * @return Byte value read (read as 8bit).
1.197 - * @error Invalid or incorrect Handle.
1.198 - */
1.199 -native BfReadByte(Handle:bf);
1.200 -
1.201 -/**
1.202 - * Reads a character from a readable bitbuffer (bf_read).
1.203 - *
1.204 - * @param bf bf_read handle to read from.
1.205 - * @return Character value read.
1.206 - * @error Invalid or incorrect Handle.
1.207 - */
1.208 -native BfReadChar(Handle:bf);
1.209 -
1.210 -/**
1.211 - * Reads a 16bit integer from a readable bitbuffer (bf_read).
1.212 - *
1.213 - * @param bf bf_read handle to read from.
1.214 - * @return Integer value read (read as 16bit).
1.215 - * @error Invalid or incorrect Handle.
1.216 - */
1.217 -native BfReadShort(Handle:bf);
1.218 -
1.219 -/**
1.220 - * Reads a 16bit unsigned integer from a readable bitbuffer (bf_read).
1.221 - *
1.222 - * @param bf bf_read handle to read from.
1.223 - * @return Integer value read (read as 16bit).
1.224 - * @error Invalid or incorrect Handle.
1.225 - */
1.226 -native BfReadWord(Handle:bf);
1.227 -
1.228 -/**
1.229 - * Reads a normal integer to a readable bitbuffer (bf_read).
1.230 - *
1.231 - * @param bf bf_read handle to read from.
1.232 - * @return Integer value read (read as 32bit).
1.233 - * @error Invalid or incorrect Handle.
1.234 - */
1.235 -native BfReadNum(Handle:bf);
1.236 -
1.237 -/**
1.238 - * Reads a floating point number from a readable bitbuffer (bf_read).
1.239 - *
1.240 - * @param bf bf_read handle to read from.
1.241 - * @return Floating point value read.
1.242 - * @error Invalid or incorrect Handle.
1.243 - */
1.244 -native Float:BfReadFloat(Handle:bf);
1.245 -
1.246 -/**
1.247 - * Reads a string from a readable bitbuffer (bf_read).
1.248 - *
1.249 - * @param bf bf_read handle to read from.
1.250 - * @param buffer Destination string buffer.
1.251 - * @param maxlength Maximum length of output string buffer.
1.252 - * @param line If true the buffer will be copied until it reaches a '\n' or a null terminator.
1.253 - * @noreturn
1.254 - * @error Invalid or incorrect Handle, destination string buffer was too short.
1.255 - */
1.256 -native BfReadString(Handle:bf, String:buffer[], maxlength, bool:line=false);
1.257 -
1.258 -/**
1.259 - * Reads an entity from a readable bitbuffer (bf_read).
1.260 - * @note This is a wrapper around BfReadShort().
1.261 - *
1.262 - * @param bf bf_read handle to read from.
1.263 - * @return Entity index read.
1.264 - * @error Invalid or incorrect Handle.
1.265 - */
1.266 -native BfReadEntity(Handle:bf);
1.267 -
1.268 -/**
1.269 - * Reads a bit angle from a readable bitbuffer (bf_read).
1.270 - *
1.271 - * @param bf bf_read handle to read from.
1.272 - * @param numBits Optional number of bits to use.
1.273 - * @return Angle read.
1.274 - * @error Invalid or incorrect Handle.
1.275 - */
1.276 -native Float:BfReadAngle(Handle:bf, numBits=8);
1.277 -
1.278 -/**
1.279 - * Reads a coordinate from a readable bitbuffer (bf_read).
1.280 - *
1.281 - * @param bf bf_read handle to read from.
1.282 - * @return Coordinate read.
1.283 - * @error Invalid or incorrect Handle.
1.284 - */
1.285 -native Float:BfReadCoord(Handle:bf);
1.286 -
1.287 -/**
1.288 - * Reads a 3D vector of coordinates from a readable bitbuffer (bf_read).
1.289 - *
1.290 - * @param bf bf_read handle to read from.
1.291 - * @param coord Destination coordinate array.
1.292 - * @noreturn
1.293 - * @error Invalid or incorrect Handle.
1.294 - */
1.295 -native BfReadVecCoord(Handle:bf, Float:coord[3]);
1.296 -
1.297 -/**
1.298 - * Reads a 3D normal vector from a readable bitbuffer (bf_read).
1.299 - *
1.300 - * @param bf bf_read handle to read from.
1.301 - * @param vec Destination vector array.
1.302 - * @noreturn
1.303 - * @error Invalid or incorrect Handle.
1.304 - */
1.305 -native BfReadVecNormal(Handle:bf, Float:vec[3]);
1.306 -
1.307 -/**
1.308 - * Reads a 3D angle vector from a readable bitbuffer (bf_read).
1.309 - *
1.310 - * @param bf bf_read handle to read from.
1.311 - * @param angles Destination angle vector.
1.312 - * @noreturn
1.313 - * @error Invalid or incorrect Handle.
1.314 - */
1.315 -native BfReadAngles(Handle:bf, Float:angles[3]);
1.316 +/**
1.317 + * vim: set ts=4 :
1.318 + * =============================================================================
1.319 + * SourceMod (C)2004-2007 AlliedModders LLC. All rights reserved.
1.320 + * =============================================================================
1.321 + *
1.322 + * This file is part of the SourceMod/SourcePawn SDK.
1.323 + *
1.324 + * This program is free software; you can redistribute it and/or modify it under
1.325 + * the terms of the GNU General Public License, version 3.0, as published by the
1.326 + * Free Software Foundation.
1.327 + *
1.328 + * This program is distributed in the hope that it will be useful, but WITHOUT
1.329 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
1.330 + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
1.331 + * details.
1.332 + *
1.333 + * You should have received a copy of the GNU General Public License along with
1.334 + * this program. If not, see <http://www.gnu.org/licenses/>.
1.335 + *
1.336 + * As a special exception, AlliedModders LLC gives you permission to link the
1.337 + * code of this program (as well as its derivative works) to "Half-Life 2," the
1.338 + * "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
1.339 + * by the Valve Corporation. You must obey the GNU General Public License in
1.340 + * all respects for all other code used. Additionally, AlliedModders LLC grants
1.341 + * this exception to all derivative works. AlliedModders LLC defines further
1.342 + * exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
1.343 + * or <http://www.sourcemod.net/license.php>.
1.344 + *
1.345 + * Version: $Id$
1.346 + */
1.347 +
1.348 +#if defined _bitbuffer_included
1.349 + #endinput
1.350 +#endif
1.351 +#define _bitbuffer_included
1.352 +
1.353 +/**
1.354 + * Writes a single bit to a writable bitbuffer (bf_write).
1.355 + *
1.356 + * @param bf bf_write handle to write to.
1.357 + * @param bit Bit to write (true for 1, false for 0).
1.358 + * @noreturn
1.359 + * @error Invalid or incorrect Handle.
1.360 + */
1.361 +native BfWriteBool(Handle:bf, bool:bit);
1.362 +
1.363 +/**
1.364 + * Writes a byte to a writable bitbuffer (bf_write).
1.365 + *
1.366 + * @param bf bf_write handle to write to.
1.367 + * @param byte Byte to write (value will be written as 8bit).
1.368 + * @noreturn
1.369 + * @error Invalid or incorrect Handle.
1.370 + */
1.371 +native BfWriteByte(Handle:bf, byte);
1.372 +
1.373 +/**
1.374 + * Writes a byte to a writable bitbuffer (bf_write).
1.375 + *
1.376 + * @param bf bf_write handle to write to.
1.377 + * @param chr Character to write.
1.378 + * @noreturn
1.379 + * @error Invalid or incorrect Handle.
1.380 + */
1.381 +native BfWriteChar(Handle:bf, chr);
1.382 +
1.383 +/**
1.384 + * Writes a 16bit integer to a writable bitbuffer (bf_write).
1.385 + *
1.386 + * @param bf bf_write handle to write to.
1.387 + * @param num Integer to write (value will be written as 16bit).
1.388 + * @noreturn
1.389 + * @error Invalid or incorrect Handle.
1.390 + */
1.391 +native BfWriteShort(Handle:bf, num);
1.392 +
1.393 +/**
1.394 + * Writes a 16bit unsigned integer to a writable bitbuffer (bf_write).
1.395 + *
1.396 + * @param bf bf_write handle to write to.
1.397 + * @param num Integer to write (value will be written as 16bit).
1.398 + * @noreturn
1.399 + * @error Invalid or incorrect Handle.
1.400 + */
1.401 +native BfWriteWord(Handle:bf, num);
1.402 +
1.403 +/**
1.404 + * Writes a normal integer to a writable bitbuffer (bf_write).
1.405 + *
1.406 + * @param bf bf_write handle to write to.
1.407 + * @param num Integer to write (value will be written as 32bit).
1.408 + * @noreturn
1.409 + * @error Invalid or incorrect Handle.
1.410 + */
1.411 +native BfWriteNum(Handle:bf, num);
1.412 +
1.413 +/**
1.414 + * Writes a floating point number to a writable bitbuffer (bf_write).
1.415 + *
1.416 + * @param bf bf_write handle to write to.
1.417 + * @param num Number to write.
1.418 + * @noreturn
1.419 + * @error Invalid or incorrect Handle.
1.420 + */
1.421 +native BfWriteFloat(Handle:bf, Float:num);
1.422 +
1.423 +/**
1.424 + * Writes a string to a writable bitbuffer (bf_write).
1.425 + *
1.426 + * @param bf bf_write handle to write to.
1.427 + * @param string Text string to write.
1.428 + * @noreturn
1.429 + * @error Invalid or incorrect Handle.
1.430 + */
1.431 +native BfWriteString(Handle:bf, const String:string[]);
1.432 +
1.433 +/**
1.434 + * Writes an entity to a writable bitbuffer (bf_write).
1.435 + * @note This is a wrapper around BfWriteShort().
1.436 + *
1.437 + * @param bf bf_write handle to write to.
1.438 + * @param ent Entity index to write.
1.439 + * @noreturn
1.440 + * @error Invalid or incorrect Handle, or invalid entity.
1.441 + */
1.442 +native BfWriteEntity(Handle:bf, ent);
1.443 +
1.444 +/**
1.445 + * Writes a bit angle to a writable bitbuffer (bf_write).
1.446 + *
1.447 + * @param bf bf_write handle to write to.
1.448 + * @param angle Angle to write.
1.449 + * @param numBits Optional number of bits to use.
1.450 + * @noreturn
1.451 + * @error Invalid or incorrect Handle.
1.452 + */
1.453 +native BfWriteAngle(Handle:bf, Float:angle, numBits=8);
1.454 +
1.455 +/**
1.456 + * Writes a coordinate to a writable bitbuffer (bf_write).
1.457 + *
1.458 + * @param bf bf_write handle to write to.
1.459 + * @param coord Coordinate to write.
1.460 + * @noreturn
1.461 + * @error Invalid or incorrect Handle.
1.462 + */
1.463 +native BfWriteCoord(Handle:bf, Float:coord);
1.464 +
1.465 +/**
1.466 + * Writes a 3D vector of coordinates to a writable bitbuffer (bf_write).
1.467 + *
1.468 + * @param bf bf_write handle to write to.
1.469 + * @param coord Coordinate array to write.
1.470 + * @noreturn
1.471 + * @error Invalid or incorrect Handle.
1.472 + */
1.473 +native BfWriteVecCoord(Handle:bf, Float:coord[3]);
1.474 +
1.475 +/**
1.476 + * Writes a 3D normal vector to a writable bitbuffer (bf_write).
1.477 + *
1.478 + * @param bf bf_write handle to write to.
1.479 + * @param vec Vector to write.
1.480 + * @noreturn
1.481 + * @error Invalid or incorrect Handle.
1.482 + */
1.483 +native BfWriteVecNormal(Handle:bf, Float:vec[3]);
1.484 +
1.485 +/**
1.486 + * Writes a 3D angle vector to a writable bitbuffer (bf_write).
1.487 + *
1.488 + * @param bf bf_write handle to write to.
1.489 + * @param angles Angle vector to write.
1.490 + * @noreturn
1.491 + * @error Invalid or incorrect Handle.
1.492 + */
1.493 +native BfWriteAngles(Handle:bf, Float:angles[3]);
1.494 +
1.495 +/**
1.496 + * Reads a single bit from a readable bitbuffer (bf_read).
1.497 + *
1.498 + * @param bf bf_read handle to read from.
1.499 + * @return Bit value read.
1.500 + * @error Invalid or incorrect Handle.
1.501 + */
1.502 +native bool:BfReadBool(Handle:bf);
1.503 +
1.504 +/**
1.505 + * Reads a byte from a readable bitbuffer (bf_read).
1.506 + *
1.507 + * @param bf bf_read handle to read from.
1.508 + * @return Byte value read (read as 8bit).
1.509 + * @error Invalid or incorrect Handle.
1.510 + */
1.511 +native BfReadByte(Handle:bf);
1.512 +
1.513 +/**
1.514 + * Reads a character from a readable bitbuffer (bf_read).
1.515 + *
1.516 + * @param bf bf_read handle to read from.
1.517 + * @return Character value read.
1.518 + * @error Invalid or incorrect Handle.
1.519 + */
1.520 +native BfReadChar(Handle:bf);
1.521 +
1.522 +/**
1.523 + * Reads a 16bit integer from a readable bitbuffer (bf_read).
1.524 + *
1.525 + * @param bf bf_read handle to read from.
1.526 + * @return Integer value read (read as 16bit).
1.527 + * @error Invalid or incorrect Handle.
1.528 + */
1.529 +native BfReadShort(Handle:bf);
1.530 +
1.531 +/**
1.532 + * Reads a 16bit unsigned integer from a readable bitbuffer (bf_read).
1.533 + *
1.534 + * @param bf bf_read handle to read from.
1.535 + * @return Integer value read (read as 16bit).
1.536 + * @error Invalid or incorrect Handle.
1.537 + */
1.538 +native BfReadWord(Handle:bf);
1.539 +
1.540 +/**
1.541 + * Reads a normal integer to a readable bitbuffer (bf_read).
1.542 + *
1.543 + * @param bf bf_read handle to read from.
1.544 + * @return Integer value read (read as 32bit).
1.545 + * @error Invalid or incorrect Handle.
1.546 + */
1.547 +native BfReadNum(Handle:bf);
1.548 +
1.549 +/**
1.550 + * Reads a floating point number from a readable bitbuffer (bf_read).
1.551 + *
1.552 + * @param bf bf_read handle to read from.
1.553 + * @return Floating point value read.
1.554 + * @error Invalid or incorrect Handle.
1.555 + */
1.556 +native Float:BfReadFloat(Handle:bf);
1.557 +
1.558 +/**
1.559 + * Reads a string from a readable bitbuffer (bf_read).
1.560 + *
1.561 + * @param bf bf_read handle to read from.
1.562 + * @param buffer Destination string buffer.
1.563 + * @param maxlength Maximum length of output string buffer.
1.564 + * @param line If true the buffer will be copied until it reaches a '\n' or a null terminator.
1.565 + * @return Number of bytes written to the buffer. If the bitbuffer stream overflowed,
1.566 + * that is, had no terminator before the end of the stream, then a negative
1.567 + * number will be returned equal to the number of characters written to the
1.568 + * buffer minus 1. The buffer will be null terminated regardless of the
1.569 + * return value.
1.570 + * @error Invalid or incorrect Handle.
1.571 + */
1.572 +native BfReadString(Handle:bf, String:buffer[], maxlength, bool:line=false);
1.573 +
1.574 +/**
1.575 + * Reads an entity from a readable bitbuffer (bf_read).
1.576 + * @note This is a wrapper around BfReadShort().
1.577 + *
1.578 + * @param bf bf_read handle to read from.
1.579 + * @return Entity index read.
1.580 + * @error Invalid or incorrect Handle.
1.581 + */
1.582 +native BfReadEntity(Handle:bf);
1.583 +
1.584 +/**
1.585 + * Reads a bit angle from a readable bitbuffer (bf_read).
1.586 + *
1.587 + * @param bf bf_read handle to read from.
1.588 + * @param numBits Optional number of bits to use.
1.589 + * @return Angle read.
1.590 + * @error Invalid or incorrect Handle.
1.591 + */
1.592 +native Float:BfReadAngle(Handle:bf, numBits=8);
1.593 +
1.594 +/**
1.595 + * Reads a coordinate from a readable bitbuffer (bf_read).
1.596 + *
1.597 + * @param bf bf_read handle to read from.
1.598 + * @return Coordinate read.
1.599 + * @error Invalid or incorrect Handle.
1.600 + */
1.601 +native Float:BfReadCoord(Handle:bf);
1.602 +
1.603 +/**
1.604 + * Reads a 3D vector of coordinates from a readable bitbuffer (bf_read).
1.605 + *
1.606 + * @param bf bf_read handle to read from.
1.607 + * @param coord Destination coordinate array.
1.608 + * @noreturn
1.609 + * @error Invalid or incorrect Handle.
1.610 + */
1.611 +native BfReadVecCoord(Handle:bf, Float:coord[3]);
1.612 +
1.613 +/**
1.614 + * Reads a 3D normal vector from a readable bitbuffer (bf_read).
1.615 + *
1.616 + * @param bf bf_read handle to read from.
1.617 + * @param vec Destination vector array.
1.618 + * @noreturn
1.619 + * @error Invalid or incorrect Handle.
1.620 + */
1.621 +native BfReadVecNormal(Handle:bf, Float:vec[3]);
1.622 +
1.623 +/**
1.624 + * Reads a 3D angle vector from a readable bitbuffer (bf_read).
1.625 + *
1.626 + * @param bf bf_read handle to read from.
1.627 + * @param angles Destination angle vector.
1.628 + * @noreturn
1.629 + * @error Invalid or incorrect Handle.
1.630 + */
1.631 +native BfReadAngles(Handle:bf, Float:angles[3]);