diff --git a/nbsdgames b/nbsdgames new file mode 160000 index 0000000..f27eb28 --- /dev/null +++ b/nbsdgames @@ -0,0 +1 @@ +Subproject commit f27eb28a8c22aa899019d1ae194d4d0592317336 diff --git a/sources/battleship.c b/sources/battleship.c index fb09d08..40f41df 100644 --- a/sources/battleship.c +++ b/sources/battleship.c @@ -46,7 +46,11 @@ void sigint_handler(int x){ } void mouseinput(bool ingame){ MEVENT minput; - getmouse(&minput); + #ifdef PDCURSES + nc_getmouse(&minput); + #else + getmouse(&minput); + #endif if(minput.bstate & (BUTTON1_CLICKED|BUTTON1_RELEASED)){ if( minput.y-4 < 10){ if( (ingame && minput.x-23<20 && minput.x-23>=0 ) || (!ingame && minput.x-1<20) ){//it most be on the trackboard if ingame is true diff --git a/sources/checkers.c b/sources/checkers.c index bbbefc6..8dcc5fb 100644 --- a/sources/checkers.c +++ b/sources/checkers.c @@ -440,7 +440,11 @@ void sigint_handler(int x){ void mouseinput(void){ MEVENT minput; - getmouse(&minput); + #ifdef PDCURSES + nc_getmouse(&minput); + #else + getmouse(&minput); + #endif if( minput.y-4 <8 && minput.x-1<16){ py=minput.y-4; px=(minput.x-1)/2; diff --git a/sources/fifteen.c b/sources/fifteen.c index a08c305..410fda0 100644 --- a/sources/fifteen.c +++ b/sources/fifteen.c @@ -135,7 +135,11 @@ void sigint_handler(int x){ } void mouseinput(void){ MEVENT minput; + #ifdef PDCURSES + nc_getmouse(&minput); + #else getmouse(&minput); + #endif if( minput.y-4