fara: use skinned windows.

git-svn-id: svn://kolibrios.org@4481 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
hidnplayr 2014-01-19 13:10:54 +00:00
parent 52b2744028
commit 8bf0ee1f09
5 changed files with 36 additions and 37 deletions

View File

@ -38,12 +38,12 @@ CFishka *fishki[blocksNum];
// //
char *gameWndTitle; char *gameWndTitle;
#if LANG == RUS #if LANG == RUS
char gameWndTitle1[] = "” à ®­ ¦¤ñâ ⥡ï :)"; char gameWndTitle1[] = "” à ®­ ¦¤ñâ ⥡ï :)\0";
char gameWndTitle2[] = "<EFBFBD>ã ¢®â..."; char gameWndTitle2[] = "<EFBFBD>ã ¢®â...\0";
char gameOverText[] = "„ «ìè¥ ¤®à®£¨ ­¥â!"; char gameOverText[] = "„ «ìè¥ ¤®à®£¨ ­¥â!";
#else #else
char gameWndTitle1[] = "Pharaoh waits for you :)"; char gameWndTitle1[] = "Pharaoh waits for you :)\0";
char gameWndTitle2[] = "Well..."; char gameWndTitle2[] = "Well...\0";
char gameOverText[] = "No further way!"; char gameOverText[] = "No further way!";
#endif #endif
// //
@ -1427,17 +1427,12 @@ void DrawGameWindow()
kos_DefineAndDrawWindow( kos_DefineAndDrawWindow(
WNDLEFT, WNDTOP, WNDLEFT, WNDTOP,
gcx + 1, gcy + 21, gcx + 1, gcy + 21,
0, 0x0, 0x14, 0x0,
0, WNDHEADCOLOUR, 0, WNDHEADCOLOUR,
WNDHEADCOLOUR gameWndTitle
); );
// çàãîëîâîê îêíà // çàãîëîâîê îêíà
kos_WriteTextToWindow( kos_ChangeWindowCaption(gameWndTitle);
4, 7,
0x10, WNDTITLECOLOUR,
gameWndTitle, strlen(gameWndTitle)
);
//
gameFace.Draw( 1, 21 ); gameFace.Draw( 1, 21 );
drawGameMap(); drawGameMap();
drawGameMeters(); drawGameMeters();

View File

@ -365,7 +365,7 @@ void kos_DefineAndDrawWindow(
Dword mainAreaColour, Dword mainAreaColour,
Byte headerType, Byte headerType,
Dword headerColour, Dword headerColour,
Dword borderColour char *textPtr
) )
{ {
Dword arg1, arg2, arg3, arg4; Dword arg1, arg2, arg3, arg4;
@ -382,7 +382,7 @@ void kos_DefineAndDrawWindow(
mov ecx, arg2 mov ecx, arg2
mov edx, arg3 mov edx, arg3
mov esi, arg4 mov esi, arg4
mov edi, borderColour mov edi, textPtr
int 0x40 int 0x40
} }
} }
@ -867,4 +867,16 @@ void crtStartUp()
kos_ExitApp(); kos_ExitApp();
} }
// sysfn 71.1
void kos_ChangeWindowCaption(
char *textPtr
)
{
__asm{
mov eax, 71
mov ebx, 1
mov ecx, textPtr
int 0x40
}
}

View File

@ -121,7 +121,7 @@ void kos_DefineAndDrawWindow(
Word sizeX, Word sizeY, Word sizeX, Word sizeY,
Byte mainAreaType, Dword mainAreaColour, Byte mainAreaType, Dword mainAreaColour,
Byte headerType, Dword headerColour, Byte headerType, Dword headerColour,
Dword borderColour char *textPtr
); );
// ôóíêöèÿ 1 ïîñòàâèòü òî÷êó // ôóíêöèÿ 1 ïîñòàâèòü òî÷êó
void kos_PutPixel( Dword x, Dword y, Dword colour ); void kos_PutPixel( Dword x, Dword y, Dword colour );
@ -193,5 +193,7 @@ void* __stdcall kos_realloc(void* mptr, Dword size);
// ôóíêöèÿ 66 ðåæèì ïîëó÷åíèÿ äàííûõ îò êëàâèàòóðû // ôóíêöèÿ 66 ðåæèì ïîëó÷åíèÿ äàííûõ îò êëàâèàòóðû
void kos_SetKeyboardDataMode( Dword mode ); void kos_SetKeyboardDataMode( Dword mode );
void kos_ChangeWindowCaption(char *textPtr);
// //
void kos_Main(); void kos_Main();

