update doc
This commit is contained in:
parent
0a5d791808
commit
2cf3a817dd
6 changed files with 71 additions and 9 deletions
|
|
@ -78,11 +78,9 @@ struc mouse
|
|||
.cur_addr_start resw 1 ; adresse de départ de la sauvegarde
|
||||
|
||||
.cur_drawing resb 1 ;
|
||||
.cur_visible resb 1 ;
|
||||
.cur_counter resb 1 ; compteur de fois que le curseur a été caché (0 = visible, <0 = invisible)
|
||||
.cur_seg resw 1 ; segment / offset of the pointer
|
||||
.cur_ofs resw 1 ;
|
||||
.cur_mask resb 1 ; pixels mask (bit per pixel)
|
||||
.bkg_saved resb 1 ; background saved
|
||||
alignb 4 ; alignement 4 bytes
|
||||
.bkg_buffer resd 16 ; buffer for saved background
|
||||
|
|
|
|||
|
|
@ -73,8 +73,8 @@
|
|||
; accessible par la GUI à des offsets fixes.
|
||||
; ------------------------------------------------------------
|
||||
%define INIT 0
|
||||
%define GFX_PUTPIXEL 1
|
||||
%define GFX_GETPIXEL 2
|
||||
%define PUTPIXEL 1
|
||||
%define GETPIXEL 2
|
||||
%define GOTOXY 3
|
||||
%define TXT_MODE 4
|
||||
%define PUTCH 5
|
||||
|
|
@ -174,16 +174,30 @@ cga_calc_addr:
|
|||
pop cx
|
||||
ret
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; gfx_set_writemode (mode)
|
||||
; Défini le mode d'écriture :
|
||||
;
|
||||
; bit : descr
|
||||
; 0 : text color : 0=black, 1=white
|
||||
; 1 : transparent : 1=apply background attribut
|
||||
;
|
||||
; si le mode n'est pas transparent, la couleur de fond
|
||||
; est l'inverse de la couleur du texte
|
||||
; ---------------------------------------------------------------------------
|
||||
cga_set_writemode:
|
||||
push bp
|
||||
mov bp, sp
|
||||
|
||||
; --- Définition des arguments ---
|
||||
%define .mode word [bp+4]
|
||||
|
||||
push fs
|
||||
push ax
|
||||
mov ax, BDA_DATA_SEG
|
||||
mov fs,ax
|
||||
|
||||
mov ax, word arg1
|
||||
mov ax, .mode
|
||||
|
||||
mov byte [fs:BDA_GFX + gfx.cur_mode], al
|
||||
|
||||
|
|
@ -193,7 +207,7 @@ cga_set_writemode:
|
|||
ret
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; gfx_set_charpos
|
||||
; gfx_set_charpos (x,y)
|
||||
; In : CX = x (pixels), DX = y (pixels)
|
||||
; Out: variables DS:GFX_CUR_*
|
||||
; Notes:
|
||||
|
|
@ -204,6 +218,10 @@ cga_set_charpos:
|
|||
push bp
|
||||
mov bp, sp
|
||||
|
||||
; --- Définition des arguments ---
|
||||
%define .x word [bp+4]
|
||||
%define .y word [bp+6]
|
||||
|
||||
pusha
|
||||
push fs
|
||||
|
||||
|
|
@ -211,8 +229,8 @@ cga_set_charpos:
|
|||
mov fs,ax
|
||||
|
||||
; store x,y en pixel
|
||||
mov cx, word arg1
|
||||
mov dx, word arg2
|
||||
mov cx, .x
|
||||
mov dx, .y
|
||||
|
||||
mov [fs:BDA_GFX + gfx.cur_x], cx
|
||||
mov [fs:BDA_GFX + gfx.cur_y], dx
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ mouse_reset:
|
|||
mov word [fs:BDA_MOUSE + mouse.x],497 ; vous pouvez aussi préciser le centre
|
||||
mov word [fs:BDA_MOUSE + mouse.y],5 ; vous pouvez aussi préciser le centre
|
||||
|
||||
mov byte [fs:BDA_MOUSE + mouse.cur_visible], 1
|
||||
mov byte [fs:BDA_MOUSE + mouse.cur_counter], 0
|
||||
mov word [fs:BDA_MOUSE + mouse.cur_x], 0
|
||||
mov word [fs:BDA_MOUSE + mouse.cur_y], 0
|
||||
mov byte [fs:BDA_MOUSE + mouse.cur_drawing], 0
|
||||
|
|
|
|||
Loading…
Reference in a new issue