mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-05 03:24:56 +08:00
public: minor refactoring
This commit is contained in:
@@ -13,15 +13,14 @@ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
*/
|
||||
#include "port.h"
|
||||
#include "xash3d_types.h"
|
||||
#include "const.h"
|
||||
#include <math.h>
|
||||
#include <stdarg.h>
|
||||
#include <time.h>
|
||||
#include "stdio.h"
|
||||
#include "crtlib.h"
|
||||
#include <stdio.h>
|
||||
#include "port.h"
|
||||
#include "xash3d_types.h"
|
||||
#include "xash3d_mathlib.h"
|
||||
#include "crtlib.h"
|
||||
|
||||
void Q_strnlwr( const char *in, char *out, size_t size_out )
|
||||
{
|
||||
|
||||
@@ -15,7 +15,6 @@ GNU General Public License for more details.
|
||||
|
||||
#include "port.h"
|
||||
#include "xash3d_types.h"
|
||||
#include "const.h"
|
||||
#include "com_model.h"
|
||||
#include "xash3d_mathlib.h"
|
||||
|
||||
|
||||
@@ -14,16 +14,13 @@ GNU General Public License for more details.
|
||||
*/
|
||||
#include "port.h"
|
||||
#include "xash3d_types.h"
|
||||
#include "const.h"
|
||||
#include "com_model.h"
|
||||
#include "xash3d_mathlib.h"
|
||||
#include "eiface.h"
|
||||
#include "studio.h"
|
||||
|
||||
#define NUM_HULL_ROUNDS ARRAYSIZE( hull_table )
|
||||
#define HULL_PRECISION 4
|
||||
|
||||
static const word hull_table[] = { 2, 4, 6, 8, 12, 16, 18, 24, 28, 32, 36, 40, 48, 54, 56, 60, 64, 72, 80, 112, 120, 128, 140, 176 };
|
||||
static const uint8_t hull_table[] = { 2, 4, 6, 8, 12, 16, 18, 24, 28, 32, 36, 40, 48, 54, 56, 60, 64, 72, 80, 112, 120, 128, 140, 176 };
|
||||
|
||||
const int boxpnt[6][4] =
|
||||
{
|
||||
@@ -110,7 +107,7 @@ void RoundUpHullSize( vec3_t size )
|
||||
result = Q_ceil( size[i] );
|
||||
|
||||
// lookup hull table to find nearest supposed value
|
||||
for( j = 0; j < NUM_HULL_ROUNDS; j++ )
|
||||
for( j = 0; j < sizeof( hull_table ) / sizeof( hull_table[0] ); j++ )
|
||||
{
|
||||
if( value > hull_table[j] )
|
||||
continue; // ceil only
|
||||
|
||||
Reference in New Issue
Block a user