Improve function name, add static declaration

This commit is contained in:
hasufell 2014-05-09 19:52:21 +02:00
parent f68eaed204
commit 71eae42e78
No known key found for this signature in database
GPG Key ID: 220CD1C5BDEED020

View File

@ -54,6 +54,7 @@ static void draw_Planet_1(void);
static void draw_Planet_2(void); static void draw_Planet_2(void);
static void gl_destroy(void); static void gl_destroy(void);
static HE_vert *find_center(HE_obj const * const obj); static HE_vert *find_center(HE_obj const * const obj);
static float get_normalized_scale_factor(HE_obj const * const obj);
/** /**
@ -63,7 +64,7 @@ static HE_vert *find_center(HE_obj const * const obj);
* @param obj the object we want to scale * @param obj the object we want to scale
* @return the corresponding scale factor * @return the corresponding scale factor
*/ */
static float scale_object_normalized(HE_obj const * const obj) static float get_normalized_scale_factor(HE_obj const * const obj)
{ {
float max = obj->vertices[0].x + float max = obj->vertices[0].x +
obj->vertices[0].y + obj->vertices[0].z; obj->vertices[0].y + obj->vertices[0].z;
@ -154,7 +155,7 @@ static void draw_obj(uint32_t const myxrot,
yrot = 0, yrot = 0,
zrot = 0; zrot = 0;
HE_vert *center_vert = find_center(obj); HE_vert *center_vert = find_center(obj);
float scalefactor = scale_object_normalized(obj) * VISIBILITY_FACTOR; float scalefactor = get_normalized_scale_factor(obj) * VISIBILITY_FACTOR;
xrot += myxrot; xrot += myxrot;
yrot += myyrot; yrot += myyrot;