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.


Topics - Weeve

Pages: [1]
1
General / Linking change from v1.6?
« on: September 13, 2013, 01:45:16 am »
Haven't messed with SFML since v1.6, and in my old project, I finally got all the 1.6 Upper-camel & event name changes switched over to 2.0, and now its not finding the libs to link to (likely a name change?)

I'm useing Qt's .pro, current code snippet:
LIBS += -l sfml-system -l sfml-window -l sfml-graphics

Errors, basically library not found:
error: sfml-system: No such file or directory
error: sfml-window: No such file or directory
error: sfml-graphics: No such file or directory

Haven't messed with this section of code in a long time, and still learning C++, ty for the help :-)

2
Graphics / The way to draw a Isometric square the fastest
« on: March 21, 2013, 07:26:48 pm »
I want to draw a 2D isometric square the fastest, the bottom two corners will always be empty, the top two might be filled (on buildings, for example, which have height above the size of the tile)

Speed is my largest concern, I don't care how messy/hard it is

I'm wanting to make an Age Of Empires II like game, if that gives you a better idea of possibilities

3
System / No Operand * and Operand / for sf::Vector2*sf::Vector2
« on: February 17, 2013, 07:00:06 am »
Sfml 2.0 Release candidate.

irritatingly, there is no * and / operator for two sf::Vector2s.. its easily avoidable by doing a memberwise multiplication myself, just... irritating, if there is a *= and /=, why not have a * and / operator?

4
Window / No sf::RenderWindow.setStyle() or sf::RenderWindow.setFullscreen()
« on: February 17, 2013, 03:49:33 am »
I need to be able to let the user change whether the window is fullscreen or not, via an options menu, after finding no function existed, I tried creating a new window, and replacing the old one, but got an 'sf::NonCopyable' complaint

A solution on how to avoid NonCopyable, or how to change the style, or setFullscreen would be greatly beloved  ;D

If there is no way around either, can you make a setStyle() or a setFullscreen()?

this is semi-project-halting, ie: I can finish this section until this is resolved, but I have other things I could work on, and leave this hanging

5
When I hover my mouse over the resize-able area of the window (bottom and right edge) the cursor doesn't change as it should to the double arrow cursor

What triggers the error:
sf::RenderWindow.setMouseCursorVisible(true);

I am using:
default Window styles,
Sfml 2.0,
OS: Windows XP Professional, Sp.3,
Compiler: Qt Creator (Mingw internal)

My project isn't halted by this, its just annoying  :-\

6
probably did something stupid, or do not have proper understanding of sf::Texture:

// Pic is a valid sf::Texture pointer, created in main
Class::Class(sf::Texture* Pic){
   // _Texture is a member variable, so is _Sprite
   // currently only use of _Texture
   _Texture = *Pic; // assign _Texture to the value of Pic
   _Sprite = sf::Sprite(_Texture); // does not work, white rectangle drawn
   //_Sprite = sf::Sprite(*Pic);   draws the proper Texture
}
 

7
Graphics / What is this black magic thou speak of?
« on: February 04, 2013, 01:59:33 am »
If a sf::Transform is a matrix, then its an odd one, since it contains position, but the position numbers are already filled in when I use sf::Sprite.getTransform(), another odd aspect is, not only the position is filled in, but it was the inverse of the object's matrix, at least the result was the inverse of what I expected when I used sf::Transform.transformPoint, whether that function inverted it, or it was inverted from .getTranform I don't know, but it needs looking into, inverse calculations are expensive on matrices. Also, perhaps weirder, when I use sf::Transform.getInverse(), then use the inverted matrix for the transformPoint() call I expected it to act as a world-space to object-space transformation, instead, I got a weird number, either aroun -3000 or +3000 on the x and y axis, when the distance between the two for each axis is only about 400-900;

I would like to know what the black magic of sf::Transform is, and why it is so difficult to use, and if there is a way I can just get a 2x2 matrix, like, two sf::Vector2<float>'s or (float,float,float,float)? or can someone give me the correct order of transformations to go from global space to object space(origin at sprite origin, same for rotation)?

8
General discussions / When will SFML 2.0 be the Current version?
« on: February 01, 2013, 11:28:02 pm »
I've been using SFML 1.6 for a while now, because I don't want to mess with any errors from 2.0 beta, or have to deal with the major version change, so I've been dodging required features, and it looks like its just about here, does anyone have a guess on a timeframe?

9
Graphics / Changing the Hue of a Sprite
« on: February 01, 2013, 02:38:16 am »
Since sf::Sprite.SetColor() is only for editing current color values, should I manually edit the pixels of the image each time, then reload them into the Sprite, or should I have three separate images of the different hues, and swap to a different image when needed, and use SetColor() to modify the color values? I would like the most efficient method, and I don't mind low level work, I'm used to it :-)