View File

@ -18,13 +18,13 @@ RGB bmPMButton[] = {
// //
#if LANG == RUS #if LANG == RUS
char mainWndTitle[] = "PHARAON's CRYPT"; char mainWndTitle[] = "PHARAON's CRYPT\0";
char mainWndCopyright[] = "(C) MMVI by Rabid Rabbit"; char mainWndCopyright[] = "(C) MMVI by Rabid Rabbit";
char mainWndMenuStart[] = "1. <20> ç âì ¨£àã"; char mainWndMenuStart[] = "1. <20> ç âì ¨£àã";
char mainWndMenuExit[] = "2. ‚ë室"; char mainWndMenuExit[] = "2. ‚ë室";
char mainWndMenuLevel[] = "<EFBFBD> ç «ì­ë© ã஢¥­ì - %U"; char mainWndMenuLevel[] = "<EFBFBD> ç «ì­ë© ã஢¥­ì - %U";
#else #else
char mainWndTitle[] = "PHARAON's CRYPT"; char mainWndTitle[] = "PHARAON's CRYPT\0";
char mainWndCopyright[] = "(C) MMVI by Rabid Rabbit"; char mainWndCopyright[] = "(C) MMVI by Rabid Rabbit";
char mainWndMenuStart[] = "1. Start game"; char mainWndMenuStart[] = "1. Start game";
char mainWndMenuExit[] = "2. Exit"; char mainWndMenuExit[] = "2. Exit";
@ -151,17 +151,12 @@ void DrawMainWindow()
kos_DefineAndDrawWindow( kos_DefineAndDrawWindow(
WNDLEFT, WNDTOP, WNDLEFT, WNDTOP,
mcx + 1, mcy + 21, mcx + 1, mcy + 21,
0, 0x0, 0x14, 0x0,
0, WNDHEADCOLOUR, 0, WNDHEADCOLOUR,
WNDHEADCOLOUR mainWndTitle
); );
// çàãîëîâîê îêíà // çàãîëîâîê îêíà
kos_WriteTextToWindow( kos_ChangeWindowCaption(mainWndTitle);
4, 7,
0x10, WNDTITLECOLOUR,
mainWndTitle, sizeof(mainWndTitle)-1
);
//
mainWndFace.Draw( 1, 21 ); mainWndFace.Draw( 1, 21 );
// ïåðâàÿ ñòðîêà // ïåðâàÿ ñòðîêà
kos_WriteTextToWindow( kos_WriteTextToWindow(

View File

@ -153,11 +153,11 @@ hiScoreFile *top10Heroes = NULL;
// //
#if LANG == RUS #if LANG == RUS
char Top10WndTitle[] = "Top 10"; char Top10WndTitle[] = "Top 10\0";
char top10str1[] = "ENTER - ¨¬ï Ok."; char top10str1[] = "ENTER - ¨¬ï Ok.";
char top10str2[] = "ESC - ¢ë室 ¢ ¬¥­î"; char top10str2[] = "ESC - ¢ë室 ¢ ¬¥­î";
#else #else
char Top10WndTitle[] = "Top 10"; char Top10WndTitle[] = "Top 10\0";
char top10str1[] = "Enter - name Ok."; char top10str1[] = "Enter - name Ok.";
char top10str2[] = "Esc - leave to menu"; char top10str2[] = "Esc - leave to menu";
#endif #endif
@ -243,18 +243,13 @@ void DrawTop10Window()
kos_DefineAndDrawWindow( kos_DefineAndDrawWindow(
100, 100, 100, 100,
TOP10_WND_SIZE_X, TOP10_WND_SIZE_Y, TOP10_WND_SIZE_X, TOP10_WND_SIZE_Y,
0, 0, 0x14, 0,
0, 0x2040A0, 0, 0x2040A0,
0x2040A0 Top10WndTitle
); );
//
kos_WriteTextToWindow( kos_ChangeWindowCaption(Top10WndTitle);
4, 4,
0x0, 0x42D2E2,
Top10WndTitle,
sizeof( Top10WndTitle ) - 1
);
//
for ( i = 0; i < TOP_TBL_SIZE; i++ ) for ( i = 0; i < TOP_TBL_SIZE; i++ )
{ {
// //