Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Colors only shown... sometimes?
#1
Hi,

I'm using print64.bas, and the code I'm using to show a command menu is as follows:

Code:
const COLOR_BLACK            as ubyte = 0 const COLOR_BLUE              as ubyte = 1 const COLOR_RED              as ubyte = 2 const COLOR_MAGENTA          as ubyte = 3 const COLOR_GREEN            as ubyte = 4 const COLOR_CYAN              as ubyte = 5 const COLOR_YELLOW            as ubyte = 6 const COLOR_WHITE            as ubyte = 7 sub cursor_to(row as ubyte, col as ubyte)     printat64( row, col ) end sub sub cprint(s as string)     print64( s ) end sub sub lf()     cprint( CR ) end sub sub set_colors(i as ubyte, p as ubyte)     paper( p )     ink( i ) end sub sub set_default_colors()     set_colors( COLOR_WHITE, COLOR_BLACK ) end sub sub set_highlighted_colors()     set_colors( COLOR_CYAN, COLOR_BLACK ) end sub sub set_action_colors()     set_colors( COLOR_YELLOW, COLOR_BLACK ) end sub sub print_word_marked_initial(word as string)     set_action_colors()     cprint( word( 0 ) )     set_default_colors()     cprint( word( 1 to ) ) end sub sub print_cmds() ' Print basic options cursor_to( SCR_FIRST_LINE_CMDS, 0 ) print_word_marked_initial( "Inv " ) print_word_marked_initial( "Mira alrededor " ) cprint( "E" ): print_word_marked_initial( "xamina... " ) print_word_marked_initial( "Norte " ) print_word_marked_initial( "Sur " ) print_word_marked_initial( "Este " ) print_word_marked_initial( "Oeste " ) print_word_marked_initial( "Arriba " ) cprint( "A" )         print_word_marked_initial( "bajo" )         lf() ' Print object manipulation options print_word_marked_initial( "Coge... " ) print_word_marked_initial( "Deja... " ) cprint( "Em" ): print_word_marked_initial( "puja... " ) print_word_marked_initial( "Tira de... " ) print_word_marked_initial( "Rompe... " ) end sub

Well, the code should be straightforward. I also know it should work because I ported it from C, the same source code I used wtith z88dk. Unfortunately, it does not work, or it does not always work... (check the image).

What could be wrong?

-- Baltasar


Attached Files
.png   speccy_reveni_cmds.png (Size: 4.33 KB / Downloads: 570)
-- Baltasar
Reply


Messages In This Thread
Colors only shown... sometimes? - by baltasarq - 2025-01-07, 02:21 PM
RE: Colors only shown... sometimes? - by boriel - 2025-01-11, 06:59 PM
RE: Colors only shown... sometimes? - by boriel - 2025-01-14, 08:00 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)