Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > PocketBook > PocketBook Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 10-21-2011, 03:05 PM   #1
mtt
Junior Member
mtt began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Oct 2011
Device: PocketBook Pro 903
Screen updating issue

Hi guys,

I'm writing game for PocketBook. Now my prototype simply use GSensor to move a square.

In an infinite loop, I'm filling squares with WHITE color (for erase square filled in prevous step) and BLACK (drawing current square position):

Code:
/* some calculations here*/
FillArea(old_x, old_y, 20, 20, WHITE);
FillArea(cur_x, cur_y, 20, 20, BLACK);

/* DynamicUpdateBW for minimal area covering whole updated area */
DynamicUpdateBW(mini(cur_x, old_x), mini(cur_y, old_y), maxi(cur_x + 20, old_x + 20) - mini(cur_x, old_x), maxi(cur_y + 20, old_y + 20) - mini(cur_y, old_y));
Everything is ok with drawing square in new position, but erasing old-position square doesn't work, even if I invert colors (white&black instead of B&W).

I noticed that:
* everything is ok, if square moves very,very slow.
* everything is ok, when I'm using PartialUpdateBW(), but this function is *very* slow.

I tried to use threads (for calculations and drawing or for calculations and erasing, using old-positions queue), but with no success...:/


Could anyone help?
mtt is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Screen issue... again? domagoj Amazon Kindle 5 02-05-2011 08:31 AM
Classic Is anyone having an issue with The Daily not updating? Gabey8 Barnes & Noble NOOK 6 06-04-2010 02:14 AM
Screen Issue RogueKB Sony Reader 3 06-13-2009 04:36 AM
Updating Issue on Ubuntu FrankNBeans Calibre 6 06-06-2009 04:14 PM
not updating screen refresh disappointing overall? hello Sony Reader 10 10-06-2007 11:35 AM


All times are GMT -4. The time now is 06:28 AM.


MobileRead.com is a privately owned, operated and funded community.