forked from KolibriOS/kolibrios
fix life2, update life3
git-svn-id: svn://kolibrios.org@8199 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
74a3bc7a32
commit
2e185e713d
@ -197,7 +197,6 @@ extra_files = {
|
|||||||
{"kolibrios/emul/kwine/lib/", PROGS .. "/emulator/kwine/bin/lib/*"},
|
{"kolibrios/emul/kwine/lib/", PROGS .. "/emulator/kwine/bin/lib/*"},
|
||||||
{"kolibrios/demos/ak47.lif", "common/demos/ak47.lif"},
|
{"kolibrios/demos/ak47.lif", "common/demos/ak47.lif"},
|
||||||
{"kolibrios/demos/life2", "common/demos/life2"},
|
{"kolibrios/demos/life2", "common/demos/life2"},
|
||||||
{"kolibrios/demos/life3tb.png", PROGS .. "/games/life3/trunk/life3tb.png"},
|
|
||||||
{"kolibrios/demos/relay.lif", "common/demos/relay.lif"},
|
{"kolibrios/demos/relay.lif", "common/demos/relay.lif"},
|
||||||
{"kolibrios/demos/rpento.lif", "common/demos/rpento.lif"},
|
{"kolibrios/demos/rpento.lif", "common/demos/rpento.lif"},
|
||||||
{"kolibrios/games/BabyPainter", "common/games/BabyPainter"},
|
{"kolibrios/games/BabyPainter", "common/games/BabyPainter"},
|
||||||
|
Binary file not shown.
@ -101,19 +101,11 @@ end if
|
|||||||
movsd
|
movsd
|
||||||
Kolibri_Put_MovEaxVal_Ret @Kolibri@GetPid$qv,edx
|
Kolibri_Put_MovEaxVal_Ret @Kolibri@GetPid$qv,edx
|
||||||
if defined KolibriHeapInit
|
if defined KolibriHeapInit
|
||||||
mov ecx,esp
|
call KolibriHeapInit ; Initialize a dynamic heap
|
||||||
push ebx
|
end if
|
||||||
push ecx
|
|
||||||
push U_END
|
|
||||||
call KolibriHeapInit ; Initialize a dynamic heap and create new memory in its begin.
|
|
||||||
pop ecx ; Parameters: begin of a new heap, end of data to create in
|
|
||||||
mov [esp+4],eax ; the begin of a heap. Return address of the created data.
|
|
||||||
mov dword [esp],0
|
|
||||||
else
|
|
||||||
xor eax,eax
|
xor eax,eax
|
||||||
push eax
|
push eax
|
||||||
push eax
|
push eax
|
||||||
end if
|
|
||||||
call @Kolibri@ThreadMain$qpvt1
|
call @Kolibri@ThreadMain$qpvt1
|
||||||
.ThreadFinish:
|
.ThreadFinish:
|
||||||
add esp,8
|
add esp,8
|
||||||
|
@ -2,31 +2,15 @@
|
|||||||
#define __KOLIBRI_HEAP_H_INCLUDED_
|
#define __KOLIBRI_HEAP_H_INCLUDED_
|
||||||
|
|
||||||
#include "kolibri.h"
|
#include "kolibri.h"
|
||||||
#include "memheap.h"
|
|
||||||
|
|
||||||
// Kolibri memory heap interface.
|
// Kolibri memory heap interface.
|
||||||
|
|
||||||
namespace Kolibri // All kolibri functions, types and data are nested in the (Kolibri) namespace.
|
namespace Kolibri // All kolibri functions, types and data are nested in the (Kolibri) namespace.
|
||||||
{
|
{
|
||||||
long _HeapInit()
|
long HeapInit();
|
||||||
{
|
void *Alloc(unsigned long int size);
|
||||||
return MemoryHeap::mem_Init();
|
void *ReAlloc(void *mem, unsigned long int size);
|
||||||
}
|
void Free(void *mem);
|
||||||
|
|
||||||
void *Alloc(unsigned int size)
|
|
||||||
{
|
|
||||||
return MemoryHeap::mem_Alloc(size);
|
|
||||||
}
|
|
||||||
|
|
||||||
void *ReAlloc(void *mem, unsigned int size)
|
|
||||||
{
|
|
||||||
return MemoryHeap::mem_ReAlloc(size, mem);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Free(void *mem)
|
|
||||||
{
|
|
||||||
MemoryHeap::mem_Free(mem);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // ndef __KOLIBRI_HEAP_H_INCLUDED_
|
#endif // ndef __KOLIBRI_HEAP_H_INCLUDED_
|
||||||
|
@ -1,37 +1,42 @@
|
|||||||
;/***
|
;/***
|
||||||
|
|
||||||
KolibriHeapInit = @@Kolibri@_HeapInit$qv
|
KolibriHeapInit = @Kolibri@HeapInit$qv
|
||||||
|
|
||||||
KolibriHeapAlloc = @@Kolibri@Alloc$qui
|
KolibriHeapAlloc = @Kolibri@Alloc$qul
|
||||||
|
|
||||||
KolibriHeapReAlloc = @@Kolibri@ReAlloc$qpvui
|
KolibriHeapReAlloc = @Kolibri@ReAlloc$qpvul
|
||||||
|
|
||||||
KolibriHeapFree = @@Kolibri@Free$qpv
|
KolibriHeapFree = @Kolibri@Free$qpv
|
||||||
|
|
||||||
proc @MemoryHeap@mem_Init$qv uses ebx
|
align 4
|
||||||
|
proc @Kolibri@HeapInit$qv uses ebx
|
||||||
mov eax,SF_SYS_MISC
|
mov eax,SF_SYS_MISC
|
||||||
mov ebx,SSF_HEAP_INIT
|
mov ebx,SSF_HEAP_INIT
|
||||||
int 0x40
|
int 0x40
|
||||||
ret
|
ret
|
||||||
endp
|
endp
|
||||||
|
|
||||||
proc @MemoryHeap@mem_Alloc$qul uses ebx
|
align 4
|
||||||
|
proc @Kolibri@Alloc$qul uses ebx
|
||||||
mov eax,SF_SYS_MISC
|
mov eax,SF_SYS_MISC
|
||||||
mov ebx,SSF_MEM_ALLOC
|
mov ebx,SSF_MEM_ALLOC
|
||||||
|
mov ecx,[esp+8]
|
||||||
int 0x40
|
int 0x40
|
||||||
ret
|
ret
|
||||||
endp
|
endp
|
||||||
|
|
||||||
proc @MemoryHeap@mem_ReAlloc$qulpv uses ebx
|
align 4
|
||||||
|
proc @Kolibri@ReAlloc$qpvul uses ebx
|
||||||
mov eax,SF_SYS_MISC
|
mov eax,SF_SYS_MISC
|
||||||
mov ebx,SSF_MEM_REALLOC
|
mov ebx,SSF_MEM_REALLOC
|
||||||
mov ecx,[esp+8]
|
mov ecx,[esp+12]
|
||||||
mov edx,[esp+12]
|
mov edx,[esp+8]
|
||||||
int 0x40
|
int 0x40
|
||||||
ret
|
ret
|
||||||
endp
|
endp
|
||||||
|
|
||||||
proc @MemoryHeap@mem_Free$qpv uses ebx
|
align 4
|
||||||
|
proc @Kolibri@Free$qpv uses ebx
|
||||||
mov eax,SF_SYS_MISC
|
mov eax,SF_SYS_MISC
|
||||||
mov ebx,SSF_MEM_FREE
|
mov ebx,SSF_MEM_FREE
|
||||||
mov ecx,[esp+8]
|
mov ecx,[esp+8]
|
||||||
|
@ -1,13 +0,0 @@
|
|||||||
#ifndef __MEMORY_HEAP_H_INCLUDED_
|
|
||||||
#define __MEMORY_HEAP_H_INCLUDED_
|
|
||||||
|
|
||||||
namespace MemoryHeap
|
|
||||||
{
|
|
||||||
long mem_Init();
|
|
||||||
void *mem_Alloc(unsigned long size);
|
|
||||||
void *mem_ReAlloc(unsigned long size, void *mem);
|
|
||||||
bool mem_Free(void *mem);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif // ndef __MEMORY_HEAP_H_INCLUDED_
|
|
||||||
|
|
@ -16,7 +16,7 @@ proc @Kolibri@OpenFileDialog$qr23Kolibri@TOpenFileStruct uses ebx esi edi ebp
|
|||||||
mov esi,ecx
|
mov esi,ecx
|
||||||
.open_file_dlg_alloc:
|
.open_file_dlg_alloc:
|
||||||
push esi
|
push esi
|
||||||
call @@Kolibri@Alloc$qui
|
call @Kolibri@Alloc$qul
|
||||||
pop ecx
|
pop ecx
|
||||||
test eax,eax
|
test eax,eax
|
||||||
jz .open_file_dlg_ret
|
jz .open_file_dlg_ret
|
||||||
@ -97,7 +97,7 @@ proc @Kolibri@OpenFileDialog$qr23Kolibri@TOpenFileStruct uses ebx esi edi ebp
|
|||||||
push eax
|
push eax
|
||||||
push esi
|
push esi
|
||||||
push dword [esp+8]
|
push dword [esp+8]
|
||||||
call @@Kolibri@ReAlloc$qpvui
|
call @Kolibri@ReAlloc$qpvul
|
||||||
add esp,8
|
add esp,8
|
||||||
mov ecx,eax
|
mov ecx,eax
|
||||||
pop eax
|
pop eax
|
||||||
@ -131,7 +131,7 @@ proc @Kolibri@OpenFileDialog$qr23Kolibri@TOpenFileStruct uses ebx esi edi ebp
|
|||||||
mov [esp+8],eax
|
mov [esp+8],eax
|
||||||
push eax
|
push eax
|
||||||
push dword [esp+4]
|
push dword [esp+4]
|
||||||
call @@Kolibri@ReAlloc$qpvui
|
call @Kolibri@ReAlloc$qpvul
|
||||||
add esp,8
|
add esp,8
|
||||||
test eax,eax
|
test eax,eax
|
||||||
jz .open_file_dlg_end
|
jz .open_file_dlg_end
|
||||||
@ -143,12 +143,12 @@ proc @Kolibri@OpenFileDialog$qr23Kolibri@TOpenFileStruct uses ebx esi edi ebp
|
|||||||
mov ebx,[esp+20]
|
mov ebx,[esp+20]
|
||||||
mov dword [ebx],2
|
mov dword [ebx],2
|
||||||
push dword [ebx+4]
|
push dword [ebx+4]
|
||||||
call @@Kolibri@Free$qpv
|
call @Kolibri@Free$qpv
|
||||||
pop ecx
|
pop ecx
|
||||||
mov [ebx+4],esi
|
mov [ebx+4],esi
|
||||||
jmp .open_file_dlg_invalidate
|
jmp .open_file_dlg_invalidate
|
||||||
.open_file_dlg_end:
|
.open_file_dlg_end:
|
||||||
call @@Kolibri@Free$qpv
|
call @Kolibri@Free$qpv
|
||||||
add esp,12
|
add esp,12
|
||||||
mov ebx,[esp+20]
|
mov ebx,[esp+20]
|
||||||
mov dword [ebx],1
|
mov dword [ebx],1
|
||||||
|
@ -12,7 +12,7 @@ include '../../../develop/libraries/box_lib/load_lib.mac'
|
|||||||
;include 'lang.inc'
|
;include 'lang.inc'
|
||||||
|
|
||||||
@use_library_mem mem.Alloc,mem.Free,mem.ReAlloc,dll.Load
|
@use_library_mem mem.Alloc,mem.Free,mem.ReAlloc,dll.Load
|
||||||
hed db 'Life 04.11.18',0 ;¯®¤¯¨áì ®ª
|
hed db 'Life 16.11.20',0 ;¯®¤¯¨áì ®ª
|
||||||
|
|
||||||
run_file_70 FileInfoBlock
|
run_file_70 FileInfoBlock
|
||||||
image_data dd 0 ;㪠§ â¥«ì ¢à¥¬¥ãî ¯ ¬ïâì. ¤«ï 㦥 ¯à¥®¡à §®¢ ¨ï ¨§®¡à ¦¥¨ï
|
image_data dd 0 ;㪠§ â¥«ì ¢à¥¬¥ãî ¯ ¬ïâì. ¤«ï 㦥 ¯à¥®¡à §®¢ ¨ï ¨§®¡à ¦¥¨ï
|
||||||
@ -75,20 +75,17 @@ align 4
|
|||||||
proc pole_init_colors uses eax ebx ecx edx esi edi, col_pole:dword, col_cell_n:dword, col_cell_o:dword
|
proc pole_init_colors uses eax ebx ecx edx esi edi, col_pole:dword, col_cell_n:dword, col_cell_o:dword
|
||||||
mov esi,[CellColors]
|
mov esi,[CellColors]
|
||||||
mov ebx,[col_pole]
|
mov ebx,[col_pole]
|
||||||
mov dword[esi],ebx
|
mov [esi],ebx
|
||||||
|
|
||||||
|
lea edi,[esi+4*COL_MEM]
|
||||||
add esi,4
|
add esi,4
|
||||||
mov edi,COL_MEM
|
|
||||||
dec edi
|
|
||||||
shl edi,2
|
|
||||||
add edi,esi
|
|
||||||
; esi - 㪠§ ⥫ì 1-© £à ¤¨¥âë© æ¢¥â
|
; esi - 㪠§ ⥫ì 1-© £à ¤¨¥âë© æ¢¥â
|
||||||
; edi - 㪠§ â¥«ì ¯®á«¥¤¨© £à ¤¨¥âë© æ¢¥â
|
; edi - 㪠§ â¥«ì ¯®á«¥¤¨© £à ¤¨¥âë© æ¢¥â
|
||||||
mov eax,[col_cell_n]
|
mov eax,[col_cell_n]
|
||||||
mov ebx,[col_cell_o]
|
mov ebx,[col_cell_o]
|
||||||
|
|
||||||
mov dword[esi],eax
|
mov [esi],eax
|
||||||
mov dword[edi],ebx
|
mov [edi],ebx
|
||||||
;need save ecx edx
|
;need save ecx edx
|
||||||
stdcall middle_colors, esi,edi
|
stdcall middle_colors, esi,edi
|
||||||
|
|
||||||
@ -1767,13 +1764,6 @@ import_buf2d:
|
|||||||
sz_buf2d_filled_rect_by_size db 'buf2d_filled_rect_by_size',0
|
sz_buf2d_filled_rect_by_size db 'buf2d_filled_rect_by_size',0
|
||||||
sz_buf2d_set_pixel db 'buf2d_set_pixel',0
|
sz_buf2d_set_pixel db 'buf2d_set_pixel',0
|
||||||
|
|
||||||
mouse_dd dd 0
|
|
||||||
sc system_colors
|
|
||||||
last_time dd 0
|
|
||||||
|
|
||||||
align 16
|
|
||||||
procinfo process_information
|
|
||||||
|
|
||||||
align 4
|
align 4
|
||||||
buf_0: dd 0
|
buf_0: dd 0
|
||||||
.l: dw 0 ;+4 left
|
.l: dw 0 ;+4 left
|
||||||
@ -1783,7 +1773,12 @@ buf_0: dd 0
|
|||||||
.color: dd 0xffffd0 ;+16 color
|
.color: dd 0xffffd0 ;+16 color
|
||||||
db 24 ;+20 bit in pixel
|
db 24 ;+20 bit in pixel
|
||||||
|
|
||||||
|
align 16
|
||||||
i_end:
|
i_end:
|
||||||
|
mouse_dd dd 0
|
||||||
|
last_time dd 0
|
||||||
|
sc system_colors
|
||||||
|
procinfo process_information
|
||||||
rb 1024
|
rb 1024
|
||||||
stacktop:
|
stacktop:
|
||||||
sys_path rb 1024
|
sys_path rb 1024
|
||||||
|
Loading…
Reference in New Issue
Block a user