X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Ftom.cpp;h=a8e482d6c6f1718ffa00a8a0bc2ebd1effd178f3;hb=d3b866b6280bb34fa878b03bb4048492e936e0e1;hp=27f0a45387abdf58f0618c15cde9f37688f3c621;hpb=3e5606b067152768044d035863be184d721897e1;p=virtualjaguar diff --git a/src/tom.cpp b/src/tom.cpp index 27f0a45..a8e482d 100644 --- a/src/tom.cpp +++ b/src/tom.cpp @@ -457,8 +457,6 @@ Vertical resolution: 238 lines void tom_calc_cry_rgb_mix_lut(void) { - memory_malloc_secure((void **)&tom_cry_rgb_mix_lut, 2 * 0x10000, "CRY/RGB mixed mode LUT"); - for (uint32 i=0; i<0x10000; i++) { uint16 color = i; @@ -478,6 +476,7 @@ void tom_calc_cry_rgb_mix_lut(void) blue = (((uint32)bluecv[chrm][chrl]) * y) >> 11; color = (red << 10) | (green << 5) | blue; } + tom_cry_rgb_mix_lut[i] = color; } } @@ -852,6 +851,8 @@ void TOMExecScanline(uint16 scanline, bool render) // void tom_init(void) { + memory_malloc_secure((void **)&tom_cry_rgb_mix_lut, 2 * 0x10000, "CRY/RGB mixed mode LUT"); + op_init(); blitter_init(); //This should be done by JERRY! pcm_init(); @@ -875,6 +876,7 @@ void tom_done(void) // gpu_done(); // dsp_done(); memory_free(tom_ram_8); + memory_free(tom_cry_rgb_mix_lut); } /*uint32 tom_getHBlankWidthInPixels(void)