Subversion Repositories Kolibri OS

Rev

Rev 523 | Rev 531 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 523 Rev 527
Line 52... Line 52...
52
;;
52
;;
53
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
53
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Line 54... Line 54...
54
 
54
 
Line 55... Line 55...
55
include 'macros.inc'
55
include 'macros.inc'
Line 56... Line 56...
56
 
56
 
57
$Revision: 523 $
57
$Revision: 527 $
58
 
58
 
Line 105... Line 105...
105
 
105
 
106
use16
106
use16
107
                  org   0x0
107
                  org   0x0
Line 108... Line 108...
108
                  jmp   start_of_code
108
                  jmp   start_of_code
Line 109... Line 109...
109
 
109
 
110
version db    'Kolibri OS  version 0.6.5.0      ',13,10,13,10,0
110
version db    'Kolibri OS  version 0.7.0.0 pre  ',13,10,13,10,0
Line 111... Line 111...
111
 
111
 
Line 519... Line 519...
519
        mov [current_slot], SLOT_BASE+256
519
        mov [current_slot], SLOT_BASE+256
Line 520... Line 520...
520
 
520
 
521
; set background
521
; set background
522
        xor  eax,eax
522
        xor  eax,eax
523
        inc  eax
523
        inc  eax
524
        mov   [display_data-12],eax
524
        mov   [BgrDrawMode],eax
525
        mov   [display_data-8],eax
525
        mov   [BgrDataWidth],eax
526
        mov   [display_data-4],eax
526
        mov   [BgrDataHeight],eax
527
        mov    [mem_BACKGROUND],4095
527
        mov    [mem_BACKGROUND],4095
528
        stdcall kernel_alloc, [mem_BACKGROUND]
528
        stdcall kernel_alloc, [mem_BACKGROUND]
Line 1117... Line 1117...
1117
        shr   ax,1
1117
        shr   ax,1
1118
        mov   [MOUSE_X],eax
1118
        mov   [MOUSE_X],eax
1119
        pop   eax
1119
        pop   eax
Line 1120... Line 1120...
1120
 
1120
 
1121
        mov   byte [SB16_Status],0            ; Minazzi Paolo
-
 
1122
        mov   [display_data-12],dword 1       ; tiled background
1121
        mov   byte [SB16_Status],0            ; Minazzi Paolo
Line 1123... Line 1122...
1123
        mov   [BTN_ADDR],dword BUTTON_INFO    ; address of button list
1122
        mov   [BTN_ADDR],dword BUTTON_INFO    ; address of button list
1124
 
1123
 
1125
     ;!! IP 04.02.2005:
1124
     ;!! IP 04.02.2005:
Line 2285... Line 2284...
2285
sound_flag      db 0
2284
sound_flag      db 0
2286
endg
2285
endg
Line 2287... Line 2286...
2287
 
2286
 
2288
iglobal
2287
iglobal
2289
version_inf:
2288
version_inf:
2290
  db 0,6,5,0  ; version 0.6.5.0
2289
  db 0,7,0,0  ; version 0.7.0.0
2291
  db UID_KOLIBRI
2290
  db UID_KOLIBRI
2292
  db 'Kolibri',0
2291
  db 'Kolibri',0
2293
version_end:
2292
version_end:
Line 2354... Line 2353...
2354
    jnz   nosb1
2353
    jnz   nosb1
2355
    cmp   ebx,0
2354
    cmp   ebx,0
2356
    je    sbgrr
2355
    je    sbgrr
2357
    cmp   ecx,0
2356
    cmp   ecx,0
2358
    je    sbgrr
2357
    je    sbgrr
2359
    mov   [display_data-8],ebx
2358
    mov   [BgrDataWidth],ebx
2360
    mov   [display_data-4],ecx
2359
    mov   [BgrDataHeight],ecx
2361
;    mov   [bgrchanged],1
2360
;    mov   [bgrchanged],1
Line 2362... Line 2361...
2362
 
2361
 
2363
    pushad
2362
    pushad
2364
; return memory for old background
2363
; return memory for old background
2365
    stdcall kernel_free, [img_background]
2364
    stdcall kernel_free, [img_background]
2366
; calculate RAW size
2365
; calculate RAW size
2367
    xor  eax,eax
2366
    xor  eax,eax
2368
    inc  eax
2367
    inc  eax
2369
    cmp  [display_data-8],eax
2368
    cmp  [BgrDataWidth],eax
2370
    jae   @f
2369
    jae   @f
2371
    mov [display_data-8],eax
2370
    mov [BgrDataWidth],eax
2372
@@:
2371
@@:
2373
    cmp  [display_data-4],eax
2372
    cmp  [BgrDataHeight],eax
2374
    jae   @f
2373
    jae   @f
2375
    mov [display_data-4],eax
