/** Convert half time to a string. * @param half half time * @return string representation of the given half time. */ const char * worldinfo_gamestate_half_tostring(worldinfo_gamestate_half_t half) { switch (half) { CASE_STRING(HALF_FIRST); CASE_STRING(HALF_SECOND); default: return "Unknown Half"; } }
/** Convert goal color to a string. * @param goal_color goal color * @return string representation of the given goal color. */ const char * worldinfo_gamestate_goalcolor_tostring(worldinfo_gamestate_goalcolor_t goal_color) { switch (goal_color) { CASE_STRING(GOAL_BLUE); CASE_STRING(GOAL_YELLOW); default: return "Unknown Goal Color"; } }
/** Convert gamestate team to a string. * @param team game state team to translate into a string * @return string representation of the given team. */ const char * worldinfo_gamestate_team_tostring(worldinfo_gamestate_team_t team) { switch (team) { CASE_STRING(TEAM_CYAN); CASE_STRING(TEAM_MAGENTA); CASE_STRING(TEAM_NONE); CASE_STRING(TEAM_BOTH); default: return "Unknown Team"; } }
const char * tex_env_name (GLenum e) { switch (e) { CASE_STRING(GL_REPLACE); CASE_STRING(GL_MODULATE); CASE_STRING(GL_DECAL); CASE_STRING(GL_BLEND); CASE_STRING(GL_ADD); NODEFAULT; } }
const char * blend_eq_name (GLenum eq) { switch (eq) { CASE_STRING(GL_FUNC_ADD); CASE_STRING(GL_FUNC_SUBTRACT); CASE_STRING(GL_FUNC_REVERSE_SUBTRACT); CASE_STRING(GL_MIN); CASE_STRING(GL_MAX); NODEFAULT; } }
const char * tex_fmt_name (GLenum t) { switch (t) { CASE_STRING(GL_RGBA); CASE_STRING(GL_RGB); CASE_STRING(GL_LUMINANCE_ALPHA); CASE_STRING(GL_LUMINANCE); CASE_STRING(GL_ALPHA); NODEFAULT; } }
/** Convert MSL gamestate to a string. * @param gamestate game state to translate into a string * @return string representation of the given state. */ const char * worldinfo_spl_gamestate_tostring(worldinfo_spl_gamestate_t gamestate) { switch (gamestate) { CASE_STRING(GS_SPL_INITIAL); CASE_STRING(GS_SPL_READY); CASE_STRING(GS_SPL_SET); CASE_STRING(GS_SPL_PLAY); CASE_STRING(GS_SPL_FINISHED); default: return "Unknown SPL Gamestate"; } }
/** Convert MSL gamestate to a string. * @param gamestate game state to translate into a string * @return string representation of the given state. */ const char * worldinfo_msl_gamestate_tostring(worldinfo_msl_gamestate_t gamestate) { switch (gamestate) { CASE_STRING(GS_FROZEN); CASE_STRING(GS_PLAY); CASE_STRING(GS_KICK_OFF); CASE_STRING(GS_DROP_BALL); CASE_STRING(GS_PENALTY); CASE_STRING(GS_CORNER_KICK); CASE_STRING(GS_THROW_IN); CASE_STRING(GS_FREE_KICK); CASE_STRING(GS_GOAL_KICK); CASE_STRING(GS_HALF_TIME); default: return "Unknown MSL Gamestate"; } }
const char * blend_dst_name (GLenum factor) { switch (factor) { CASE_STRING(GL_ZERO); CASE_STRING(GL_ONE); CASE_STRING(GL_SRC_COLOR); CASE_STRING(GL_ONE_MINUS_SRC_COLOR); CASE_STRING(GL_DST_COLOR); CASE_STRING(GL_ONE_MINUS_DST_COLOR); CASE_STRING(GL_SRC_ALPHA); CASE_STRING(GL_ONE_MINUS_SRC_ALPHA); CASE_STRING(GL_DST_ALPHA); CASE_STRING(GL_ONE_MINUS_DST_ALPHA); CASE_STRING(GL_CONSTANT_COLOR); CASE_STRING(GL_ONE_MINUS_CONSTANT_COLOR); CASE_STRING(GL_CONSTANT_ALPHA); CASE_STRING(GL_ONE_MINUS_CONSTANT_ALPHA); NODEFAULT; } }
std::string IDASigArchToString(uint32_t in) { CASE_STRING(IDASIG__ARCH__80X86, "80X86"); CASE_STRING(IDASIG__ARCH__Z80, "Z80"); CASE_STRING(IDASIG__ARCH__INTEL_860, "INTEL_860"); CASE_STRING(IDASIG__ARCH__8051, "8051"); CASE_STRING(IDASIG__ARCH__TMS320C5X, "TMS320C5X"); CASE_STRING(IDASIG__ARCH__6502, "6502"); CASE_STRING(IDASIG__ARCH__PDP11, "PDP11"); CASE_STRING(IDASIG__ARCH__MOTOROLA_680X0, "MOTOROLA_680X0"); CASE_STRING(IDASIG__ARCH__JAVA, "JAVA"); CASE_STRING(IDASIG__ARCH__MOTOROLA_68XX, "MOTOROLA_68XX"); CASE_STRING(IDASIG__ARCH__SGS_THOMSON_ST7, "SGS_THOMSON_ST7"); CASE_STRING(IDASIG__ARCH__MOTOROLA_68HC12, "MOTOROLA_68HC12"); CASE_STRING(IDASIG__ARCH__MIPS, "MIPS"); CASE_STRING(IDASIG__ARCH__ADVANCED_RISC, "ADVANCED_RISC"); CASE_STRING(IDASIG__ARCH__TMS320C6X, "TMS320C6X"); CASE_STRING(IDASIG__ARCH__POWERPC, "POWERPC"); CASE_STRING(IDASIG__ARCH__INTEL_80196, "INTEL_80196"); CASE_STRING(IDASIG__ARCH__Z8, "Z8"); CASE_STRING(IDASIG__ARCH__HITACHI_SH, "HITACHI_SH"); CASE_STRING(IDASIG__ARCH__MSVS_DOT_NET, "MSVS_DOT_NET"); CASE_STRING(IDASIG__ARCH__ATMEL_8_BIT_RISC, "ATMEL_8_BIT_RISC"); CASE_STRING(IDASIG__ARCH__HITACHI_H8_300_H8_2000, "HITACHI_H8_300_H8_2000"); CASE_STRING(IDASIG__ARCH__MICROCHIP_PIC, "MICROCHIP_PIC"); CASE_STRING(IDASIG__ARCH__SPARC, "SPARC"); CASE_STRING(IDASIG__ARCH__DEC_ALPHA, "DEC_ALPHA"); CASE_STRING(IDASIG__ARCH__HP_PA_RISC, "HP_PA_RISC"); CASE_STRING(IDASIG__ARCH__HITACHI_H8_500, "HITACHI_H8_500"); CASE_STRING(IDASIG__ARCH__TASKING_TRICORE, "TASKING_TRICORE"); CASE_STRING(IDASIG__ARCH__MOTOROLA_DSP5600X, "MOTOROLA_DSP5600X"); CASE_STRING(IDASIG__ARCH__SIEMENS_C166, "SIEMENS_C166"); CASE_STRING(IDASIG__ARCH__SGS_THOMSON_ST20, "SGS_THOMSON_ST20"); CASE_STRING(IDASIG__ARCH__INTEL_ITANIUM_IA64, "INTEL_ITANIUM_IA64"); CASE_STRING(IDASIG__ARCH__INTEL_I960, "INTEL_I960"); CASE_STRING(IDASIG__ARCH__FUJITSU_F2MC_16, "FUJITSU_F2MC_16"); CASE_STRING(IDASIG__ARCH__TMS320C54XX, "TMS320C54XX"); CASE_STRING(IDASIG__ARCH__TMS320C55XX, "TMS320C55XX"); CASE_STRING(IDASIG__ARCH__TRIMEDIA, "TRIMEDIA"); CASE_STRING(IDASIG__ARCH__MITSUBISH_32_BIT_RISC, "MITSUBISH_BIT_RISC"); CASE_STRING(IDASIG__ARCH__NEC_78K0, "NEC_78K0"); CASE_STRING(IDASIG__ARCH__NEC_78K0S, "NEC_78K0S"); CASE_STRING(IDASIG__ARCH__MITSUBISHI_8_BIT, "MITSUBISHI_8_BIT"); CASE_STRING(IDASIG__ARCH__MITSIBUSHI_16_BIT, "MITSIBUSHI_16_BIT"); CASE_STRING(IDASIG__ARCH__ST9PLUS, "ST9PLUS"); CASE_STRING(IDASIG__ARCH__FUJITSU_FR, "FUJITSU_FR"); CASE_STRING(IDASIG__ARCH__MOTOROLA_68HC16, "MOTOROLA_68HC16"); CASE_STRING(IDASIG__ARCH__MITSUBISHI_7900, "MITSUBISHI_7900"); return "UNKNOWN"; }
/** Convert penalty to a string. * @param penalty penalty to translate into a string * @return string representation of the penalty */ const char * worldinfo_penalty_tostring(worldinfo_penalty_t penalty) { switch (penalty) { CASE_STRING(PENALTY_NONE); CASE_STRING(PENALTY_BALL_HOLDING); CASE_STRING(PENALTY_GOALIE_PUSHING); CASE_STRING(PENALTY_PLAYER_PUSHING); CASE_STRING(PENALTY_ILLEGAL_DEFENDER); CASE_STRING(PENALTY_ILLEGAL_DEFENSE); CASE_STRING(PENALTY_OBSTRUCTION); CASE_STRING(PENALTY_REQ_FOR_PICKUP); CASE_STRING(PENALTY_LEAVING); CASE_STRING(PENALTY_DAMAGE); CASE_STRING(PENALTY_MANUAL); default: return "Unknown Penalty"; } }