From thomas@hidden Thu Jan 8 21:12:34 2009 From: thomas@hidden (Thomas Horsten) Date: Thu Jan 8 22:12:40 2009 Subject: [PATCH] Updated Minitris with piece colours, next image preview and image shadow Message-ID: <5d932cdc0901081312v57a6e871ldaa2be5c02f4b6ce@mail.gmail.com> Hope gmail doesn't mess it up... --- tools/minitris.c | 87 +++++++++++++++++++++++++++++++++++++++++++++--------- 1 files changed, 73 insertions(+), 14 deletions(-) diff --git a/tools/minitris.c b/tools/minitris.c index 8641efc..bf042e4 100644 --- a/tools/minitris.c +++ b/tools/minitris.c @@ -2,25 +2,35 @@ #define DEFAULT_WIDTH 11 #define DEFAULT_HEIGHT 20 +#define DEFAULT_BLOCKSIZE 20 +#define PREVIEW_BLOCKSIZE 7 #define BLACK 0 #define RED 1 #define GREEN 2 #define BLUE 3 +#define PURPLE 4 +#define YELLOW 5 +#define CYAN 6 ULONG board[DEFAULT_WIDTH * DEFAULT_HEIGHT]; int board_width = DEFAULT_WIDTH; int board_height = DEFAULT_HEIGHT; -int block_size = 20; +int block_size = DEFAULT_BLOCKSIZE; int interval = 1000; int piece_orientation = 0; +int next_piece_type = 0; int piece_type = 0; int piece_color = RED; int piece_x = 0; int piece_y = 0; -HBRUSH brushes[4]; +BOOL show_next_piece = TRUE; +int preview_pos_x = (DEFAULT_WIDTH * DEFAULT_BLOCKSIZE)-(5*PREVIEW_BLOCKSIZE)-1; +int preview_pos_y = 1; + +HBRUSH brushes[6]; HPEN null_pen; const char piece[] = { @@ -174,12 +184,12 @@ const char piece[] = { #undef max #undef min -int max( int x, int y ) +static inline int max( int x, int y ) { return xy?y:x; } @@ -203,6 +213,28 @@ void draw_block( HDC hdc, int x, int y ) (x+1)*block_size - 1, (y+1)*block_size - 1 ); } +BOOL piece_has_block( int type, int orientation, int x, int y ); + +void draw_next_piece_preview(HDC hdc) +{ + int x, y; + + SelectObject( hdc, brushes[0] ); + + for (x=0; x<5; x++) + for (y=0; y<5; y++) + { + if (piece_has_block(next_piece_type, 0, x, y)) + { + SelectObject( hdc, brushes[next_piece_type+1] ); + } else { + SelectObject( hdc, brushes[0] ); + } + Rectangle( hdc, preview_pos_x+(x*PREVIEW_BLOCKSIZE), preview_pos_y+y*PREVIEW_BLOCKSIZE, + preview_pos_x+((x+1)*PREVIEW_BLOCKSIZE), preview_pos_y+(y+1)*PREVIEW_BLOCKSIZE ); + } +} + void do_paint( HWND hwnd ) { PAINTSTRUCT ps; @@ -215,6 +247,7 @@ void do_paint( HWND hwnd ) old_brush = SelectObject( hdc, brushes[0] ); old_pen = SelectObject( hdc, null_pen ); + for (i=0; i= 4) - new_orientation = 0; + int new_orientation = (piece_orientation + 1) & 3; block_at_cursor( piece_type, piece_orientation, BLACK ); if (block_fits_at(piece_type, new_orientation, piece_x, piece_y )) piece_orientation = new_orientation; @@ -338,11 +391,11 @@ BOOL do_rotate() BOOL new_block() { - piece_type += 1; - if (piece_type > 5) - piece_type = 0; + piece_type = next_piece_type; + next_piece_type = rand()%6; + piece_color = piece_type+1; piece_x = board_width/2 - 2; - piece_y = 1; + piece_y = 0; block_at_cursor( piece_type, piece_orientation, piece_color ); return TRUE; } @@ -443,7 +496,7 @@ LRESULT CALLBACK minitris_wndproc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lpa switch (msg) { case WM_SIZE: - do_size( hwnd, block_size * board_width, block_size * board_height ); + do_size( hwnd, block_size * board_width, block_size * board_height + 5 ); break; case WM_KEYDOWN: if (do_keydown(wparam)) @@ -468,6 +521,9 @@ int APIENTRY WinMain( HINSTANCE Instance, HINSTANCE Prev, LPSTR CmdLine, int Sho HWND hwnd; MSG msg; + srand(time(NULL)); + next_piece_type = rand()%5; + wc.style = 0; wc.lpfnWndProc = minitris_wndproc; wc.cbClsExtra = 0; @@ -485,7 +541,7 @@ int APIENTRY WinMain( HINSTANCE Instance, HINSTANCE Prev, LPSTR CmdLine, int Sho } hwnd = CreateWindow("MINITRIS", "Minitris", WS_VISIBLE|WS_POPUP|WS_DLGFRAME, - CW_USEDEFAULT, CW_USEDEFAULT, block_size * board_width, block_size * board_height, + CW_USEDEFAULT, CW_USEDEFAULT, block_size * board_width, block_size * board_height + 5, NULL, NULL, Instance, NULL); if (!hwnd) { @@ -498,6 +554,9 @@ int APIENTRY WinMain( HINSTANCE Instance, HINSTANCE Prev, LPSTR CmdLine, int Sho brushes[1] = CreateSolidBrush( RGB( 0x80, 0, 0 ) ); brushes[2] = CreateSolidBrush( RGB( 0, 0x80, 0 ) ); brushes[3] = CreateSolidBrush( RGB( 0, 0, 0x80 ) ); + brushes[4] = CreateSolidBrush( RGB( 0x80, 0, 0x80 ) ); + brushes[5] = CreateSolidBrush( RGB( 0x80, 0x80, 0 ) ); + brushes[6] = CreateSolidBrush( RGB( 0, 0x80, 0x80 ) ); new_block(); SetTimer( hwnd, 0, interval, 0 ); -- 1.5.6.5 From thomas@hidden Thu Jan 8 21:30:37 2009 From: thomas@hidden (Thomas Horsten) Date: Thu Jan 8 22:30:46 2009 Subject: (no subject) Message-ID: >From 34e9bba9f35d4db98f70140e5d66fc5674a9e2b7 Mon Sep 17 00:00:00 2001 From: Thomas Horsten Date: Thu, 8 Jan 2009 20:44:04 +0000 Subject: Updated Minitris with piece colours, next image preview and image shadow Signed-off-by: Thomas Horsten --- tools/minitris.c | 87 +++++++++++++++++++++++++++++++++++++++++++++--------- 1 files changed, 73 insertions(+), 14 deletions(-) diff --git a/tools/minitris.c b/tools/minitris.c index 8641efc..bf042e4 100644 --- a/tools/minitris.c +++ b/tools/minitris.c @@ -2,25 +2,35 @@ #define DEFAULT_WIDTH 11 #define DEFAULT_HEIGHT 20 +#define DEFAULT_BLOCKSIZE 20 +#define PREVIEW_BLOCKSIZE 7 #define BLACK 0 #define RED 1 #define GREEN 2 #define BLUE 3 +#define PURPLE 4 +#define YELLOW 5 +#define CYAN 6 ULONG board[DEFAULT_WIDTH * DEFAULT_HEIGHT]; int board_width = DEFAULT_WIDTH; int board_height = DEFAULT_HEIGHT; -int block_size = 20; +int block_size = DEFAULT_BLOCKSIZE; int interval = 1000; int piece_orientation = 0; +int next_piece_type = 0; int piece_type = 0; int piece_color = RED; int piece_x = 0; int piece_y = 0; -HBRUSH brushes[4]; +BOOL show_next_piece = TRUE; +int preview_pos_x = (DEFAULT_WIDTH * DEFAULT_BLOCKSIZE)-(5*PREVIEW_BLOCKSIZE)-1; +int preview_pos_y = 1; + +HBRUSH brushes[6]; HPEN null_pen; const char piece[] = { @@ -174,12 +184,12 @@ const char piece[] = { #undef max #undef min -int max( int x, int y ) +static inline int max( int x, int y ) { return xy?y:x; } @@ -203,6 +213,28 @@ void draw_block( HDC hdc, int x, int y ) (x+1)*block_size - 1, (y+1)*block_size - 1 ); } +BOOL piece_has_block( int type, int orientation, int x, int y ); + +void draw_next_piece_preview(HDC hdc) +{ + int x, y; + + SelectObject( hdc, brushes[0] ); + + for (x=0; x<5; x++) + for (y=0; y<5; y++) + { + if (piece_has_block(next_piece_type, 0, x, y)) + { + SelectObject( hdc, brushes[next_piece_type+1] ); + } else { + SelectObject( hdc, brushes[0] ); + } + Rectangle( hdc, preview_pos_x+(x*PREVIEW_BLOCKSIZE), preview_pos_y+y*PREVIEW_BLOCKSIZE, + preview_pos_x+((x+1)*PREVIEW_BLOCKSIZE), preview_pos_y+(y+1)*PREVIEW_BLOCKSIZE ); + } +} + void do_paint( HWND hwnd ) { PAINTSTRUCT ps; @@ -215,6 +247,7 @@ void do_paint( HWND hwnd ) old_brush = SelectObject( hdc, brushes[0] ); old_pen = SelectObject( hdc, null_pen ); + for (i=0; i= 4) - new_orientation = 0; + int new_orientation = (piece_orientation + 1) & 3; block_at_cursor( piece_type, piece_orientation, BLACK ); if (block_fits_at(piece_type, new_orientation, piece_x, piece_y )) piece_orientation = new_orientation; @@ -338,11 +391,11 @@ BOOL do_rotate() BOOL new_block() { - piece_type += 1; - if (piece_type > 5) - piece_type = 0; + piece_type = next_piece_type; + next_piece_type = rand()%6; + piece_color = piece_type+1; piece_x = board_width/2 - 2; - piece_y = 1; + piece_y = 0; block_at_cursor( piece_type, piece_orientation, piece_color ); return TRUE; } @@ -443,7 +496,7 @@ LRESULT CALLBACK minitris_wndproc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lpa switch (msg) { case WM_SIZE: - do_size( hwnd, block_size * board_width, block_size * board_height ); + do_size( hwnd, block_size * board_width, block_size * board_height + 5 ); break; case WM_KEYDOWN: if (do_keydown(wparam)) @@ -468,6 +521,9 @@ int APIENTRY WinMain( HINSTANCE Instance, HINSTANCE Prev, LPSTR CmdLine, int Sho HWND hwnd; MSG msg; + srand(time(NULL)); + next_piece_type = rand()%5; + wc.style = 0; wc.lpfnWndProc = minitris_wndproc; wc.cbClsExtra = 0; @@ -485,7 +541,7 @@ int APIENTRY WinMain( HINSTANCE Instance, HINSTANCE Prev, LPSTR CmdLine, int Sho } hwnd = CreateWindow("MINITRIS", "Minitris", WS_VISIBLE|WS_POPUP|WS_DLGFRAME, - CW_USEDEFAULT, CW_USEDEFAULT, block_size * board_width, block_size * board_height, + CW_USEDEFAULT, CW_USEDEFAULT, block_size * board_width, block_size * board_height + 5, NULL, NULL, Instance, NULL); if (!hwnd) { @@ -498,6 +554,9 @@ int APIENTRY WinMain( HINSTANCE Instance, HINSTANCE Prev, LPSTR CmdLine, int Sho brushes[1] = CreateSolidBrush( RGB( 0x80, 0, 0 ) ); brushes[2] = CreateSolidBrush( RGB( 0, 0x80, 0 ) ); brushes[3] = CreateSolidBrush( RGB( 0, 0, 0x80 ) ); + brushes[4] = CreateSolidBrush( RGB( 0x80, 0, 0x80 ) ); + brushes[5] = CreateSolidBrush( RGB( 0x80, 0x80, 0 ) ); + brushes[6] = CreateSolidBrush( RGB( 0, 0x80, 0x80 ) ); new_block(); SetTimer( hwnd, 0, interval, 0 ); -- 1.5.6.5 From thomas@hidden Thu Jan 8 22:34:24 2009 From: thomas@hidden (Thomas Horsten) Date: Thu Jan 8 23:41:31 2009 Subject: [PATCH] Add Game Over detection, add missing square piece, make colors brighter and more true to original *tris Message-ID: Signed-off-by: Thomas Horsten --- tools/minitris.c | 359 ++++++++++++++++++++++++++++-------------------------- 1 files changed, 187 insertions(+), 172 deletions(-) diff --git a/tools/minitris.c b/tools/minitris.c index bf042e4..5c2c4bd 100644 --- a/tools/minitris.c +++ b/tools/minitris.c @@ -1,4 +1,6 @@ #include +#include +#include #define DEFAULT_WIDTH 11 #define DEFAULT_HEIGHT 20 @@ -6,12 +8,7 @@ #define PREVIEW_BLOCKSIZE 7 #define BLACK 0 -#define RED 1 -#define GREEN 2 -#define BLUE 3 -#define PURPLE 4 -#define YELLOW 5 -#define CYAN 6 +#define CYAN 1 ULONG board[DEFAULT_WIDTH * DEFAULT_HEIGHT]; @@ -22,7 +19,7 @@ int interval = 1000; int piece_orientation = 0; int next_piece_type = 0; int piece_type = 0; -int piece_color = RED; +int piece_color = CYAN; int piece_x = 0; int piece_y = 0; @@ -30,155 +27,160 @@ BOOL show_next_piece = TRUE; int preview_pos_x = (DEFAULT_WIDTH * DEFAULT_BLOCKSIZE)-(5*PREVIEW_BLOCKSIZE)-1; int preview_pos_y = 1; -HBRUSH brushes[6]; +BOOL game_over = FALSE; + +HBRUSH brushes[8]; HPEN null_pen; +HWND hwnd; + const char piece[] = { // straight - " " - " X " - " X " - " X " - " X " - - " " - " " - " XXXX" - " " - " " - - " X " - " X " - " X " - " X " - " " - - " " - " " - "XXXX " - " " - " " + " X " + " X " + " X " + " X " + + " " + " " + "XXXX" + " " + + " X " + " X " + " X " + " X " + + " " + "XXXX" + " " + " " + // bent left - " " - " XX " - " X " - " X " - " " - - " " - " " - " XXX " - " X " - " " - - " " - " X " - " X " - " XX " - " " - - " " - " X " - " XXX " - " " - " " + " XX " + " X " + " X " + " " + + " " + " XXX" + " X " + " " + + " " + " X " + " X " + " XX " + + " " + " X " + "XXX " + " " + // bent right - " " - " XX " - " X " - " X " - " " - - " " - " X " - " XXX " - " " - " " - - " " - " X " - " X " - " XX " - " " - - " " - " " - " XXX " - " X " - " " + " " + " XX " + " X " + " X " + + " " + "X " + "XXX " + " " + + " " + " X " + " X " + "XX " + + " " + " " + "XXX " + " X " + // T shaped - " " - " " - " XXX " - " X " - " " - - " " - " X " - " XX " - " X " - " " - - " " - " X " - " XXX " - " " - " " - - " " - " X " - " XX " - " X " - " " + " " + "XXX " + " X " + " " + + " " + " X " + " XX " + " X " + + " " + " X " + "XXX " + " " + + " " + " X " + "XX " + " X " + // dogleg left - " " - " " - " XX " - " XX " - " " - - " " - " X " - " XX " - " X " - " " - - " " - " XX " - " XX " - " " - " " - - " " - " X " - " XX " - " X " - " " + " " + " " + " XX " + "XX " + + " " + " X " + " XX " + " X " + + " " + " XX " + "XX " + " " + + " " + "X " + "XX " + " X " // dogleg right - " " - " " - " XX " - " XX " - " " - - " " - " X " - " XX " - " X " - " " - - " " - " XX " - " XX " - " " - " " - - " " - " X " - " XX " - " X " - " " + " " + " " + "XX " + " XX " + + " " + " X " + " XX " + " X " + + " " + "XX " + " XX " + " " + + " " + " X " + "XX " + "X " + +// square + " " + " XX " + " XX " + " " + + " " + " XX " + " XX " + " " + + " " + " XX " + " XX " + " " + + " " + " XX " + " XX " + " " }; #undef max @@ -221,8 +223,8 @@ void draw_next_piece_preview(HDC hdc) SelectObject( hdc, brushes[0] ); - for (x=0; x<5; x++) - for (y=0; y<5; y++) + for (x=0; x<4; x++) + for (y=0; y<4; y++) { if (piece_has_block(next_piece_type, 0, x, y)) { @@ -235,7 +237,7 @@ void draw_next_piece_preview(HDC hdc) } } -void do_paint( HWND hwnd ) +void do_paint() { PAINTSTRUCT ps; HDC hdc; @@ -261,14 +263,14 @@ void do_paint( HWND hwnd ) Rectangle( hdc, 1, board_height*block_size, board_width*block_size-1, board_height*block_size+5 ); SelectObject( hdc, brushes[piece_color] ); - for (i=0; i<5; i++) + for (i=0; i<4; i++) { - for (j=0; j<5; j++) { + for (j=0; j<4; j++) { if (piece_has_block(piece_type, piece_orientation, i, j)) break; } - if (j<5) { + if (j<4) { Rectangle( hdc, (i+piece_x)*block_size, board_height*block_size, (i+piece_x+1)*block_size - 1, board_height*block_size+5 ); } @@ -293,15 +295,15 @@ void set_block( int x, int y, int color ) BOOL piece_has_block( int type, int orientation, int x, int y ) { - return piece[ type*100 + orientation*25 + y*5 + x] == 'X'; + return piece[ type*64 + orientation*16 + y*4 + x] == 'X'; } void block_at_cursor( int type, int orientation, int color ) { int i, j; - for (i=0; i<5; i++) + for (i=0; i<4; i++) { - for (j=0; j<5; j++) + for (j=0; j<4; j++) { if (!piece_has_block( type, orientation, i, j )) continue; @@ -313,9 +315,9 @@ void block_at_cursor( int type, int orientation, int color ) BOOL block_fits_at( int type, int orientation, int x, int y ) { int i, j; - for (i=0; i<5; i++) + for (i=0; i<4; i++) { - for (j=0; j<5; j++) + for (j=0; j<4; j++) { ULONG *ptr; if (!piece_has_block( type, orientation, i, j )) @@ -392,11 +394,15 @@ BOOL do_rotate() BOOL new_block() { piece_type = next_piece_type; - next_piece_type = rand()%6; + next_piece_type = rand()%7; piece_color = piece_type+1; piece_x = board_width/2 - 2; piece_y = 0; - block_at_cursor( piece_type, piece_orientation, piece_color ); + if ( !block_fits_at(piece_type, piece_orientation, piece_x, piece_y) ) + game_over = TRUE; + else + block_at_cursor( piece_type, piece_orientation, piece_color ); + return TRUE; } @@ -449,6 +455,9 @@ ULONG erase_rows( void ) BOOL do_keydown( ULONG vkey ) { + if (game_over && vkey != VK_ESCAPE) + return FALSE; + switch (vkey) { case VK_ESCAPE: @@ -485,10 +494,16 @@ void do_size( HWND hwnd, int width, int height ) void do_timer() { - if (move_down()) - return; - erase_rows(); - new_block(); + if (!game_over) + { + if (move_down()) + return; + erase_rows(); + new_block(); + } else { + printf("Game over!\n"); + KillTimer( hwnd, 0 ); + } } LRESULT CALLBACK minitris_wndproc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) @@ -503,7 +518,7 @@ LRESULT CALLBACK minitris_wndproc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lpa InvalidateRect( hwnd, 0, 0 ); break; case WM_PAINT: - do_paint( hwnd ); + do_paint(); break; case WM_NCHITTEST: return HTCAPTION; @@ -518,11 +533,10 @@ LRESULT CALLBACK minitris_wndproc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lpa int APIENTRY WinMain( HINSTANCE Instance, HINSTANCE Prev, LPSTR CmdLine, int Show ) { WNDCLASS wc; - HWND hwnd; MSG msg; srand(time(NULL)); - next_piece_type = rand()%5; + next_piece_type = rand()%6; wc.style = 0; wc.lpfnWndProc = minitris_wndproc; @@ -551,12 +565,13 @@ int APIENTRY WinMain( HINSTANCE Instance, HINSTANCE Prev, LPSTR CmdLine, int Sho null_pen = GetStockObject( NULL_PEN ); brushes[0] = GetStockObject( BLACK_BRUSH ); - brushes[1] = CreateSolidBrush( RGB( 0x80, 0, 0 ) ); - brushes[2] = CreateSolidBrush( RGB( 0, 0x80, 0 ) ); - brushes[3] = CreateSolidBrush( RGB( 0, 0, 0x80 ) ); - brushes[4] = CreateSolidBrush( RGB( 0x80, 0, 0x80 ) ); - brushes[5] = CreateSolidBrush( RGB( 0x80, 0x80, 0 ) ); - brushes[6] = CreateSolidBrush( RGB( 0, 0x80, 0x80 ) ); + brushes[1] = CreateSolidBrush( RGB( 0x00, 0xf0, 0xf0 ) ); + brushes[2] = CreateSolidBrush( RGB( 0xf0, 0xa0, 0x00 ) ); + brushes[3] = CreateSolidBrush( RGB( 0x00, 0x00, 0xf0 ) ); + brushes[4] = CreateSolidBrush( RGB( 0xa0, 0x00, 0xf0 ) ); + brushes[5] = CreateSolidBrush( RGB( 0x00, 0xf0, 0x00 ) ); + brushes[6] = CreateSolidBrush( RGB( 0xf0, 0x00, 0x00 ) ); + brushes[7] = CreateSolidBrush( RGB( 0xf0, 0xf0, 0x00 ) ); new_block(); SetTimer( hwnd, 0, interval, 0 ); -- 1.5.6.5 From andy.elvey@hidden Sat Jan 10 19:29:26 2009 From: andy.elvey@hidden (Andy Elvey) Date: Sat Jan 10 07:29:32 2009 Subject: [ring3k 0.0.15] - Possible bug - dirent.h file missing Message-ID: <49684046.3060104@paradise.net.nz> Hi all - I'm a first-timer here, so hope you'll be gentle with me.... ;) I'm building ring3k on Linux Mint (an Ubuntu derivative). Anyway, I've just downloaded 0.0.15 and tried to build it. The configure went fine, but when I ran make, I got this error - ( this is just the last part of the "make" messages - I have the complete log of my configure and make session if you want it. ) g++ -m32 -Wall -O2 -D__i386__ -fshort-wchar -fno-strict-aliasing -I. -I../include -I/usr/include/libxml2 -I../libudis86 -Wp,-MD,.file.o.d -c -o file.o file.cpp file.cpp:34:26: error: linux/dirent.h: No such file or directory make[1]: *** [file.o] Error 1 make[1]: Leaving directory `/home/andy/ring3k-0.0.15/loader' make: *** [loader_dir] Error 2 andy@obsidian:~/ring3k-0.0.15$ I had a look through the ring3k directories, and it does indeed seem to be the case that there is no "dirent.h" file. So, I'm guessing that this may have just been inadvertently left out of the makefile somehow. Anyway, just thought I'd let you know. If you want my complete log, is it ok to send it as an attachment (a text file)? Cheers - bye for now - - Andy From wine.msi@hidden Sat Jan 10 08:15:21 2009 From: wine.msi@hidden (Mike McCormack) Date: Sat Jan 10 09:15:44 2009 Subject: [ring3k 0.0.15] - Possible bug - dirent.h file missing In-Reply-To: <49684046.3060104@paradise.net.nz> References: <49684046.3060104@paradise.net.nz> Message-ID: <49685919.2060700@gmail.com> Hi Andy, Andy Elvey wrote: > Hi all - I'm a first-timer here, so hope you'll be gentle with me.... ;) Welcome! > g++ -m32 -Wall -O2 -D__i386__ -fshort-wchar -fno-strict-aliasing -I. > -I../include -I/usr/include/libxml2 -I../libudis86 -Wp,-MD,.file.o.d -c > -o file.o file.cpp > file.cpp:34:26: error: linux/dirent.h: No such file or directory It should be OK to delete that line from file.cpp, as the code that required it has been removed. I guess you have a newer set of kernel headers installed on your machine that doesn't have linux/dirent.h I have committed a fix to the git repository. Please let me know if it works. thanks, Mike From wine.msi@hidden Sat Jan 10 13:15:23 2009 From: wine.msi@hidden (Mike McCormack) Date: Sat Jan 10 14:15:40 2009 Subject: [ring3k 0.0.15] - Possible bug - dirent.h file missing In-Reply-To: <49686B6A.7090000@paradise.net.nz> References: <49684046.3060104@paradise.net.nz> <49685919.2060700@gmail.com> <4968674B.4060905@paradise.net.nz> <49686B6A.7090000@paradise.net.nz> Message-ID: <49689F6B.2060101@gmail.com> Andy Elvey wrote: > I've cloned your Git repo, and good news - that error has indeed gone! I do get another one though, as follows - Great! > client.c:(.text+0x45c): undefined reference to `__stack_chk_fail' I've pushed a fix for this one too. > mutant.cpp: In function ???NTSTATUS NtReleaseMutant(void*, long unsigned int*)???: > mutant.cpp:123: warning: ???mutant??? may be used uninitialized in this function I'll install newer gcc and see if I can have a go at fixing some of these build warnings too. thanks! Mike From thomas@hidden Sat Jan 10 14:23:15 2009 From: thomas@hidden (Thomas Horsten) Date: Sat Jan 10 15:25:48 2009 Subject: [PATCH] Make pieces simpler and remove unused functions Message-ID: Signed-off-by: Thomas Horsten --- tools/minitris.c | 173 ++++------------------------------------------------- 1 files changed, 13 insertions(+), 160 deletions(-) diff --git a/tools/minitris.c b/tools/minitris.c index 5b84886..e3016e7 100644 --- a/tools/minitris.c +++ b/tools/minitris.c @@ -34,168 +34,23 @@ HPEN null_pen; HWND hwnd; -const char piece[] = { +const unsigned short piece[] = { // straight - " X " - " X " - " X " - " X " - - " " - " " - "XXXX" - " " - - " X " - " X " - " X " - " X " - - " " - "XXXX" - " " - " " - + 0x2222, // bent left - " XX " - " X " - " X " - " " - - " " - " XXX" - " X " - " " - - " " - " X " - " X " - " XX " - - " " - " X " - "XXX " - " " - + 0x6220, // bent right - " " - " XX " - " X " - " X " - - " " - "X " - "XXX " - " " - - " " - " X " - " X " - "XX " - - " " - " " - "XXX " - " X " - + 0x0644, // T shaped - " " - "XXX " - " X " - " " - - " " - " X " - " XX " - " X " - - " " - " X " - "XXX " - " " - - " " - " X " - "XX " - " X " - + 0x0e40, // dogleg left - " " - " " - " XX " - "XX " - - " " - " X " - " XX " - " X " - - " " - " XX " - "XX " - " " - - " " - "X " - "XX " - " X " - + 0x006c, // dogleg right - " " - " " - "XX " - " XX " - - " " - " X " - " XX " - " X " - - " " - "XX " - " XX " - " " - - " " - " X " - "XX " - "X " - + 0x00c6, // square - " " - " XX " - " XX " - " " - - " " - " XX " - " XX " - " " - - " " - " XX " - " XX " - " " - - " " - " XX " - " XX " - " " + 0x0660, }; -#undef max -#undef min - -static inline int max( int x, int y ) -{ - return xy?y:x; -} - ULONG *get_block_ptr( int x, int y ) { if (x < 0 || x >= board_width) @@ -215,7 +70,11 @@ void draw_block( HDC hdc, int x, int y ) (x+1)*block_size - 1, (y+1)*block_size - 1 ); } -BOOL piece_has_block( int type, int orientation, int x, int y ); +BOOL piece_has_block( int type, int orientation, int x, int y ) +{ + int bit = (orientation & 1) ? (x+4*y) : (3-y+4*x); + return (piece[type] & ((orientation & 2) ? (0x8000 >> bit):(1 << bit) )) != 0; +} void draw_next_piece_preview(HDC hdc) { @@ -293,11 +152,6 @@ void set_block( int x, int y, int color ) *ptr = color; } -BOOL piece_has_block( int type, int orientation, int x, int y ) -{ - return piece[ type*64 + orientation*16 + y*4 + x] == 'X'; -} - void block_at_cursor( int type, int orientation, int color ) { int i, j; @@ -391,7 +245,6 @@ BOOL do_rotate() return piece_orientation == new_orientation; } - BYTE get_random_number() { ULONG ticks = GetTickCount(); -- 1.5.6.5 From thomas@hidden Mon Jan 12 22:29:29 2009 From: thomas@hidden (Thomas Horsten) Date: Mon Jan 12 23:32:45 2009 Subject: [PATCH] minitris: New model for pieces and rotation, change width to 10 Message-ID: The rotation in a 4x4 (or 5x5) fixed field is wobbly for some of the pieces. This is fixed by having a size for each piece. The rotation is then more true to the original game. Also, the playing field was changed to be 10 wide as in the original game (and the majority of clones), instead of 11. I know that the upstream has changed before submitting this, I don't feel confident enough with git-rebase to handle a massive conflict like this so I leave it to you Mike ;) --- tools/minitris.c | 87 +++++++++++++++++++++++++++++++++++++---------------- 1 files changed, 61 insertions(+), 26 deletions(-) diff --git a/tools/minitris.c b/tools/minitris.c index e3016e7..abbaeb6 100644 --- a/tools/minitris.c +++ b/tools/minitris.c @@ -2,7 +2,7 @@ #include #include -#define DEFAULT_WIDTH 11 +#define DEFAULT_WIDTH 10 #define DEFAULT_HEIGHT 20 #define DEFAULT_BLOCKSIZE 20 #define PREVIEW_BLOCKSIZE 7 @@ -34,21 +34,30 @@ HPEN null_pen; HWND hwnd; -const unsigned short piece[] = { -// straight - 0x2222, -// bent left - 0x6220, -// bent right - 0x0644, -// T shaped - 0x0e40, -// dogleg left - 0x006c, -// dogleg right - 0x00c6, -// square - 0x0660, +const unsigned int piece[] = { +// The pieces are stored in specially formatted 32-bit integers. + +// The top 8 bits specify the x and y size of the piece (e.g. 0x41 for +// a 4*1 piece). The lower (xsize*ysize) bits are a bitmap of the +// piece. This is used instead of a fixed size e.g. 4x4, so that +// rotation can be done correctly relating to the piece size and +// prevents "wobbling" when rotating the pieces. When displaying, +// every piece is mapped (and centered) to a 5x5 area. + + // straight + 0x41000000 | 0x0f, + // bent left + 0x23000000 | (0x3 << 4) | (0x1 << 2) | 0x1, + // bent right + 0x23000000 | (0x3 << 4) | (0x2 << 2) | 0x2, + // T shaped + 0x32000000 | (0x2 << 3) | 0x7, + // dogleg left + 0x32000000 | (0x3 << 3) | 0x6, + // dogleg right + 0x32000000 | (0x6 << 3) | 0x3, + // square + 0x2200000f, }; ULONG *get_block_ptr( int x, int y ) @@ -72,8 +81,34 @@ void draw_block( HDC hdc, int x, int y ) BOOL piece_has_block( int type, int orientation, int x, int y ) { - int bit = (orientation & 1) ? (x+4*y) : (3-y+4*x); - return (piece[type] & ((orientation & 2) ? (0x8000 >> bit):(1 << bit) )) != 0; + int size_x = (piece[type] & 0xf0000000) >> 28; + int size_y = (piece[type] & 0x0f000000) >> 24; + int new_x, new_y; + BOOL has_block = FALSE; + + // Center in 5x5 area + x = (x - (2-(((orientation & 1)?size_y:size_x)>>1))); + y = (y - (2-(((orientation & 1)?size_x:size_y)>>1))); + if ((x<0)||(y<0)) + return FALSE; + + if ((orientation & 1) == 0) { + new_x = x; + new_y = y; + } else { + new_x = size_x-y-1; + new_y = x; + } + if ((orientation & 2) != 0) { + new_x = size_x-1-new_x; + new_y = size_y-1-new_y; + } + + if ((new_x < 0) || (new_x >= size_x) || (new_y < 0) || (new_y >= size_y)) + has_block = FALSE; + else + has_block = ((piece[type] & ((1<<(size_x*size_y-1)) >> ((new_x + size_x*new_y)))) != 0); + return has_block; } void draw_next_piece_preview(HDC hdc) @@ -82,8 +117,8 @@ void draw_next_piece_preview(HDC hdc) SelectObject( hdc, brushes[0] ); - for (x=0; x<4; x++) - for (y=0; y<4; y++) + for (x=0; x<5; x++) + for (y=0; y<5; y++) { if (piece_has_block(next_piece_type, 0, x, y)) { @@ -124,12 +159,12 @@ void do_paint() SelectObject( hdc, brushes[piece_color] ); for (i=0; i<4; i++) { - for (j=0; j<4; j++) { + for (j=0; j<5; j++) { if (piece_has_block(piece_type, piece_orientation, i, j)) break; } - if (j<4) { + if (j<5) { Rectangle( hdc, (i+piece_x)*block_size, board_height*block_size, (i+piece_x+1)*block_size - 1, board_height*block_size+5 ); } @@ -155,9 +190,9 @@ void set_block( int x, int y, int color ) void block_at_cursor( int type, int orientation, int color ) { int i, j; - for (i=0; i<4; i++) + for (i=0; i<5; i++) { - for (j=0; j<4; j++) + for (j=0; j<5; j++) { if (!piece_has_block( type, orientation, i, j )) continue; @@ -169,9 +204,9 @@ void block_at_cursor( int type, int orientation, int color ) BOOL block_fits_at( int type, int orientation, int x, int y ) { int i, j; - for (i=0; i<4; i++) + for (i=0; i<5; i++) { - for (j=0; j<4; j++) + for (j=0; j<5; j++) { ULONG *ptr; if (!piece_has_block( type, orientation, i, j )) -- 1.5.6.5 From bengen@hidden Tue Jan 13 01:29:15 2009 From: bengen@hidden (Hilko Bengen) Date: Tue Jan 13 01:29:43 2009 Subject: file.cpp: directory_t::count Message-ID: <877i50calg.fsf@msgid.hilluzination.de> While trying to understand file.cpp, I noticed that directory_t::count is not incremented for the special `.' and `..' entries. Is that intentional? -Hilko From wine.msi@hidden Tue Jan 13 09:29:46 2009 From: wine.msi@hidden (Mike McCormack) Date: Tue Jan 13 10:30:13 2009 Subject: file.cpp: directory_t::count In-Reply-To: <877i50calg.fsf@msgid.hilluzination.de> References: <877i50calg.fsf@msgid.hilluzination.de> Message-ID: <496C5F0A.4010504@gmail.com> Hilko Bengen wrote: > While trying to understand file.cpp, I noticed that directory_t::count > is not incremented for the special `.' and `..' entries. Is that > intentional? Hi Hilko, Directory entries are added in directory_t::add_entry(). There's two cases in which the entry won't be appended or counted. One is if it can't be stat'ed, and one is if it doesn't match the mask that was specified when NtQueryDirectoryFile was first called. The mask is specified by the 10th parameter of NtQueryDirectoryFile. I wrote a small interactive test program (tools/qdf.c) that can be used to try out different masks on Windows, and added a short bit of documentation on masks there. Hope that helps, Mike From bengen@hidden Tue Jan 13 13:08:20 2009 From: bengen@hidden (Hilko Bengen) Date: Tue Jan 13 13:08:45 2009 Subject: file.cpp: directory_t::count In-Reply-To: <496C5F0A.4010504@gmail.com> (Mike McCormack's message of "Tue\, 13 Jan 2009 09\:29\:46 +0000") References: <877i50calg.fsf@msgid.hilluzination.de> <496C5F0A.4010504@gmail.com> Message-ID: <873afns91n.fsf@msgid.hilluzination.de> Mike McCormack writes: > Directory entries are added in directory_t::add_entry(). Of course. Apparently, it was too late when I wrote my question. Never mind. :-) -Hilko From wine.msi@hidden Thu Jan 15 23:09:29 2009 From: wine.msi@hidden (Mike McCormack) Date: Fri Jan 16 00:09:57 2009 Subject: Announcing ring3k-0.016 Message-ID: <496FC229.5050308@gmail.com> Hi All, ring3k-0.0.16.tar.gz is now available. This version brings: * A working minitris game^H^H^H^H test application * Various developer usability fixes * build fixes for gcc 4.3.2 The source is available from: http://ring3k.org/ring3k-0.0.16.tar.gz Work is progressing on basic window functionality, out of tree builds, and a 'make install' target. Thanks to all those that have helped with this release. All feedback welcome! Mike From bengen@hidden Tue Jan 20 00:34:14 2009 From: bengen@hidden (Hilko Bengen) Date: Tue Jan 20 00:34:40 2009 Subject: Another idea about getting rid of having to read the /proc/self/ namespace. Message-ID: <87y6x6c1l5.fsf@msgid.hilluzination.de> Hi Mike, here's another try for building internal representations of a directory without having to use the /proc fs. I am not sure if saving the current working directory is needed at all, but I left it in to be sure. I haven't tried compiling it on an etch system, but a quick look into manual pages showed that fchdir() is available there. On my sid system it compiles and the tests run fine. Handling the "." and ".." special cases seemed to make more sense within the add_entry() method, so I moved them there. Cheers, -Hilko diff --git a/kernel/file.cpp b/kernel/file.cpp index 0f54dcb..4dc3dba 100644 --- a/kernel/file.cpp +++ b/kernel/file.cpp @@ -417,25 +417,55 @@ bool directory_t::match(unicode_string_t &name) const void directory_t::add_entry(const char *name) { - char fullname[MAX_PATH]; - sprintf(fullname, "/proc/self/fd/%d/%s", get_fd(), name); + int cwd; dprintf("adding dir entry: %s\n", name); directory_entry_t *ent = new directory_entry_t; + if ( (cwd=::open(".", O_DIRECTORY)) == -1 ) + { + dprintf("failed open current directory (%d).\n", errno); + return; + } + if ( fchdir(get_fd()) == -1 ) + { + dprintf("fchdir() feilad (%d).\n", errno); + goto end; + } ent->name.copy(name); - if (0 != stat(fullname, &ent->st)) + if (0 != stat(name, &ent->st)) { delete ent; - return; + goto end; } if (!match(ent->name)) { delete ent; - return; + goto end; } dprintf("matched mask %pus\n", &mask); //dprintf("mode = %o\n", ent->st.st_mode); - entries.append(ent); + if (strcmp(name, ".") == 0) + { + entries.prepend(ent); + } + else if (strcmp(name, "..") == 0) + { + if (entries.head()->name.Length == 2 && + entries.head()->name.Buffer[0] == '.') + entries.insert_after(entries.head(), ent); + else + entries.prepend(ent); + } + else + { + entries.append(ent); + } count++; +end: + if ( fchdir(cwd) == -1 ) + { + dprintf("fchdir() failed (%d)\n", errno); + } + ::close(cwd); } int directory_t::get_num_entries() const @@ -457,9 +487,6 @@ void directory_t::scandir() } dprintf("reading entries:\n"); - // . and .. always come first - add_entry("."); - add_entry(".."); do { @@ -480,8 +507,6 @@ void directory_t::scandir() if (de->d_reclen <=0 ) break; ofs += de->d_reclen; - if (!strcmp(de->d_name,".") || !strcmp(de->d_name, "..")) - continue; add_entry(de->d_name); } } while (0); From wine.msi@hidden Mon Jan 19 23:57:34 2009 From: wine.msi@hidden (Mike McCormack) Date: Tue Jan 20 00:58:10 2009 Subject: Another idea about getting rid of having to read the /proc/self/ namespace. In-Reply-To: <87y6x6c1l5.fsf@msgid.hilluzination.de> References: <87y6x6c1l5.fsf@msgid.hilluzination.de> Message-ID: <4975136E.7040400@gmail.com> Hi Hilko, > here's another try for building internal representations of a > directory without having to use the /proc fs. I am not sure if saving > the current working directory is needed at all, but I left it in to be > sure. How about using openat()? The manual page claims that it's been available since 2.6.16. http://linux.die.net/man/2/openat > Handling the "." and ".." special cases seemed to make more sense > within the add_entry() method, so I moved them there. The old special case was just 4 lines ... thanks, Mike From johnsr@hidden Tue Jan 20 21:41:55 2009 From: johnsr@hidden (Richard Johns) Date: Tue Jan 20 09:40:36 2009 Subject: additions for the FAQ Message-ID: <49758E53.3030702@woosh.co.nz> For the "What is it?" section ReactOS? is a free, modern operating system based on the design of Windows? XP/2003. Written completely from scratch, it aims to follow the Windows? architecture designed by Microsoft from the hardware level right through to the application level. This is not a Linux based system, and shares none of the unix architecture. http://www.reactos.org/ and the "Where can I learn more about the NT Native API?" section Undocumented Windows 2000 Secrets A Programmer's Cookbook Welcome to the homepage of my book Undocumented Windows 2000 Secrets - A Programmer's Cookbook, published in May, 2001, by Addison-Wesley. Here you find additional information about the contents of this book and its companion CD, as well as the most recent additions and updates. Get the free PDF version of this book! http://undocumented.rawol.com/ -- From wine.msi@hidden Tue Jan 20 09:39:51 2009 From: wine.msi@hidden (Mike McCormack) Date: Tue Jan 20 10:39:59 2009 Subject: additions for the FAQ In-Reply-To: <49758E53.3030702@woosh.co.nz> References: <49758E53.3030702@woosh.co.nz> Message-ID: <392fb48f0901200139x66a9459fse077bca4396c201e@mail.gmail.com> Hi John, 2009/1/20 Richard Johns > For the "What is it?" section > I am aware there are other Windows kernel projects out there. > and the "Where can I learn more about the NT Native API?" section > > Undocumented Windows 2000 Secrets A Programmer's Cookbook > Welcome to the homepage of my book Undocumented Windows 2000 Secrets - A > Programmer's Cookbook, published in May, 2001, by Addison-Wesley. Here you > find additional information about the contents of this book and its > companion CD, as well as the most recent additions and updates. > Get the free PDF version of this book! > > http://undocumented.rawol.com/ > I will add this link to the FAQ page. thanks, Mike -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.infowares.com/archive/ring3k/attachments/20090120/dd92b774/attachment.htm From wine.msi@hidden Thu Jan 22 22:17:02 2009 From: wine.msi@hidden (Mike McCormack) Date: Thu Jan 22 23:17:47 2009 Subject: Announcing ring3k-0.0.17 Message-ID: <4978F05E.7050105@gmail.com> Hi All, ring3k-0.0.17 is tagged, tar'ed, tested and released. Major changes this week were: * Fixes for Ubuntu Intrepid/gcc 4.3.2 * More work on windowing functionality * Removed the the c: symlink minitris still starts as default, and work at the moment is focused around getting enough windowing functionality to run it in a window. Download: http://ring3k.org/ring3k-0.0.17.tar.gz As always, reports of success or otherwise, and suggestions for improving the project or the website are welcome! thanks, Mike commit a55fa0a04875ec1bae36ae3c9b28951b3216d3ea Author: Mike McCormack Date: Thu Jan 22 22:05:09 2009 +0000 Version 0.0.17 commit 6be836fe0f2273373ad410bda2447778f498d75f Author: Mike McCormack Date: Thu Jan 22 22:00:18 2009 +0000 Extract winmine.exe commit 3cd88a6999182e04aad37cb5cb48bf74f82da080 Author: Mike McCormack Date: Wed Jan 21 22:39:18 2009 +0000 Remove minitris POLLED_INPUT define commit 0379a8615a34f41b531c2ca11f9ec340fba4ddac Author: Mike McCormack Date: Tue Jan 20 23:41:14 2009 +0000 Split message functions into a separate file commit c5b08b5cad0940094d4294aee67560e583d80375 Author: Mike McCormack Date: Tue Jan 20 23:06:11 2009 +0000 Split the message queue implementation into a separate file commit 11f91f17760da8c351c6f1fd0a2a0326fcc0303c Author: Mike McCormack Date: Tue Jan 20 23:04:24 2009 +0000 Declare NtUserPostMessage commit 591b9d7942bed00f28fce2fbd1b3181bec34105a Author: Mike McCormack Date: Tue Jan 20 22:35:55 2009 +0000 Stub NtUserPostMessage commit 72de373e93df66739b48a7d6bc627fe84355fac5 Author: Mike McCormack Date: Tue Jan 20 22:30:21 2009 +0000 Send a WM_NULL message to see which NtUser function is called. commit 64afd5de7041e90520a6abc504280958a0822bf5 Author: Mike McCormack Date: Tue Jan 20 22:05:31 2009 +0000 Implement PostQuitMessage commit b6d511d14b4fab7757adb1be9451d50a3a38929c Author: Mike McCormack Date: Tue Jan 20 20:48:13 2009 +0000 Stub for NtUserDispatchMessage and skeleton NtUserGetMessage commit d4c86083fdaa4aa85b3646840572c638b248c257 Author: Mike McCormack Date: Tue Jan 20 20:37:58 2009 +0000 Use Wine's wingdi header commit 1c6b736baffc5d01442d677abbb6ef00b15e49c9 Author: Mike McCormack Date: Tue Jan 20 20:34:56 2009 +0000 Use Wine's wingdi and winuser headers commit 4fe25ecf151b122ec0497b9deb7600b9ea6c019f Author: Mike McCormack Date: Tue Jan 20 19:44:00 2009 +0000 Add NtUserDispatchMessage commit 3dd60994c9d78cca3b6c186a948bb03371f1b8de Author: Mike McCormack Date: Tue Jan 20 19:06:13 2009 +0000 Use mingw32's winuser.h and wingdi.h headers commit ff6e9af0de180ae0e708abeb76eba790f4958cb4 Author: Mike McCormack Date: Mon Jan 19 23:30:45 2009 +0000 Set the cached window handle commit c9a3067319a87ff7aaa4c527710521f701b5961b Author: Mike McCormack Date: Mon Jan 19 21:45:13 2009 +0000 Update minitris when it changes commit 56b6b7317900a9e28d98911b49cecb18af354cdc Author: Mike McCormack Date: Mon Jan 19 21:35:54 2009 +0000 Tools depend on tests to get ntwin32.dll commit 50201362255e0cc60e1d3ddd5a59cd8a9ccb95b9 Author: Mike McCormack Date: Mon Jan 19 21:26:59 2009 +0000 Add dependencies to top level makefile commit fb852248d6c453d14fc35d5f970c8a17f7fb6285 Author: Mike McCormack Date: Sun Jan 18 23:37:58 2009 +0000 Share window data structures with user side commit c5673264342b2bcae0f6344df54d02b60b2645c9 Author: Mike McCormack Date: Sun Jan 18 10:46:21 2009 +0000 Add some extra defines commit d5047fa12cb74a893396cfbd2fe1b85cd8f0fce7 Author: Mike McCormack Date: Sun Jan 18 10:43:54 2009 +0000 Remove the count target commit 2c11ad4e7b583aafdd3cdf68b08e4829592ed6f4 Author: Mike McCormack Date: Sun Jan 18 10:41:41 2009 +0000 Add a bitmap memory manager commit 8a83a75bfcb33e410457dcce7bb76c8312e56eeb Author: Mike McCormack Date: Sat Jan 17 23:00:07 2009 +0000 Add missing DBG_ status codes commit 54f8625c65890aed87ad34a88427172ed9d17c73 Author: Mike McCormack Date: Sat Jan 17 20:45:17 2009 +0000 Add some debug output to minitris commit a82b7f8e224e90621e311f4ecac3cb8e890fe351 Author: Mike McCormack Date: Sat Jan 17 20:44:35 2009 +0000 Handle OutputDebugString messages commit 2c88b81401a2abe2ad6482e0d7c79b3f40bb5902 Author: Mike McCormack Date: Sat Jan 17 18:17:37 2009 +0000 Add user handle shared memory access tracer commit 34ef509eac08f85e047aa3b3dccf971c1d56f7f0 Author: Mike McCormack Date: Sat Jan 17 17:01:22 2009 +0000 Remove the c: link commit 834e6b71a730ae43c0e0c86dceb36efc1c0ff4da Author: Mike McCormack Date: Sat Jan 17 16:48:57 2009 +0000 Use object heirachy in NtDeleteFile commit e92989193289ad6cb0035372a76c714ead514187 Author: Mike McCormack Date: Sat Jan 17 16:15:33 2009 +0000 Fix ring3k-setup for in-tree case commit 2a72a6aede81e53b0fc4c01c02e00d0728bef4bf Author: Mike McCormack Date: Sat Jan 17 16:07:30 2009 +0000 Use object heirachy in NtQueryAttributesFile commit 9274e11ba7e43d44adc2c1cc547641f2f7fd6cfa Author: Mike McCormack Date: Sat Jan 17 16:01:34 2009 +0000 Make sure ntwin32k.dll is installed for tests commit 5bf9f1b02a4dd53578406e82776cb7fcf3f807db Author: Mike McCormack Date: Sat Jan 17 15:44:56 2009 +0000 Make sure to clean all files commit e40d0b881b928ed3a8b4f12786a0175cac436fcd Author: Mike McCormack Date: Sat Jan 17 15:41:47 2009 +0000 Fix a warning commit daa14e83d16debbd5d6b328e3d3b137abb0ab9b2 Author: Mike McCormack Date: Sat Jan 17 15:40:30 2009 +0000 Rework ring3k-setup to work out of tree commit ae8c59f6caf1998ebc04968fd1cfd26a57c44976 Author: Mike McCormack Date: Sat Jan 17 15:09:17 2009 +0000 Install the unpack program commit 0e82150cc02a90979ef5730b5eeb000b1025e6a4 Author: Mike McCormack Date: Sat Jan 17 15:08:58 2009 +0000 Fix kernel install target commit fef80cfb84d90b03a658fbfe25641c8c31d299f6 Author: Mike McCormack Date: Fri Jan 16 23:46:18 2009 +0000 Open the locale files using sections commit f54d1e00a6d96a1871641e9c09b40c8c5e8f561d Author: Mike McCormack Date: Fri Jan 16 23:45:04 2009 +0000 Correct a message commit a3a4a6a973d86cf9702ba447312163d527839729 Author: Mike McCormack Date: Fri Jan 16 22:50:37 2009 +0000 Ignore the correct file commit 330ca065f9ffa779e844da7b05d1b6df4680eaee Author: Mike McCormack Date: Fri Jan 16 22:50:09 2009 +0000 Rename loader directory to kernel commit 1affc12af4ef2498fb6992d3ba0bb37e5810fc8e Author: Mike McCormack Date: Fri Jan 16 22:17:06 2009 +0000 Reuse wineloader's code to set %gs and %fs when the client starts commit 3d9bf584d2190a561975054b408d62a7d1ebac6b Author: Mike McCormack Date: Fri Jan 16 21:55:29 2009 +0000 Let the compiler know memory is clobbered commit 84c389848a0b75e726fa54ebfa7d5b8ef1ce4ac1 Author: Mike McCormack Date: Fri Jan 16 21:29:50 2009 +0000 Allocate window handles properly commit e7567575f697a11c24b5ffea3e7ee19f9955b81d Author: Mike McCormack Date: Fri Jan 16 20:18:39 2009 +0000 Check the unpacker is present commit c0bdd54c494156d52907a31f0dd2c23a4f240ed2 Author: Mike McCormack Date: Fri Jan 16 13:13:57 2009 +0000 Dump registers if we crash in stub code commit 8871b588d2fb7d86fb7a63d8bb43e4bbc9135dcd Author: Mike McCormack Date: Thu Jan 15 23:48:35 2009 +0000 Write the registry out from the setup script commit c6ec06ff762560a5feff2f93a63697c402dd8fc6 Author: Mike McCormack Date: Thu Jan 15 23:44:03 2009 +0000 Rename ntl.cpp to main.cpp From wine.msi@hidden Sat Jan 31 00:32:57 2009 From: wine.msi@hidden (Mike McCormack) Date: Sat Jan 31 01:33:57 2009 Subject: Announcing ring3k-0.0.18 Message-ID: <49839C39.6040907@gmail.com> Hi All, Ring3k-0.0.18 is tar'ed, tested and uploaded, and can be downloaded from the following location: http://ring3k.org/ring3k-0.0.18.tar.gz This week, work has progressed on getting minitris (our test application) to pump a message loop. Tested and (partially) implemented messages now include: WM_NCPAINT, WM_ERASEBKGND, WM_WINDOWPOSCHANGED, WM_NCPAINT, WM_NCACTIVATE, WM_ACTIVATE, WM_WINDOWPOSCHANGING, WM_ACTIVATEAPP Keyboard input is also posted using WM_KEYDOWN and WM_KEYUP. thanks, Mike commit a2d42c418774ec48eadcfbf0864d334a3796e250 Author: Mike McCormack Date: Sat Jan 31 00:13:57 2009 +0000 Version 0.0.18 commit 989028160e2750e9bb44a9398e69f0b75774974b Author: Mike McCormack Date: Sat Jan 31 00:07:45 2009 +0000 Fix a warning commit 01d56a20f04763d0d9146c0e63197d89d34387d0 Author: Mike McCormack Date: Fri Jan 30 23:58:45 2009 +0000 Implement NtUserCallOneParam(NTUCOP_GETWNDPTR) commit e9abe2febc9d8c372671bf7a6b0e2b201475f591 Author: Mike McCormack Date: Fri Jan 30 23:24:45 2009 +0000 Stub NtUserMessageCall commit 1cad49a58931b93a16b55acb15b9c165cac329f7 Author: Mike McCormack Date: Fri Jan 30 23:24:31 2009 +0000 Add a macro to force a message loop in minitris commit 30fcc1f0a0263e77348f769b91880abe105d3087 Author: Mike McCormack Date: Fri Jan 30 22:55:26 2009 +0000 Store the cached window handle and pointer when sending a message commit 33424b6792a6c1647b11e73cd00f4fcc984e85b1 Author: Mike McCormack Date: Fri Jan 30 00:10:24 2009 +0000 Post keyboard messages, don't send them commit f4a29b6a79a0c2830eb45a15e86c259a4bb73789 Author: Mike McCormack Date: Thu Jan 29 23:03:37 2009 +0000 Stub NtUserInvalidateRect commit 0aba5606891630fefc409d9e7da360a234530338 Author: Mike McCormack Date: Thu Jan 29 22:58:08 2009 +0000 Add active window to deadlock detection commit 598e8cc3855fe1bb54481963d501d49d00cc07c9 Author: Mike McCormack Date: Thu Jan 29 22:54:06 2009 +0000 Send WM_KEYDOWN and WM_KEYUP messages on keyboard input commit 3f59cd60f7505b2ea44000dd96f48f1ef4ab562a Author: Mike McCormack Date: Thu Jan 29 22:35:48 2009 +0000 Send WM_NCPAINT, WM_ERASEBKGND and WM_WINDOWPOSCHANGED commit a5174599ef73a8b382cb8f97e8d07494b06e06e2 Author: Mike McCormack Date: Thu Jan 29 21:59:23 2009 +0000 Send WM_NCPAINT message commit 69431a2c5331b3a29ab3f58fb4218b1aff79abd5 Author: Mike McCormack Date: Thu Jan 29 21:17:53 2009 +0000 Update TODO list commit 5344739fa12835072b51d0a3d207ea20d6c16e16 Author: Mike McCormack Date: Thu Jan 29 21:16:10 2009 +0000 Add a help target commit e824920cb3f79c7aabb8d198e764e71dc34412c6 Author: Mike McCormack Date: Thu Jan 29 21:11:26 2009 +0000 Add stat target at top level commit 8dc09301a1d4798a451268e2bc11e794f1a34b6c Author: Mike McCormack Date: Wed Jan 28 01:22:19 2009 +0000 Send WM_NCACTIVATE and WM_ACTIVATE commit 9147670372e8e1b3e06e88176d6fdd3b02c7d1c7 Author: Mike McCormack Date: Wed Jan 28 00:47:47 2009 +0000 Send WM_WINDOWPOSCHANGING and WM_ACTIVATEAPP messages commit f539c5269971adcff88bd6341d04b459d99caea1 Author: Mike McCormack Date: Tue Jan 27 23:51:58 2009 +0000 Base message packers on a template commit b23b75ceafa4ecdc8293968a78c0d4c2aa64b133 Author: Mike McCormack Date: Tue Jan 27 23:37:41 2009 +0000 Use NTCREATEPACKEDINFO from ntuser.h commit 47002127dbb5e03512c1c7f69069f274867d5d65 Author: Mike McCormack Date: Tue Jan 27 23:24:02 2009 +0000 Add a test for visible windows commit 6cf4f341e048b90f90ecdb07bbb9878a7f5984ea Author: Mike McCormack Date: Tue Jan 27 23:22:01 2009 +0000 Add window position callback definitions commit 67d22b667d2ccc31ff65ff541a5a60b4b76756c6 Author: Mike McCormack Date: Tue Jan 27 22:18:56 2009 +0000 Add infrastructure for passing generic messages commit 1b5519858b35fd92ddf491d00084e19e52c940e9 Author: Mike McCormack Date: Tue Jan 27 22:04:05 2009 +0000 Merge test and kernel gdi/user headers commit 379c20c7f6571dae30bb6a58e23e604e5efe9447 Author: Mike McCormack Date: Tue Jan 27 00:10:11 2009 +0000 Add a test for sending WM_NULL and make it pass commit 57a167c992c114a8ecd2124f25dc013227baefa4 Author: Mike McCormack Date: Tue Jan 27 00:04:35 2009 +0000 Initialize all members in unicode_string_t commit be8399095e0a615330c0dd189793d28ced82bd67 Author: Mike McCormack Date: Tue Jan 27 00:02:54 2009 +0000 Generate a backtrace on SIGTRAP (catches gcc malloc errors) commit c22c3c7619d81f44f9472a2f9e972adc731c98e9 Author: Mike McCormack Date: Tue Jan 27 00:02:05 2009 +0000 Tell valgrind about blocks in allocation bitmaps commit 0048eeb0cd0137338ebd5374251d5f80ef74f051 Author: Hilko Bengen Date: Tue Jan 20 10:56:40 2009 +0100 Get rid of /proc/self/fd// trickery