Page 1 of 1

Is it about time you checked yuor monitor settings?!

Posted: Mon Dec 22, 2003 4:49 am
by DriakTravo
This is just a bit of code I use when ever I need to adjust my monitor settings for position, size, color, brightness, and contrast. It really helps me...

Code: Select all

InitSprite()
InitKeyboard()
OpenScreen(1024,768,32,"")
Repeat
  ClearScreen(0,0,0)
  StartDrawing(ScreenOutput())
    Line(1,1,1022,0,RGB(255,255,255))
    Line(1023,1,0,766,RGB(255,255,255))
    Line(1,1,0,766,RGB(255,255,255))
    Line(1,766,1022,0,RGB(255,255,255))
    Box(2,100,1020,50,RGB(255,0,0))
    Box(2,200,1020,50,RGB(0,255,0))
    Box(2,300,1020,50,RGB(0,0,255))
    Box(2,150,1020,50,RGB(128,0,0))
    Box(2,250,1020,50,RGB(0,128,0))
    Box(2,350,1020,50,RGB(0,0,128))
  StopDrawing()
  FlipBuffers()
  ExamineKeyboard()
  If KeyboardPushed(#PB_Key_ALL)
    End
  EndIf
ForEver
Uggg... It is really late where I am and I acan hardly keep my eyes open... aqnd listen ing to soft techno so.... meh!

Posted: Mon Dec 22, 2003 10:20 am
by J. Baker
Nice work, test this. :D

Code: Select all

InitSprite() 
InitKeyboard() 
OpenScreen(800,600,32,"") 
Repeat 
  ClearScreen(0,0,0) 
  StartDrawing(ScreenOutput())
  
  ;Circle Centered
  Circle(400,300,296,RGB(255,255,255))
  Circle(400,300,295,RGB(0,0,0))
  
  ;Line Edge
  Line(1,1,800,0,RGB(255,255,255))
  Line(1,1,0,600,RGB(255,255,255))
  Line(1,599,800,0,RGB(255,255,255))
  Line(799,1,0,600,RGB(255,255,255))
  
  ;Line Cross
  Line(400,1,0,600,RGB(255,255,255))
  Line(1,300,800,0,RGB(255,255,255))
  
  ;Colors
  Box(4,4,37,197,RGB(255,0,0))
  Box(4,201,37,197,RGB(0,255,0))
  Box(4,398,37,198,RGB(0,0,255))
  
  ;Contrast
  Box(41,4,39,39,RGB(255,170,170))
  Box(41,43,39,39,RGB(255,85,85))
  Box(41,82,39,41,RGB(255,0,0))
  Box(41,123,39,39,RGB(170,0,0))
  Box(41,162,39,39,RGB(85,0,0))
  
  Box(41,201,39,39,RGB(170,255,170))
  Box(41,240,39,39,RGB(85,255,85))
  Box(41,279,39,41,RGB(0,255,0))
  Box(41,320,39,39,RGB(0,170,0))
  Box(41,359,39,39,RGB(0,85,0))
  
  Box(41,398,39,39,RGB(170,170,255))
  Box(41,437,39,39,RGB(85,85,255))
  Box(41,476,39,41,RGB(0,0,255))
  Box(41,517,39,39,RGB(0,0,170))
  Box(41,556,39,40,RGB(0,0,85))

  ;Brightness
  Box(760,4,37,37,RGB(255,255,255))
  Box(760,41,37,37,RGB(239,239,239))
  Box(760,78,37,37,RGB(223,223,223))
  Box(760,115,37,37,RGB(207,207,207))
  Box(760,152,37,37,RGB(191,191,191))
  Box(760,189,37,37,RGB(175,175,175))
  Box(760,226,37,37,RGB(159,159,159))
  Box(760,263,37,37,RGB(143,143,143))
  Box(760,300,37,37,RGB(127,127,127))
  Box(760,337,37,37,RGB(111,111,111))
  Box(760,374,37,37,RGB(95,95,95))
  Box(760,411,37,37,RGB(79,79,79))
  Box(760,448,37,37,RGB(63,63,63))
  Box(760,485,37,37,RGB(47,47,47))
  Box(760,522,37,37,RGB(31,31,31))
  Box(760,559,37,37,RGB(15,15,15))
  
  StopDrawing() 
  FlipBuffers() 
  ExamineKeyboard() 
  If KeyboardPushed(#PB_Key_ALL) 
    End 
  EndIf 
ForEver

Posted: Mon Dec 22, 2003 2:04 pm
by DriakTravo
Nice work to you also. I knew someone was going to come in and make a better one than me. They always do :cry: . Well! My day will come...

One question tho. What is that oversized crosshair for?

Posted: Mon Dec 22, 2003 2:59 pm
by J. Baker
Hey, you started the code, I just played with it. All credit goes to you. The crosshair is used mainly for tv's because of distorsion bending in some sets but comp monitors don't have this problem (that I know of). Just thought it would give it a little something something, lol. I'm still a noob to programming, so most of the time I play with other peoples code to learn. Keep up the good work. :D

Posted: Mon Dec 22, 2003 8:11 pm
by DriakTravo
Ahh! I see, I thought it was for width/height adjustment to make sure it is not in an oval, and the lines were for rotating balance ;). Nice job!

Posted: Mon Dec 22, 2003 10:57 pm
by J. Baker
I guess if some monitors are able to adjust the height and width along with rotation, this could be used for that. 8)