PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Button Mapping with Rotation

It seems that PF 0.8.1 with PHAL is rotating the buttons on top of the rotation that is done internal to PHAL.

In other words, the DeviceToLogical( int& button ) should be removed - else the buttons don't map correctly (at least with respect to what I'd expect).

I'm suprised that the stylus point DeviceToLogical is needed, since I thought that the PHAL would have already rotated things before PF. But this rotation ends up being correct, it's just the up/down/left/right that is screwy.

Jason
PocketHAL will not remap any key. But it will update the KeyList structure using the orientation you specify.

So the PocketFrog remapping of key should be removed and the stylus should be remapped instead.
I've been switching back and forth between eVC3 and eVC4 lately. Everything is OK with rotation of buttons, but I ran into something strange.

It appears that when using eVC4 to compile PFrog, the DeviceToLogical for the stylus is not being executed (i.e. the FROG_PPC was not defined ?). I've double checked this by using the blit sample (if you grab one of the objects, up/down is actually right/left).

Code:

LRESULT Game::OnMouseEvent( UINT msg, WPARAM wparam, LPARAM lparam, BOOL& bHandled )
{
Point P( LOWORD(lparam), HIWORD(lparam) );

#if defined(FROG_PPC)
DeviceToLogical( P );
#endif


I've traced it down to the "defs.h" file where FROG_PPC 'should' be defined when I build with either eVC3 or 4. It seems that _WIN32_WCE_PSPC should be defined for my build, yet it isn't. The problem is possilby with the config of my projects, but the blit sample was unmodified.

BTW, I do get errors stating that the target doesn't match the device (ARM SA1100), so maybe this is keeping the FROG_PPC from being defined?
I still do not understand why the FROG_PPC (or more specifically, the _WIN32_WCE_PSPC) isn't being defined automatically in eVC4.

I can add it manually under the preprocessor definitions and all is well, though.


It makes me wonder what kind of havok could be caused by neither FROG_PC or FROG_PPC being defined could cause... Especially since I have a smartphone build of a game in circulation.