20,10 → 20,9 |
; |
; Compile with FASM for Menuet |
;****************************************************************************** |
BTN_HEIGHT = 22 ;26 |
BTN_WIDTH = 140 ;178 |
BTN_HEIGHT = 22 |
BTN_WIDTH = 140 |
TXT_Y = (BTN_HEIGHT)/2-4 |
FONT_TYPE = 0x80000000 ;0x90000000 |
|
PANEL_HEIGHT = 20 |
MENU_BOTTON_X_POS = 10 |
78,8 → 77,6 |
START: ; start of execution |
mcall 68,11 |
|
mcall 30, 1, default_dir |
|
mov esi,bootparam |
cmp [esi],byte 0 |
je .no_boot_parameters |
381,10 → 378,10 |
pop eax |
|
mov ecx,40 |
mov al,'|' |
mov al,'/' |
cld |
repne scasb |
test ecx,ecx ; if '|' not found |
test ecx,ecx ; if '/' not found |
je searchexit |
|
cmp [edi],byte '@' ; check for submenu |
393,7 → 390,7 |
cmp [last_key],179 |
je searchexit |
|
;dec edi |
dec edi |
push edi ; pointer to start of filename |
call searchstartstring ; search for next string |
sub edi,2 ; to last byte of string |
438,7 → 435,7 |
|
mov [esi + child],al ; this is my child |
mov cx,[esi + x_start] |
add cx,BTN_WIDTH+1 ; new x_start in cx |
add cx,141 ; new x_start in cx |
movzx edx,al |
shl edx,4 |
add edx,[menu_data] ; edx points to child's base address |
687,10 → 684,9 |
mov eax,[menu_mame] |
cmp [ebx+10],eax |
jne @f |
; temporary to fit into 3 IMG sectors |
;mov ax,[menu_mame+4] |
;cmp [ebx+14],ax |
;jne @f |
mov ax,[menu_mame+4] |
cmp [ebx+14],ax |
jne @f |
cmp ecx,[active_process] |
je @f |
; dph ecx |
859,20 → 855,18 |
; from system close button with 0x000001 id |
; dunkaist] |
mcall |
push edx |
pusha |
|
mov edx, esi |
mcall 13 |
|
mcall , BTN_WIDTH,<[draw_y],1>,[sc.work_light] |
add ecx, BTN_HEIGHT-1 |
mcall , 1 |
inc ecx |
mcall , <BTN_WIDTH,1>, , [sc.work_dark] |
mcall , 1, <[draw_y],BTN_HEIGHT> |
mcall , <BTN_WIDTH,1>, <[draw_y],BTN_HEIGHT+1>, [sc.work_dark] |
add [draw_y], BTN_HEIGHT-1 |
mcall , BTN_WIDTH,<[draw_y],1> |
|
pop edx |
popa |
movzx edx,dl |
dec dl |
imul ebx,edx,BTN_HEIGHT |
911,8 → 905,8 |
ret |
;------------------------------------------------------------------------------ |
;*** DATA AREA **************************************************************** |
menu_mame: db '@MENU',0 |
default_dir: db '/sys',0 |
menu_mame: |
db '@MENU',0 |
|
align 4 |
free_my_area_lock dd 0 |
939,7 → 933,7 |
.size dd 0 ; bytes to read |
.return dd procinfo ; return data pointer |
.name: |
db 'SETTINGS/MENU.DAT',0 ; ASCIIZ dir & filename |
db '/SYS/SETTINGS/MENU.DAT',0 ; ASCIIZ dir & filename |
;-------------------------------------- |
align 4 |
fileinfo_start: |