2374
    mov [BgrDataHeight],eax
2376
@@:
2375
@@:
2377
    mov  eax,[display_data-8]
2376
    mov  eax,[BgrDataWidth]
2378
    imul eax,[display_data-4]
-
 
2379
    inc  eax
2377
    imul eax,[BgrDataHeight]
2380
    imul eax,3
2378
    lea  eax,[eax*3]
2381
    mov  [mem_BACKGROUND],eax
2379
    mov  [mem_BACKGROUND],eax
2382
; get memory for new background
2380
; get memory for new background
2383
    stdcall kernel_alloc, [mem_BACKGROUND]
2381
    stdcall kernel_alloc, [mem_BACKGROUND]
2384
    test eax, eax
2382
    test eax, eax
Line 2423... Line 2421...
2423
    ret
2421
    ret
2424
  nosb3:
2422
  nosb3:
Line 2425... Line 2423...
2425
 
2423
 
2426
    cmp   eax,4                            ; TILED / STRETCHED
2424
    cmp   eax,4                            ; TILED / STRETCHED
2427
    jnz   nosb4
2425
    jnz   nosb4
2428
    cmp   ebx,[display_data-12]
2426
    cmp   ebx,[BgrDrawMode]
2429
    je    nosb41
2427
    je    nosb41
2430
    mov   [display_data-12],ebx
2428
    mov   [BgrDrawMode],ebx
2431
;    mov   [bgrchanged],1
2429
;    mov   [bgrchanged],1
2432
   nosb41:
2430
   nosb41:
2433
    ret
2431
    ret
Line 2434... Line 2432...
2434
  nosb4:
2432
  nosb4:
2435
 
2433
 
2436
    cmp   eax,5                            ; BLOCK MOVE TO BGR
2434
    cmp   eax,5                            ; BLOCK MOVE TO BGR
2437
    jnz   nosb5
-
 
2438
  ; bughere
-
 
2439
    mov   edi, [TASK_BASE]
2435
    jnz   nosb5
2440
    add   ebx, [edi+TASKDATA.mem_start]
2436
  ; bughere
2441
    mov   eax, ebx
-
 
2442
    mov   ebx, ecx
2437
    mov   eax, ebx
2443
    add   ecx, edx
2438
    mov   ebx, ecx
2444
    add   ebx, [img_background]   ;IMG_BACKGROUND
2439
    add   ebx, [img_background]   ;IMG_BACKGROUND
2445
    mov   ecx, edx
2440
    mov   ecx, edx
2446
    call  memmove
2441
    call  memmove
Line 2455... Line 2450...
2455
 
2450
 
Line 2456... Line 2451...
2456
sys_getbackground:
2451
sys_getbackground:
2457
 
2452
 
2458
    cmp   eax,1                                  ; SIZE
2453
    cmp   eax,1                                  ; SIZE
2459
    jnz   nogb1
2454
    jnz   nogb1
2460
    mov   eax,[display_data-8]
2455
    mov   eax,[BgrDataWidth]
2461
    shl   eax,16
2456
    shl   eax,16
2462
    mov   ax,[display_data-4]
2457
    mov   ax,[BgrDataWidth]
2463
    mov   [esp+36],eax
2458
    mov   [esp+36],eax
Line 2464... Line 2459...
2464
    ret
2459
    ret
Line 2478... Line 2473...
2478
    ret
2473
    ret
2479
  nogb2:
2474
  nogb2:
Line 2480... Line 2475...
2480
 
2475
 
2481
    cmp   eax,4                                  ; TILED / STRETCHED
2476
    cmp   eax,4                                  ; TILED / STRETCHED
2482
    jnz   nogb4
2477
    jnz   nogb4
2483
    mov   eax,[display_data-12]
2478
    mov   eax,[BgrDrawMode]
2484
  nogb4:
2479
  nogb4:
2485
    mov   [esp+36],eax
2480
    mov   [esp+36],eax
Line 4096... Line 4091...
4096
       call  vesa12_drawbackground
4091
       call  vesa12_drawbackground
4097
       dec   [mouse_pause]
4092
       dec   [mouse_pause]
4098
       call   [draw_pointer]
4093
       call   [draw_pointer]
4099
       ret
4094
       ret
4100
     dbrv20:
4095
     dbrv20:
4101
       cmp   [display_data-12],dword 1
4096
       cmp   [BgrDrawMode],dword 1
4102
       jne   bgrstr
4097
       jne   bgrstr
4103
       call  vesa20_drawbackground_tiled
4098
       call  vesa20_drawbackground_tiled
4104
       dec   [mouse_pause]
4099
       dec   [mouse_pause]
4105
       call   [draw_pointer]
4100
       call   [draw_pointer]
4106
       ret
4101
       ret