Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 484 → Rev 485

/programs/games/arcanii/trunk/arcanii.asm
8,6 → 8,7
;----------------------------------------
 
include 'lang.inc'
include '..\..\..\macros.inc'
include 'ascl.inc'
include 'ascgl.inc'
include 'asjc.inc'
64,7 → 65,7
.no_game:
 
mov eax,11
int 0x40
mcall
 
cmp eax,1 ; redraw request ?
je red
81,11 → 82,11
 
key: ; key
mov eax,2 ; just read it and ignore
int 0x40
mcall
cmp ah,key_Esc ; if Esc ?
jne .no_q
mov eax,-1
int 0x40
or eax,-1
mcall
.no_q:
 
if_e dword [mode],4,.end_if6
117,13 → 118,13
 
button: ; button
mov eax,17 ; get id
int 0x40
mcall
 
cmp ah,1 ; button id=1 ?
jne noclose
 
mov eax,-1 ; close this program
int 0x40
mcall
noclose:
 
jmp still
139,7 → 140,7
mov ebx,screen
mov ecx,X_SIZE*65536+Y_SIZE
mov edx,4*65536+20
int 0x40
mcall
 
pop_abc
ret
458,7 → 459,7
 
mov eax,37 ; get mouse position
mov ebx,1
int 0x40
mcall
shr eax,16
mov [x],eax
add eax,[s_x]
/programs/games/arcanii/trunk/ascgl.inc
373,7 → 373,7
words2reg ecx,y,ys ;y*65536+ys
mov edx,color
mov eax,13
int 0x40
mcall
}
 
; FPS - Set Frame Per Second Display
390,7 → 390,7
spdat:
get_time:
mov eax,3
int 0x40
mcall
cmp eax,[savetime]
jne new_time
inc [fps_cntr]
409,7 → 409,7
mov ecx,y*65536+7
mov edx,delcolor
mov eax,13
int 0x40
mcall
end if
mov dword [ttt],fps_show_frequency
mov eax,47
418,7 → 418,7
mov edx,x*65536+y
mov esi,color
mov ecx,[fps]
int 0x40
mcall
no_out_fps:
}
 
497,7 → 497,7
; wordstoreg ecx,[arg3],[arg3+4]
; wordstoreg edx,x,y
words2reg edx, x , y ;arg1*65536+arg2
int 0x40
mcall
}
 
macro setframe x , y ,arg3
508,7 → 508,7
words2reg edx, x , y ;arg1*65536+arg2
add edx,dword [arg3]
mov ecx,dword [arg3+4]
int 0x40
mcall
}
 
 
1384,4 → 1384,3
gifmacend:
}
 
/programs/games/arcanii/trunk/ascl.inc
50,7 → 50,7
mov dword [fileinfo+8],1 ; how many blocks to read (1)
mov eax,58
mov ebx,fileinfo
int 0x40
mcall
mov eax,[file_load_area+2]
shr eax,9 ; ¯®¤¥«¨¬ ­  512 ¨ ¯à¨¡ ¢¨¬ 1 - ¯®«ã稬 ç¨á«® ¡«®ª®¢
inc eax
57,7 → 57,7
mov dword [fileinfo+8],eax
mov eax,58
mov ebx,fileinfo
int 0x40
mcall
}
 
 
143,7 → 143,7
mov edx,id
mov esi,bcolor
mov eax,8
int 0x40
mcall
 
mov eax,asd-lab ;calc size
mov ebx,6
168,7 → 168,7
mov edx,lab
mov esi,asd-lab ;calc size
mov eax,4
int 0x40
mcall
}
 
 
197,7 → 197,7
mov eax,9
mov ebx,procinfo
mov ecx,-1
int 0x40
mcall
 
; convert eax bin to param dec
mov eax,dword [procinfo+30] ;offset of myPID
231,12 → 231,12
mov ebx,1 ; define IPC
mov ecx,path ; offset of area
mov edx,150 ; size 150 bytes
int 0x40
mcall
 
; change wanted events list 7-bit IPC event
mov eax,40
mov ebx,01000111b
int 0x40
mcall
 
;
; STEP 3 run SYSTEM XTREE with parameters
244,7 → 244,7
 
mov eax,58
mov ebx,run_fileinfo
int 0x40
mcall
 
call redproc
 
252,7 → 252,7
getmesloop:
mov eax,23
mov ebx,50 ;0.5 sec
int 0x40
mcall
 
cmp eax,1
je mred
267,7 → 267,7
mov ebx,procinfo
mov ecx,-1
mov eax,9
int 0x40
mcall
mov ebp,eax
 
