life2: change namespace to 'Kolibri'

git-svn-id: svn://kolibrios.org@8129 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
IgorA 2020-11-02 18:44:51 +00:00
parent df14e6f07e
commit 69ced70cd8
15 changed files with 492 additions and 564 deletions

View File

@ -1,4 +1,3 @@
#include <windows.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <ctype.h> #include <ctype.h>

View File

@ -1,11 +1,11 @@
#ifndef __MENUET_H_INCLUDED_ #ifndef __MENUET_H_INCLUDED_
#define __MENUET_H_INCLUDED_ #define __MENUET_H_INCLUDED_
#include <me_lib.h> #include <kos_lib.h>
// Menuet interface. // Kolibri interface.
namespace Menuet // All menuet functions, types and data are nested in the (Menuet) namespace. namespace Kolibri // All kolibri functions, types and data are nested in the (Kolibri) namespace.
{ {
const char *DebugPrefix = "User program: "; const char *DebugPrefix = "User program: ";
char CommandLine[257]; char CommandLine[257];
@ -137,17 +137,17 @@ namespace Menuet // All menuet functions, types and data are nested in the (Me
// Function, defined outside. // Function, defined outside.
bool MenuetOnStart(Menuet::TStartData &me_start, Menuet::TThreadData thread_data); bool MenuetOnStart(Kolibri::TStartData &me_start, Kolibri::TThreadData thread_data);
// Window will be created iff return value is true. // Window will be created iff return value is true.
bool MenuetOnClose(Menuet::TThreadData thread_data); // Window will be closed iff return value is true. bool MenuetOnClose(Kolibri::TThreadData thread_data); // Window will be closed iff return value is true.
int MenuetOnIdle(Menuet::TThreadData thread_data); // Return the time to wait next message. int MenuetOnIdle(Kolibri::TThreadData thread_data); // Return the time to wait next message.
void MenuetOnSize(int window_rect[/* 4 */], Menuet::TThreadData thread_data); // When the window is resized. void MenuetOnSize(int window_rect[/* 4 */], Kolibri::TThreadData thread_data); // When the window is resized.
void MenuetOnKeyPress(Menuet::TThreadData thread_data); // When user press a key. void MenuetOnKeyPress(Kolibri::TThreadData thread_data); // When user press a key.
void MenuetOnMouse(Menuet::TThreadData thread_data); // When user move a mouse. void MenuetOnMouse(Kolibri::TThreadData thread_data); // When user move a mouse.
#ifdef __MENUET__ #ifdef __MENUET__
namespace Menuet namespace Kolibri
{ {
// Structures. // Structures.
@ -248,7 +248,7 @@ namespace Menuet
// Constants from fasm. // Constants from fasm.
#include <me_func.inc> #include <kos_func.inc>
// Functions. // Functions.
@ -508,7 +508,7 @@ namespace Menuet
#else // def __MENUET__ #else // def __MENUET__
namespace Menuet namespace Kolibri
{ {
struct TMutex struct TMutex
{ {

View File

@ -1,12 +1,12 @@
#ifndef __MENUET_FILE_H_INCLUDED_ #ifndef __MENUET_FILE_H_INCLUDED_
#define __MENUET_FILE_H_INCLUDED_ #define __MENUET_FILE_H_INCLUDED_
#include <menuet.h> #include <kolibri.h>
#include <me_heap.h> #include <kos_heap.h>
// Menuet file interface. // Kolibri file interface.
namespace Menuet // All menuet functions, types and data are nested in the (Menuet) namespace. namespace Kolibri // All kolibri functions, types and data are nested in the (Kolibri) namespace.
{ {
struct _FileDataStruct; struct _FileDataStruct;
typedef _FileDataStruct *TFileData; typedef _FileDataStruct *TFileData;
@ -24,7 +24,7 @@ namespace Menuet // All menuet functions, types and data are nested in the (Me
#ifdef __MENUET__ #ifdef __MENUET__
namespace Menuet namespace Kolibri
{ {
// Define the file data structure. // Define the file data structure.
@ -264,7 +264,7 @@ namespace Menuet
#else // def __MENUET__ #else // def __MENUET__
namespace Menuet namespace Kolibri
{ {
struct _FileDataStruct struct _FileDataStruct
{ {

View File

@ -1,12 +1,12 @@
#ifndef __MENUET_HEAP_H_INCLUDED_ #ifndef __MENUET_HEAP_H_INCLUDED_
#define __MENUET_HEAP_H_INCLUDED_ #define __MENUET_HEAP_H_INCLUDED_
#include <menuet.h> #include <kolibri.h>
#include <memheap.h> #include <memheap.h>
// Menuet memory heap interface. // Kolibri memory heap interface.
namespace Menuet // All menuet functions, types and data are nested in the (Menuet) namespace. namespace Kolibri // All kolibri functions, types and data are nested in the (Kolibri) namespace.
{ {
void *Alloc(unsigned int size); void *Alloc(unsigned int size);
void *ReAlloc(void *mem, unsigned int size); void *ReAlloc(void *mem, unsigned int size);
@ -15,7 +15,7 @@ namespace Menuet // All menuet functions, types and data are nested in the (Me
#ifdef __MENUET__ #ifdef __MENUET__
namespace Menuet namespace Kolibri
{ {
// Global variables // Global variables

View File

@ -1,16 +1,16 @@
;/*** ;/***
MenuetHeapInit = @@Menuet@_HeapInit$qpvt1t1 MenuetHeapInit = @@Kolibri@_HeapInit$qpvt1t1
MenuetHeapAlloc = @@Menuet@Alloc$qui MenuetHeapAlloc = @@Kolibri@Alloc$qui
MenuetHeapReAlloc = @@Menuet@ReAlloc$qpvui MenuetHeapReAlloc = @@Kolibri@ReAlloc$qpvui
MenuetHeapFree = @@Menuet@Free$qpv MenuetHeapFree = @@Kolibri@Free$qpv
MenuetHeapFreeAndThreadFinish = @Menuet@_FreeAndThreadFinish$qpvpi MenuetHeapFreeAndThreadFinish = @Kolibri@_FreeAndThreadFinish$qpvpi
define @Menuet@_SetUseMemory$qui proc @Kolibri@_SetUseMemory$qui
push ebx push ebx
mov eax,64 mov eax,64
mov ebx,1 mov ebx,1
@ -18,23 +18,23 @@ define @Menuet@_SetUseMemory$qui
int 0x40 int 0x40
pop ebx pop ebx
test eax,eax test eax,eax
jnz Menuet_set_use_memory_nomem jnz .set_use_memory_nomem
push ecx push ecx
push dword [@Menuet@_MenuetMemBlock] push dword [@Kolibri@_MenuetMemBlock]
call @@MemoryHeap@ResizeBlock$q20MemoryHeap@TMemBlockpv call @@MemoryHeap@ResizeBlock$q20MemoryHeap@TMemBlockpv
add esp,8 add esp,8
mov al,1 mov al,1
ret ret
Menuet_set_use_memory_nomem: .set_use_memory_nomem:
xor al,al xor al,al
ret ret
enddef endp
define @Menuet@_RecalculateUseMemory$qui proc @Kolibri@_RecalculateUseMemory$qui
mov eax,dword [esp+4] mov eax,dword [esp+4]
mov ecx,(U_END + 3) and not 3 mov ecx,(U_END + 3) and not 3
cmp eax,ecx cmp eax,ecx
jna Menuet_recalculate_use_memory_min jna .recalculate_use_memory_min
push ebx push ebx
sub eax,ecx sub eax,ecx
mov ebx,6 mov ebx,6
@ -45,35 +45,35 @@ define @Menuet@_RecalculateUseMemory$qui
and eax,not 3 and eax,not 3
pop ebx pop ebx
ret ret
Menuet_recalculate_use_memory_min: .recalculate_use_memory_min:
mov eax,ecx mov eax,ecx
ret ret
enddef endp
define @Menuet@_FreeAndThreadFinish$qpvpi proc @Kolibri@_FreeAndThreadFinish$qpvpi
mov ebx,1 mov ebx,1
mov ecx,[esp+8] mov ecx,[esp+8]
jmp Menuet_heap_free_tf_wait jmp .heap_free_tf_wait
Menuet_heap_free_tf_wait_loop: .heap_free_tf_wait_loop:
mov eax,5 mov eax,5
int 0x40 int 0x40
shl ebx,1 shl ebx,1
cmp ebx,MENUET_MUTEX_MAX_TIME_WAIT cmp ebx,MENUET_MUTEX_MAX_TIME_WAIT
jna Menuet_heap_free_tf_wait jna .heap_free_tf_wait
mov ebx,MENUET_MUTEX_MAX_TIME_WAIT mov ebx,MENUET_MUTEX_MAX_TIME_WAIT
Menuet_heap_free_tf_wait: .heap_free_tf_wait:
cmp dword [ecx],0 cmp dword [ecx],0
jnz @Menuet@ExitProcess$qv jnz @Kolibri@ExitProcess$qv
lock bts dword [@Menuet@_MemHeapMutex],0 lock bts dword [@Kolibri@_MemHeapMutex],0
jc Menuet_heap_free_tf_wait_loop jc .heap_free_tf_wait_loop
push dword [esp+4] push dword [esp+4]
push @Menuet@_MenuetFreeSpace push @Kolibri@_MenuetFreeSpace
call @@MemoryHeap@Free$qr21MemoryHeap@TFreeSpacepv call @@MemoryHeap@Free$qr21MemoryHeap@TFreeSpacepv
add esp,8 add esp,8
mov byte [@Menuet@_MemHeapMutex],0x40 mov byte [@Kolibri@_MemHeapMutex],0x40
or eax,-1 or eax,-1
int 0x40 int 0x40
enddef endp
macro call func macro call func
{ {

View File

@ -1,9 +1,9 @@
#ifndef __MENUET_LIB_H_INCLUDED_ #ifndef __MENUET_LIB_H_INCLUDED_
#define __MENUET_LIB_H_INCLUDED_ #define __MENUET_LIB_H_INCLUDED_
// Menuet interface. // Kolibri interface.
namespace Menuet // All menuet functions, types and data are nested in the (Menuet) namespace. namespace Kolibri // All kolibri functions, types and data are nested in the (Kolibri) namespace.
{ {
unsigned int StrLen(const char *str); unsigned int StrLen(const char *str);
char *StrCopy(char *dest, const char *src); char *StrCopy(char *dest, const char *src);

View File

@ -1,5 +1,4 @@
define @Menuet@StrLen$qpxc proc @Kolibri@StrLen$qpxc uses edi
push edi
cld cld
mov edi,[esp+8] mov edi,[esp+8]
mov ecx,-1 mov ecx,-1
@ -7,13 +6,10 @@ define @Menuet@StrLen$qpxc
repnz scas byte [edi] repnz scas byte [edi]
not ecx not ecx
lea eax,[ecx-1] lea eax,[ecx-1]
pop edi
ret ret
enddef endp
define @Menuet@StrCopy$qpcpxc proc @Kolibri@StrCopy$qpcpxc uses esi edi
push esi
push edi
cld cld
mov edi,[esp+16] mov edi,[esp+16]
mov ecx,-1 mov ecx,-1
@ -29,14 +25,10 @@ define @Menuet@StrCopy$qpcpxc
mov ecx,edx mov ecx,edx
and ecx,3 and ecx,3
rep movs byte [edi],[esi] rep movs byte [edi],[esi]
pop edi
pop esi
ret ret
enddef endp
define @Menuet@MemCopy$qpvpxvui proc @Kolibri@MemCopy$qpvpxvui uses esi edi
push esi
push edi
cld cld
mov edi,[esp+12] mov edi,[esp+12]
mov eax,edi mov eax,edi
@ -48,13 +40,10 @@ define @Menuet@MemCopy$qpvpxvui
mov ecx,edx mov ecx,edx
and ecx,3 and ecx,3
rep movs byte [edi],[esi] rep movs byte [edi],[esi]
pop edi
pop esi
ret ret
enddef endp
define @Menuet@MemSet$qpvcui proc @Kolibri@MemSet$qpvcui uses edi
push edi
cld cld
mov edi,[esp+8] mov edi,[esp+8]
mov al,[esp+12] mov al,[esp+12]
@ -69,12 +58,11 @@ define @Menuet@MemSet$qpvcui
mov ecx,edx mov ecx,edx
and ecx,3 and ecx,3
rep stos byte [edi] rep stos byte [edi]
pop edi
mov eax,[esp+4] mov eax,[esp+4]
ret ret
enddef endp
define __ftol proc __ftol
sub esp,12 sub esp,12
wait wait
fstcw word [esp+8] fstcw word [esp+8]
@ -89,9 +77,9 @@ define __ftol
mov edx,[esp+4] mov edx,[esp+4]
add esp,12 add esp,12
ret ret
enddef endp
define @Menuet@Floor$qd proc @Kolibri@Floor$qd
fld qword [esp+4] fld qword [esp+4]
mov ax,[esp+10] mov ax,[esp+10]
shl ax,1 shl ax,1
@ -114,5 +102,5 @@ define @Menuet@Floor$qd
add esp,2 add esp,2
Menuet_floor_end: Menuet_floor_end:
ret ret
enddef endp

View File

@ -1,12 +1,12 @@
use32 use32
org 0x0 org 0
db 'MENUET01' db 'MENUET01'
dd 0x1 dd 1
dd MenuetEntryPoint dd @Kolibri@Main$qv
dd I_END dd I_END
dd U_END+STACKSIZE+HEAPSIZE dd U_END+STACKSIZE+HEAPSIZE
dd U_END+STACKSIZE dd U_END+STACKSIZE
dd @Menuet@CommandLine,0x0 dd @Kolibri@CommandLine,0
ptr equ ptr equ
offset equ offset equ
@ -78,13 +78,8 @@ macro newdef x,[link]
usedef link usedef link
} }
macro nextdef x,[link] macro nextdef x
{ {
common x:
usedef x
end if
if x eq
else if used x
x:
usedef link
} }

View File

@ -1,4 +1,3 @@
#include <windows.h>
#include <string.h> #include <string.h>
#include <process.h> #include <process.h>
#include <stdio.h> #include <stdio.h>
@ -6,11 +5,11 @@
#include <assert.h> #include <assert.h>
#include <deque.h> #include <deque.h>
#include <menuet.h> #include <kolibri.h>
#include <me_heap.h> #include <kos_heap.h>
#include <me_file.h> #include <kos_file.h>
using namespace Menuet; using namespace Kolibri;
using namespace std; using namespace std;
const char file_prefix[] = ""; const char file_prefix[] = "";
@ -236,7 +235,7 @@ int ThreadMainProc(void *user)
return 0; return 0;
} }
namespace Menuet namespace Kolibri
{ {
void Main() {ThreadMain();} void Main() {ThreadMain();}

View File

@ -1,11 +1,11 @@
#ifndef __MENUET_FILE_OPEN_H_INCLUDED_ #ifndef __MENUET_FILE_OPEN_H_INCLUDED_
#define __MENUET_FILE_OPEN_H_INCLUDED_ #define __MENUET_FILE_OPEN_H_INCLUDED_
#include <menuet.h> #include <kolibri.h>
// Menuet interface. // Kolibri interface.
namespace Menuet // All menuet functions, types and data are nested in the (Menuet) namespace. namespace Kolibri // All kolibri functions, types and data are nested in the (Kolibri) namespace.
{ {
struct TOpenFileStruct; // Data for a file open dialog. struct TOpenFileStruct; // Data for a file open dialog.
#define MENUET_OPEN_FILE_INIT {} // Initializer of the file open struct, cat be redefined in a realization of the library #define MENUET_OPEN_FILE_INIT {} // Initializer of the file open struct, cat be redefined in a realization of the library
@ -21,7 +21,7 @@ namespace Menuet // All menuet functions, types and data are nested in the (Me
#ifdef __MENUET__ #ifdef __MENUET__
namespace Menuet namespace Kolibri
{ {
// Structures. // Structures.
@ -81,7 +81,7 @@ namespace Menuet
#else // else: def __MENUET__ #else // else: def __MENUET__
namespace Menuet namespace Kolibri
{ {
struct TOpenFileStruct struct TOpenFileStruct
{ {

View File

@ -1,16 +1,12 @@
define @Menuet@OpenFileDialog$qr22Menuet@TOpenFileStruct proc @Kolibri@OpenFileDialog$qr23Kolibri@TOpenFileStruct uses ebx esi edi ebp
push ebx call @Kolibri@GetThreadData$qv
push esi
push edi
push ebp
call @Menuet@GetThreadData$qv
mov ebp,eax mov ebp,eax
mov ebx,[esp+20] mov ebx,[esp+20]
cmp dword [ebx+4],0 cmp dword [ebx+4],0
jnz Menuet_open_file_dlg_str jnz .open_file_dlg_str
mov esi,7 mov esi,7
jmp Menuet_open_file_dlg_alloc jmp .open_file_dlg_alloc
Menuet_open_file_dlg_str: .open_file_dlg_str:
cld cld
mov edi,[ebx+4] mov edi,[ebx+4]
mov ecx,-1 mov ecx,-1
@ -18,12 +14,12 @@ Menuet_open_file_dlg_str:
repnz scas byte [edi] repnz scas byte [edi]
not ecx not ecx
mov esi,ecx mov esi,ecx
Menuet_open_file_dlg_alloc: .open_file_dlg_alloc:
push esi push esi
call @@Menuet@Alloc$qui call @@Kolibri@Alloc$qui
pop ecx pop ecx
test eax,eax test eax,eax
jz Menuet_open_file_dlg_ret jz .open_file_dlg_ret
mov ecx,esi mov ecx,esi
dec ecx dec ecx
push esi push esi
@ -31,17 +27,17 @@ Menuet_open_file_dlg_alloc:
push eax push eax
mov dword [ebx],-1 mov dword [ebx],-1
cmp dword [ebx+4],0 cmp dword [ebx+4],0
jnz Menuet_open_file_dlg_copy jnz .open_file_dlg_copy
mov dword [eax],0x2F64722F mov dword [eax],0x2F64722F
mov word [eax+4],0x2F31 mov word [eax+4],0x2F31
jmp Menuet_open_file_dlg_redraw jmp .open_file_dlg_redraw
Menuet_open_file_dlg_copy: .open_file_dlg_copy:
cld cld
mov ecx,esi mov ecx,esi
mov esi,[ebx+4] mov esi,[ebx+4]
mov edi,eax mov edi,eax
rep movs byte [edi],[esi] rep movs byte [edi],[esi]
Menuet_open_file_dlg_redraw: .open_file_dlg_redraw:
mov eax,12 mov eax,12
mov ebx,1 mov ebx,1
int 0x40 int 0x40
@ -55,8 +51,8 @@ Menuet_open_file_dlg_redraw:
mov eax,4 mov eax,4
mov ebx,0x00070007 mov ebx,0x00070007
mov ecx,[ebp+MENUET_THREAD_DATA_C_TITLE*4] mov ecx,[ebp+MENUET_THREAD_DATA_C_TITLE*4]
mov edx,Menuet_open_file_dlg_name mov edx,Kolibri_open_file_dlg_name
mov esi,Menuet_open_file_dlg_name_end - Menuet_open_file_dlg_name mov esi,Kolibri_open_file_dlg_name_end - Kolibri_open_file_dlg_name
int 0x40 int 0x40
mov eax,4 mov eax,4
mov ebx,0x000C001E mov ebx,0x000C001E
@ -67,78 +63,78 @@ Menuet_open_file_dlg_redraw:
mov eax,12 mov eax,12
mov ebx,2 mov ebx,2
int 0x40 int 0x40
Menuet_open_file_dlg_loop: .open_file_dlg_loop:
mov eax,10 mov eax,10
int 0x40 int 0x40
dec eax dec eax
jz Menuet_open_file_dlg_redraw jz .open_file_dlg_redraw
dec eax dec eax
jz Menuet_open_file_dlg_key jz .open_file_dlg_key
dec eax dec eax
jz Menuet_open_file_dlg_end jz .open_file_dlg_end
jmp Menuet_open_file_dlg_loop jmp .open_file_dlg_loop
Menuet_open_file_dlg_key: .open_file_dlg_key:
xor edi,edi xor edi,edi
Menuet_open_file_dlg_key_loop: .open_file_dlg_key_loop:
mov eax,2 mov eax,2
int 0x40 int 0x40
test al,al test al,al
jnz Menuet_open_file_dlg_key_end jnz .open_file_dlg_key_end
cmp ah,27 cmp ah,27
jz Menuet_open_file_dlg_end jz .open_file_dlg_end
cmp ah,13 cmp ah,13
jz Menuet_open_file_dlg_apply jz .open_file_dlg_apply
cmp ah,8 cmp ah,8
jz Menuet_open_file_dlg_key_bsp jz .open_file_dlg_key_bsp
cmp ah,32 cmp ah,32
jna Menuet_open_file_dlg_key_loop jna .open_file_dlg_key_loop
mov ebx,[esp+4] mov ebx,[esp+4]
cmp ebx,[esp+8] cmp ebx,[esp+8]
jb Menuet_open_file_dlg_key_any jb .open_file_dlg_key_any
lea esi,[ebx+2*ebx] lea esi,[ebx+2*ebx]
shr esi,1 shr esi,1
inc esi inc esi
push eax push eax
push esi push esi
push dword [esp+8] push dword [esp+8]
call @@Menuet@ReAlloc$qpvui call @@Kolibri@ReAlloc$qpvui
add esp,8 add esp,8
mov ecx,eax mov ecx,eax
pop eax pop eax
test ecx,ecx test ecx,ecx
jz Menuet_open_file_dlg_key jz .open_file_dlg_key
mov [esp+8],esi mov [esp+8],esi
mov [esp],ecx mov [esp],ecx
Menuet_open_file_dlg_key_any: .open_file_dlg_key_any:
mov esi,ebx mov esi,ebx
add esi,[esp] add esi,[esp]
mov byte [esi],ah mov byte [esi],ah
inc ebx inc ebx
mov edi,1 mov edi,1
mov [esp+4],ebx mov [esp+4],ebx
jmp Menuet_open_file_dlg_key_loop jmp .open_file_dlg_key_loop
Menuet_open_file_dlg_key_bsp: .open_file_dlg_key_bsp:
mov eax,[esp+4] mov eax,[esp+4]
test eax,eax test eax,eax
jz Menuet_open_file_dlg_key_loop jz .open_file_dlg_key_loop
dec eax dec eax
mov edi,1 mov edi,1
mov [esp+4],eax mov [esp+4],eax
jmp Menuet_open_file_dlg_key_loop jmp .open_file_dlg_key_loop
Menuet_open_file_dlg_key_end: .open_file_dlg_key_end:
test edi,edi test edi,edi
jnz Menuet_open_file_dlg_redraw jnz .open_file_dlg_redraw
jmp Menuet_open_file_dlg_loop jmp .open_file_dlg_loop
Menuet_open_file_dlg_apply: .open_file_dlg_apply:
mov eax,[esp+4] mov eax,[esp+4]
inc eax inc eax
mov [esp+8],eax mov [esp+8],eax
push eax push eax
push dword [esp+4] push dword [esp+4]
call @@Menuet@ReAlloc$qpvui call @@Kolibri@ReAlloc$qpvui
add esp,8 add esp,8
test eax,eax test eax,eax
jz Menuet_open_file_dlg_end jz .open_file_dlg_end
mov eax,[esp] mov eax,[esp]
mov esi,eax mov esi,eax
add eax,[esp+4] add eax,[esp+4]
@ -147,27 +143,25 @@ Menuet_open_file_dlg_apply:
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 @@Menuet@Free$qpv call @@Kolibri@Free$qpv
pop ecx pop ecx
mov [ebx+4],esi mov [ebx+4],esi
jmp Menuet_open_file_dlg_invalidate jmp .open_file_dlg_invalidate
Menuet_open_file_dlg_end: .open_file_dlg_end:
call @@Menuet@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
Menuet_open_file_dlg_invalidate: .open_file_dlg_invalidate:
push ebp push ebp
push dword 1 push dword 1
call @@Menuet@Invalidate$qippv call @@Kolibri@Invalidate$qippv
add esp,8 add esp,8
Menuet_open_file_dlg_ret: .open_file_dlg_ret:
pop ebp
pop edi
pop esi
pop ebx
ret ret
Menuet_open_file_dlg_name: endp
Kolibri_open_file_dlg_name:
db 'Open file' db 'Open file'
Menuet_open_file_dlg_name_end: Kolibri_open_file_dlg_name_end:
enddef

View File

@ -1,11 +1,10 @@
#include <windows.h>
#include <commdlg.h> #include <commdlg.h>
#include <menuet.h> #include <kolibri.h>
#include <me_heap.h> #include <kos_heap.h>
#include "me_cdlg.h" #include "kos_cdlg.h"
using namespace Menuet; using namespace Kolibri;
extern HINSTANCE hInstance; extern HINSTANCE hInstance;
@ -31,7 +30,7 @@ struct TOpenFileData
char name[1]; char name[1];
}; };
namespace Menuet namespace Kolibri
{ {
TOpenFileStruct::TOpenFileStruct() : data(0) {} TOpenFileStruct::TOpenFileStruct() : data(0) {}

View File

@ -1,11 +1,11 @@
#include <menuet.h> #include <kolibri.h>
#include <me_heap.h> #include <kos_heap.h>
#include <me_file.h> #include <kos_file.h>
#include "lifegen.h" #include "lifegen.h"
#include "life_bmp.h" #include "life_bmp.h"
#include "me_cdlg.h" #include "kos_cdlg.h"
using namespace Menuet; using namespace Kolibri;
/*** /***
#define StrLen LibbStrLen #define StrLen LibbStrLen
@ -20,14 +20,13 @@ void *(*MemCopy)(void *dest, const void *src, unsigned int n) = 0;
void *(*MemSet)(void *s, char c, unsigned int n) = 0; void *(*MemSet)(void *s, char c, unsigned int n) = 0;
double (*Floor)(double x) = 0; double (*Floor)(double x) = 0;
#include <windows.h>
void LibbInit() void LibbInit()
{ {
HINSTANCE hLib = LoadLibrary("Libb.dll"); HINSTANCE hLib = LoadLibrary("Libb.dll");
if (!hLib) if (!hLib)
{ {
DebugPutString("Can't load the library.\n"); DebugPutString("Can't load the library.\n");
Menuet::Abort(); Kolibri::Abort();
} }
StrLen = (unsigned int(*)(const char *str))GetProcAddress(hLib, "StrLen"); StrLen = (unsigned int(*)(const char *str))GetProcAddress(hLib, "StrLen");
StrCopy = (char *(*)(char *dest, const char *src))GetProcAddress(hLib, "StrCopy"); StrCopy = (char *(*)(char *dest, const char *src))GetProcAddress(hLib, "StrCopy");
@ -1789,7 +1788,7 @@ int MenuetOnIdle(TThreadData th)
return res; return res;
} }
void MenuetOnSize(int window_rect[], Menuet::TThreadData th) void MenuetOnSize(int window_rect[], Kolibri::TThreadData th)
{ {
unsigned short w, h; unsigned short w, h;
GetClientSize(w, h, window_rect[2], window_rect[3], th); GetClientSize(w, h, window_rect[2], window_rect[3], th);
@ -1964,13 +1963,13 @@ void DllInit()
if (!hLib) if (!hLib)
{ {
DebugPutString("Can't load the library.\n"); DebugPutString("Can't load the library.\n");
Menuet::Abort(); Kolibri::Abort();
} }
DllOneGeneration = (void(__stdcall*)(int, int, void*, const void*, int))GetProcAddress(hLib, "OneGeneration"); DllOneGeneration = (void(__stdcall*)(int, int, void*, const void*, int))GetProcAddress(hLib, "OneGeneration");
if (!DllOneGeneration) if (!DllOneGeneration)
{ {
DebugPutString("Can't get a library function.\n"); DebugPutString("Can't get a library function.\n");
Menuet::Abort(); Kolibri::Abort();
} }
} }

View File

@ -5,9 +5,10 @@
STACKSIZE equ 102400 STACKSIZE equ 102400
HEAPSIZE equ 102400 HEAPSIZE equ 102400
include "include\me_start.inc" include "..\..\proc32.inc"
include "include\me_func.inc" include "include\kos_start.inc"
include "include\me_heap.inc" include "include\kos_func.inc"
include "me_cdlg.inc" include "include\kos_heap.inc"
include "kos_cdlg.inc"
include "mmxlife.inc" include "mmxlife.inc"
;include "sse2life.inc" ;include "sse2life.inc"