mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-05 03:24:56 +08:00
public: refactor variable declarations
This commit is contained in:
@@ -17,15 +17,13 @@ GNU General Public License for more details.
|
||||
|
||||
qboolean Atlas_AllocBlock( atlas_t *atlas, int w, int h, int *x, int *y )
|
||||
{
|
||||
int i, j;
|
||||
int best, best2;
|
||||
int size = atlas->size;
|
||||
int best = size;
|
||||
int j;
|
||||
|
||||
best = size;
|
||||
|
||||
for( i = 0; i <= size - w; )
|
||||
for( int i = 0; i <= size - w; )
|
||||
{
|
||||
best2 = 0;
|
||||
int best2 = 0;
|
||||
|
||||
for( j = 0; j < w; j++ )
|
||||
{
|
||||
@@ -52,7 +50,7 @@ qboolean Atlas_AllocBlock( atlas_t *atlas, int w, int h, int *x, int *y )
|
||||
if( best + h > size )
|
||||
return false;
|
||||
|
||||
for( i = 0; i < w; i++ )
|
||||
for( int i = 0; i < w; i++ )
|
||||
atlas->allocated[*x + i] = best + h;
|
||||
|
||||
if( best + h > atlas->max_height )
|
||||
|
||||
Reference in New Issue
Block a user