| 168 | file.write(INDENT + 'return ' + arg1 + ' ' + functionName + ' ' + arg2 + ';\n') |
| 169 | |
| 170 | def _writeTwoArgumentFunc(file, outputType, functionName, arg1="mxp_in1", arg2="mxp_in2"): |
| 171 | if outputType == 'color4': |
| 172 | file.write(INDENT + 'return mk_color4(' + functionName + '(mk_float4(' + arg1 + '), mk_float4(' + arg2 + ')));\n') |
| 173 | elif outputType == 'color': |
| 174 | file.write(INDENT + 'return color(' + functionName + '(float3(' + arg1 + '), float3(' + arg2 + ')));\n') |
| 175 | else: |
| 176 | file.write(INDENT + 'return ' + functionName + '(' + arg1 + ', ' + arg2 + ');\n') |
| 177 | |
| 178 | def _writeThreeArgumentFunc(file, outputType, functionName, arg1, arg2, arg3): |
| 179 | if outputType == 'color4': |