[Jrisk-cvs] SF.net SVN: jrisk:[371] Domination/src_android/net/yura/domination/mobile/ PicturePanel
Brought to you by:
yuranet
From: <yu...@us...> - 2010-05-20 12:24:59
|
Revision: 371 http://jrisk.svn.sourceforge.net/jrisk/?rev=371&view=rev Author: yuranet Date: 2010-05-20 12:24:50 +0000 (Thu, 20 May 2010) Log Message: ----------- lot less mem used in pp Modified Paths: -------------- Domination/src_android/net/yura/domination/mobile/PicturePanel.java Modified: Domination/src_android/net/yura/domination/mobile/PicturePanel.java =================================================================== --- Domination/src_android/net/yura/domination/mobile/PicturePanel.java 2010-05-20 12:01:21 UTC (rev 370) +++ Domination/src_android/net/yura/domination/mobile/PicturePanel.java 2010-05-20 12:24:50 UTC (rev 371) @@ -112,6 +112,8 @@ RiskGame game = myrisk.getGame(); + original = null; + Image m = Image.createImage(RiskUtil.openMapStream(game.getImageMap()) ); Image O = Image.createImage(RiskUtil.openMapStream(game.getImagePic()) ); @@ -152,12 +154,11 @@ countryImage cci; + int[] pixels = new int[m.getWidth()]; - // create a very big 2d array with all the data from the image map for(int y=0; y < m.getHeight(); y++) { - int[] pixels = new int[m.getWidth()]; m.getRGB(pixels,0,m.getWidth(),0,y,m.getWidth(),1); for(int x=0; x < m.getWidth(); x++) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |