void hp48_state::palette_init() { int i; for ( i = 0; i < 255; i++ ) { float c = i/255.; palette_set_color( machine(), i, MAKE_ARGB( 0, mix2(0,c), mix2(1,c), mix2(2,c) ) ); } }
PALETTE_INIT_MEMBER(hp48_state, hp48) { int i; for ( i = 0; i < 255; i++ ) { float c = i/255.; m_palette->set_pen_color( i, rgb_t( 0, mix2(0,c), mix2(1,c), mix2(2,c) ) ); } }
void solve() { char s[10]; int ncmd = 0, begin = 0; gets(line); while (begin < strlen(line)){ sscanf(line + begin, "%s", cmd[++ncmd]); begin += strlen(cmd[ncmd]); while (line[begin] == ' ') begin++; } p = 0; while (ncmd) { strcpy(s, cmd[ncmd]); ncmd--; if (strcmp(s, "id") == 0 || strcmp(s, "id-") == 0) continue; if (strcmp(s, "rot") == 0) rot(); else if (strcmp(s, "rot-") == 0) rot2(); else if (strcmp(s, "sym") == 0 || strcmp(s, "sym-") == 0) sym(); else if (strcmp(s, "bhsym") == 0 || strcmp(s, "bhsym-") == 0) bhsym(); else if (strcmp(s, "bvsym") == 0 || strcmp(s, "bvsym-") == 0) bvsym(); else if (strcmp(s, "div") == 0) div(); else if (strcmp(s, "div-") == 0) div2(); else if (strcmp(s, "mix") == 0) mix(); else if (strcmp(s, "mix-") == 0) mix2(); p = !p; } }