diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2017-01-15 22:15:47 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2017-01-16 08:49:52 +0100 |
commit | 2a0ddc1e89ec7b947152c8d0cb132d58f2c00a81 (patch) | |
tree | e7cafdf9c76fd6545124ead4dc5ee17f940f0a10 /modules/pvr | |
parent | 39114178a0952e9f5efee08e23d73d70f3d8d3db (diff) |
Style: Various fixes to play nice with clang-format
Diffstat (limited to 'modules/pvr')
-rw-r--r-- | modules/pvr/texture_loader_pvr.cpp | 58 |
1 files changed, 32 insertions, 26 deletions
diff --git a/modules/pvr/texture_loader_pvr.cpp b/modules/pvr/texture_loader_pvr.cpp index 0d8cabb331..9805675f2c 100644 --- a/modules/pvr/texture_loader_pvr.cpp +++ b/modules/pvr/texture_loader_pvr.cpp @@ -464,16 +464,19 @@ static void get_modulation_value(int x, int y, const int p_2bit, const int p_mod if(((x^y)&1)==0) mod_val = rep_vals0[p_modulation[y][x]]; else if(p_modulation_modes[y][x] == 1) { - mod_val = (rep_vals0[p_modulation[y-1][x]] + - rep_vals0[p_modulation[y+1][x]] + - rep_vals0[p_modulation[y][x-1]] + - rep_vals0[p_modulation[y][x+1]] + 2) / 4; + mod_val = ( + rep_vals0[p_modulation[y-1][x]] + + rep_vals0[p_modulation[y+1][x]] + + rep_vals0[p_modulation[y][x-1]] + + rep_vals0[p_modulation[y][x+1]] + 2) / 4; } else if(p_modulation_modes[y][x] == 2) { - mod_val = (rep_vals0[p_modulation[y][x-1]] + - rep_vals0[p_modulation[y][x+1]] + 1) / 2; + mod_val = ( + rep_vals0[p_modulation[y][x-1]] + + rep_vals0[p_modulation[y][x+1]] + 1) / 2; } else { - mod_val = (rep_vals0[p_modulation[y-1][x]] + - rep_vals0[p_modulation[y+1][x]] + 1) / 2; + mod_val = ( + rep_vals0[p_modulation[y-1][x]] + + rep_vals0[p_modulation[y+1][x]] + 1) / 2; } } else { mod_val = rep_vals1[p_modulation[y][x]]; @@ -615,11 +618,12 @@ static void decompress_pvrtc(PVRTCBlock *p_comp_img, const int p_2bit, const int for(j = 0; j < 2; j++) { unpack_5554(p_blocks[i][j], colors5554[i][j].Reps); - unpack_modulations(p_blocks[i][j], - p_2bit, - p_modulation, - p_modulation_modes, - p_x, p_y); + unpack_modulations( + p_blocks[i][j], + p_2bit, + p_modulation, + p_modulation_modes, + p_x, p_y); p_x += x_block_size; } @@ -632,19 +636,21 @@ static void decompress_pvrtc(PVRTCBlock *p_comp_img, const int p_2bit, const int } - interpolate_colors(colors5554[0][0].Reps[0], - colors5554[0][1].Reps[0], - colors5554[1][0].Reps[0], - colors5554[1][1].Reps[0], - p_2bit, x, y, - ASig); - - interpolate_colors(colors5554[0][0].Reps[1], - colors5554[0][1].Reps[1], - colors5554[1][0].Reps[1], - colors5554[1][1].Reps[1], - p_2bit, x, y, - BSig); + interpolate_colors( + colors5554[0][0].Reps[0], + colors5554[0][1].Reps[0], + colors5554[1][0].Reps[0], + colors5554[1][1].Reps[0], + p_2bit, x, y, + ASig); + + interpolate_colors( + colors5554[0][0].Reps[1], + colors5554[0][1].Reps[1], + colors5554[1][0].Reps[1], + colors5554[1][1].Reps[1], + p_2bit, x, y, + BSig); get_modulation_value(x,y, p_2bit, (const int (*)[16])p_modulation, (const int (*)[16])p_modulation_modes, &Mod, &DoPT); |