Rev 5154 | Rev 5351 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5154 | Rev 5350 | ||
---|---|---|---|
Line 69... | Line 69... | ||
69 | format binary as "mnt" |
69 | format binary as "mnt" |
Line 70... | Line 70... | ||
70 | 70 | ||
71 | include 'macros.inc' |
71 | include 'macros.inc' |
Line 72... | Line 72... | ||
72 | include 'struct.inc' |
72 | include 'struct.inc' |
Line 73... | Line 73... | ||
73 | 73 | ||
74 | $Revision: 5154 $ |
74 | $Revision: 5350 $ |
Line 442... | Line 442... | ||
442 | mov [launcher_start], al |
442 | mov [launcher_start], al |
443 | movzx eax, word [BOOT_VARS+BOOT_X_RES]; X max |
443 | movzx eax, word [BOOT_VARS+BOOT_X_RES]; X max |
444 | mov [_display.width], eax |
444 | mov [_display.width], eax |
445 | mov [display_width_standard], eax |
445 | mov [display_width_standard], eax |
446 | dec eax |
446 | dec eax |
447 | mov [Screen_Max_X], eax |
- | |
448 | mov [screen_workarea.right], eax |
447 | mov [screen_workarea.right], eax |
449 | movzx eax, word [BOOT_VARS+BOOT_Y_RES]; Y max |
448 | movzx eax, word [BOOT_VARS+BOOT_Y_RES]; Y max |
450 | mov [_display.height], eax |
449 | mov [_display.height], eax |
451 | mov [display_height_standard], eax |
450 | mov [display_height_standard], eax |
452 | dec eax |
451 | dec eax |
453 | mov [Screen_Max_Y], eax |
- | |
454 | mov [screen_workarea.bottom], eax |
452 | mov [screen_workarea.bottom], eax |
455 | movzx eax, word [BOOT_VARS+BOOT_VESA_MODE] ; screen mode |
453 | movzx eax, word [BOOT_VARS+BOOT_VESA_MODE] ; screen mode |
456 | mov dword [SCR_MODE], eax |
454 | mov dword [SCR_MODE], eax |
457 | ; mov eax, [BOOT_VAR+0x9014] ; Vesa 1.2 bnk sw add |
455 | ; mov eax, [BOOT_VAR+0x9014] ; Vesa 1.2 bnk sw add |
458 | ; mov [BANK_SWITCH], eax |
456 | ; mov [BANK_SWITCH], eax |
Line 2404... | Line 2402... | ||
2404 | ; removed here by |
2402 | ; removed here by |
2405 | ; call mouse_centered |
2403 | ; call mouse_centered |
2406 | ;* mouse centered - start code- Mario79 |
2404 | ;* mouse centered - start code- Mario79 |
2407 | ;mouse_centered: |
2405 | ;mouse_centered: |
2408 | ; push eax |
2406 | ; push eax |
2409 | mov eax, [Screen_Max_X] |
2407 | mov eax, [_display.width] |
2410 | shr eax, 1 |
2408 | shr eax, 1 |
2411 | mov [MOUSE_X], ax |
2409 | mov [MOUSE_X], ax |
2412 | mov eax, [Screen_Max_Y] |
2410 | mov eax, [_display.height] |
2413 | shr eax, 1 |
2411 | shr eax, 1 |
2414 | mov [MOUSE_Y], ax |
2412 | mov [MOUSE_Y], ax |
2415 | call wakeup_osloop |
2413 | call wakeup_osloop |
2416 | ; ret |
2414 | ; ret |
2417 | ;* mouse centered - end code- Mario79 |
2415 | ;* mouse centered - end code- Mario79 |
Line 2449... | Line 2447... | ||
2449 | ret |
2447 | ret |
2450 | .set_pointer_position: |
2448 | .set_pointer_position: |
2451 | ; cmp ecx,4 ; set mouse pointer position |
2449 | ; cmp ecx,4 ; set mouse pointer position |
2452 | dec ecx |
2450 | dec ecx |
2453 | jnz .set_mouse_button |
2451 | jnz .set_mouse_button |
2454 | cmp dx, word[Screen_Max_Y] |
2452 | cmp dx, word[_display.height] |
2455 | ja .end |
2453 | jae .end |
2456 | rol edx, 16 |
2454 | rol edx, 16 |
2457 | cmp dx, word[Screen_Max_X] |
2455 | cmp dx, word[_display.width] |
2458 | ja .end |
2456 | jae .end |
2459 | mov [MOUSE_X], edx |
2457 | mov [MOUSE_X], edx |
2460 | mov [mouse_active], 1 |
2458 | mov [mouse_active], 1 |
2461 | call wakeup_osloop |
2459 | call wakeup_osloop |
2462 | ret |
2460 | ret |
2463 | .set_mouse_button: |
2461 | .set_mouse_button: |
Line 2880... | Line 2878... | ||
2880 | nosb8: |
2878 | nosb8: |
2881 | cmp ebx, 9 |
2879 | cmp ebx, 9 |
2882 | jnz nosb9 |
2880 | jnz nosb9 |
2883 | ; ecx = [left]*65536 + [right] |
2881 | ; ecx = [left]*65536 + [right] |
2884 | ; edx = [top]*65536 + [bottom] |
2882 | ; edx = [top]*65536 + [bottom] |
2885 | mov eax, [Screen_Max_X] |
2883 | mov eax, [_display.width] |
2886 | mov ebx, [Screen_Max_Y] |
2884 | mov ebx, [_display.height] |
- | 2885 | dec eax |
|
- | 2886 | dec ebx |
|
2887 | ; check [right] |
2887 | ; check [right] |
2888 | cmp cx, ax |
2888 | cmp cx, ax |
2889 | ja .exit |
2889 | ja .exit |
2890 | ; check [left] |
2890 | ; check [left] |
2891 | ror ecx, 16 |
2891 | ror ecx, 16 |
Line 2933... | Line 2933... | ||
2933 | align 4 |
2933 | align 4 |
2934 | force_redraw_background: |
2934 | force_redraw_background: |
2935 | and [draw_data+32 + RECT.left], 0 |
2935 | and [draw_data+32 + RECT.left], 0 |
2936 | and [draw_data+32 + RECT.top], 0 |
2936 | and [draw_data+32 + RECT.top], 0 |
2937 | push eax ebx |
2937 | push eax ebx |
2938 | mov eax, [Screen_Max_X] |
2938 | mov eax, [_display.width] |
2939 | mov ebx, [Screen_Max_Y] |
2939 | mov ebx, [_display.height] |
- | 2940 | dec eax |
|
- | 2941 | dec ebx |
|
2940 | mov [draw_data+32 + RECT.right], eax |
2942 | mov [draw_data+32 + RECT.right], eax |
2941 | mov [draw_data+32 + RECT.bottom], ebx |
2943 | mov [draw_data+32 + RECT.bottom], ebx |
2942 | pop ebx eax |
2944 | pop ebx eax |
2943 | inc byte[REDRAW_BACKGROUND] |
2945 | inc byte[REDRAW_BACKGROUND] |
2944 | call wakeup_osloop |
2946 | call wakeup_osloop |
Line 3296... | Line 3298... | ||
3296 | 3298 | ||
3297 | mov edx, [TASK_BASE] ; return whole screen draw area for this app |
3299 | mov edx, [TASK_BASE] ; return whole screen draw area for this app |
3298 | add edx, draw_data - CURRENT_TASK |
3300 | add edx, draw_data - CURRENT_TASK |
3299 | mov [edx + RECT.left], 0 |
3301 | mov [edx + RECT.left], 0 |
3300 | mov [edx + RECT.top], 0 |
3302 | mov [edx + RECT.top], 0 |
- | 3303 | mov eax, [_display.width] |
|
3301 | mov eax, [Screen_Max_X] |
3304 | dec eax |
3302 | mov [edx + RECT.right], eax |
3305 | mov [edx + RECT.right], eax |
- | 3306 | mov eax, [_display.height] |
|
3303 | mov eax, [Screen_Max_Y] |
3307 | dec eax |
Line 3304... | Line 3308... | ||
3304 | mov [edx + RECT.bottom], eax |
3308 | mov [edx + RECT.bottom], eax |
3305 | 3309 | ||
Line 4791... | Line 4795... | ||
4791 | add word [msg_board_pos+2], 6 |
4795 | add word [msg_board_pos+2], 6 |
4792 | cmp bl, 10 |
4796 | cmp bl, 10 |
4793 | jnz @f |
4797 | jnz @f |
4794 | mov word [msg_board_pos+2], (42*6) |
4798 | mov word [msg_board_pos+2], (42*6) |
4795 | add word [msg_board_pos], 10 |
4799 | add word [msg_board_pos], 10 |
4796 | mov ax, word [Screen_Max_Y] |
4800 | mov ax, word [_display.width] |
4797 | cmp word [msg_board_pos], ax |
4801 | cmp word [msg_board_pos], ax |
4798 | jbe @f |
4802 | jb @f |
4799 | mov word [msg_board_pos], 10 |
4803 | mov word [msg_board_pos], 10 |
4800 | @@: |
4804 | @@: |
4801 | ; // end if |
4805 | ; // end if |
Line 4802... | Line 4806... | ||
4802 | 4806 | ||
Line 5010... | Line 5014... | ||
5010 | or [esp+32], dword -1 |
5014 | or [esp+32], dword -1 |
5011 | ret |
5015 | ret |
Line 5012... | Line 5016... | ||
5012 | 5016 | ||
5013 | 5017 | ||
5014 | .1: ; resolution |
5018 | .1: ; resolution |
5015 | mov eax, [Screen_Max_X] |
5019 | mov eax, [_display.width] |
5016 | shl eax, 16 |
- | |
5017 | mov ax, word [Screen_Max_Y] |
5020 | shl eax, 16 |
5018 | add eax, 0x00010001 |
5021 | mov ax, word [_display.height] |
5019 | mov [esp+32], eax |
5022 | mov [esp+32], eax |
5020 | ret |
5023 | ret |
5021 | .2: ; bits per pixel |
5024 | .2: ; bits per pixel |
Line 5098... | Line 5101... | ||
5098 | .drectr: |
5101 | .drectr: |
5099 | ret |
5102 | ret |
Line 5100... | Line 5103... | ||
5100 | 5103 | ||
5101 | align 4 |
5104 | align 4 |
5102 | syscall_getscreensize: ; GetScreenSize |
5105 | syscall_getscreensize: ; GetScreenSize |
- | 5106 | mov ax, word [_display.width] |
|
5103 | mov ax, word [Screen_Max_X] |
5107 | dec ax |
5104 | shl eax, 16 |
5108 | shl eax, 16 |
- | 5109 | mov ax, word [_display.height] |
|
5105 | mov ax, word [Screen_Max_Y] |
5110 | dec ax |
5106 | mov [esp + 32], eax |
5111 | mov [esp + 32], eax |
5107 | ret |
5112 | ret |
5108 | ;----------------------------------------------------------------------------- |
5113 | ;----------------------------------------------------------------------------- |
5109 | align 4 |
5114 | align 4 |
Line 5176... | Line 5181... | ||
5176 | and [cd_status], 0 |
5181 | and [cd_status], 0 |
5177 | ret |
5182 | ret |
5178 | ;----------------------------------------------------------------------------- |
5183 | ;----------------------------------------------------------------------------- |
5179 | align 4 |
5184 | align 4 |
5180 | syscall_getpixel_WinMap: ; GetPixel WinMap |
5185 | syscall_getpixel_WinMap: ; GetPixel WinMap |
5181 | cmp ebx, [Screen_Max_X] |
5186 | cmp ebx, [_display.width] |
5182 | jbe @f |
5187 | jb @f |
5183 | cmp ecx, [Screen_Max_Y] |
5188 | cmp ecx, [_display.height] |
5184 | jbe @f |
5189 | jb @f |
5185 | xor eax, eax |
5190 | xor eax, eax |
5186 | jmp .store |
5191 | jmp .store |
5187 | ;-------------------------------------- |
5192 | ;-------------------------------------- |
5188 | align 4 |
5193 | align 4 |
5189 | @@: |
5194 | @@: |
Line 5196... | Line 5201... | ||
5196 | mov [esp + 32], eax |
5201 | mov [esp + 32], eax |
5197 | ret |
5202 | ret |
5198 | ;----------------------------------------------------------------------------- |
5203 | ;----------------------------------------------------------------------------- |
5199 | align 4 |
5204 | align 4 |
5200 | syscall_getpixel: ; GetPixel |
5205 | syscall_getpixel: ; GetPixel |
5201 | mov ecx, [Screen_Max_X] |
5206 | mov ecx, [_display.width] |
5202 | inc ecx |
- | |
5203 | xor edx, edx |
5207 | xor edx, edx |
5204 | mov eax, ebx |
5208 | mov eax, ebx |
5205 | div ecx |
5209 | div ecx |
5206 | mov ebx, edx |
5210 | mov ebx, edx |
5207 | xchg eax, ebx |
5211 | xchg eax, ebx |
Line 5442... | Line 5446... | ||
5442 | ; edx - new Screen_Max_Y |
5446 | ; edx - new Screen_Max_Y |
Line 5443... | Line 5447... | ||
5443 | 5447 | ||
5444 | pushfd |
5448 | pushfd |
Line 5445... | Line -... | ||
5445 | cli |
- | |
5446 | - | ||
5447 | mov [Screen_Max_X], eax |
5449 | cli |
Line 5448... | Line 5450... | ||
5448 | mov [Screen_Max_Y], edx |
5450 | |
5449 | mov [_display.pitch], ecx |
5451 | mov [_display.pitch], ecx |
Line 5485... | Line 5487... | ||
5485 | popad |
5487 | popad |
Line 5486... | Line 5488... | ||
5486 | 5488 | ||
5487 | call repos_windows |
5489 | call repos_windows |
5488 | xor eax, eax |
5490 | xor eax, eax |
5489 | xor ebx, ebx |
5491 | xor ebx, ebx |
5490 | mov ecx, [Screen_Max_X] |
5492 | mov ecx, [_display.width] |
- | 5493 | mov edx, [_display.height] |
|
- | 5494 | dec ecx |
|
5491 | mov edx, [Screen_Max_Y] |
5495 | dec edx |
5492 | call calculatescreen |
5496 | call calculatescreen |
5493 | pop edi |
5497 | pop edi |
5494 | pop esi |
5498 | pop esi |