decrease tmpdisk

git-svn-id: svn://kolibrios.org@7985 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Kirill Lipatov (Leency) 2020-05-26 00:59:44 +00:00
parent ddd90c73c8
commit ba500c0f89
4 changed files with 102 additions and 107 deletions

View File

@ -75,7 +75,7 @@ bool getparam()
dstfilename = #param + strlen(#param) + 3; dstfilename = #param + strlen(#param) + 3;
return true; return true;
} }
notify("'Wrong params specified. Use next format:\nAPPPATH \"PARAM1\" \"PARAM2\"' -E"); notify("'Wrong params! Use format:\nAPPPATH \"PARAM1\" \"PARAM2\"' -E");
return false; return false;
} }

View File

@ -130,11 +130,7 @@ void main()
road.load(abspath("road.png")); road.load(abspath("road.png"));
objects.load(abspath("objects.png")); objects.load(abspath("objects.png"));
loop() loop() switch(@WaitEventTimeout(frame_timeout))
{
WaitEventTimeout(frame_timeout);
switch(EAX & 0xFF)
{ {
case evKey: case evKey:
GetKeys(); GetKeys();
@ -237,7 +233,6 @@ void main()
DrawRoad(); DrawRoad();
} }
} }
}
} }
void NewLevel() void NewLevel()

View File

@ -55,20 +55,21 @@ void Main_Window()
word id; word id;
int x; int x;
#define NO_DLL_INIT
load_dll(boxlib, #box_lib_init,0); load_dll(boxlib, #box_lib_init,0);
GetNewSizeDisk(); GetNewSizeDisk();
edit_disk_size.left = strlen(SIZE_TEXT)*8 + 13; edit_disk_size.left = strlen(SIZE_TEXT)*8 + 13;
SetEventMask(EVM_REDRAW + EVM_KEY + EVM_BUTTON + EVM_MOUSE + EVM_MOUSE_FILTER); @SetEventMask(EVM_REDRAW + EVM_KEY + EVM_BUTTON + EVM_MOUSE + EVM_MOUSE_FILTER);
loop() loop()
{ {
switch(WaitEvent()) switch(@WaitEvent())
{ {
case evMouse: case evMouse:
edit_box_mouse stdcall (#edit_disk_size); edit_box_mouse stdcall (#edit_disk_size);
break; break;
case evButton: case evButton:
id=GetButtonID(); id = @GetButtonID();
if (id==1) return; if (id==1) return;
if (id==10) AddDisk(); if (id==10) AddDisk();
if (id==11) { if (id==11) {

View File

@ -52,8 +52,7 @@ int driver_handle;
void main() void main()
{ {
driver_handle = LoadDriver("tmpdisk"); if (! driver_handle = LoadDriver("tmpdisk"))
if (driver_handle==0)
{ {
notify("'TmpDisk\nError: /rd/1/drivers/tmpdisk.obj driver loading failed\nVirtual disk wouldn't be added' -tE"); notify("'TmpDisk\nError: /rd/1/drivers/tmpdisk.obj driver loading failed\nVirtual disk wouldn't be added' -tE");
ExitProcess(); ExitProcess();