wined3d: Use BOOL type where appropriate.

This commit is contained in:
Frédéric Delanoy 2013-12-11 20:05:34 +01:00 committed by Alexandre Julliard
parent 483b7ebebf
commit cc6f9c36cd
1 changed files with 7 additions and 8 deletions

View File

@ -1506,17 +1506,16 @@ static void shader_arb_get_src_param(const struct wined3d_shader_instruction *in
const struct wined3d_shader_src_param *src, unsigned int tmpreg, char *outregstr) const struct wined3d_shader_src_param *src, unsigned int tmpreg, char *outregstr)
{ {
/* Generate a line that does the input modifier computation and return the input register to use */ /* Generate a line that does the input modifier computation and return the input register to use */
BOOL is_color = FALSE; BOOL is_color = FALSE, insert_line;
char regstr[256]; char regstr[256];
char swzstr[20]; char swzstr[20];
int insert_line;
struct wined3d_shader_buffer *buffer = ins->ctx->buffer; struct wined3d_shader_buffer *buffer = ins->ctx->buffer;
struct shader_arb_ctx_priv *ctx = ins->ctx->backend_data; struct shader_arb_ctx_priv *ctx = ins->ctx->backend_data;
const char *one = arb_get_helper_value(ins->ctx->reg_maps->shader_version.type, ARB_ONE); const char *one = arb_get_helper_value(ins->ctx->reg_maps->shader_version.type, ARB_ONE);
const char *two = arb_get_helper_value(ins->ctx->reg_maps->shader_version.type, ARB_TWO); const char *two = arb_get_helper_value(ins->ctx->reg_maps->shader_version.type, ARB_TWO);
/* Assume a new line will be added */ /* Assume a new line will be added */
insert_line = 1; insert_line = TRUE;
/* Get register name */ /* Get register name */
shader_arb_get_register_name(ins, &src->reg, regstr, &is_color); shader_arb_get_register_name(ins, &src->reg, regstr, &is_color);
@ -1526,11 +1525,11 @@ static void shader_arb_get_src_param(const struct wined3d_shader_instruction *in
{ {
case WINED3DSPSM_NONE: case WINED3DSPSM_NONE:
sprintf(outregstr, "%s%s", regstr, swzstr); sprintf(outregstr, "%s%s", regstr, swzstr);
insert_line = 0; insert_line = FALSE;
break; break;
case WINED3DSPSM_NEG: case WINED3DSPSM_NEG:
sprintf(outregstr, "-%s%s", regstr, swzstr); sprintf(outregstr, "-%s%s", regstr, swzstr);
insert_line = 0; insert_line = FALSE;
break; break;
case WINED3DSPSM_BIAS: case WINED3DSPSM_BIAS:
shader_addline(buffer, "ADD T%c, %s, -coefdiv.x;\n", 'A' + tmpreg, regstr); shader_addline(buffer, "ADD T%c, %s, -coefdiv.x;\n", 'A' + tmpreg, regstr);
@ -1564,7 +1563,7 @@ static void shader_arb_get_src_param(const struct wined3d_shader_instruction *in
case WINED3DSPSM_ABS: case WINED3DSPSM_ABS:
if(ctx->target_version >= NV2) { if(ctx->target_version >= NV2) {
sprintf(outregstr, "|%s%s|", regstr, swzstr); sprintf(outregstr, "|%s%s|", regstr, swzstr);
insert_line = 0; insert_line = FALSE;
} else { } else {
shader_addline(buffer, "ABS T%c, %s;\n", 'A' + tmpreg, regstr); shader_addline(buffer, "ABS T%c, %s;\n", 'A' + tmpreg, regstr);
} }
@ -1576,11 +1575,11 @@ static void shader_arb_get_src_param(const struct wined3d_shader_instruction *in
shader_addline(buffer, "ABS T%c, %s;\n", 'A' + tmpreg, regstr); shader_addline(buffer, "ABS T%c, %s;\n", 'A' + tmpreg, regstr);
sprintf(outregstr, "-T%c%s", 'A' + tmpreg, swzstr); sprintf(outregstr, "-T%c%s", 'A' + tmpreg, swzstr);
} }
insert_line = 0; insert_line = FALSE;
break; break;
default: default:
sprintf(outregstr, "%s%s", regstr, swzstr); sprintf(outregstr, "%s%s", regstr, swzstr);
insert_line = 0; insert_line = FALSE;
} }
/* Return modified or original register, with swizzle */ /* Return modified or original register, with swizzle */