/programs/cmm/appearance/appearance.c |
---|
106,7 → 106,6 |
load_dll(boxlib, #box_lib_init,0); |
load_dll(libini, #lib_init,1); |
load_dll(libio, #libio_init,1); |
load_dll(libimg, #libimg_init,1); |
load_dll(Proc_lib, #OpenDialog_init,0); |
o_dialog.type = 2; //select folder |
/programs/cmm/browser/TWB/special.h |
---|
48,10 → 48,10 |
"#8594", "->", |
"uarr", "\24", |
"darr", "\25", |
"rarr", "\26", |
"larr", "\27", |
"uarr", "^", |
"darr", "v", |
"rarr", "->", |
"larr", "<-", |
"bull", "\31", |
"percnt","%", |
/programs/cmm/drvinst/drvinst.c |
---|
13,7 → 13,6 |
#include "../lib/gui.h" |
#include "../lib/list_box.h" |
#include "../lib/obj/box_lib.h" |
#include "../lib/obj/libio.h" |
#include "../lib/obj/libimg.h" |
#include "../lib/obj/libini.h" |
#include "../lib/collection.h" |
88,7 → 87,6 |
void main() |
{ |
load_dll(libio, #libio_init,1); |
load_dll(libini, #lib_init,1); |
load_dll(boxlib, #box_lib_init,0); |
load_dll(libimg, #libimg_init,1); |
/programs/cmm/eolite/Eolite.c |
---|
23,6 → 23,7 |
#include "../lib/collection.h" |
#include "../lib/copyf.h" |
#include "../lib/obj/libio.h" |
#include "../lib/obj/libini.h" |
#include "../lib/obj/box_lib.h" |
#include "../lib/obj/libimg.h" |
/programs/cmm/iconedit/iconedit.c |
---|
13,6 → 13,7 |
#include "../lib/list_box.h" |
#include "../lib/events.h" |
#include "../lib/obj/libio.h" |
#include "../lib/obj/libimg.h" |
#include "../lib/obj/box_lib.h" |
/programs/cmm/lib/draw_buf.h |
---|
47,7 → 47,7 |
dword i; |
dword max_i = bufw * bufh * 4 + buf_data + 8; |
fill_color = i_fill_color; |
MEMSETD(buf_data+start_pointer+8, max_i-buf_data-start_pointer-8/4, fill_color); |
@MEMSETD(buf_data+start_pointer+8, max_i-buf_data-start_pointer-8/4, fill_color); |
} |
void DrawBufer::DrawBar(dword x, y, w, h, color) |
158,9 → 158,9 |
*/ |
void DrawBufer::Show() |
void DrawBufer::Show(dword _y_offset) |
{ |
PutPaletteImage(buf_data+8, bufw, bufh, bufx, bufy, 32, 0); |
PutPaletteImage(_y_offset * bufw * 4 + buf_data+8, bufw, bufh, bufx, bufy, 32, 0); |
} |
void DrawBufer::IncreaseBufSize() |
/programs/cmm/lib/obj/libimg.h |
---|
14,10 → 14,6 |
#include "../lib/dll.h" |
#endif |
#ifndef INCLUDE_LIBIO_H |
#include "../lib/obj/libio.h" |
#endif |
//library |
dword libimg = #alibimg; |
char alibimg[] = "/sys/lib/libimg.obj"; |
31,6 → 27,7 |
dword img_create = #aimg_create; |
dword img_encode = #aimg_encode; |
dword img_convert = #aimg_convert; |
dword img_from_file = #aimg_from_file; |
//dword img_flip = #aimg_flip; |
//dword img_rotate = #aimg_rotate; |
46,6 → 43,7 |
char aimg_create[] = "img_create"; |
char aimg_encode[] = "img_encode"; |
char aimg_convert[] = "img_convert"; |
char aimg_from_file[] = "img_from_file"; |
//char aimg_flip[] = "img_flip"; |
//char aimg_rotate[] = "img_rotate "; |
292,27 → 290,38 |
///////////////////////////// |
:void DrawIcon32(dword x,y, _bg, icon_n) { |
static libimg_image i32; |
static dword bg; |
//load_dll(libimg, #libimg_init,1); |
if (!i32.image) || (bg!=_bg) { |
static dword pure_img32; |
if (!pure_img32) || (bg!=_bg) { |
bg = _bg; |
i32.load("/sys/icons32.png"); |
i32.replace_color(0x00000000, bg); |
img_from_file stdcall("/sys/icons32.png"); |
pure_img32 = EAX; |
//now fill transparent with another color |
EDX = ESDWORD[EAX+4] * ESDWORD[EAX+8] * 4 + ESDWORD[EAX+24]; |
for (ESI = ESDWORD[EAX+24]; ESI < EDX; ESI += 4) { |
if (DSDWORD[ESI]==0x00000000) DSDWORD[ESI] = bg; |
} |
if (icon_n>=0) i32.draw(x, y, 32, 32, 0, icon_n*32); |
} |
img_draw stdcall(pure_img32, x, y, 32, 32, 0, icon_n*32); |
} |
:void DrawIcon16(dword x,y, bg, icon_n) { |
static libimg_image i16; |
//load_dll(libimg, #libimg_init,1); |
if (!i16.image) { |
i16.load("/sys/icons16.png"); |
i16.replace_color(0xffFFFfff, bg); |
i16.replace_color(0xffCACBD6, MixColors(bg, 0, 220)); |
:void DrawIcon16(dword x,y, _bg, icon_n) { |
static dword bg; |
static dword pure_img16; |
dword bgshadow; |
if (!pure_img16) || (bg!=_bg) { |
bg = _bg; |
bgshadow = MixColors(bg, 0, 220); |
img_from_file stdcall("/sys/icons16.png"); |
pure_img16 = EAX; |
//now fill transparent with another color |
EDX = ESDWORD[EAX+4] * ESDWORD[EAX+8] * 4 + ESDWORD[EAX+24]; |
for (ESI = ESDWORD[EAX+24]; ESI < EDX; ESI += 4) { |
if (DSDWORD[ESI]==0xffFFFfff) DSDWORD[ESI] = bg; |
if (DSDWORD[ESI]==0xffCACBD6) DSDWORD[ESI] = bgshadow; |
} |
if (icon_n>=0) i16.draw(x, y, 16, 16, 0, icon_n*16); |
} |
img_draw stdcall(pure_img16, x, y, 16, 16, 0, icon_n*16); |
} |
#endif |
/programs/cmm/misc/easyshot.c |
---|
4,6 → 4,7 |
#include "../lib/mem.h" |
#include "../lib/gui.h" |
#include "../lib/obj/libio.h" |
#include "../lib/obj/libimg.h" |
#include "../lib/obj/box_lib.h" |
#include "../lib/obj/proc_lib.h" |
/programs/cmm/misc/mblocks.c |
---|
10,7 → 10,6 |
#include "..\lib\gui.h" |
#include "..\lib\random.h" |
#include "..\lib\obj\libio.h" |
#include "..\lib\obj\libimg.h" |
#ifndef AUTOBUILD |
45,7 → 44,6 |
void main() |
{ |
dword id; |
load_dll(libio, #libio_init,1); |
load_dll(libimg, #libimg_init,1); |
NewGame(); |
157,7 → 155,7 |
case BTN_OPEN: |
DrawBar(xx+1, yy+1, CELL_SIZE-1, CELL_SIZE-1, 0xFFFfff);//background |
} |
DrawIcon32(xx+6, yy+6, 0xFFFfff, bitpict[id]); |
DrawIcon32(xx+6, yy+6, 0xFFFfff, bitpict[id]+51); //skip first 51 icons as they are boring for game |
} |
void Draw_Panel() |
/programs/cmm/quark/quark.c |
---|
28,6 → 28,7 |
#include "../lib/obj/box_lib.h" |
#include "../lib/obj/libini.h" |
#include "../lib/obj/libio.h" |
#include "../lib/obj/libimg.h" |
#include "../lib/obj/iconv.h" |
#include "../lib/obj/proc_lib.h" |
/programs/cmm/sysmon/sysmon.c |
---|
1,6 → 1,6 |
/* |
* System Monitor |
* version 1.35 |
* version 1.36 |
* Author: Leency |
*/ |
43,9 → 43,6 |
#define BOTPANEL_H 36 |
#ifdef LANG_RUS |
#define T_CPU_AND_RAM "à®æ¥áá®à ¨ " |
#define T_DRIVES "¨áª¨" |
#define T_PROCESSES "à®æ¥ááë" |
#define T_APP_TITLE "¨áâ¥¬ë© ¬®¨â®à" |
#define T_SHOW_SYSTEM "¨á⥬ë¥" |
#define T_DETAILS "®¤à®¡¥¥" |
57,9 → 54,6 |
#define T_RD_USAGE "¨áâ¥¬ë© ¤¨áª: %i ¡ ᢮¡®¤® ¨§ 1.4 ¡" |
#define T_TMP_USAGE "TMP%i ¤¨áª: %i ¡ ᢮¡®¤® ¨§ %i ¡" |
#else |
#define T_CPU_AND_RAM "CPU & RAM" |
#define T_DRIVES "Drives" |
#define T_PROCESSES "Processes" |
#define T_APP_TITLE "System Monitor" |
#define T_SHOW_SYSTEM "System" |
#define T_DETAILS "Details" |
118,7 → 112,7 |
//dword cpu_frequency = GetCpuFrequency()/1000; |
load_lib(); |
SetEventMask(EVM_REDRAW + EVM_KEY + EVM_BUTTON + EVM_MOUSE + EVM_MOUSE_FILTER); |
loop() switch(@WaitEventTimeout(120)) |
loop() switch(@WaitEventTimeout(50)) |
{ |
case evMouse: |
SelectList_ProcessMouse(); |
175,9 → 169,9 |
ram.set_size(RIGHT_X, WIN_CONTENT_Y+170, right_w, 23); |
rd.set_size(RIGHT_X, WIN_CONTENT_Y+240, right_w, 23); |
default: |
SelectList_LineChanged(); |
MonitorCpu(); |
MonitorRam(); |
SelectList_LineChanged(); |
MonitorRd(); |
MonitorTmp(); |
} |
343,11 → 337,11 |
sprintf(#param, T_CPU_LOAD, cpu_stack[pos]); |
DrawIconWithText(RIGHT_X, cpu.y - 25, 48, #param); |
for (i=0; i<right_w; i+=2) { |
DrawBar(i+cpu.x, cpu.y, 1, cpu.h-cpu_stack[i], PROGRESS_BG); |
DrawBar(i+cpu.x, cpu.h-cpu_stack[i]+cpu.y, 1, cpu_stack[i], LOAD_CPU); |
DrawBar(i+1+cpu.x, cpu.y, 1, cpu.h, PROGRESS_BG); |
#define LINEW 8 |
for (i=0; i<right_w; i+=LINEW) { |
DrawBar(i+cpu.x, cpu.y, LINEW, cpu.h-cpu_stack[i], PROGRESS_BG); |
DrawBar(i+cpu.x, cpu.h-cpu_stack[i]+cpu.y, LINEW, cpu_stack[i], 0xDFA13B); |
//DrawBar(i+LINEW+cpu.x, cpu.y, 1, cpu.h, PROGRESS_BG); |
} |
pos++; |