As for the fix for the stylus orentation mapping, here's what I did (warning, I don't even try to adhere to any variable naming convention):
added to game.h in the private section
- Code: Select all
1int styluswidth, stylusheight;1 lines; 1 keywds; 0 nums; 2 ops; 0 strs; 0 coms Syntactic Coloring v0.4 - Dan East
added this to the END of Game::Init in game.cpp
- Code: Select all
1
2
3
4
5stylusheight = m_display->GetHeight();
styluswidth = m_display->GetWidth();
if (m_config.orientation == ORIENTATION_ROTATE90CW || m_config.orientation == ORIENTATION_ROTATE90CCW)
swap( stylusheight, styluswidth );5 lines; 1 keywds; 0 nums; 26 ops; 0 strs; 0 coms Syntactic Coloring v0.4 - Dan East
Changed DeviceToLogical in game.cpp
- Code: Select all
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20void Game::DeviceToLogical( Point& P ) const
{
switch (m_config.orientation)
{
case ORIENTATION_ROTATE90CCW:
swap( P.x, P.y );
P.x = stylusheight - 1 - P.x;
break;
case ORIENTATION_ROTATE90CW:
swap( P.x, P.y );
P.y = styluswidth - 1 - P.y;
break;
case ORIENTATION_ROTATE180:
P.x = styluswidth - 1 - P.x;
P.y = stylusheight - 1 - P.y;
break;
}
}20 lines; 9 keywds; 4 nums; 54 ops; 0 strs; 0 coms Syntactic Coloring v0.4 - Dan East
It may be no better than just using m_display->GetHeight() in the DeviceToLogical function, but I didn't.
(edit: I didn't have the swap for landscape)
Eventually, I'll get around to submitting a mod to the sourceforge...

