Rev 2545 | Rev 2561 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2545 | Rev 2547 | ||
---|---|---|---|
Line 67... | Line 67... | ||
67 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
67 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
Line 68... | Line 68... | ||
68 | 68 | ||
69 | include 'macros.inc' |
69 | include 'macros.inc' |
Line 70... | Line 70... | ||
70 | include 'struct.inc' |
70 | include 'struct.inc' |
Line 71... | Line 71... | ||
71 | 71 | ||
Line 72... | Line 72... | ||
72 | $Revision: 2545 $ |
72 | $Revision: 2547 $ |
Line 2423... | Line 2423... | ||
2423 | align 4 |
2423 | align 4 |
2424 | sys_background: |
2424 | sys_background: |
2425 | cmp ebx, 1 ; BACKGROUND SIZE |
2425 | cmp ebx, 1 ; BACKGROUND SIZE |
2426 | jnz nosb1 |
2426 | jnz nosb1 |
2427 | test ecx, ecx |
2427 | test ecx, ecx |
2428 | ; cmp ecx,0 |
- | |
2429 | jz sbgrr |
2428 | jz sbgrr |
- | 2429 | ||
2430 | test edx, edx |
2430 | test edx, edx |
2431 | ; cmp edx,0 |
- | |
2432 | jz sbgrr |
2431 | jz sbgrr |
2433 | ;-------------------------------------- |
2432 | ;-------------------------------------- |
2434 | align 4 |
2433 | align 4 |
2435 | @@: |
2434 | @@: |
2436 | ;;Maxis use atomic bts for mutexes 4.4.2009 |
2435 | ;;Maxis use atomic bts for mutexes 4.4.2009 |
Line 2696... | Line 2695... | ||
2696 | mov [esp + 20], eax ; ebx = [top]*65536 + [bottom] |
2695 | mov [esp + 20], eax ; ebx = [top]*65536 + [bottom] |
2697 | ret |
2696 | ret |
2698 | ;------------------------------------------------------------------------------ |
2697 | ;------------------------------------------------------------------------------ |
2699 | align 4 |
2698 | align 4 |
2700 | nosb8: |
2699 | nosb8: |
- | 2700 | cmp ebx, 9 |
|
- | 2701 | jnz nosb9 |
|
- | 2702 | ; ecx = [left]*65536 + [right] |
|
- | 2703 | ; edx = [top]*65536 + [bottom] |
|
- | 2704 | mov eax, [Screen_Max_X] |
|
- | 2705 | mov ebx, [Screen_Max_Y] |
|
- | 2706 | ; check [right] |
|
- | 2707 | cmp cx, ax |
|
- | 2708 | ja .exit |
|
- | 2709 | ; check [left] |
|
- | 2710 | ror ecx, 16 |
|
- | 2711 | cmp cx, ax |
|
- | 2712 | ja .exit |
|
- | 2713 | ; check [bottom] |
|
- | 2714 | cmp dx, bx |
|
- | 2715 | ja .exit |
|
- | 2716 | ; check [top] |
|
- | 2717 | ror edx, 16 |
|
- | 2718 | cmp dx, bx |
|
- | 2719 | ja .exit |
|
- | 2720 | ||
- | 2721 | movzx eax, cx ; [left] |
|
- | 2722 | movzx ebx, dx ; [top] |
|
- | 2723 | ||
- | 2724 | shr ecx, 16 ; [right] |
|
- | 2725 | shr edx, 16 ; [bottom] |
|
- | 2726 | ||
- | 2727 | mov [background_defined], 1 |
|
- | 2728 | ||
- | 2729 | mov [draw_data+32 + RECT.left], eax |
|
- | 2730 | mov [draw_data+32 + RECT.top], ebx |
|
- | 2731 | ||
- | 2732 | mov [draw_data+32 + RECT.right], ecx |
|
- | 2733 | mov [draw_data+32 + RECT.bottom], edx |
|
- | 2734 | ||
- | 2735 | inc byte[REDRAW_BACKGROUND] |
|
- | 2736 | ;-------------------------------------- |
|
- | 2737 | align 4 |
|
- | 2738 | .exit: |
|
- | 2739 | ret |
|
- | 2740 | ;------------------------------------------------------------------------------ |
|
- | 2741 | align 4 |
|
- | 2742 | nosb9: |
|
2701 | ret |
2743 | ret |
2702 | ;------------------------------------------------------------------------------ |
2744 | ;------------------------------------------------------------------------------ |
2703 | align 4 |
2745 | align 4 |
2704 | uglobal |
2746 | uglobal |
2705 | BG_Rect_X_left_right dd 0x0 |
2747 | BG_Rect_X_left_right dd 0x0 |