• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!
  • Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Question - Code Issue with Views

spacerobot

Member
Ok I ported my project over and mostly everything is running. I have a map screen that when I press the map key it creates a map object and pauses the game. The map screen draws borders around each side of the view. It appears to be drawing everything, but not in the view. It's all off centered and sometimes I can't see the map border or player position.

What exactly is going on with this code? What are the underscores for like _view_get and e_VW?

Code:
draw_sprite_ext(sSubBottom,0,__view_get( e__VW.XView, 0 ),__view_get( e__VW.YView, 0 )-OffY+__view_get( e__VW.HView, 0 )-32,1,1,0,image_blend,TabAlpha);
draw_sprite_ext(sSubTop,0,__view_get( e__VW.XView, 0 ),__view_get( e__VW.YView, 0 )+OffY,1,1,0,image_blend,TabAlpha);
draw_sprite_ext(sSubLeft,0,__view_get( e__VW.XView, 0 )+OffY,__view_get( e__VW.YView, 0 ),1,1,0,image_blend,TabAlpha);
draw_sprite_ext(sSubRight,0,__view_get( e__VW.XView, 0 )-OffY+__view_get( e__VW.WView, 0 )-32,__view_get( e__VW.YView, 0 ),1,1,0,image_blend,TabAlpha);
Here is the original for reference. Any ideas on why this isn't drawing to the view and staying locked there?

Code:
draw_sprite_ext(sSubBottom,0,view_xview,view_yview-OffY+view_hview-32,1,1,0,image_blend,TabAlpha);
draw_sprite_ext(sSubTop,0,view_xview,view_yview+OffY,1,1,0,image_blend,TabAlpha);
draw_sprite_ext(sSubLeft,0,view_xview+OffY,view_yview,1,1,0,image_blend,TabAlpha);
draw_sprite_ext(sSubRight,0,view_xview-OffY+view_wview-32,view_yview,1,1,0,image_blend,TabAlpha);
 

Nocturne

Friendly Tyrant
Forum Staff
Admin
Look in the compatibility scripts that are created when you import a 1.4 project. The __view functions use them to replicate 1.4 styles. The full compatibility report that shows everything changed on import is in the Notes section of the resource tree too. If you can pinpoint the issue, file a bug as the compatibility stuff should "just work", but there will always be edge cases that will need looking at.
 
Top