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 - Onurb

Pages: [1]
1
C / Re: can't set sfVector2f in 2.1?
« on: May 07, 2014, 02:41:02 am »
alright thanks my friend i suspected something like that :P

so how do i input 2 floats in the form of a sfVector2f ?? that's what i'm trying to figure out

every time i try to do this i fail, and i can't move my instances by setX or setY commands those don't seem to work either  >:(

sorry for being such a newb, last time i programmed it was C# and i think that has classes.. haven't touched C in a few years at least


this doesn't work either:

sfCircleShape_setPosition(shape,(sfVector2f){wmode.width/2.0f - radius, wmode.height/2.0f - radius})

although i am pretty sure it worked in 2.0? at least one forum claims it did for CSFML 2.0

how do i feed the circleshape_setposition function my set of floats to update it's position? :S i'm baffled lol something definitely eludes me here

2
C / can't set sfVector2f in 2.1?
« on: May 07, 2014, 01:01:50 am »
first of all thanks for development with C sfml, appreciate it too much; however it seems i am in need of some help!

every time i type:

sfVector2f v1(100.f,100.f);

or anything of the sort; and i try compiling, this is what i get

1>sfml_test2.c(20): error C2275: 'sfVector2f' : illegal use of this type as an expression
1>          C:\Program Files (x86)\CSFML-2.1\include\SFML/System/Vector2.h(64) : see declaration of 'sfVector2f'


how do i define a new vector then? anybody help me? it seems it is an illegal use of the type as an expression what i am doing but; why?
the usage in the documentation reads:

http://www.sfml-dev.org/documentation/2.1/classsf_1_1Vector2.php

sf::Vector2f v1(16.5f, 24.f);

that's the example code.

i just don't get it :S i can't make the stuff move without this; and setX doesn't work it seems;
i can't set make the 2 floats into a vector no matter what the manual says!!! sure could use a hand  :-\

Pages: [1]
anything