also, if I do end up writing a SetHue() function for a sf::Sprite, would sfml integrate it for me, so that I can avoid code bloat?

10
Graphics / Best Way to get the position of an indexed pixel
« on: February 01, 2013, 02:29:44 am »
I guess a noob question, but I was wondering if sf::Sprite.GetMatrix() returns (X.x, X.y, 0, Y.x, Y.y,0,0,0,0), since it was claiming to be a Matrix3 (I assume SFML equiv of a Matrix3x3)? and if it does, is this data relevant to a sf::Sprite that has been rotated and scaled? or will it be relevant to its rotation, but have scaled vectors? and can I request that SFML will in the future have options to edit the Matrix directly, and that it will have a Matrix2.

or would it be wiser to construct the matrix myself, including the data I require? I want to know so that I can write a per-pixel collision function

11
Window / Feature Request: GetSelected() for sf::Window
« on: January 08, 2013, 05:09:47 pm »
I need a feature where you can check if your sf::Window is the currently selected window, I need this because my program uses SetCursorPosition and ShowMouseCursor to lock the mouse to the middle of the screen, however, if you deselect the window, SetCursorPosition is still jamming the mouse to the position I set  ???  (Windows XP is my OS), so I would prefer if you would either make SetCursorPosition only works if the window is selected, or I would need some way to check if the window is selected so I can make the functionality. if you do consider making either feature, please Email me *****, as my project will be waiting on this, until then, I'm going to fudge it and make ESC unlock the mouse until the window is clicked again, but there are several flaws with doing so :'( , will be waiting for the email, and good luck!  ;D

12
Graphics / Object rotation as opposed to inertial rotation of a point
« on: February 27, 2012, 12:03:46 am »
Hey, I can't figure out how in the world to get object rotation, but I got inertial rotation down, I was wondering if anyone could explain it better? heres my rotation code on the y axis for inertial (yrot being the value, _Matrix is a member variable for the current rotation) and I wrote it all by hand, so it might be a little unfamiliaure

Code: [Select]
void MeshObject::RotateY(float roty){
    for (unsigned int i=0;i<_verts.size();++i){
        sf::Vector3<float> transform( _verts[i].x - _Position.x, _verts[i].y - _Position.y, _verts[i].z - _Position.z );

        _verts[i] = transform;
    }

    float cosy = cos(roty);
    float siny = sin(roty);
    sf::Vector3<float> XMatrix(cosy,0,-siny);
    sf::Vector3<float> ZMatrix(siny,0,cosy);

    sf::Vector3<float> XMtransform((XMatrix * _XMatrix.x) + (ZMatrix * _XMatrix.z) + sf::Vector3<float>(0,_XMatrix.y,0));
    sf::Vector3<float> ZMtransform((XMatrix * _ZMatrix.x) + (ZMatrix * _ZMatrix.z) + sf::Vector3<float>(0,_ZMatrix.y,0));

    _XMatrix = XMtransform;
    _ZMatrix = ZMtransform;

    for (unsigned int i=0;i<_verts.size();++i){
        sf::Vector3<float> transform((XMatrix * _verts[i].x) + (ZMatrix * _verts[i].z) + sf::Vector3<float>(0,_verts[i].y,0));
        _verts[i] = transform;
    }

    for (unsigned int i=0;i<_verts.size();++i){
        sf::Vector3<float> transform( _verts[i].x + _Position.x, _verts[i].y + _Position.y, _verts[i].z + _Position.z );

        _verts[i] = transform;
    }
}

13
Graphics / SFML & OpenGL, complaint that my image is too large?
« on: February 19, 2012, 03:25:34 am »
Well, first of all I'd like to know the limit, it loaded a 200x200, but when I try to load the 4096x4096, I get

"Failed to create image, its internal size is too high (4096x4096)"

, any way I could get a resolution that large, and is it a SFML complaint, or an OpenGL complaint?

14
General / How do I get the resolution of a screen?
« on: October 21, 2011, 08:30:43 pm »
how do I get the pixel size of a screen? im making a full screen game based on a 32X32 pixel grid. I need to be able to find the centre, and set the background sprite's size accuratley

15
Window / What type is a sf::Key::Down?
« on: October 20, 2011, 02:02:49 pm »
I want to make a array to hold 4 keys, but I don't know what type to assign it, so that I can make the array. I'm using C++. example,

(KeyTypeHere) Controls[4];

Pages: [1]
anything