I recently followed Presto's instructions to modify image.cpp to remove dependency on imgdecmp.dll by using SHLoadImage instead.
This works great on WM2005 devices as well as older (2002/2003) devices. However, I'm finding that the font class (written by Thomas 'gersen' Maniero) no longer works with this change. The bitmap fonts display correctly on WM2005 devices, but if I load my game on early 2003 devices, the bitmap fonts won't display at all.
From what I can tell, the m_rect surface size that is used in the Font::draw method is not being generated correctly.
- Code: Select all
display->Blit(x, y, m_surf, &m_rect[str[i]]);1 lines; 0 keywds; 0 nums; 13 ops; 0 strs; 0 coms Syntactic Coloring v0.4 - Dan East
I can pass in a &Rect with a fixed size and get part of the font bitmap to display which tells me this may be part of the problem. However, I don't have the expertise to understand the font class well enough to come up with a real solution.
Does anyone else use the font class with the WM2005 updates (SHLoadImage) for PocketFrog? If so, did you have to make any changes to the font class to get your bitmap fonts to display on both WM2005 and 2002/2003 devices?