#include "classes.h" // 00a114d0 void BlendMode::SetMode(int mode, int unusedArg) { uint32_t srcFactor; uint32_t graphicsFlags; graphicsFlags = g_graphicsManager_flags; if (mode == 0) { *GHIDRA_CAST(this) = 0; *GHIDRA_CAST((GHIDRA_CAST(this) + 4)) = 1; *GHIDRA_CAST((GHIDRA_CAST(this) + 8)) = 0; *GHIDRA_CAST((GHIDRA_CAST(this) + 0xc)) = 1; *GHIDRA_CAST((GHIDRA_CAST(this) + 0x10)) = 0; } else { if (mode == 1) { graphicsFlags = g_graphicsManager_flags & 4; srcFactor = 1; *GHIDRA_CAST(this) = 0; if (graphicsFlags == 0) { srcFactor = 6; } *GHIDRA_CAST((GHIDRA_CAST(this) + 4)) = srcFactor; *GHIDRA_CAST((GHIDRA_CAST(this) + 8)) = 7; *GHIDRA_CAST((GHIDRA_CAST(this) + 0xc)) = 1; *GHIDRA_CAST((GHIDRA_CAST(this) + 0x10)) = 7; return; } if (mode == 2) { *GHIDRA_CAST(this) = 0; *GHIDRA_CAST((GHIDRA_CAST(this) + 8)) = 1; srcFactor = 6; *GHIDRA_CAST((GHIDRA_CAST(this) + 0xc)) = 1; if ((graphicsFlags & 4) != 0) { srcFactor = 1; } *GHIDRA_CAST((GHIDRA_CAST(this) + 0x10)) = 1; *GHIDRA_CAST((GHIDRA_CAST(this) + 4)) = srcFactor; return; } } return; }