Changeset 60 in xtideuniversalbios for trunk/Assembly_Library/Src/Menu/MenuBorders.asm
- Timestamp:
- Nov 25, 2010, 2:17:45 PM (14 years ago)
- google:author:
- aitotat
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Assembly_Library/Src/Menu/MenuBorders.asm
r52 r60 2 2 ; Project name : Assembly Library 3 3 ; Created date : 14.7.2010 4 ; Last update : 11.10.20104 ; Last update : 25.11.2010 5 5 ; Author : Tomi Tilli 6 6 ; Description : Functions for drawing menu borders. … … 34 34 call RefreshInformationBorders 35 35 call DrawBottomBorderLine 36 call DrawBottomShadowLine 37 jmp MenuTime_DrawWithoutUpdating 36 call DrawTimeoutCounterOverBottomBorderLine 37 jmp DrawBottomShadowLine 38 39 40 ;-------------------------------------------------------------------- 41 ; MenuBorders_RedrawBottomBorderLine 42 ; Parameters 43 ; SS:BP: Ptr to MENU 44 ; Returns: 45 ; Nothing 46 ; Corrupts registers: 47 ; AX, BX, DX, SI, DI 48 ;-------------------------------------------------------------------- 49 ALIGN JUMP_ALIGN 50 MenuBorders_RedrawBottomBorderLine: 51 call MenuBorders_AdjustDisplayContextForDrawingBorders 52 call MenuLocation_GetBottomBordersTopLeftCoordinatesToAX 53 CALL_DISPLAY_LIBRARY SetCursorCoordinatesFromAX 54 call GetNumberOfMiddleCharactersToDX 55 jmp DrawBottomBorderLine 56 57 58 ;-------------------------------------------------------------------- 59 ; MenuBorders_RedrawTimeoutValue 60 ; Parameters 61 ; SS:BP: Ptr to MENU 62 ; Returns: 63 ; Nothing 64 ; Corrupts registers: 65 ; AX, BX, SI, DI 66 ;-------------------------------------------------------------------- 67 ALIGN JUMP_ALIGN 68 MenuBorders_RedrawTimeoutValue: 69 call MenuBorders_AdjustDisplayContextForDrawingBorders 70 call MenuLocation_GetBottomBordersTopLeftCoordinatesToAX 71 inc ah ; Increment for shadow border 72 CALL_DISPLAY_LIBRARY SetCursorCoordinatesFromAX 73 jmp DrawTimeoutCounterOverBottomBorderLine 38 74 39 75 … … 174 210 ; DrawSeparationBorderLine 175 211 ; DrawBottomBorderLine 212 ; DrawTimeoutCounterOverBottomBorderLine 176 213 ; DrawBottomShadowLine 177 214 ; DrawTextBorderLine … … 201 238 202 239 ALIGN JUMP_ALIGN 240 DrawTimeoutCounterOverBottomBorderLine: 241 test BYTE [bp+MENU.bFlags], FLG_MENU_TIMEOUT_COUNTDOWN 242 jz SHORT .NoNeedToDrawSinceTimeoutDisabled 243 mov ax, (-1)<<8 ; Decrement row 244 call MenuLocation_MoveCursorByALcolumnsAndAHrows 245 call MenuTime_GetTimeoutSecondsLeftToAX 246 call PrintTimeoutStringWithSecondsInAX 247 jmp SHORT PrintNewlineToEndBorderLine 248 .NoNeedToDrawSinceTimeoutDisabled: 249 ret 250 251 ALIGN JUMP_ALIGN 203 252 DrawBottomShadowLine: 204 CALL_DISPLAY_LIBRARY GetSoftwareCoordinatesToAX 205 inc ax ; Increment column 206 CALL_DISPLAY_LIBRARY SetCursorCoordinatesFromAX 253 mov ax, 1 ; Increment column 254 call MenuLocation_MoveCursorByALcolumnsAndAHrows 207 255 inc dx ; Increment repeat count... 208 256 inc dx ; ...for both corner characters … … 333 381 334 382 383 ;-------------------------------------------------------------------- 384 ; PrintTimeoutStringWithSecondsInAX 385 ; Parameters 386 ; AX: Seconds to print 387 ; SS:BP: Ptr to MENU 388 ; Returns: 389 ; Nothing 390 ; Corrupts registers: 391 ; AX, SI, DI 392 ;-------------------------------------------------------------------- 393 ALIGN JUMP_ALIGN 394 PrintTimeoutStringWithSecondsInAX: 395 push bp 396 397 xchg di, ax 398 mov bp, sp 399 call .GetTimeoutAttributeToAXfromSecondsInDI 400 mov si, .szSelectionTimeout 401 push ax ; Push attribute 402 push di ; Push seconds 403 CALL_DISPLAY_LIBRARY FormatNullTerminatedStringFromCSSI 404 pop bp 405 406 ; Draw right border with normal border color 407 mov al, DOUBLE_RIGHT_HORIZONTAL_TO_SINGLE_VERTICAL 408 jmp MenuBorders_PrintSingleBorderCharacterFromAL 409 .szSelectionTimeout: 410 db DOUBLE_BOTTOM_LEFT_CORNER 411 db DOUBLE_LEFT_HORIZONTAL_TO_SINGLE_VERTICAL 412 db "%AAutoselection in %2u s",NULL 413 414 ;-------------------------------------------------------------------- 415 ; .GetTimeoutAttributeToAXfromSecondsInDI 416 ; Parameters 417 ; DI: Seconds to print 418 ; Returns: 419 ; AX: Attribute byte for seconds 420 ; Corrupts registers: 421 ; SI 422 ;-------------------------------------------------------------------- 423 ALIGN JUMP_ALIGN 424 .GetTimeoutAttributeToAXfromSecondsInDI: 425 mov si, ATTRIBUTE_CHARS.cNormalTimeout 426 cmp di, BYTE 3 427 eCMOVB si, ATTRIBUTE_CHARS.cHurryTimeout 428 jmp MenuAttribute_GetToAXfromTypeInSI 429 335 430 336 431 ; Lookup tables for border characters
Note:
See TracChangeset
for help on using the changeset viewer.