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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - sadin97

Pages: [1]
1
Graphics / Re: Is it possible to remove "transparent" background of sprite?
« on: September 23, 2017, 11:46:48 pm »
FRex solution is indeed simpler. In that case how could I check which pixel is clicked and more important is that pixel transparent or not? ::)

Thank you both for replying!

2
Graphics / Is it possible to remove "transparent" background of sprite?
« on: September 23, 2017, 10:25:46 pm »
If this is a sprite:



Blue color is transparent (I just marked it as color to help me explain question).

How can I than make only selectable this tree. Is it possible?
Is it possible to just select everything within red border of the sprite?

Because, I have some sprites that I'm drawing behind and in front of and I can only detect the whole rectangle of sprite. Is there any solution for this?

3
Graphics / Re: Exception Thrown at line where I defined sf::Texture
« on: September 17, 2017, 09:44:00 pm »
A reference works the same way for any type. If you don't know how a reference works, you should go back to pure C++ for a bit and read it up in a good C++ book. ;)

Okay, thanks for help! :)

4
Graphics / Re: Exception Thrown at line where I defined sf::Texture
« on: September 17, 2017, 06:48:49 pm »
Pass by reference.

Can you post some simple examples using textures?

5
Graphics / Re: Exception Thrown at line where I defined sf::Texture
« on: September 16, 2017, 10:33:08 pm »
Some SFML resources can't be declared in the global scope. They do internal stuff during their construction and destruction, which involves other global variables that may not be available due to non-deterministic order of initialization of globals.

So... any hint? How should I use same texture in other file if it is even possible?

6
Graphics / Re: Exception Thrown at line where I defined sf::Texture
« on: September 15, 2017, 12:48:27 am »
You're probably using the wrong DLLs, e.g. outdated DLLs, x64 vs x86 mismatch or DLLs with different runtime libraries. Make sure everything is matching and that you don't have old libraries and keep in mind that VS comes with two kinds of compilers, one for x86 and one for x64, you have to pick the right one.

Are you sure that is the problem? I can use generally sf::Texture... but with this making it extern I got problems.

7
Graphics / Exception Thrown at line where I defined sf::Texture
« on: September 14, 2017, 10:34:28 pm »
Code: [Select]
Exception thrown at 0x7749B2E3 (ntdll.dll) in App.exe: 0xC0000005: Access violation writing location 0x00000004.

At line:

Code: [Select]
sf::Texture seaTexture;
In file resources.cpp

I also put:

Code: [Select]
extern sf::Texture seaTexture;
in file resources.h

So... can I do something like this. Im using seaTexture in another file so I tried to put extern to it.

8
General / Sprite overrides another sprite (isometric tiles/map)
« on: September 05, 2017, 09:41:58 pm »
I managed to make isometric map but I have problem on overriding sprites while selecting the certain tile.

I made isometric map from this 1 tile:



I made something like this:



Which is the problem.

When I select one of blue tiles (and I clicked in area where is grey rectangular) program (mouse) detects all of tiles in that area.

Now, the question is how will I change this grid perspective and fix this problem.
I found some similiar questions on forum but couldn't fix this problem.



How to change "grid" or what it is called from yellow to green. So when I click desirable tile that and only that tile would be selected.

Thanks and sorry for my bad English.


Pages: [1]
anything