Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Tile system problem  (Read 1735 times)

0 Members and 1 Guest are viewing this topic.

OutlawLee

  • Jr. Member
  • **
  • Posts: 50
  • This is my personal text. Dont read it.
    • View Profile
    • Email
Tile system problem
« on: May 06, 2012, 02:02:43 pm »
Hi, im new here.
Since i dowloaded sfml 2.0 im trying to convert "SFML Tiled Map Loader v0.1"  by Walker,
http://en.sfml-dev.org/forums/index.php?topic=3023.0

Its written for sfml 1.6, so the image functions dont work.

Im trying to convert everything that was loading to images, to load to textures.

First problem i cant change: GetHeight() and GetWidth() since they got removed in 2.0? or they dont exist for textures.


Thx.

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Re: Tile system problem
« Reply #1 on: May 06, 2012, 02:57:37 pm »
sf::Texture::getSize()
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

OutlawLee

  • Jr. Member
  • **
  • Posts: 50
  • This is my personal text. Dont read it.
    • View Profile
    • Email
Re: Tile system problem
« Reply #2 on: May 06, 2012, 03:25:59 pm »
But doesnt that return the number of pixels instead of the width and height ?

or i have to calculate myself the width and height from the pixels

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Tile system problem
« Reply #3 on: May 06, 2012, 03:39:12 pm »
Quote
But doesnt that return the number of pixels instead of the width and height ?
No :)
Laurent Gomila - SFML developer

mateandmetal

  • Full Member
  • ***
  • Posts: 171
  • The bird is the word
    • View Profile
    • my blog
Re: Tile system problem
« Reply #4 on: May 07, 2012, 01:38:36 am »
Quote
Vector2u sf::Texture::getSize() const

Width = getSize().x
Height = getSize().y

 ;)
- Mate (beverage) addict
- Heavy metal addict _lml
- SFML 2 addict
- My first (and free) game: BichingISH!