Advertisement
Guest User

NES Shader

a guest
Dec 5th, 2022
227
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 22.18 KB | None | 0 0
  1. //Apologies for the blunt force trauma style of tackling this. I know jack shit about hint colors or different ranges.
  2.  
  3. shader_type canvas_item;
  4.  
  5. uniform int state = 0; //Determines which colors will be displayed.
  6.  
  7. //Colors.
  8. uniform vec4 white1 : hint_color;
  9. uniform vec4 white2 : hint_color;
  10. uniform vec4 white3 : hint_color;
  11. uniform vec4 white4 : hint_color;
  12. uniform vec4 lblue1 : hint_color;
  13. uniform vec4 lblue2 : hint_color;
  14. uniform vec4 lblue3 : hint_color;
  15. uniform vec4 lblue4 : hint_color;
  16. uniform vec4 blue1 : hint_color;
  17. uniform vec4 blue2 : hint_color;
  18. uniform vec4 blue3 : hint_color;
  19. uniform vec4 blue4 : hint_color;
  20. uniform vec4 violet1 : hint_color;
  21. uniform vec4 violet2 : hint_color;
  22. uniform vec4 violet3 : hint_color;
  23. uniform vec4 violet4 : hint_color;
  24. uniform vec4 magenta1 : hint_color;
  25. uniform vec4 magenta2 : hint_color;
  26. uniform vec4 magenta3 : hint_color;
  27. uniform vec4 magenta4 : hint_color;
  28. uniform vec4 pink1 : hint_color;
  29. uniform vec4 pink2 : hint_color;
  30. uniform vec4 pink3 : hint_color;
  31. uniform vec4 pink4 : hint_color;
  32. uniform vec4 red1 : hint_color;
  33. uniform vec4 red2 : hint_color;
  34. uniform vec4 red3 : hint_color;
  35. uniform vec4 red4 : hint_color;
  36. uniform vec4 orange1 : hint_color;
  37. uniform vec4 orange2 : hint_color;
  38. uniform vec4 orange3 : hint_color;
  39. uniform vec4 orange4 : hint_color;
  40. uniform vec4 yellow1 : hint_color;
  41. uniform vec4 yellow2 : hint_color;
  42. uniform vec4 yellow3 : hint_color;
  43. uniform vec4 yellow4 : hint_color;
  44. uniform vec4 lgreen1 : hint_color;
  45. uniform vec4 lgreen2 : hint_color;
  46. uniform vec4 lgreen3 : hint_color;
  47. uniform vec4 lgreen4 : hint_color;
  48. uniform vec4 green1 : hint_color;
  49. uniform vec4 green2 : hint_color;
  50. uniform vec4 green3 : hint_color;
  51. uniform vec4 green4 : hint_color;
  52. uniform vec4 teal1 : hint_color;
  53. uniform vec4 teal2 : hint_color;
  54. uniform vec4 teal3 : hint_color;
  55. uniform vec4 teal4 : hint_color;
  56. uniform vec4 turq1 : hint_color;
  57. uniform vec4 turq2 : hint_color;
  58. uniform vec4 turq3 : hint_color;
  59. uniform vec4 turq4 : hint_color;
  60. uniform vec4 grey1 : hint_color;
  61. uniform vec4 grey2 : hint_color;
  62. uniform vec4 grey3 : hint_color;
  63. uniform vec4 black1 : hint_color;
  64. uniform vec4 black2 : hint_color;
  65. uniform vec4 black3 : hint_color;
  66. uniform vec4 black4 : hint_color;
  67. //Famicom extra colors.
  68. uniform vec4 famred1 : hint_color;
  69. uniform vec4 famred2 : hint_color;
  70. uniform vec4 famyellow1 : hint_color;
  71. uniform vec4 famyellow2 : hint_color;
  72. uniform vec4 famtan1 : hint_color;
  73. uniform vec4 famtan2 : hint_color;
  74. uniform vec4 famskin : hint_color;
  75. uniform vec4 famblue : hint_color;
  76.  
  77. void fragment() {
  78. //Grab current color.
  79. vec4 currColor = texture(TEXTURE,UV); // Get current color of pixel
  80.  
  81. if (state == 0) { //Initial state. All colors normal.
  82. //White
  83. if (currColor == white1) {
  84. COLOR = white1;
  85. }
  86. if (currColor == white2) {
  87. COLOR = white2;
  88. }
  89. if (currColor == white3) {
  90. COLOR = white3;
  91. }
  92. if (currColor == white4) {
  93. COLOR = white4;
  94. }
  95. //Light blue.
  96. if (currColor == lblue1) {
  97. COLOR = lblue1;
  98. }
  99. if (currColor == lblue2) {
  100. COLOR = lblue2;
  101. }
  102. if (currColor == lblue3) {
  103. COLOR = lblue3;
  104. }
  105. if (currColor == lblue4) {
  106. COLOR = lblue4;
  107. }
  108. //Blue.
  109. if (currColor == blue1) {
  110. COLOR = blue1;
  111. }
  112. if (currColor == blue2) {
  113. COLOR = blue2;
  114. }
  115. if (currColor == blue3) {
  116. COLOR = blue3;
  117. }
  118. if (currColor == blue4) {
  119. COLOR = blue4;
  120. }
  121. //Violet
  122. if (currColor == violet1) {
  123. COLOR = violet1;
  124. }
  125. if (currColor == violet2) {
  126. COLOR = violet2;
  127. }
  128. if (currColor == violet3) {
  129. COLOR = violet3;
  130. }
  131. if (currColor == violet4) {
  132. COLOR = violet4;
  133. }
  134. //Magenta
  135. if (currColor == magenta1) {
  136. COLOR = magenta1;
  137. }
  138. if (currColor == magenta2) {
  139. COLOR = magenta2;
  140. }
  141. if (currColor == magenta3) {
  142. COLOR = magenta3;
  143. }
  144. if (currColor == magenta4) {
  145. COLOR = magenta4;
  146. }
  147. //Pink
  148. if (currColor == pink1) {
  149. COLOR = pink1;
  150. }
  151. if (currColor == pink2) {
  152. COLOR = pink2;
  153. }
  154. if (currColor == pink3) {
  155. COLOR = pink3;
  156. }
  157. if (currColor == pink4) {
  158. COLOR = pink4;
  159. }
  160. //Red
  161. if (currColor == red1) {
  162. COLOR = red1;
  163. }
  164. if (currColor == red2) {
  165. COLOR = red2;
  166. }
  167. if (currColor == red3) {
  168. COLOR = red3;
  169. }
  170. if (currColor == red4) {
  171. COLOR = red4;
  172. }
  173. //Orange
  174. if (currColor == orange1) {
  175. COLOR = orange1;
  176. }
  177. if (currColor == orange2) {
  178. COLOR = orange2;
  179. }
  180. if (currColor == orange3) {
  181. COLOR = orange3;
  182. }
  183. if (currColor == orange4) {
  184. COLOR = orange4;
  185. }
  186. //Yellow
  187. if (currColor == yellow1) {
  188. COLOR = yellow1;
  189. }
  190. if (currColor == yellow2) {
  191. COLOR = yellow2;
  192. }
  193. if (currColor == yellow3) {
  194. COLOR = yellow3;
  195. }
  196. if (currColor == yellow4) {
  197. COLOR = yellow4;
  198. }
  199. //Light green.
  200. if (currColor == lgreen1) {
  201. COLOR = lgreen1;
  202. }
  203. if (currColor == lgreen2) {
  204. COLOR = lgreen2;
  205. }
  206. if (currColor == lgreen3) {
  207. COLOR = lgreen3;
  208. }
  209. if (currColor == lgreen4) {
  210. COLOR = lgreen4;
  211. }
  212. //Green
  213. if (currColor == green1) {
  214. COLOR = green1;
  215. }
  216. if (currColor == green2) {
  217. COLOR = green2;
  218. }
  219. if (currColor == green3) {
  220. COLOR = green3;
  221. }
  222. if (currColor == green4) {
  223. COLOR = green4;
  224. }
  225. //Teal
  226. if (currColor == teal1) {
  227. COLOR = teal1;
  228. }
  229. if (currColor == teal2) {
  230. COLOR = teal2;
  231. }
  232. if (currColor == teal3) {
  233. COLOR = teal3;
  234. }
  235. if (currColor == teal4) {
  236. COLOR = teal4;
  237. }
  238. //Turquoise
  239. if (currColor == turq1) {
  240. COLOR = turq1;
  241. }
  242. if (currColor == turq2) {
  243. COLOR = turq2;
  244. }
  245. if (currColor == turq3) {
  246. COLOR = turq3;
  247. }
  248. if (currColor == turq4) {
  249. COLOR = turq4;
  250. }
  251. //Grey
  252. if (currColor == grey1) {
  253. COLOR = grey1;
  254. }
  255. if (currColor == grey2) {
  256. COLOR = grey2;
  257. }
  258. if (currColor == grey3) {
  259. COLOR = grey3;
  260. }
  261. //Black
  262. if (currColor == black1) {
  263. COLOR = black1;
  264. }
  265. if (currColor == black2) {
  266. COLOR = black2;
  267. }
  268. if (currColor == black3) {
  269. COLOR = black3;
  270. }
  271. if (currColor == black4) {
  272. COLOR = black4;
  273. }
  274. //Famicom extras.
  275. if (currColor == famred1) {
  276. COLOR = famred1;
  277. }
  278. if (currColor == famred2) {
  279. COLOR = famred2;
  280. }
  281. if (currColor == famyellow1) {
  282. COLOR = famyellow1;
  283. }
  284. if (currColor == famyellow2) {
  285. COLOR = famyellow2;
  286. }
  287. if (currColor == famtan1) {
  288. COLOR = famtan1;
  289. }
  290. if (currColor == famtan2) {
  291. COLOR = famtan2;
  292. }
  293. if (currColor == famskin) {
  294. COLOR = famskin;
  295. }
  296. if (currColor == famblue) {
  297. COLOR = famblue;
  298. }
  299. }
  300. if (state == 1) { //Dark step 1.
  301. //White
  302. //Whites are entirely too bright for the fade effect, so I'll be mixing greys in as well.
  303. if (currColor == white1) {
  304. COLOR = grey1;
  305. }
  306. if (currColor == white2) {
  307. COLOR = grey2;
  308. }
  309. if (currColor == white3) {
  310. COLOR = grey3;
  311. }
  312. if (currColor == white4) {
  313. COLOR = black4;
  314. }
  315. //Light blue.
  316. if (currColor == lblue1) {
  317. COLOR = lblue2;
  318. }
  319. if (currColor == lblue2) {
  320. COLOR = lblue3;
  321. }
  322. if (currColor == lblue3) {
  323. COLOR = lblue4;
  324. }
  325. if (currColor == lblue4) {
  326. COLOR = black4;
  327. }
  328. //Blue.
  329. if (currColor == blue1) {
  330. COLOR = blue2;
  331. }
  332. if (currColor == blue2) {
  333. COLOR = blue3;
  334. }
  335. if (currColor == blue3) {
  336. COLOR = blue4;
  337. }
  338. if (currColor == blue4) {
  339. COLOR = black4;
  340. }
  341. //Violet
  342. if (currColor == violet1) {
  343. COLOR = violet2;
  344. }
  345. if (currColor == violet2) {
  346. COLOR = violet3;
  347. }
  348. if (currColor == violet3) {
  349. COLOR = violet4;
  350. }
  351. if (currColor == violet4) {
  352. COLOR = black4;
  353. }
  354. //Magenta
  355. if (currColor == magenta1) {
  356. COLOR = magenta2;
  357. }
  358. if (currColor == magenta2) {
  359. COLOR = magenta3;
  360. }
  361. if (currColor == magenta3) {
  362. COLOR = magenta4;
  363. }
  364. if (currColor == magenta4) {
  365. COLOR = black4;
  366. }
  367. //Pink
  368. if (currColor == pink1) {
  369. COLOR = pink2;
  370. }
  371. if (currColor == pink2) {
  372. COLOR = pink3;
  373. }
  374. if (currColor == pink3) {
  375. COLOR = pink4;
  376. }
  377. if (currColor == pink4) {
  378. COLOR = black4;
  379. }
  380. //Red
  381. if (currColor == red1) {
  382. COLOR = red2;
  383. }
  384. if (currColor == red2) {
  385. COLOR = red3;
  386. }
  387. if (currColor == red3) {
  388. COLOR = red4;
  389. }
  390. if (currColor == red4) {
  391. COLOR = black4;
  392. }
  393. //Orange
  394. if (currColor == orange1) {
  395. COLOR = orange2;
  396. }
  397. if (currColor == orange2) {
  398. COLOR = orange3;
  399. }
  400. if (currColor == orange3) {
  401. COLOR = orange4;
  402. }
  403. if (currColor == orange4) {
  404. COLOR = black4;
  405. }
  406. //Yellow
  407. if (currColor == yellow1) {
  408. COLOR = yellow2;
  409. }
  410. if (currColor == yellow2) {
  411. COLOR = yellow3;
  412. }
  413. if (currColor == yellow3) {
  414. COLOR = yellow4;
  415. }
  416. if (currColor == yellow4) {
  417. COLOR = black4;
  418. }
  419. //Light green.
  420. if (currColor == lgreen1) {
  421. COLOR = lgreen2;
  422. }
  423. if (currColor == lgreen2) {
  424. COLOR = lgreen3;
  425. }
  426. if (currColor == lgreen3) {
  427. COLOR = lgreen4;
  428. }
  429. if (currColor == lgreen4) {
  430. COLOR = black4;
  431. }
  432. //Green
  433. if (currColor == green1) {
  434. COLOR = green2;
  435. }
  436. if (currColor == green2) {
  437. COLOR = green3;
  438. }
  439. if (currColor == green3) {
  440. COLOR = green4;
  441. }
  442. if (currColor == green4) {
  443. COLOR = black4;
  444. }
  445. //Teal
  446. if (currColor == teal1) {
  447. COLOR = teal2;
  448. }
  449. if (currColor == teal2) {
  450. COLOR = teal3;
  451. }
  452. if (currColor == teal3) {
  453. COLOR = teal4;
  454. }
  455. if (currColor == teal4) {
  456. COLOR = black4;
  457. }
  458. //Turquoise
  459. if (currColor == turq1) {
  460. COLOR = turq2;
  461. }
  462. if (currColor == turq2) {
  463. COLOR = turq3;
  464. }
  465. if (currColor == turq3) {
  466. COLOR = turq4;
  467. }
  468. if (currColor == turq4) {
  469. COLOR = black4;
  470. }
  471. //Grey
  472. if (currColor == grey1) {
  473. COLOR = grey2;
  474. }
  475. if (currColor == grey2) {
  476. COLOR = grey3;
  477. }
  478. if (currColor == grey3) {
  479. COLOR = black4;
  480. }
  481. //Black
  482. if (currColor == black1) {
  483. COLOR = black2;
  484. }
  485. if (currColor == black2) {
  486. COLOR = black3;
  487. }
  488. if (currColor == black3) {
  489. COLOR = black4;
  490. }
  491. if (currColor == black4) {
  492. COLOR = black4;
  493. }
  494. //Famicom extras.
  495. if (currColor == famred1) {
  496. COLOR = famred2;
  497. }
  498. if (currColor == famred2) {
  499. COLOR = black4;
  500. }
  501. if (currColor == famyellow1) {
  502. COLOR = famyellow2;
  503. }
  504. if (currColor == famyellow2) {
  505. COLOR = black4;
  506. }
  507. if (currColor == famtan1) {
  508. COLOR = famtan2;
  509. }
  510. if (currColor == famtan2) {
  511. COLOR = black4;
  512. }
  513. if (currColor == famskin) {
  514. COLOR = famtan1;
  515. }
  516. if (currColor == famblue) {
  517. COLOR = black4;
  518. }
  519. }
  520. if (state == 2) { //Darkened halfway
  521. //White
  522. //Whites are entirely too bright for the fade effect, so I'll be mixing greys in as well.
  523. if (currColor == white1) {
  524. COLOR = grey2;
  525. }
  526. if (currColor == white2) {
  527. COLOR = grey3;
  528. }
  529. if (currColor == white3) {
  530. COLOR = black4;
  531. }
  532. if (currColor == white4) {
  533. COLOR = black4;
  534. }
  535. //Light blue.
  536. if (currColor == lblue1) {
  537. COLOR = lblue3;
  538. }
  539. if (currColor == lblue2) {
  540. COLOR = lblue4;
  541. }
  542. if (currColor == lblue3) {
  543. COLOR = black4;
  544. }
  545. if (currColor == lblue4) {
  546. COLOR = black4;
  547. }
  548. //Blue.
  549. if (currColor == blue1) {
  550. COLOR = blue3;
  551. }
  552. if (currColor == blue2) {
  553. COLOR = blue4;
  554. }
  555. if (currColor == blue3) {
  556. COLOR = black4;
  557. }
  558. if (currColor == blue4) {
  559. COLOR = black4;
  560. }
  561. //Violet
  562. if (currColor == violet1) {
  563. COLOR = violet3;
  564. }
  565. if (currColor == violet2) {
  566. COLOR = violet4;
  567. }
  568. if (currColor == violet3) {
  569. COLOR = black4;
  570. }
  571. if (currColor == violet4) {
  572. COLOR = black4;
  573. }
  574. //Magenta
  575. if (currColor == magenta1) {
  576. COLOR = magenta3;
  577. }
  578. if (currColor == magenta2) {
  579. COLOR = magenta4;
  580. }
  581. if (currColor == magenta3) {
  582. COLOR = black4;
  583. }
  584. if (currColor == magenta4) {
  585. COLOR = black4;
  586. }
  587. //Pink
  588. if (currColor == pink1) {
  589. COLOR = pink3;
  590. }
  591. if (currColor == pink2) {
  592. COLOR = pink4;
  593. }
  594. if (currColor == pink3) {
  595. COLOR = black4;
  596. }
  597. if (currColor == pink4) {
  598. COLOR = black4;
  599. }
  600. //Red
  601. if (currColor == red1) {
  602. COLOR = red3;
  603. }
  604. if (currColor == red2) {
  605. COLOR = red4;
  606. }
  607. if (currColor == red3) {
  608. COLOR = black4;
  609. }
  610. if (currColor == red4) {
  611. COLOR = black4;
  612. }
  613. //Orange
  614. if (currColor == orange1) {
  615. COLOR = orange3;
  616. }
  617. if (currColor == orange2) {
  618. COLOR = orange4;
  619. }
  620. if (currColor == orange3) {
  621. COLOR = black4;
  622. }
  623. if (currColor == orange4) {
  624. COLOR = black4;
  625. }
  626. //Yellow
  627. if (currColor == yellow1) {
  628. COLOR = yellow3;
  629. }
  630. if (currColor == yellow2) {
  631. COLOR = yellow4;
  632. }
  633. if (currColor == yellow3) {
  634. COLOR = black4;
  635. }
  636. if (currColor == yellow4) {
  637. COLOR = black4;
  638. }
  639. //Light green.
  640. if (currColor == lgreen1) {
  641. COLOR = lgreen3;
  642. }
  643. if (currColor == lgreen2) {
  644. COLOR = lgreen4;
  645. }
  646. if (currColor == lgreen3) {
  647. COLOR = black4;
  648. }
  649. if (currColor == lgreen4) {
  650. COLOR = black4;
  651. }
  652. //Green
  653. if (currColor == green1) {
  654. COLOR = green3;
  655. }
  656. if (currColor == green2) {
  657. COLOR = green4;
  658. }
  659. if (currColor == green3) {
  660. COLOR = black4;
  661. }
  662. if (currColor == green4) {
  663. COLOR = black4;
  664. }
  665. //Teal
  666. if (currColor == teal1) {
  667. COLOR = teal3;
  668. }
  669. if (currColor == teal2) {
  670. COLOR = teal4;
  671. }
  672. if (currColor == teal3) {
  673. COLOR = black4;
  674. }
  675. if (currColor == teal4) {
  676. COLOR = black4;
  677. }
  678. //Turquoise
  679. if (currColor == turq1) {
  680. COLOR = turq3;
  681. }
  682. if (currColor == turq2) {
  683. COLOR = turq4;
  684. }
  685. if (currColor == turq3) {
  686. COLOR = black4;
  687. }
  688. if (currColor == turq4) {
  689. COLOR = black4;
  690. }
  691. //Grey
  692. if (currColor == grey1) {
  693. COLOR = black4;
  694. }
  695. if (currColor == grey2) {
  696. COLOR = black4;
  697. }
  698. if (currColor == grey3) {
  699. COLOR = black4;
  700. }
  701. //Black
  702. if (currColor == black1) {
  703. COLOR = black3;
  704. }
  705. if (currColor == black2) {
  706. COLOR = black4;
  707. }
  708. if (currColor == black3) {
  709. COLOR = black4;
  710. }
  711. if (currColor == black4) {
  712. COLOR = black4;
  713. }
  714. //Famicom extras.
  715. if (currColor == famred1) {
  716. COLOR = black4;
  717. }
  718. if (currColor == famred2) {
  719. COLOR = black4;
  720. }
  721. if (currColor == famyellow1) {
  722. COLOR = black4;
  723. }
  724. if (currColor == famyellow2) {
  725. COLOR = black4;
  726. }
  727. if (currColor == famtan1) {
  728. COLOR = black4;
  729. }
  730. if (currColor == famtan2) {
  731. COLOR = black4;
  732. }
  733. if (currColor == famskin) {
  734. COLOR = famtan2;
  735. }
  736. if (currColor == famblue) {
  737. COLOR = black4;
  738. }
  739. }
  740. if (state == 3) { //Almost completely dark.
  741. //White
  742. //Whites are entirely too bright for the fade effect, so I'll be mixing greys in as well.
  743. if (currColor == white1) {
  744. COLOR = grey3;
  745. }
  746. if (currColor == white2) {
  747. COLOR = black4;
  748. }
  749. if (currColor == white3) {
  750. COLOR = black4;
  751. }
  752. if (currColor == white4) {
  753. COLOR = black4;
  754. }
  755. //Light blue.
  756. if (currColor == lblue1) {
  757. COLOR = lblue4;
  758. }
  759. if (currColor == lblue2) {
  760. COLOR = black4;
  761. }
  762. if (currColor == lblue3) {
  763. COLOR = black4;
  764. }
  765. if (currColor == lblue4) {
  766. COLOR = black4;
  767. }
  768. //Blue.
  769. if (currColor == blue1) {
  770. COLOR = blue4;
  771. }
  772. if (currColor == blue2) {
  773. COLOR = black4;
  774. }
  775. if (currColor == blue3) {
  776. COLOR = black4;
  777. }
  778. if (currColor == blue4) {
  779. COLOR = black4;
  780. }
  781. //Violet
  782. if (currColor == violet1) {
  783. COLOR = violet4;
  784. }
  785. if (currColor == violet2) {
  786. COLOR = black4;
  787. }
  788. if (currColor == violet3) {
  789. COLOR = black4;
  790. }
  791. if (currColor == violet4) {
  792. COLOR = black4;
  793. }
  794. //Magenta
  795. if (currColor == magenta1) {
  796. COLOR = magenta4;
  797. }
  798. if (currColor == magenta2) {
  799. COLOR = black4;
  800. }
  801. if (currColor == magenta3) {
  802. COLOR = black4;
  803. }
  804. if (currColor == magenta4) {
  805. COLOR = black4;
  806. }
  807. //Pink
  808. if (currColor == pink1) {
  809. COLOR = pink4;
  810. }
  811. if (currColor == pink2) {
  812. COLOR = black4;
  813. }
  814. if (currColor == pink3) {
  815. COLOR = black4;
  816. }
  817. if (currColor == pink4) {
  818. COLOR = black4;
  819. }
  820. //Red
  821. if (currColor == red1) {
  822. COLOR = red4;
  823. }
  824. if (currColor == red2) {
  825. COLOR = black4;
  826. }
  827. if (currColor == red3) {
  828. COLOR = black4;
  829. }
  830. if (currColor == red4) {
  831. COLOR = black4;
  832. }
  833. //Orange
  834. if (currColor == orange1) {
  835. COLOR = orange4;
  836. }
  837. if (currColor == orange2) {
  838. COLOR = black4;
  839. }
  840. if (currColor == orange3) {
  841. COLOR = black4;
  842. }
  843. if (currColor == orange4) {
  844. COLOR = black4;
  845. }
  846. //Yellow
  847. if (currColor == yellow1) {
  848. COLOR = yellow4;
  849. }
  850. if (currColor == yellow2) {
  851. COLOR = black4;
  852. }
  853. if (currColor == yellow3) {
  854. COLOR = black4;
  855. }
  856. if (currColor == yellow4) {
  857. COLOR = black4;
  858. }
  859. //Light green.
  860. if (currColor == lgreen1) {
  861. COLOR = lgreen4;
  862. }
  863. if (currColor == lgreen2) {
  864. COLOR = black4;
  865. }
  866. if (currColor == lgreen3) {
  867. COLOR = black4;
  868. }
  869. if (currColor == lgreen4) {
  870. COLOR = black4;
  871. }
  872. //Green
  873. if (currColor == green1) {
  874. COLOR = green4;
  875. }
  876. if (currColor == green2) {
  877. COLOR = black4;
  878. }
  879. if (currColor == green3) {
  880. COLOR = black4;
  881. }
  882. if (currColor == green4) {
  883. COLOR = black4;
  884. }
  885. //Teal
  886. if (currColor == teal1) {
  887. COLOR = teal4;
  888. }
  889. if (currColor == teal2) {
  890. COLOR = black4;
  891. }
  892. if (currColor == teal3) {
  893. COLOR = black4;
  894. }
  895. if (currColor == teal4) {
  896. COLOR = black4;
  897. }
  898. //Turquoise
  899. if (currColor == turq1) {
  900. COLOR = turq4;
  901. }
  902. if (currColor == turq2) {
  903. COLOR = black4;
  904. }
  905. if (currColor == turq3) {
  906. COLOR = black4;
  907. }
  908. if (currColor == turq4) {
  909. COLOR = black4;
  910. }
  911. //Grey
  912. if (currColor == grey1) {
  913. COLOR = black4;
  914. }
  915. if (currColor == grey2) {
  916. COLOR = black4;
  917. }
  918. if (currColor == grey3) {
  919. COLOR = black4;
  920. }
  921. //Black
  922. if (currColor == black1) {
  923. COLOR = black4;
  924. }
  925. if (currColor == black2) {
  926. COLOR = black4;
  927. }
  928. if (currColor == black3) {
  929. COLOR = black4;
  930. }
  931. if (currColor == black4) {
  932. COLOR = black4;
  933. }
  934. //Famicom extras.
  935. if (currColor == famred1) {
  936. COLOR = black4;
  937. }
  938. if (currColor == famred2) {
  939. COLOR = black4;
  940. }
  941. if (currColor == famyellow1) {
  942. COLOR = black4;
  943. }
  944. if (currColor == famyellow2) {
  945. COLOR = black4;
  946. }
  947. if (currColor == famtan1) {
  948. COLOR = black4;
  949. }
  950. if (currColor == famtan2) {
  951. COLOR = black4;
  952. }
  953. if (currColor == famskin) {
  954. COLOR = black4;
  955. }
  956. if (currColor == famblue) {
  957. COLOR = black4;
  958. }
  959. }
  960. if (state == 4) { //All black.
  961. COLOR = black4;
  962. }
  963. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement