Harris6310 Posted September 30, 2009 Author Share Posted September 30, 2009 I would like to know how to make this code to have 32 tiles wide and 24 tiles high.``` NewX = 12 NewY = 9 NewPlayerY = Player(MyIndex).y - NewY NewPlayerX = Player(MyIndex).x - NewX NewX = NewX * PIC_X NewY = NewY * PIC_Y NewXOffset = Player(MyIndex).xOffset NewYOffset = Player(MyIndex).yOffset If Player(MyIndex).y - 9 < 1 Then NewY = Player(MyIndex).y * PIC_Y + Player(MyIndex).yOffset NewYOffset = 0 NewPlayerY = 0 If Player(MyIndex).y = 9 And Player(MyIndex).Dir = DIR_UP Then NewPlayerY = Player(MyIndex).y - 9 NewY = 9 * PIC_Y NewYOffset = Player(MyIndex).yOffset End If ElseIf Player(MyIndex).y + 11 > MAX_MAPY + 1 Then NewY = (Player(MyIndex).y - (MAX_MAPY - 18)) * PIC_Y + Player(MyIndex).yOffset NewYOffset = 0 NewPlayerY = MAX_MAPY - 18 If Player(MyIndex).y = MAX_MAPY - 9 And Player(MyIndex).Dir = DIR_DOWN Then NewPlayerY = Player(MyIndex).y - 9 NewY = 9 * PIC_Y NewYOffset = Player(MyIndex).yOffset End If End If If Player(MyIndex).x - 12 < 1 Then NewX = Player(MyIndex).x * PIC_X + Player(MyIndex).xOffset NewXOffset = 0 NewPlayerX = 0 If Player(MyIndex).x = 12 And Player(MyIndex).Dir = DIR_LEFT Then NewPlayerX = Player(MyIndex).x - 12 NewX = 12 * PIC_X NewXOffset = Player(MyIndex).xOffset End If ElseIf Player(MyIndex).x + 14 > MAX_MAPX + 1 Then NewX = (Player(MyIndex).x - (MAX_MAPX - 24)) * PIC_X + Player(MyIndex).xOffset NewXOffset = 0 NewPlayerX = MAX_MAPX - 24 If Player(MyIndex).x = MAX_MAPX - 12 And Player(MyIndex).Dir = DIR_RIGHT Then NewPlayerX = Player(MyIndex).x - 12 NewX = 12 * PIC_X NewXOffset = Player(MyIndex).xOffset End If End If ScreenX = GetScreenLeft(MyIndex) ScreenY = GetScreenTop(MyIndex) ScreenX2 = GetScreenRight(MyIndex) ScreenY2 = GetScreenBottom(MyIndex) If ScreenX < 0 Then ScreenX = 0 ScreenX2 = 25 ElseIf ScreenX2 > MAX_MAPX Then ScreenX2 = MAX_MAPX ScreenX = MAX_MAPX - 25 End If If ScreenY < 0 Then ScreenY = 0 ScreenY2 = 19 ElseIf ScreenY2 > MAX_MAPY Then ScreenY2 = MAX_MAPY ScreenY = MAX_MAPY - 19 End If ``````Public Function GetScreenLeft(ByVal Index As Long) As Long GetScreenLeft = GetPlayerX(Index) - 12End FunctionPublic Function GetScreenTop(ByVal Index As Long) As Long GetScreenTop = GetPlayerY(Index) - 9End FunctionPublic Function GetScreenRight(ByVal Index As Long) As Long GetScreenRight = GetPlayerX(Index) + 12End FunctionPublic Function GetScreenBottom(ByVal Index As Long) As Long GetScreenBottom = GetPlayerY(Index) + 9End Function```Please help! Link to comment Share on other sites More sharing options...
Robin Posted September 30, 2009 Share Posted September 30, 2009 Holy Christ that code is ugly. >____>; Link to comment Share on other sites More sharing options...
Harris6310 Posted September 30, 2009 Author Share Posted September 30, 2009 In what way? Link to comment Share on other sites More sharing options...
Harris6310 Posted October 1, 2009 Author Share Posted October 1, 2009 Bump Link to comment Share on other sites More sharing options...
xeross Posted October 1, 2009 Share Posted October 1, 2009 @Haggis:> In what way?In the way that eclipse is poorly coded. First you'd have to change the picscreen size accordingly and then you need to adjust some values to the new size. Link to comment Share on other sites More sharing options...
Harris6310 Posted October 21, 2009 Author Share Posted October 21, 2009 Bump-teh. Link to comment Share on other sites More sharing options...
Harris6310 Posted October 21, 2009 Author Share Posted October 21, 2009 Bump-teh. Link to comment Share on other sites More sharing options...
anasky Posted October 22, 2009 Share Posted October 22, 2009 It's basically impossible if you don't know what you're doing, let's stick to that.I think I've seen a tutorial about it though in the toturial section. Link to comment Share on other sites More sharing options...
anasky Posted October 22, 2009 Share Posted October 22, 2009 It's basically impossible if you don't know what you're doing, let's stick to that.I think I've seen a tutorial about it though in the toturial section. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now