loox:
274,7 → 274,7
mov eax,9
mov ebx,procinfo
mov ecx,ebp
int 0x40
mcall
mov eax,[DLGPID]
cmp [procinfo+30],eax ;IF Dialog find
je dlg_is_work ;jmp to dlg_is_work
299,15 → 299,15
jmp getmesloop
mkey:
mov eax,2
int 0x40 ; read (eax=2)
mcall ; read (eax=2)
jmp getmesloop
mbutton:
mov eax,17 ; get id
int 0x40
mcall
cmp ah,1 ; button id=1 ?
jne getmesloop
mov eax,-1 ; close this program
int 0x40
mcall
mgetmes:
 
; If dlg_pid_get then second message get jmp to still
409,7 → 409,7
mov eax,9
mov ebx,procinfo
mov ecx,-1
int 0x40
mcall
 
; convert eax bin to param dec
mov eax,dword [procinfo+30] ;offset of myPID
443,12 → 443,12
mov ebx,1 ; define IPC
mov ecx,path ; offset of area
mov edx,150 ; size 150 bytes
int 0x40
mcall
 
; change wanted events list 7-bit IPC event
mov eax,40
mov ebx,01000111b
int 0x40
mcall
 
;
; STEP 3 run SYSTEM XTREE with parameters
456,7 → 456,7
 
mov eax,58
mov ebx,run_fileinfo
int 0x40
mcall
 
call redproc
 
464,7 → 464,7
getmesloop:
mov eax,23
mov ebx,50 ;0.5 sec
int 0x40
mcall
 
cmp eax,1
je mred
479,7 → 479,7
mov ebx,procinfo
mov ecx,-1
mov eax,9
int 0x40
mcall
mov ebp,eax
 
loox:
486,7 → 486,7
mov eax,9
mov ebx,procinfo
mov ecx,ebp
int 0x40
mcall
mov eax,[DLGPID]
cmp [procinfo+30],eax ;IF Dialog find
je dlg_is_work ;jmp to dlg_is_work
511,15 → 511,15
jmp getmesloop
mkey:
mov eax,2
int 0x40 ; read (eax=2)
mcall ; read (eax=2)
jmp getmesloop
mbutton:
mov eax,17 ; get id
int 0x40
mcall
cmp ah,1 ; button id=1 ?
jne getmesloop
mov eax,-1 ; close this program
int 0x40
mcall
mgetmes:
 
; If dlg_pid_get then second message get jmp to still
671,7 → 671,7
macro scank
{
mov eax,10
int 0x40
mcall
}
 
macro putpix x,y,color
680,7 → 680,7
mov ecx,y
mov edx,color
mov eax,1
int 0x40
mcall
}
 
macro bar x,y,sizex,sizey,color
689,7 → 689,7
words2reg ecx,y,sizey
dword2reg edx,color
mov eax,13
int 0x40
mcall
 
}
 
708,7 → 708,7
; mov edx,offs
mov esi,size
mov eax,4
int 0x40
mcall
}
 
macro outcount data, x, y, color, numtype
720,7 → 720,7
words2reg edx,x,y
mov esi,color
mov eax,47
int 0x40
mcall
}
 
; SCEVENT - Scan event
728,7 → 728,7
macro scevent red,key,but
{
mov eax,11
int 0x40
mcall
dec eax
jz red
dec eax
742,7 → 742,7
macro wtevent red,key,but
{
mov eax,10
int 0x40
mcall
dec eax
jz red
dec eax
757,7 → 757,7
{
mov eax,23
mov ebx,xfps
int 0x40
mcall
cmp eax,0
je noevent
dec eax
774,7 → 774,7
macro close
{
mov eax,-1
int 0x40
mcall
}
 
; DELAY - Create delay 1/100 sec
785,7 → 785,7
{
mov eax,5
mov ebx,arg1
int 0x40
mcall
}
 
; WINDOW - Draw window
800,7 → 800,7
words2reg ecx,arg2,arg4
mov edx,arg5
mov eax,0
int 0x40
mcall
}
 
macro colorwindow arg1,arg2,arg3,arg4,arg5,arg6,arg7
811,7 → 811,7
mov esi,arg6
mov edi,arg7
mov eax,0
int 0x40
mcall
}
 
 
821,7 → 821,7
{
mov eax,12
mov ebx,1
int 0x40
mcall
}
 
; ENDWD - End window draw
830,7 → 830,7
{
mov eax,12
mov ebx,2
int 0x40
mcall
}
 
; LABEL - Put text to frame
854,7 → 854,7
mov edx,lab
mov esi,asd-lab ;calc size
mov eax,4
int 0x40
mcall
}
 
;Key's
/programs/games/arcanii/trunk/build_en.bat
1,4 → 1,5
@erase lang.inc
@echo lang fix en >lang.inc
@fasm arcanii.asm arcanii
@erase lang.inc
@pause
/programs/games/arcanii/trunk/build_ru.bat
1,4 → 1,5
@erase lang.inc
@echo lang fix ru >lang.inc
@fasm arcanii.asm arcanii
@erase lang.inc
@pause