0

I am copying JSTileMap and LFCGzipUtility into the project and when I run the application it generates several warnings for both files.

However, when I run the provided sample from github, I don't see any of those warnings.

I would like to know why is there a difference, and in case, what am I doing wrong?

For reference please visit, https://github.com/slycrel/JSTileMap

Clarification, I would like to know if there is anything I should change in the project settings, rather than debug the code that runs just fine and without any warnings on the provided sample at the links above.

user2421700
  • 149
  • 8
  • 1
    jecht is correct, 64 bit translation has not yet happened. It's already on my list to take care of that. It was a mistake to use NSInteger and NSUInteger, I will need to correct that. I'll see about getting to that this week. – slycrel Mar 05 '14 at 15:26
  • 1
    The github repo is now updated, removing the warnings. – slycrel Mar 08 '14 at 18:19

1 Answers1

1

if you are running your app in the iOS simulator 64 bit mode then the problem is that the files of JSTileMap are not updated to 64 bit architecture

Apple documents says


Code that relies on the NSInteger and CGFloat types needs to be carefully examined.

Start by building the app for the 64-bit runtime, fixing any warnings that occur as well as searching your code for specific 64-bit issues. For example:

Make sure all function calls have a proper prototype. Avoid truncating 64-bit values by accidentally assigning them to a 32-bit data type. Ensure that calculations are performed correctly in the 64-bit version of your app. Create data structures whose layouts are identical in the 32-bit and 64-bit versions of your app (such as when you write a data file to iCloud).


here is the Apple's transition guide to 64 bit:

https://developer.apple.com/library/ios/documentation/General/Conceptual/CocoaTouch64BitGuide/Introduction/Introduction.html

if that is not your case the open the file JSTileMap.m, inside press command + f type warning and press enter

and you will find all the warnings that JSTileMap want you to see just comment all warning and thats it

Here i show you all the warnings

#warning these appear to be incorrect for iso maps when used for tile objects!  Unsure why the math is different between objects and regular tiles.

#warning This needs to be optimized into tilemap layers like our regular layers above for performance reasons.

#warning the positioning is off here, seems to be bottom-left instead of top-left.

#warning need to write setTileGidAt:

Good Luck!!

Julio Montoya
  • 1,614
  • 1
  • 12
  • 14
  • Thanks, but as I had mentioned earlier the sample provided by the author doesn't have any warnings. Please see the link below, https://github.com/slycrel/JSTileMap I want to know what he did that the sample doesn't have any warnings but when the files are added to anew project it generates all those warnings. – user2421700 Mar 04 '14 at 22:57
  • can you tell the warnings? – Julio Montoya Mar 04 '14 at 23:53
  • As I mentioned, sample provided by the author of JSTileMap doesn't have any warnings, but when I add them to my project (a typical Sprite Kit template) I get warnings, such as the following, Implicit conversion loses integers precision... – user2421700 Mar 05 '14 at 01:10
  • 1
    i know that the sample provided by the author don't have warnings i was asking for the warnings of your project, as i said in my answer you are running your app in the 64 bit simulator instead in 32 bit, JSTileMap is not updated to 64 bit, if you run your app in 32 bit simulator you should have no warnings – Julio Montoya Mar 05 '14 at 02:07
  • Thanks, that clarified a lot of things out of a sudden. Its all about 32bit vs 64bit. Much appreciated. – user2421700 Mar 05 '14 at 22:58