/data/Tupfile.lua |
---|
38,7 → 38,6 |
{"File Managers/FNAV/FNAV_CUR.PNG", "common/File Managers/fNav/fnav_cur.png"}, |
{"File Managers/FNAV/FNAV_FNT.PNG", "common/File Managers/fNav/fnav_fnt.png"}, |
{"File Managers/FNAV/FNAV_ICN.PNG", "common/File Managers/fNav/fnav_icn.png"}, |
{"FONTS/LITT.CHR", PROGS .. "/demos/bgitest/trunk/FONTS/LITT.CHR"}, |
{"FONTS/TAHOMA.KF", "common/fonts/tahoma.kf"}, |
{"LIB/ICONV.OBJ", "common/lib/iconv.obj"}, |
{"LIB/KMENU.OBJ", "common/lib/kmenu.obj"}, |
/programs/cmm/examples/Tupfile.lua |
---|
8,3 → 8,5 |
tup.rule("menu.c", "c-- /D=AUTOBUILD /D=$(C_LANG) %f" .. tup.getconfig("KPACK_CMD"), "menu.com") |
tup.rule("rgb.c", "c-- /D=AUTOBUILD /D=$(C_LANG) %f" .. tup.getconfig("KPACK_CMD"), "rgb.com") |
tup.rule("console.c", "c-- /D=AUTOBUILD /D=$(C_LANG) %f" .. tup.getconfig("KPACK_CMD"), "console.com") |
tup.rule("info.c", "c-- /D=AUTOBUILD /D=$(C_LANG) %f" .. tup.getconfig("KPACK_CMD"), "info.com") |
tup.rule("pig.c", "c-- /D=AUTOBUILD /D=$(C_LANG) %f" .. tup.getconfig("KPACK_CMD"), "pig.com") |
/programs/cmm/examples/info.c |
---|
0,0 → 1,52 |
/* |
* Template C-- program. |
*/ |
#define MEMSIZE 4096*15 |
#include "../lib/io.h" |
#include "../lib/gui.h" |
#define WIN_W 12*10+30 |
#define WIN_H 80 |
void main() |
{ |
word btn; |
loop() switch(WaitEvent()) |
{ |
case evButton: |
btn = GetButtonID(); |
if (btn == 1) ExitProcess(); |
break; |
case evKey: |
GetKeys(); |
if (key_scancode == SCAN_CODE_ESC) ExitProcess(); |
break; |
case evReDraw: |
draw_window(); |
break; |
} |
} |
inline GetRevisionNumber() |
{ |
char buf[32]; |
EAX = 18; |
EBX = 13; |
ECX = #buf; |
return ESDWORD[#buf+5]; |
} |
void draw_window() |
{ |
system.color.get(); |
DefineUnDragableWindow(screen.width-WIN_W-15, GetClientHeight()-WIN_H-15, WIN_W-1, WIN_H-1); |
DrawBar(0,0,WIN_W,WIN_H,0x414155); |
DrawWideRectangle(0,0,WIN_W,WIN_H, 3, 0x5555FF); |
WriteText(15, 20, 0x81, 0xFFFF55, " REV 7321 "); |
WriteText(15, 20+25, 0x81, 0xFFFF55, "17.09.2018"); |
} |
/programs/cmm/examples/pig.c |
---|
0,0 → 1,25 |
/* |
* Template C-- program. |
*/ |
#define MEMSIZE 4096*5 |
#include "../lib/kolibri.h" |
#include "../lib/fs.h" |
#include "../lib/patterns/restart_process.h" |
proc_info Form; |
void main() |
{ |
int i; |
CreateDir("/tmp0/1/pig"); |
RunProgram("/sys/UNZ", "-o /tmp0/1/pig -h /kolibrios/games/pig.zip"); |
for (i = 0; i < 200; i++) |
{ |
if (CheckProcessExists("UNZ")==false) break; |
pause(3); |
} |
RunProgram("/tmp0/1/pig/pig", NULL); |
} |
/programs/cmm/lib/patterns/restart_process.h |
---|
12,7 → 12,7 |
#define MAX_PROCESS_COUNT 256 |
:int CheckProcessExists(dword proc_name) { |
:bool CheckProcessExists(dword proc_name) { |
int i; |
proc_info Process; |
for (i=0; i<MAX_PROCESS_COUNT; i++;) |
/programs/other/rtfread/trunk/ascl.inc |
---|
File deleted |
Property changes: |
Deleted: svn:eol-style |
-native |
\ No newline at end of property |
/programs/other/rtfread/trunk/bgifont.inc |
---|
37,21 → 37,6 |
dd Align ;32 |
} |
; font options structure |
struc BGIrec FontName,CharsCount,FirstChar,UpperMargin,LowerMargin,\ |
Widths,FirstData,EOF,font_data |
{ |
.FontName dd ? ; 0 |
.CharsCount db ? ; 4 |
.FirstChar db ? ; 5 |
.UpperMargin db ? ; 6 |
.LowerMargin db ? ; 7 |
.Widths dd ? ; 8 |
.FirstData dd ? ; 12 |
.EOF dd ? ; 16 |
.font_data dd ? ; 20 follows (Offsets) |
} |
macro BGIfont_GetID |
{ |
call _BGIfont_GetID |
80,54 → 65,6 |
end if |
} |
BGIfont_names: |
_FI 'LCOM',11485 ;7 |
_FI 'EURO',8117 ;5 |
_FI 'GOTH',13816 ;6 |
_FI 'LITT',3596 ;8 |
_FI 'TRIP',11932 ;14 |
_FI 'SCRI',8490 ;11 |
_FI 'SMAL',4162 ;13 |
_FI 'TSCR',12134 ;15 |
_FI 'SANS',8453 ;10 |
_FI 'SIMP',9522 ;12 |
BGIfont_names_end: |
macro BGIfont_Init |
{ |
; in: ecx - number of fonts to load; |
; esi-> _FI structure |
; edi-> where to load |
push edi |
if BGI_LEVEL eq KERNEL |
mov edi,0x40000 |
end if |
.nfont: |
mov edx,[esi] |
if BGI_LEVEL eq KERNEL |
movzx ebx,word[esi+4] |
mov [BGIfont_Prepare.okflag],'N' |
end if |
call _BGIfont_Prepare |
if ~ BGI_LEVEL eq KERNEL |
add esi,4 |
else |
push esi |
test eax,eax |
jz .fail |
mov [BGIfont_Prepare.okflag],'*' |
.fail: |
mov esi,BGIfont_Prepare.font |
call boot_log |
pop esi |
add esi,6 |
end if |
loop .nfont |
dph2 _BGI_BOLD,300,550 |
; movzx edi,byte[0x40000] |
pop edi |
} |
BGIfont_get2head: |
shr ecx,28 ; font # |
sub ecx,4 |
146,30 → 83,11 |
.ex: |
ret |
BGIfont_GetName: |
; in: ecx-fontID; |
; out: edx-font name. |
call BGIfont_get2head |
xor edx,edx |
test edi,edi |
jz .ex |
mov edx,[edi] |
.ex: |
ret |
macro dps2 _str |
{ |
if ~ BGI_LEVEL eq KERNEL |
if LOAD_MSG eq 1 |
dps _str |
end if |
else |
pusha |
mov esi,BGIfont_Prepare.okflag |
mov byte[esi], _str |
call boot_log |
popa |
end if |
} |
macro dph2 num,x,y |
236,32 → 154,21 |
mov dword[.font],edx ; filename |
mov esi,edi ; esi->FontName |
mov [.dest],edi ; ptr to load font |
if ~ BGI_LEVEL eq KERNEL |
mov eax, 70 |
mov ebx, .fontattr |
mcall |
test eax, eax |
jnz .fail |
;jnz .fail |
dps2 '1' |
mov eax, [.fileattr+32] |
mov [.fsize], eax |
mov [.fsize], litt_end-litt_file |
mov ebx,.fontinfo |
mov eax,70 |
mcall ; ebx - file size |
else |
push edi esi edx |
mov eax,.font |
xor ebx,ebx |
mov esi,12 |
mov ecx,ebx |
mov edx,edi |
call fileread |
pop edx esi edi |
mov ebp,edi |
add ebp,ebx |
cmp ebp,0x50000 |
ja .fail |
end if |
;mov ebx, litt_end-litt_file |
;mov edi, litt_file |
;mov [.dest],litt_file ; ptr to load font |
cmp dword[edi],0x08084b50 ; 'PK',8,8 |
jne .fail |
dps2 '2' |
334,7 → 241,6 |
popa |
ret |
if ~ BGI_LEVEL eq KERNEL |
.fontinfo: |
dd 0 |
dd 0 |
343,7 → 249,7 |
.dest dd 0 |
.fontfullname: |
db BGIFONT_PATH |
.font db 'FONT.CHR',0 |
.font db 'LITT.CHR',0 |
.fontattr: |
dd 5 |
354,12 → 260,8 |
db 0 |
dd .fontfullname |
.fileattr rd 40/4 |
else |
.dest dd 0 |
.font db 'FONT CHR' |
.okflag db ' ',0 |
end if |
BGIfont_Coo: |
; y->word[txt.y1], x->word[txt.x1] |
fild [txt.y1] ;y |
/programs/other/rtfread/trunk/litt.chr |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/programs/other/rtfread/trunk/rtfread.asm |
---|
15,8 → 15,6 |
WINH equ 450 |
WIN_COLOR equ 0x73f0f0f0 |
DEFCOLOR equ 0x303030 |
;RENDER equ PIX |
;RENDER equ BGI |
RENDER equ FREE |
BGIFONT_PATH equ '/sys/fonts/' |
56,8 → 54,8 |
dd I_END0 ; à §¬¥à ¯à®£à ¬¬ë |
dd esp_end ; ª®«¨ç¥á⢮ ¯ ¬ï⨠|
dd sys_mem ; ¤à¥á ¢¥àè¨ë áâíª |
dd fname_buf ; ¤à¥á ¡ãä¥à ¤«ï ¯ à ¬¥â஢ (¥ ¨á¯®«ì§ã¥âáï) |
dd cur_dir_path ; § १¥à¢¨à®¢ ® |
dd fname_buf ; ¤à¥á ¡ãä¥à ¤«ï ¯ à ¬¥â஢ |
dd cur_dir_path ; ¯ãâì ª ¯à®£à ¬¬¥ |
include '../../../config.inc' ;for nightbuild |
include '../../../macros.inc' ; ¬ ªà®áë ®¡«¥£ç îâ ¦¨§ì áᥬ¡«¥à騪®¢! |
64,26 → 62,16 |
include '../../../develop/libraries/box_lib/trunk/box_lib.mac' |
include '../../../develop/libraries/box_lib/load_lib.mac' |
;include 'MACROS.INC' |
;include 'load_lib.mac' |
@use_library |
;include '../../../debug.inc' |
if ~ RENDER eq PIX |
TOP=TOP+4 |
include 'bgifont.inc' |
end if |
include 'rtf_lite.inc' |
;include 'ascl.inc' |
;--------------------------------------------------------------------- |
;--- ---------------------------------------------- |
;--------------------------------------------------------------------- |
help_file: |
file 'reader.rtf' |
help_end: |
START: |
mcall 68, 11 |
mcall 40, 0x80000027 |
95,11 → 83,9 |
call [OpenDialog_Init] |
mov [pitch],2 |
if ~ RENDER eq PIX |
mov edx,FONT_NAME |
mov edi,save_limit |
BGIfont_Prepare |
end if |
start2: |
cmp byte[fname_buf],0 |
je load_file;top_red |
321,7 → 307,6 |
; je still |
jmp red |
.noarup: |
if RENDER eq FREE |
cmp ah,56 ;zoom+ |
jne .noplus |
.zplus: |
338,7 → 323,6 |
fdiv [Zoomscale] |
jmp .zoom |
.nominus: |
end if |
cmp ah,0xB5 ; end |
jne .pre_file_open |
.end: |
672,14 → 656,7 |
mov ecx,16 |
.l1: |
push ecx |
if RENDER eq BGI |
mov edx,char |
mov ecx,0x48000000 |
mov esi,1 |
BGIfont_Outtext |
else |
mcall 4,,0x10000000,char,1 |
end if |
pop ecx |
inc [char] |
add ebx,(CHARW+3) shl 16 |
1072,18 → 1049,13 |
;--------------------------------------------------------------------- |
;blind db ? |
if RENDER eq PIX |
; rd 2 |
Free rd 9 |
else |
if RENDER eq BGI |
FreeFontscale dd 0.07 |
else |
Zoomscale dd 1.15 |
FreeFontscale dd 0.04 |
end if |
Free BGIfree FONT_NAME,0,0,1.0,1.0,char,1,0x44000000,0 |
end if |
I_END0: |
fname_buf: |
rb 1024+16 |
1141,6 → 1113,14 |
szParameter rb 21 |
block_end dd ? |
help_file: |
file 'reader.rtf' |
help_end: |
litt_file: |
file 'litt.chr' |
litt_end: |
;--------------------------------------------------------------------- |
I_END: ; ¬¥âª ª®æ ¯à®£à ¬¬ë |
rb RTFSIZE |