Map Movement in BitBlt
Map Movement in BitBlt
Map Movement in BitBlt
Map Movement in BitBlt
Map Movement in BitBlt
Map Movement in BitBlt Map Movement in BitBlt Map Movement in BitBlt Map Movement in BitBlt Map Movement in BitBlt Map Movement in BitBlt Map Movement in BitBlt Map Movement in BitBlt
Map Movement in BitBlt Map Movement in BitBlt
Map Movement in BitBlt
Go Back  Xtreme Visual Basic Talk > > > Map Movement in BitBlt


Reply
 
Thread Tools Display Modes
  #21  
Old 12-01-2004, 08:37 PM
Iceplug's Avatar
IceplugMap Movement in BitBlt Iceplug is offline
MetaCenturion

Retired Moderator
* Guru *
 
Join Date: Aug 2001
Location: Iowa, USA
Posts: 16,583
Default


OK (maybe the 3rd time's a charm?)
intCarry = MapTile(X, Y)
Raises an error because MapTile is not initialized.

You need to set MapTile's bounds to tW and tH... but in order to do that, you have to calculate tW and tH before the Paint event is raised... Preferably in the CreateMap subroutine.
Add a tW and tH to your Map structure and, in the CreateMap, calculate the values for tW and tH... put them in your map. Then, create the array (also in CreateMap perhaps)
MapTile = New Integer (tW, tH) {}

Now, you should be able to put values into your Map tile array.
__________________

Iceplug, USN
Quadrill 1 Quadrill 2 (full) Quadrill 3 JumpCross .NET Website is ALIVE! - DL Platform Tour for VB.NET! Posting Guidelines Hint: Specify your location in your user cp profile if you want compassion!
Reply With Quote
  #22  
Old 12-02-2004, 08:19 AM
theController theController is offline
Centurion
 
Join Date: May 2004
Posts: 120
Default

Quote:
Originally Posted by Iceplug
OK (maybe the 3rd time's a charm?)
intCarry = MapTile(X, Y)
Raises an error because MapTile is not initialized.

You need to set MapTile's bounds to tW and tH... but in order to do that, you have to calculate tW and tH before the Paint event is raised... Preferably in the CreateMap subroutine.
Add a tW and tH to your Map structure and, in the CreateMap, calculate the values for tW and tH... put them in your map. Then, create the array (also in CreateMap perhaps)
MapTile = New Integer (tW, tH) {}

Now, you should be able to put values into your Map tile array.
MapTile = New Integer (tW, tH) {} does not allow me to put any values in the {}

and I still get everything to equal 0 if I leave them open.
Reply With Quote
  #23  
Old 12-02-2004, 07:44 PM
Iceplug's Avatar
IceplugMap Movement in BitBlt Iceplug is offline
MetaCenturion

Retired Moderator
* Guru *
 
Join Date: Aug 2001
Location: Iowa, USA
Posts: 16,583
Default

But, you should be able to put values into the array during the CreateMap routine and draw your map now.
Your map size is fixed, therefore you do not need to hardcode the array by putting values into the {}.

MapTile(24, 10) = 1
MapTile(6, 27) = 2
__________________

Iceplug, USN
Quadrill 1 Quadrill 2 (full) Quadrill 3 JumpCross .NET Website is ALIVE! - DL Platform Tour for VB.NET! Posting Guidelines Hint: Specify your location in your user cp profile if you want compassion!
Reply With Quote
  #24  
Old 12-02-2004, 08:04 PM
theController theController is offline
Centurion
 
Join Date: May 2004
Posts: 120
Default

Quote:
Originally Posted by Iceplug

MapTile(24, 10) = 1
MapTile(6, 27) = 2
errrrrrrrrr, this still produces a tileset of all 0's (all the same pictures)..

I mean, i knew this would be a hard task, but I didnt think I was THIS dumb.
Reply With Quote
  #25  
Old 12-02-2004, 08:18 PM
Iceplug's Avatar
IceplugMap Movement in BitBlt Iceplug is offline
MetaCenturion

Retired Moderator
* Guru *
 
Join Date: Aug 2001
Location: Iowa, USA
Posts: 16,583
Default

Where did you put that code?
__________________

Iceplug, USN
Quadrill 1 Quadrill 2 (full) Quadrill 3 JumpCross .NET Website is ALIVE! - DL Platform Tour for VB.NET! Posting Guidelines Hint: Specify your location in your user cp profile if you want compassion!
Reply With Quote
  #26  
Old 12-02-2004, 08:24 PM
theController theController is offline
Centurion
 
Join Date: May 2004
Posts: 120
Default

Quote:
Originally Posted by Iceplug
Where did you put that code?
In order:

Code:
MapTile = New Integer(tW, tH) {}

        MapTile(0, 0) = 1

        'Set up new tile
        TilePic(0) = New Bitmap(Application.StartupPath & "\..\PicTile0.bmp")
        TilePic(1) = New Bitmap(Application.StartupPath & "\..\PicTile1.bmp")

        intCarry = MapTile(tW, tH)
in the CreateMap routine.

But it still displays the 0 tile.
Reply With Quote
  #27  
Old 12-02-2004, 08:31 PM
Iceplug's Avatar
IceplugMap Movement in BitBlt Iceplug is offline
MetaCenturion

Retired Moderator
* Guru *
 
Join Date: Aug 2001
Location: Iowa, USA
Posts: 16,583
Default

This line:
intCarry = MapTile(tW, tH)
does not belong in the same subroutine as the other lines in your code block.

I was asking where did you post this code?
MapTile(24, 10) = 1
MapTile(6, 27) = 1

This is where you set some of the tiles to 1 and it *should* occur before you draw the map.
__________________

Iceplug, USN
Quadrill 1 Quadrill 2 (full) Quadrill 3 JumpCross .NET Website is ALIVE! - DL Platform Tour for VB.NET! Posting Guidelines Hint: Specify your location in your user cp profile if you want compassion!
Reply With Quote
  #28  
Old 12-02-2004, 10:57 PM
theController theController is offline
Centurion
 
Join Date: May 2004
Posts: 120
Default

Quote:
Originally Posted by Iceplug
This line:
intCarry = MapTile(tW, tH)
does not belong in the same subroutine as the other lines in your code block.

I was asking where did you post this code?
MapTile(24, 10) = 1
MapTile(6, 27) = 1

This is where you set some of the tiles to 1 and it *should* occur before you draw the map.
YES! lol at this time at night, I have finally got it to work!

*thinks* the order in which you put the code will change the project

hooray!

Thank you so much!

Last edited by theController; 12-03-2004 at 08:05 PM.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Map Movement in BitBlt
Map Movement in BitBlt
Map Movement in BitBlt Map Movement in BitBlt
Map Movement in BitBlt
Map Movement in BitBlt
Map Movement in BitBlt Map Movement in BitBlt Map Movement in BitBlt Map Movement in BitBlt Map Movement in BitBlt Map Movement in BitBlt Map Movement in BitBlt
Map Movement in BitBlt
Map Movement in BitBlt
 
Map Movement in BitBlt
Map Movement in BitBlt
 
-->