comparison src/tft_outputs.asm @ 234:57155164faad

Show OSTC2-like active gas boxes in surface mode
author heinrichsweikamp
date Wed, 25 Feb 2015 13:57:30 +0100
parents 834e1c35160c
children 23311219dacc
comparison
equal deleted inserted replaced
233:b6edf9bb8e3b 234:57155164faad
333 call TFT_standard_color 333 call TFT_standard_color
334 return 334 return
335 335
336 ; **************************************************************************** 336 ; ****************************************************************************
337 337
338 global TFT_show_OC_startgas_surface
339 TFT_show_OC_startgas_surface: ; Show first gas and "OSTC2-like" active gases
340 ; Show first gas
341 WIN_SMALL surf_decotype_column+.1,surf_decotype_row+.30
342 extern get_first_gas_to_WREG,gaslist_strcat_gas
343 call get_first_gas_to_WREG ; Gets first gas (0-4) into WREG
344 movwf PRODL
345 call gaslist_strcat_gas ; Input: PRODL : gas number (0..4), Output: Text appended into buffer pointed by FSR2.
346 STRCAT_PRINT ""
347 ; Show boxes
348 WIN_TOP surf_decotype_row+.30+.25
349 WIN_LEFT surf_decotype_boxes_left1+.1
350 rcall TFT_disabled_color
351 movff opt_gas_type+0,hi ; 0=Disabled, 1=First, 2=Travel, 3=Deco
352 tstfsz hi
353 rcall TFT_standard_color
354 STRCPY_PRINT "1"
355 decfsz hi,F ; Type = 1 (First)?
356 bra DISP_active_gas_surfmode3 ; No, skip box
357 WIN_FRAME_STD surf_decotype_boxes_top, surf_decotype_boxes_bottom, surf_decotype_boxes_left1, surf_decotype_boxes_left1+.8 ;top, bottom, left, right
358 DISP_active_gas_surfmode3:
359 rcall TFT_disabled_color
360 movff opt_gas_type+1,hi ; 0=Disabled, 1=First, 2=Travel, 3=Deco
361 tstfsz hi
362 rcall TFT_standard_color
363 WIN_LEFT surf_decotype_boxes_left2+.1
364 STRCPY_PRINT "2"
365 decfsz hi,F ; Type = 1 (First)?
366 bra DISP_active_gas_surfmode4 ; No, skip box
367 WIN_FRAME_STD surf_decotype_boxes_top, surf_decotype_boxes_bottom, surf_decotype_boxes_left2, surf_decotype_boxes_left2+.8 ;top, bottom, left, right
368 DISP_active_gas_surfmode4:
369 rcall TFT_disabled_color
370 movff opt_gas_type+2,hi ; 0=Disabled, 1=First, 2=Travel, 3=Deco
371 tstfsz hi
372 rcall TFT_standard_color
373 WIN_LEFT surf_decotype_boxes_left3+.1
374 STRCPY_PRINT "3"
375 decfsz hi,F ; Type = 1 (First)?
376 bra DISP_active_gas_surfmode5 ; No, skip box
377 WIN_FRAME_STD surf_decotype_boxes_top, surf_decotype_boxes_bottom, surf_decotype_boxes_left3, surf_decotype_boxes_left3+.8 ;top, bottom, left, right
378 DISP_active_gas_surfmode5:
379 rcall TFT_disabled_color
380 movff opt_gas_type+3,hi ; 0=Disabled, 1=First, 2=Travel, 3=Deco
381 tstfsz hi
382 rcall TFT_standard_color
383 WIN_LEFT surf_decotype_boxes_left4+.1
384 STRCPY_PRINT "4"
385 decfsz hi,F ; Type = 1 (First)?
386 bra DISP_active_gas_surfmode6 ; No, skip box
387 WIN_FRAME_STD surf_decotype_boxes_top, surf_decotype_boxes_bottom, surf_decotype_boxes_left4, surf_decotype_boxes_left4+.8 ;top, bottom, left, right
388 DISP_active_gas_surfmode6:
389 call TFT_disabled_color
390 movff opt_gas_type+4,hi ; 0=Disabled, 1=First, 2=Travel, 3=Deco
391 tstfsz hi
392 rcall TFT_standard_color
393 WIN_LEFT surf_decotype_boxes_left5+.1
394 STRCPY_PRINT "5"
395 rcall TFT_standard_color ; Reset color
396 decfsz hi,F ; Type = 1 (First)?
397 return ; no, Done.
398 WIN_FRAME_STD surf_decotype_boxes_top, surf_decotype_boxes_bottom, surf_decotype_boxes_left5, surf_decotype_boxes_left5+.8 ;top, bottom, left, right
399 return ; Done.
338 400
339 global TFT_show_color_schemes 401 global TFT_show_color_schemes
340 TFT_show_color_schemes: ; update the color schemes 402 TFT_show_color_schemes: ; update the color schemes
341 bsf divemode ; put in divemode 403 bsf divemode ; put in divemode
342 call TFT_divemask_color 404 call TFT_divemask_color