asamy / forgottenmapeditor

Map editor written in lua for Open Tibia. Written with OtClient's framework.
Other
46 stars 20 forks source link

Needed functions #30

Closed tosty33 closed 11 years ago

tosty33 commented 11 years ago

Hello, I think that some new functions will be needed:

asamy commented 11 years ago

g_map.beginGhostMode() .. do the rendering ... g_map.endGhostMode()

Is OK?

tosty33 commented 11 years ago

Yeah, something like that, for example: move(32, 0) for moving right, move(-14, 0) for moving left etc. I think that ghost functions will be ok. :-)

asamy commented 11 years ago

move(-14, 0) ? well, tibia sprites are all 32x32, so 14 pixels is like moving half the tile on the left. Maybe I misunderstood something, mind explaining further?

tosty33 commented 11 years ago

You've misunderstood me. ~16 pixels isn't like moving half the tile on the left, tiles on the map can have 8, 16, 32, 64 etc. pixels (depending on the actual zoom level). For example: http://i.imgur.com/jk84bJW.png

This function should be useful, cause moving by one tile by 'setCameraPosition' function isn't too smooth or is too fast on some zool levels. Also it'll allow to make moving around the map more precise.

asamy commented 11 years ago

Alright, so, here's the ghost functions prototype:

opacity:

asamy commented 11 years ago

OTClient's upstream commit https://github.com/edubart/otclient/commit/56d6ef6642dfa10ada0f71cff7df6d0058540731 implements the needed functions.