diff --git a/project/jni/application/lbreakout2/.gitignore b/project/jni/application/lbreakout2/.gitignore index 26612d342..7c49cd1dd 100644 --- a/project/jni/application/lbreakout2/.gitignore +++ b/project/jni/application/lbreakout2/.gitignore @@ -1,3 +1,5 @@ *.o Makefile config.log +*.a +*.so diff --git a/project/jni/application/lbreakout2/AndroidAppSettings.cfg b/project/jni/application/lbreakout2/AndroidAppSettings.cfg index e5dc91d0e..49bceb5a4 100644 --- a/project/jni/application/lbreakout2/AndroidAppSettings.cfg +++ b/project/jni/application/lbreakout2/AndroidAppSettings.cfg @@ -1,5 +1,5 @@ # The application settings for Android libSDL port -AppSettingVersion=7 +AppSettingVersion=8 LibSdlVersion=1.2 AppName="LBreakout2" AppFullName=net.sourceforge.lgames.lbreakout2 @@ -18,6 +18,7 @@ MultiABI=n AppVersionCode=26101 AppVersionName="2.6.1.01" CompiledLibraries="sdl_mixer sdl_image sdl_net intl" +CustomBuildScript=y AppCflags='-DHAVE_CONFIG_H -finline-functions -O2' AppLdflags='' AppSubdirsBuild='src/dummy' diff --git a/project/jni/application/lbreakout2/AndroidBuild.sh b/project/jni/application/lbreakout2/AndroidBuild.sh index 7e523847d..b6a047cb0 100755 --- a/project/jni/application/lbreakout2/AndroidBuild.sh +++ b/project/jni/application/lbreakout2/AndroidBuild.sh @@ -3,6 +3,6 @@ if [ \! -f Makefile ] ; then ../launchConfigure.sh --disable-install --enable-sdl-net LIBS=-lintl fi - +rm -f libapplication.so make mv -f client/lbreakout2 libapplication.so diff --git a/project/jni/application/lbreakout2/client/bricks.c b/project/jni/application/lbreakout2/client/bricks.c index ccb909ada..73059830c 100644 --- a/project/jni/application/lbreakout2/client/bricks.c +++ b/project/jni/application/lbreakout2/client/bricks.c @@ -165,14 +165,16 @@ static void client_brick_grow( int x, int y, int id ) px = x * BRICK_WIDTH; py = y * BRICK_HEIGHT; if (isReplace) - brick_draw( offscreen, x, y, 0 ); + brick_draw( stk_display, x, y, 0 ); else brick_draw_complex( x, y, px, py ); + /* stk_surface_blit( offscreen, px, py, BRICK_WIDTH + shadow_size, BRICK_HEIGHT + shadow_size, stk_display, px, py ); stk_display_store_drect(); + */ } } @@ -190,13 +192,15 @@ Draw all bricks to offscreen surface. void bricks_draw() { int i, j; + /* if ( offscreen == 0 ) return; stk_surface_clip( offscreen, 0, 0, stk_display->w - BRICK_WIDTH, stk_display->h ); + */ for ( j = 1; j < MAP_HEIGHT - 1; j++ ) for ( i = 1; i < MAP_WIDTH - 1; i++ ) if ( game->bricks[i][j].id >= 0 ) - brick_draw( offscreen, i, j, 1 ); - stk_surface_clip( offscreen, 0,0,0,0 ); + brick_draw( stk_display, i, j, 1 ); + //stk_surface_clip( offscreen, 0,0,0,0 ); } /* ==================================================================== @@ -330,13 +334,15 @@ void client_handle_brick_hit( BrickHit *hit ) /* redraw all bricks (leaving shadows in transparent frame parts) */ void client_redraw_all_bricks() { - stk_surface_blit( bkgnd, BRICK_WIDTH, BRICK_HEIGHT, - stk_display->w - BRICK_WIDTH*2,stk_display->h - BRICK_HEIGHT, - offscreen, BRICK_WIDTH, BRICK_HEIGHT ); + stk_surface_blit( bkgnd, 0, 0, + stk_display->w,stk_display->h, + stk_display, 0, 0 ); bricks_draw(); + /* stk_surface_blit( offscreen, BRICK_WIDTH, BRICK_HEIGHT, stk_display->w - BRICK_WIDTH*2,stk_display->h - BRICK_HEIGHT, stk_display, BRICK_WIDTH, BRICK_HEIGHT ); // stk_display_update( STK_UPDATE_ALL ); stk_display_store_drect(); + */ } diff --git a/project/jni/application/lbreakout2/client/frame.c b/project/jni/application/lbreakout2/client/frame.c index 65cc70457..4e64e2b8e 100644 --- a/project/jni/application/lbreakout2/client/frame.c +++ b/project/jni/application/lbreakout2/client/frame.c @@ -158,33 +158,39 @@ void frame_draw() /* left and right part are always drawn */ /* left part */ stk_surface_alpha_blit( fr_left_shadow, 0,0,-1,-1, - offscreen, shadow_size, shadow_size, SHADOW_ALPHA ); - stk_surface_blit( fr_left, 0,0,-1,-1, offscreen, 0,0 ); + stk_display, shadow_size, shadow_size, SHADOW_ALPHA ); + stk_surface_blit( fr_left, 0,0,-1,-1, stk_display, 0,0 ); + /* stk_surface_alpha_blit( fr_left_shadow, 0,0,-1,-1, bkgnd, shadow_size, shadow_size, SHADOW_ALPHA ); stk_surface_blit( fr_left, 0,0,-1,-1, bkgnd, 0,0 ); + */ if ( game->game_type == GT_LOCAL ) { /* add top */ stk_surface_alpha_blit( frame_top_shadow, 0,0,-1,-1, - offscreen, fr_left->w + shadow_size, shadow_size, SHADOW_ALPHA ); + stk_display, fr_left->w + shadow_size, shadow_size, SHADOW_ALPHA ); stk_surface_blit( - frame_top, 0,0,-1,-1, offscreen, fr_left->w,0 ); + frame_top, 0,0,-1,-1, stk_display, fr_left->w,0 ); + /* stk_surface_alpha_blit( frame_top_shadow, 0,0,-1,-1, bkgnd, fr_left->w + shadow_size, shadow_size, SHADOW_ALPHA ); stk_surface_blit( frame_top, 0,0,-1,-1, bkgnd, fr_left->w,0 ); + */ } /* right part */ stk_surface_alpha_blit( fr_right_shadow, 0,0,-1,-1, - offscreen, stk_display->w - fr_right_shadow->w + shadow_size, + stk_display, stk_display->w - fr_right_shadow->w + shadow_size, shadow_size, SHADOW_ALPHA ); - stk_surface_blit( fr_right, 0,0,-1,-1, offscreen, + stk_surface_blit( fr_right, 0,0,-1,-1, stk_display, stk_display->w - fr_right->w,0 ); + /* stk_surface_alpha_blit( fr_right_shadow, 0,0,-1,-1, bkgnd, stk_display->w - fr_right_shadow->w + shadow_size, shadow_size, SHADOW_ALPHA ); stk_surface_blit( fr_right, 0,0,-1,-1, bkgnd, stk_display->w - fr_right->w,0 ); + */ } /* ==================================================================== @@ -205,7 +211,7 @@ void frame_draw_lives( int lives, int max_lives ) else y = BRICK_HEIGHT * 2; stk_surface_blit( lamps, 0,y, BRICK_WIDTH, BRICK_HEIGHT, - offscreen, 0, ( MAP_HEIGHT - i - 1 ) * BRICK_HEIGHT ); + stk_display, 0, ( MAP_HEIGHT - i - 1 ) * BRICK_HEIGHT ); } /* get position of next lamp */ new_life_y = stk_display->h - lives * BRICK_HEIGHT; diff --git a/project/jni/application/lbreakout2/client/game.c b/project/jni/application/lbreakout2/client/game.c index 03234dfbf..336533821 100644 --- a/project/jni/application/lbreakout2/client/game.c +++ b/project/jni/application/lbreakout2/client/game.c @@ -347,8 +347,8 @@ static void display_bonus_level_score() /* begin frame by hiding all objects */ static void begin_frame( void ) { + /* int i; - displays_hide(); frame_info_hide(); extras_hide(); @@ -364,12 +364,25 @@ static void begin_frame( void ) shine_hide(); exps_hide(); credit_hide(); + */ } /* end frame by drawing all objects and updating the screen */ static void end_frame( void ) { int i; + + if ( game->game_type == GT_LOCAL && cur_player ) + bkgnd_draw( bkgnd, bkgnd_ids[cur_player->level_id] ); + else + bkgnd_draw( bkgnd, -1 ); + /* add frame */ + frame_draw(); + /* add bricks */ + bricks_draw(); + /* draw lives */ + if ( game->game_type == GT_LOCAL && cur_player ) + frame_draw_lives( cur_player->lives, game->diff->max_lives ); /* show -- some things will be missing if darkness is enabled */ balls_show_shadow(); diff --git a/project/jni/application/lbreakout2/client/misc.c b/project/jni/application/lbreakout2/client/misc.c index 20abdd2f6..11024743b 100644 --- a/project/jni/application/lbreakout2/client/misc.c +++ b/project/jni/application/lbreakout2/client/misc.c @@ -61,7 +61,7 @@ void bkgnd_draw( SDL_Surface *bkgnd, int id ) } /* draw to offscreen */ - stk_surface_blit( bkgnd, 0,0,-1,-1, offscreen, 0,0 ); + stk_surface_blit( bkgnd, 0,0,-1,-1, stk_display, 0,0 ); } /* ==================================================================== diff --git a/project/jni/application/lbreakout2/client/shots.c b/project/jni/application/lbreakout2/client/shots.c index 83c9b152f..f2f130a36 100644 --- a/project/jni/application/lbreakout2/client/shots.c +++ b/project/jni/application/lbreakout2/client/shots.c @@ -81,11 +81,13 @@ void shots_show() stk_surface_alpha_blit( shot_pic, (int)shot->cur_fr * shot_w, 0, shot_w, shot_h, stk_display, x, y, shot_alpha ); + /* shot->update_rect.x = x; shot->update_rect.y = y; shot->update_rect.w = shot_w + shadow_size; shot->update_rect.h = shot_h + shadow_size; stk_display_store_rect( &shot->update_rect ); + */ } stk_surface_clip( stk_display, 0, 0, 0, 0 ); } diff --git a/project/jni/application/lbreakout2/client/shrapnells.c b/project/jni/application/lbreakout2/client/shrapnells.c index 53c12321f..5ab7e6bb3 100644 --- a/project/jni/application/lbreakout2/client/shrapnells.c +++ b/project/jni/application/lbreakout2/client/shrapnells.c @@ -209,7 +209,7 @@ void shrapnells_show() stk_surface_blit( shr->pic, 0,0,shr->pic->w,shr->pic->h, stk_display, (int)shr->x, (int)shr->y ); - stk_display_store_drect(); + //stk_display_store_drect(); } } /* diff --git a/project/jni/application/lbreakout2/common/libcommon.a b/project/jni/application/lbreakout2/common/libcommon.a deleted file mode 100644 index 5021544c1..000000000 Binary files a/project/jni/application/lbreakout2/common/libcommon.a and /dev/null differ diff --git a/project/jni/application/lbreakout2/game/libgame.a b/project/jni/application/lbreakout2/game/libgame.a deleted file mode 100644 index 03056e28a..000000000 Binary files a/project/jni/application/lbreakout2/game/libgame.a and /dev/null differ diff --git a/project/jni/application/lbreakout2/gui/libGui.a b/project/jni/application/lbreakout2/gui/libGui.a deleted file mode 100644 index 9511b29a4..000000000 Binary files a/project/jni/application/lbreakout2/gui/libGui.a and /dev/null differ diff --git a/project/jni/application/lbreakout2/gui/stk.c b/project/jni/application/lbreakout2/gui/stk.c index 233cd2283..6497fc3ed 100644 --- a/project/jni/application/lbreakout2/gui/stk.c +++ b/project/jni/application/lbreakout2/gui/stk.c @@ -431,6 +431,7 @@ If NULL is passed as 'rect' the whole screen is stored for update. */ void stk_display_store_rect( SDL_Rect *rect ) { + #if 0 if ( stk_update_rect_count < STK_UPDATE_RECT_LIMIT ) { if ( rect ) { /* for safety this check is kept although it should be @@ -453,6 +454,7 @@ void stk_display_store_rect( SDL_Rect *rect ) else stk_update_rect_count = STK_UPDATE_RECT_LIMIT; } + #endif } /* @@ -463,8 +465,10 @@ modified this rectangle to the actually updated clipping region. */ void stk_display_store_drect( void ) { + /* if ( stk_update_rect_count < STK_UPDATE_RECT_LIMIT ) stk_update_rects[stk_update_rect_count++] = stk_drect; + */ } /* diff --git a/project/jni/application/lbreakout2/libapplication.so b/project/jni/application/lbreakout2/libapplication.so deleted file mode 100755 index 758fbcda9..000000000 Binary files a/project/jni/application/lbreakout2/libapplication.so and /dev/null differ