Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Welcome to the Rockbox Technical Forums!

+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Theming and Appearance Customization
| | |-+  SKIN BEHAVIOUR CHANGE: draw images when the tag is hit instead of at the end
« previous next »
  • Print
Pages: [1]

Author Topic: SKIN BEHAVIOUR CHANGE: draw images when the tag is hit instead of at the end  (Read 1341 times)

Offline JdGordon

  • Member
  • *
  • Posts: 1817
  • Constantly breaking stuff
SKIN BEHAVIOUR CHANGE: draw images when the tag is hit instead of at the end
« on: March 21, 2010, 05:22:51 AM »
Hi all,
I've started a quick patch which changes the draw order of images in the skins and I need help testing.

http://www.rockbox.org/tracker/task/11133

What this does is instead of drawing all images in each viewport at the end of that viewport, each are now drawn when the %xd tag is hit. This should allow you to have text overlap the images, and maybe other fun stuff.

The important thing is that the behaviour changes so some themes might need fixing, I'm curious to know which and how things break.

My goal is to follow the skin file order 100% to give themers complete control how things are drawn.
Logged


Using PMs to annoy devs about bugs/patches is not a good way to have the issue looked at.

Offline Yotto

  • Artist
  • Member
  • *
  • Posts: 826
  • Every Silver Lining has a Cloud
    • My Blog
Re: SKIN BEHAVIOUR CHANGE: draw images when the tag is hit instead of at the end
« Reply #1 on: March 21, 2010, 11:53:07 AM »
I created a new simulator using today's build (r24504-100321), and this failed to patch because of a one-space difference between the source and patch. Here's the rej file:
Code: [Select]
***************
*** 471,478 ****
          case WPS_TOKEN_ALBUMART_DISPLAY:
              if (!data->albumart)
                  return NULL;
-             if (!data->albumart->draw)
-                 data->albumart->draw = true;
              return NULL;
  #endif
 
--- 471,478 ----
          case WPS_TOKEN_ALBUMART_DISPLAY:
              if (!data->albumart)
                  return NULL;
+             draw_album_art(gwps, playback_current_aa_hid(data->playback_aa_slot),
+                            false);
              return NULL;
  #endif

I was able to patch manually with no problems.

In trying to test this, I'm having some issues. Using the following code:
Code: [Select]
This text should be behind all bitmaps
%x|a|test1.bmp|10|10|
Here's text after the first bitmap
It should be on top of it.
But behind the second bitmap.
Here comes another test bitmap...
%x|b|test2.bmp|50|10|
And this should be on top of everything!
The following screen is shown on the UNPATCHED daily build:

(Note: This is what you'd expect because the images are loading last)

The following, however, is displayed using your patch (Ignore the status bar, that's not the problem):

(This is not what I'd expect)

Because images are loading in other WPSs (They all look normal), I compared my code to other WPSs. %x, by itself, is never used. So, I preloaded the bitmaps like so:
Code: [Select]
This text should be behind all bitmaps
%xl|a|test1.bmp|10|10|
%xda
Here's text after the first bitmap
It should be on top of it.
But behind the second bitmap.
Here comes another test bitmap...
%xl|b|test2.bmp|50|10|
%xdb
And this should be on top of everything!

And while it worked, it added line breaks that I don't think I can get rid of:
Logged
Pulp Audio Weekly - Where we talk about News, Reviews, and pretty much anything else we feel like discussing.

Offline karashata

  • Rockbox Expert
  • Member
  • *
  • Posts: 603
  • Just a fluffy dragon with too much time on my paws
    • Alex Vanderpol (karashata) on Twitter
Re: SKIN BEHAVIOUR CHANGE: draw images when the tag is hit instead of at the end
« Reply #2 on: March 21, 2010, 04:02:00 PM »
I would try moving the image preload tags both to the top of the WPS file and see if that removes the line breaks, if that doesn't do it the next thing would be to move the image display tags to the end of the previous line or the beginning of the next line...
Logged
Welp, my iriver H10 20GB is out of commission again.

Offline JdGordon

  • Member
  • *
  • Posts: 1817
  • Constantly breaking stuff
Re: SKIN BEHAVIOUR CHANGE: draw images when the tag is hit instead of at the end
« Reply #3 on: March 21, 2010, 07:42:06 PM »
yeah,which version did you use? %x seems to still have issues. It shold work though  :/
Logged


Using PMs to annoy devs about bugs/patches is not a good way to have the issue looked at.

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Theming and Appearance Customization
| | |-+  SKIN BEHAVIOUR CHANGE: draw images when the tag is hit instead of at the end
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.079 seconds with 16 queries.