/programs/network/htmlv/browser/include/colors.h-- |
---|
0,0 → 1,288 |
//Íàäî áóäåò ïåðåäåëàòü íà "äåðåâî ïîèñêà" èëè, ÷òî-òî ïîäîáíîå |
//áóäåò íå÷èòàáåëüíî, çàòî ìåíüøå è áûñòåå |
//Èìåíà web öâåòîâ |
char *color_names[]={ |
"aliceblue", |
"antiquewhite", |
"aqua", |
"aquamarine", |
"azure", |
"beige", |
"bisque", |
"black", |
"blanchedalmond", |
"blue", |
"blueviolet", |
"brown", |
"burlywood", |
"cadetblue", |
"chartreuse", |
"chocolate", |
"coral", |
"cornflowerblue", |
"cornsilk", |
"crimson", |
"cyan", |
"darkblue", |
"darkcyan", |
"darkgoldenrod", |
"darkgray", |
"darkgreen", |
"darkkhaki", |
"darkmagenta", |
"darkolivegreen", |
"darkorange", |
"darkorchid", |
"darkred", |
"darksalmon", |
"darkseagreen", |
"darkslateblue", |
"darkslategray", |
"darkturquoise", |
"darkviolet", |
"deeppink", |
"deepskyblue", |
"dimgray", |
"dodgerblue", |
"firebrick", |
"floralwhite", |
"forestgreen", |
"fuchsia", |
"gainsboro", |
"ghostwhite", |
"gold", |
"goldenrod", |
"gray", |
"green", |
"greenyellow", |
"honeydew", |
"hotpink", |
"indianred", |
"indigo", |
"ivory", |
"khaki", |
"lavender", |
"lavenderblush", |
"lawngreen", |
"lemonchiffon", |
"lightblue", |
"lightcoral", |
"lightcyan", |
"lightgoldenrodyellow", |
"lightgray", |
"lightgreen", |
"lightpink", |
"lightsalmon", |
"lightseagreen", |
"lightskyblue", |
"lightslategray", |
"lightsteelblue", |
"lightyellow", |
"lime", |
"limegreen", |
"linen", |
"magenta", |
"maroon", |
"mediumaquamarine", |
"mediumblue", |
"mediumorchid", |
"mediumpurple", |
"mediumseagreen", |
"mediumslateblue", |
"mediumspringgreen", |
"mediumturquoise", |
"mediumvioletred", |
"midnightblue", |
"mintcream", |
"mistyrose", |
"moccasin", |
"navajowhite", |
"navy", |
"navyblue", |
"oldlace", |
"olive", |
"olivedrab", |
"orange", |
"orangered", |
"orchid", |
"palegoldenrod", |
"paleturquoise", |
"palevioletred", |
"papayawhip", |
"peachpuff", |
"peru", |
"pink", |
"plum", |
"powderblue", |
"purple", |
"red", |
"rosybrown", |
"royalblue", |
"saddlebrown", |
"salmon", |
"sandybrown", |
"seagreen", |
"seashell", |
"sienna", |
"silver", |
"skyblue", |
"slateblue", |
"slategray", |
"snow", |
"springgreen", |
"steelblue", |
"tan", |
"teal", |
"thistle", |
"tomato", |
"turquoise", |
"violet", |
"wheat", |
"white", |
"whitesmoke", |
"yellow", |
"yellowgreen"}; |
//ñîîòâåòñòâóþùèå èì çíà÷åíèÿ |
dword *colors[]={ |
0xf0f8ff, |
0xfaebd7, |
0x00ffff, |
0x7fffd4, |
0xf0ffff, |
0xf5f5dc, |
0xffe4c4, |
0x000000, |
0xffebcd, |
0x0000ff, |
0x8a2be2, |
0xa52a2a, |
0xdeb887, |
0x5f9ea0, |
0x7fff00, |
0xd2691e, |
0xff7f50, |
0x6495ed, |
0xfff8dc, |
0xdc143c, |
0x00ffff, |
0x00008b, |
0x008b8b, |
0xb8860b, |
0xa9a9a9, |
0x006400, |
0xbdb76b, |
0x8b008b, |
0x556b2f, |
0xff8c00, |
0x9932cc, |
0x8b0000, |
0xe9967a, |
0x8fbc8f, |
0x483d8b, |
0x2f4f4f, |
0x00ced1, |
0x9400d3, |
0xff1493, |
0x00bfff, |
0x696969, |
0x1e90ff, |
0xb22222, |
0xfffaf0, |
0x228b22, |
0xff00ff, |
0xdcdcdc, |
0xf8f8ff, |
0xffd700, |
0xdaa520, |
0x808080, |
0x008000, |
0xadff2f, |
0xf0fff0, |
0xff69b4, |
0xcd5c5c, |
0x4b0082, |
0xfffff0, |
0xf0e68c, |
0xe6e6fa, |
0xfff0f5, |
0x7cfc00, |
0xfffacd, |
0xadd8e6, |
0xf08080, |
0xe0ffff, |
0xfafad2, |
0xd3d3d3, |
0x90ee90, |
0xffb6c1, |
0xffa07a, |
0x20b2aa, |
0x87cefa, |
0x778899, |
0xb0c4de, |
0xffffe0, |
0x00ff00, |
0x32cd32, |
0xfaf0e6, |
0xff00ff, |
0x800000, |
0x66cdaa, |
0x0000cd, |
0xba55d3, |
0x9370db, |
0x3cb371, |
0x7b68ee, |
0x00fa9a, |
0x48d1cc, |
0xc71585, |
0x191970, |
0xf5fffa, |
0xffe4e1, |
0xffe4b5, |
0xffdead, |
0x000080, |
0x9fafdf, |
0xfdf5e6, |
0x808000, |
0x6b8e23, |
0xffa500, |
0xff4500, |
0xda70d6, |
0xeee8aa, |
0xafeeee, |
0xd87093, |
0xffefd5, |
0xffdab9, |
0xcd853f, |
0xffc0cb, |
0xdda0dd, |
0xb0e0e6, |
0x800080, |
0xff0000, |
0xbc8f8f, |
0x4169e1, |
0x8b4513, |
0xfa8072, |
0xf4a460, |
0x2e8b57, |
0xfff5ee, |
0xa0522d, |
0xc0c0c0, |
0x87ceeb, |
0x6a5acd, |
0x708090, |
0xfffafa, |
0x00ff7f, |
0x4682b4, |
0xd2b48c, |
0x008080, |
0xd8bfd8, |
0xff6347, |
0x40e0d0, |
0xee82ee, |
0xf5deb3, |
0xffffff, |
0xf5f5f5, |
0xffff00, |
0x9acd32}; |
/programs/network/htmlv/browser/include/fps.h-- |
---|
0,0 → 1,51 |
int GetTime() |
{ |
$mov eax, 26; |
$mov ebx, 9; |
$int 0x40; |
return EAX; |
} |
/******************************************************************************* |
ÔÓÍÊÖÈß ÎÏÐÅÄÅËÅÍÈß FPS |
x,y - êîîðäèíàòû âûâîäà FPS íà îêíî |
âîçâðàùàåò âðåìÿ â ñîòûõ äîëÿõ ñåêóíäû çàòðà÷èâàåìîå íà 1 öèêë |
*/ |
int time1=0; |
int time2=0; |
int fps1=0; |
int timerend=0; |
int FPS() |
{ |
int tr; |
time1=GetTime(); |
if (timerend==0) |
{ |
time2=time1; |
timerend=time1; |
} |
tr = time1 - timerend; |
if (time1 - time2 < 100) //åñëè ïðîøëî ìåíåå 1 ñåêóíäû |
{ //óâåëè÷èâàåì ñ÷åò÷èê fps |
fps1++; |
} |
else |
{ |
//âûâîäèì ÷èñëî fps |
DrawTitle(IntToStr(fps1)); |
fps1=0; |
time2=time1; |
} |
timerend=time1; |
return tr; |
} |
//****************************************************************************** |
/programs/network/htmlv/browser/include/history.h-- |
---|
0,0 → 1,37 |
struct UrlsHistory { |
byte UrlHistory[6000]; |
void AddUrl(); |
void GoBack(); |
dword CurrentUrl(); |
}; |
UrlsHistory BrowserHistory; |
void UrlsHistory::GoBack() |
{ |
j = strlen(#UrlHistory); |
WHILE(UrlHistory[j] <>'|') && (j > 0) j--; |
IF (j > 0) UrlHistory[j] = 0x00; |
WHILE(UrlHistory[j] <>'|') && (j > 0) { |
copystr(#UrlHistory[j], #URL); |
j--; |
} |
UrlHistory[j] = 0x00; |
WB1.Load(#URL); |
} |
void UrlsHistory::AddUrl() |
{ |
IF (strlen(#UrlHistory)>6000) copystr(#UrlHistory+5000,#UrlHistory); |
copystr("|", #UrlHistory + strlen(#UrlHistory)); |
copystr(#URL, #UrlHistory + strlen(#UrlHistory)); |
} |
dword UrlsHistory::CurrentUrl() |
{ |
EAX=#UrlHistory + find_symbol(#UrlHistory, '|'); |
} |
/programs/network/htmlv/browser/include/some_code.h-- |
---|
0,0 → 1,62 |
//ª®¯ª¨ |
#define BACK 300 |
#define FORWARD 301 |
#define REFRESH 302 |
#define HOME 303 |
#define GOTOURL 305 |
#define SEARCHWEB 306 |
#define ID1 178 |
#define ID2 177 |
#define WINDOWS 0 |
#define DOS 1 |
#define KOI 2 |
#define UTF 3 |
#define DONT_LOAD 0 |
#define LETS_LOAD 1 |
byte utf100tmmv_mas[77] = " ¡¢£¤¥¦§¨©ª«¬®¯àáâãäåæçèéêëìíîïðñh£si\244j"; |
dword get_URL_part(byte len) { |
char temp1[1000]; |
copystr(#URL, #temp1); |
temp1[len] = 0x00; |
return #temp1; |
} |
inline byte chTag(dword text) {return strcmp(#tag,text);} |
// á ¥â ª«®ëå èà¨ä⮢, ¯®í⮬㠤¥« ¥¬ ª®áâë«ì ¨§ |
//¯ «®ç¥ª ¤«ï ¬®à®¦¥®£® ¨ ¦¥¢ ⥫쮩 १¨ª¨: |
//¨¬ ¥¬ ®¡« áâì íªà ¨ ¢ë¢®¤¨¬ ¥ñ ®¡à â® ¯®«®áª ¬¨ ᮠᬥ饨¥¬, |
//çâ® ¤ ñâ ¯¥à¥ª®á ª à⨪¨ |
//ਠ«¨ç¨¨ ä® ¨ â.¯. ¯à®ï¢¨âáï ¢áï ª®áâë«ì®áâì à¥è¥¨ï :) |
//ç áâì ¤ ëå 㦥 ¯®«ãç¥ ¢ TBW - skin_width, Form.top, ¯®¤ª«î票¥ memory |
inline void Skew(dword x,y,w,h) |
{ |
dword italic_buf; |
int tile_height=2,//¡ã¤¥¬ ¢ë¢®¤¨âì ¤¢ã寨ªá¥«ì묨 ¯®«®áª ¬¨ |
i, skin_width, |
shift=-2; |
skin_width = GetSkinWidth(); |
Form.GetInfo(SelfInfo); |
italic_buf = malloc(w*h*3); |
//ebx = 㪠§ â¥«ì ¯à¥¤¢ à¨â¥«ì® ¢ë¤¥«¥ãî ®¡« áâì ¯ ¬ïâ¨, ªã¤ ¡ã¤¥â ¯®¬¥é¥® ¨§®¡à ¦¥¨¥ ¢ ä®à¬ ⥠BBGGRRBBGGRR... |
EBX = italic_buf; |
//ecx = [à §¬¥à ¯® ®á¨ x]*65536 + [à §¬¥à ¯® ®á¨ y] |
ECX = w * 65536 + h; |
//edx = [ª®®à¤¨ â ¯® ®á¨ x]*65536 + [ª®®à¤¨ â ¯® ®á¨ y] |
EDX = x + Form.left * 65536 + y + Form.top + skin_width; |
EAX = 36; |
$int 0x40; |
FOR (i=0;i*tile_height<h;i++){ |
PutImage(w*3*tile_height*i+italic_buf,w,tile_height,x+shift-i,i*tile_height+y); |
} |
free(italic_buf); |
} |