|
From: Nicolas P. <nic...@us...> - 2005-07-09 19:22:43
|
Update of /cvsroot/hipgmap/gmap/com/trileet/gmap In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18377/com/trileet/gmap Modified Files: TileSet.java Log Message: add teeny little display window of tile fetching status in bottom right corner, somehow it makes things feel 'faster' Index: TileSet.java =================================================================== RCS file: /cvsroot/hipgmap/gmap/com/trileet/gmap/TileSet.java,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** TileSet.java 9 Jul 2005 19:06:18 -0000 1.28 --- TileSet.java 9 Jul 2005 19:22:33 -0000 1.29 *************** *** 487,494 **** // draw a little version of our tiles in the corner for cache debugging ! if (false){ ! int startX = 60; ! int startY = 20; ! int width = 10; for (int x = 0; x < getWidth(); x++) { for (int y = 0; y < getHeight(); y++) { --- 487,494 ---- // draw a little version of our tiles in the corner for cache debugging ! if (true){ ! int startX = 220; ! int startY = 120; ! int width = 5; for (int x = 0; x < getWidth(); x++) { for (int y = 0; y < getHeight(); y++) { *************** *** 509,523 **** int drawY = y * TILE_WIDTH - m_offsetY; ! if (drawX > -TILE_WIDTH && drawX < 240 ! && drawY > -TILE_WIDTH && drawY < 160) { ! p.setColor(Color.RED); ! } else { ! p.setColor(Color.BLACK); ! } ! p.drawRect(startX + x * width, startY + y * width, startX + (x+1) * width, startY + (y+1) * width); } } } } --- 509,523 ---- int drawY = y * TILE_WIDTH - m_offsetY; ! p.setColor(Color.BLACK); p.drawRect(startX + x * width, startY + y * width, startX + (x+1) * width, startY + (y+1) * width); } } + + // figure out where our current 'view' is.. + int topX = m_offsetX / 51; + int topY = m_offsetY / 51; + p.setColor(Color.RED); + p.drawRect(startX + topX, startY + topY, startX + topX + 5, startY + topY + 3); } } |