diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-06-20 20:43:48 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-06-20 20:43:48 +0400 |
commit | a744fed46c1378d5aa6996bf0be5421c0a1c27d4 (patch) | |
tree | d3bc5d00611058db31a8d0277edbecd42e3cd3a0 /intern | |
parent | ea122cf59bebf1f69559c76aae796e1f44c2e870 (diff) |
style cleanup
Diffstat (limited to 'intern')
-rw-r--r-- | intern/bsp/test/BSP_GhostTest/BSP_GhostTest3D.cpp | 12 | ||||
-rw-r--r-- | intern/bsp/test/BSP_GhostTest/main.cpp | 4 | ||||
-rw-r--r-- | intern/raskter/raskter.c | 21 |
3 files changed, 22 insertions, 15 deletions
diff --git a/intern/bsp/test/BSP_GhostTest/BSP_GhostTest3D.cpp b/intern/bsp/test/BSP_GhostTest/BSP_GhostTest3D.cpp index 543e7e087b1..46cde625cf2 100644 --- a/intern/bsp/test/BSP_GhostTest/BSP_GhostTest3D.cpp +++ b/intern/bsp/test/BSP_GhostTest/BSP_GhostTest3D.cpp @@ -205,15 +205,15 @@ Operate( void BSP_GhostTestApp3D:: UpdateFrame( -){ -if (m_window) { +) { + if (m_window) { - GHOST_Rect v_rect; - m_window->getClientBounds(v_rect); + GHOST_Rect v_rect; + m_window->getClientBounds(v_rect); - glViewport(0,0,v_rect.getWidth(),v_rect.getHeight()); + glViewport(0,0,v_rect.getWidth(),v_rect.getHeight()); -} + } } diff --git a/intern/bsp/test/BSP_GhostTest/main.cpp b/intern/bsp/test/BSP_GhostTest/main.cpp index d5fa884afa1..25185f40192 100644 --- a/intern/bsp/test/BSP_GhostTest/main.cpp +++ b/intern/bsp/test/BSP_GhostTest/main.cpp @@ -93,8 +93,8 @@ NewTestMesh( #endif -int main() { - +int main() +{ MT_Vector3 min,max; MT_Vector3 min2,max2; diff --git a/intern/raskter/raskter.c b/intern/raskter/raskter.c index 910cd4c6a3d..4552db10ccb 100644 --- a/intern/raskter/raskter.c +++ b/intern/raskter/raskter.c @@ -67,7 +67,8 @@ struct r_fill_context { * just the poly. Since the DEM code could end up being coupled with this, we'll keep it separate * for now. */ -static void preprocess_all_edges(struct r_fill_context *ctx, struct poly_vert *verts, int num_verts, struct e_status *open_edge) { +static void preprocess_all_edges(struct r_fill_context *ctx, struct poly_vert *verts, int num_verts, struct e_status *open_edge) +{ int i; int xbeg; int ybeg; @@ -165,7 +166,8 @@ static void preprocess_all_edges(struct r_fill_context *ctx, struct poly_vert *v * for speed, but waiting on final design choices for curve-data before eliminating data the DEM code will need * if it ends up being coupled with this function. */ -static int rast_scan_fill(struct r_fill_context *ctx, struct poly_vert *verts, int num_verts, float intensity) { +static int rast_scan_fill(struct r_fill_context *ctx, struct poly_vert *verts, int num_verts, float intensity) +{ int x_curr; /* current pixel position in X */ int y_curr; /* current scan line being drawn */ int yp; /* y-pixel's position in frame buffer */ @@ -757,18 +759,21 @@ int PLX_raskterize_feather(float (*base_verts)[2], int num_base_verts, float (*f return i; /* Return the value returned by the rasterizer. */ } -int get_range_expanded_pixel_coord(float normalized_value, int max_value) { +int get_range_expanded_pixel_coord(float normalized_value, int max_value) +{ return (int)((normalized_value * (float)(max_value)) + 0.5f); } -float get_pixel_intensity(float *buf, int buf_x, int buf_y, int pos_x, int pos_y) { +float get_pixel_intensity(float *buf, int buf_x, int buf_y, int pos_x, int pos_y) +{ if(pos_x < 0 || pos_x >= buf_x || pos_y < 0 || pos_y >= buf_y) { return 0.0f; } return buf[(pos_y * buf_y) + buf_x]; } -float get_pixel_intensity_bilinear(float *buf, int buf_x, int buf_y, float u, float v) { +float get_pixel_intensity_bilinear(float *buf, int buf_x, int buf_y, float u, float v) +{ int a; int b; int a_plus_1; @@ -794,14 +799,16 @@ float get_pixel_intensity_bilinear(float *buf, int buf_x, int buf_y, float u, fl } -void set_pixel_intensity(float *buf, int buf_x, int buf_y, int pos_x, int pos_y, float intensity) { +void set_pixel_intensity(float *buf, int buf_x, int buf_y, int pos_x, int pos_y, float intensity) +{ if(pos_x < 0 || pos_x >= buf_x || pos_y < 0 || pos_y >= buf_y) { return; } buf[(pos_y * buf_y) + buf_x] = intensity; } #define __PLX__FAKE_AA__ -int PLX_antialias_buffer(float *buf, int buf_x, int buf_y) { +int PLX_antialias_buffer(float *buf, int buf_x, int buf_y) +{ #ifdef __PLX__FAKE_AA__ #ifdef __PLX_GREY_AA__ int i=0; |