Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 8025 → Rev 8024

/programs/demos/3DS/VIEW3DS.ASM
161,27 → 161,17
@@:
int 0x40
 
cmp eax,1 ; redraw event ?
cmp eax,1 ; redraw request ?
je red
cmp eax,2 ; key event ?
cmp eax,2 ; key in buffer ?
je key
cmp eax,3 ; button event ?
cmp eax,3 ; button in buffer ?
je button
cmp eax,6 ; mouse event ?
cmp eax,6
jne @f
cmp [edit_flag],1 ; handle mouse only when edit is active
cmp [edit_flag],1
jne @f
 
mov eax,37
mov ebx,7 ; get mouse scroll
int 0x40
and eax, 0xFFFF ; check only vertial
cmp eax, 65535
je button.zoom_in
cmp eax, 1
je button.zoom_out
 
mov eax,37
mov ebx,3 ;read mouse state
int 0x40
mov [mouse_state],eax
218,22 → 208,6
key: ; key
mov eax,2 ; just read it and ignore
int 0x40
 
cmp ah, '+'
je button.zoom_in
cmp ah, '='
je button.zoom_in
cmp ah, '-'
je button.zoom_out
cmp ah, 176 ;left
je add_vec_buttons.x_minus
cmp ah, 179 ;right
je add_vec_buttons.x_plus
cmp ah, 178 ;up
je add_vec_buttons.y_minus
cmp ah, 177 ;down
je add_vec_buttons.y_plus
jmp noclose
 
button: ; button
268,7 → 242,6
; ah = 5 -> scale-
cmp ah,5
jne @f
.zoom_out:
mov dword[scale],0.7
fninit
fld [rsscale]
278,7 → 251,6
@@:
cmp ah,6 ; ah = 6 -> scale+
jne @f
.zoom_in:
mov dword[scale],1.3
fninit
fld [rsscale]
385,7 → 357,6
jne @f
; cmp [move_flag],2
; je .set_light1
.y_minus:
sub [vect_y],10
jmp .next
@@:
425,7 → 396,6
jne .next2
cmp [move_flag],0
jne @f
.x_minus:
sub [vect_x],10
jmp .next2
@@:
443,7 → 413,6
jne .next3
cmp [move_flag],0
jne @f
.x_plus:
add [vect_x],10
jmp .next3
@@:
472,7 → 441,6
cmp [move_flag],0
jne @f
; call add_vector
.y_plus:
add [vect_y],10
jmp .next5
@@: