cinap_lenrek ,
@cinap_lenrek@hj.9fs.net avatar

actually, implementing it is not too hard.

take a look at pc/screen.c.

essentially, tilting works by having gscreen being a shadow framebuffer (softscreen)
with the rotated/tilted dimension.

and flushmemscreen() copies changed rectangle from gscreen in tilted
coordinates into the real framebuffer.

one also needs to tilt also the mouse coordinates and the mouse cursor bitmap
in cursoron().

the tilting codes are as follows:

0 = none,
1 = left,
2 = inverted,
3 = right,

note that negating a tilt code yields the inverse operation so when you apply -tilt code
to tiltpt()/tiltrect() on transformed coordinates to get the original back.

-0 & 3 = 0 none
-1 & 3 = 3 right
-2 & 3 = 2 inverted
-3 & 3 = 1 left

CC: @icoon @mcz @bubstance

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • test
  • worldmews
  • mews
  • All magazines