Mysterious green line
- Posted by simulat <simulat at INTERGATE.BC.CA> Aug 15, 1999
- 406 views
Hi When I make my own palette, I get a green line at the top of my monitor. This line doesn't appear if I accept the system palette. The line doesn't get saved if the screen is saved to disk as a bitmap file. This is a mystery for me- not a problem. Though it would be a problem if I actually needed to make the green line go away. Does anyone know what's going on? Thanks Martin <<<<<START OF EUPHORIA CODE>>>> -- When I try to make my own palette, I get a green line at the top of the -- screen. Why is it there? include misc.e include graphics.e include image.e include get.e function InitGraphics(atom grafmode) atom gr gr=graphics_mode(grafmode) return video_config() end function constant degtorad=PI/180 --constant radtodeg=180/PI global constant vidok=1 global constant vidmode=2 global constant vidwide=5 global constant vidhigh=6 global constant vidcolrs=7 global constant yes=1 global constant no=0 sequence videoconfig -- Set up the screen graphic mode videoconfig=InitGraphics(261)-- I'm using video mode 261 global constant numcolours=videoconfig[vidcolrs]-1 global constant sw=videoconfig[vidwide] global constant sh=videoconfig[vidhigh] function Radian(atom i) return degtorad*i end function procedure wait() atom a a=wait_key() end procedure global procedure prinseq(sequence label, sequence string) printf(1, "%s", {label&" "}) printf(1, "%s \n", {string}) end procedure -- This is the palette making routine that makes the green line global procedure browns1colourit(atom cn) -- Makes a palette of colours atom red, green, blue, t1, t2 sequence colours colours={{0,0,0}} for colour=2 to cn do t1=colour/cn*180 t2=colour/cn*89.09 red=63*sin(Radian(t1-10)) green=63*cos(Radian(t1+30)) blue=tan(Radian(t2)) colours=append(colours,{red, green, blue}) end for all_palette(colours) end procedure atom sav --with trace trace(1) browns1colourit(256) -- This line calls the palette making routine prinseq("","Do you see a green line at the top of the screen?") prinseq("","Why is it there?") prinseq("","It only occurs when I make up my own palette.") prinseq("","Press any key twice to exit") sav=save_screen(0,"e:\\pictures\\new\\test.bmp") wait() --clear_screen() <<<<END OF EUPHORIA CODE