Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
A new project I've been busy with :-)
#21
That's cause it's designed to be run from terminals. Each terminal can be very different to another. Some allow text decorations, some allow a number of colours, some of them need fixed colour values, some other can define R,G,B intensities... That's why ncurses is so awkward.

I misread the message, that's why I posted that silly formula that works in MSDOS if you configure the VGA to deactivate blink thus being able to display all the 16 background colours.

http://www.apmaths.uwo.ca/~xli/ncurses.html#attribute
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply
#22
Thanks for the link, but I have already figured it out, like I said. Here's code proof:


Code:
Sub curses_InitColorTable()
    
    Dim As Integer y, x, c
  
    For y = 0 To 15
      
      For x = 0 To 7
      
          c += 1
          init_pair( c, x, y )
  
        Next
        
      Next
    
  End Sub

  Private Sub con_Blitter( conBlit As con_Core Ptr )
  
    
    Dim As Integer y, x
    
    With *( conBlit )
  
      Dim As chType charBlit
      
      move( 0, 0 )
  
      For y = 0 To .con_y - 1
        '' rows
          
        For x = 0 To .con_x - 1
          '' columns
          
  
          With .con_Data[y][x]
  
            charBlit = IIf( _
                            .char = 0, _
                            32    Or color_pair( ( .bcol Shl 3 ) + 1 ), _
                            .char Or color_pair( ( .bcol Shl 3 ) + 1 + ( .fcol And &b0111 ) ) Or IIf( .fcol And &b1000, a_bold, 0 ) _
                          )
            
            addch( charBlit )
            
                      
          End With
          
      
        Next
        
      Next
  
    End With
    
    refresh '' curses ...
  
  End Sub

One thing MS did right was making that formula for hitting all colors so easy Tongue
Reply
#23
Well, having a VGA or a VGA clone it's easy to do thing "that right" Wink Big Grin
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)