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

Pages: [1]
1
Network / [Bug - v1.3 & SVN!] sf::Packet
« on: August 24, 2008, 04:56:31 pm »
Quote from: "Laurent"
Quote from: "NeWsOfTzzz"
You should put that into the tutorial of the network package! :)

I did... Unless you were speaking of the EndOfPacket function ?


Oh true, I just read it, sorry! I just didn't notice it as a solution for my problem because it was in another context :P

Ye well I think it's nearly a philosophical question to check if you can read before or after you read :p

2
Network / [Bug - v1.3 & SVN!] sf::Packet
« on: August 24, 2008, 02:39:49 pm »
Hmm maybe you are right :p

You should put that into the tutorial of the network package! :)

3
Network / [Bug - v1.3 & SVN!] sf::Packet
« on: August 23, 2008, 12:30:46 am »
Quote from: "Laurent"
Quote
Because if myReadPos + Size == myData.size() all bytes were already read and no more bytes can be read.

So the last extraction was ok and the packet reports a valid state. Only the next attempt to extract data will put the packet in an invalid state.

The boolean operator checks what has been done previously, not what can be done.


Who'd need that??

I changed SVN and compiled it for me so this works, but I tell you what I need it for:

I put several packets in one packet (several commands, like display map or display this, move this) and then I need to check if more is there.

So I do
Code: [Select]
uint8_t protocolID;
while(packet)
{
  packet >> protocolID;
  switch(protocolID)
  {
    ..BLAH..
  }
}


Why would I need a function that tells me if there was an error in the past?

So if this is really intended by you then I request a function either
bool IsReadable()
or
uint32_t GetRemainingSize()

4
Network / [Bug - v1.3 & SVN!] sf::Packet
« on: August 22, 2008, 06:45:46 pm »
There is a bug in the packet class in the function CheckSize which affects the bool() function to check if the packet is still readable

for 1.3:
Code: [Select]
00367 bool Packet::CheckSize(std::size_t Size)
00368 {
00369     if (myIsValid && (myReadPos + Size <= myData.size()))
00370     {
00371         return true;
00372     }
00373     else
00374     {
00375         myIsValid = false;
00376         return false;
00377     }
00378 }

change to
Code: [Select]
00367 bool Packet::CheckSize(std::size_t Size)
00368 {
00369     if (myIsValid && (myReadPos + Size < myData.size()))
00370     {
00371         return true;
00372     }
00373     else
00374     {
00375         myIsValid = false;
00376         return false;
00377     }
00378 }







for SVN:
Code: [Select]
00400 bool Packet::CheckSize(std::size_t Size)
00401 {
00402     myIsValid = myIsValid && (myReadPos + Size <= myData.size());
00403
00404     return myIsValid;
00405 }

change to
Code: [Select]
00400 bool Packet::CheckSize(std::size_t Size)
00401 {
00402     myIsValid = myIsValid && (myReadPos + Size < myData.size());
00403
00404     return myIsValid;
00405 }


Because if myReadPos + Size == myData.size() all bytes were already read and no more bytes can be read.








.

5
Feature requests / sf::IPAddress::ToUin32_t()
« on: August 21, 2008, 04:20:22 pm »
Not to forget I'd also like to have a constructor for an uint32_t.

Why? Simple, to send IPs over network easy and with lowest possible bandwitdth use!

6
Feature requests / sf::IPAddress::ToUin32_t()
« on: August 21, 2008, 04:12:19 pm »
The uint32_t is already there but inaccessible as private :/

7
Graphics / Draw Missing!?
« on: August 21, 2008, 02:34:57 am »
@Wizzard: wrong, 2 errors :/

Correct version:
Code: [Select]
for (unsigned int x = 0; x < 5; ++x)
{
    for (unsigned int y = 0; y < 6; ++y)
    {
        Money[x + y * 5].SetImage(money[x]);
    }
}


And why?
Code: [Select]
sf::Sprite Money[31];
30 was enough!






@qsik, your problem is simple, you scale the sprites to zero
Code: [Select]
for (int i = 0; i < 30; i++)
   {
      ImageWidth = money[i].GetWidth();
      ImageHeight = money[i].GetHeight();
      ImageWidth = ((ScreenWidth/6) / ImageWidth);
      ImageHeight = ((ScreenHeight/6) / ImageHeight);
      Money[i].Scale(ImageWidth, ImageHeight);
   };


change to
Code: [Select]
  for (int i = 0; i < 30; i++)
   {
      ImageWidth = money[0].GetWidth();
      ImageHeight = money[0].GetHeight();
      ImageWidth = ((ScreenWidth/6) / ImageWidth);
      ImageHeight = ((ScreenHeight/6) / ImageHeight);
      Money[i].Scale(ImageWidth, ImageHeight);
   };


Your loop tries to access image[0] to image[29] but you only have image[0] to image[4].. Got it? ;)
.
.
.
.
.
.
.
.
.
.
.

8
General discussions / Favicon missing in documentation
« on: August 20, 2008, 04:09:52 pm »
Just a small bug but whatever, as soon as you enter the documentation (i.e. http://www.sfml-dev.org/documentation/1.3/ ) the favicon is missing, you should add following line in the HTML header:

Code: [Select]
<link rel="icon"       type="image/gif" href="http://www.sfml-dev.org/images/favicon.gif"/>

9
Feature requests / C++ (And others too) aliases for functions
« on: August 20, 2008, 03:26:46 pm »
Quote from: "Laurent"
Quote
Could I make them and you implement them?

No.

And why exactly? It'd be only an alias and people could choose if they want to use the uppercase or lowercase version and those aliases don't add any extra space in the executable, because the compiler handles them as the same function!

10
Feature requests / C++ (And others too) aliases for functions
« on: August 20, 2008, 03:22:15 pm »
Quote from: "Laurent"
Quote
The standard is to write methods with a lower-case letter, so could you make aliases for functions to have them as lower-case version too?

No :)
Could I make them and you implement them?

Quote
PS: You need any help in coding?

I always need help to port SFML to new languages or systems ;)
I don't need anything but Windows/Linux and C++ so it wouldn't be in my interest!

11
If I use this function (in Windows) there is a bug. If i hold down my mouse button, move out of the window and release it there, the input class still thinks my left mouse button is pressed! Even if I reenter the window with my mouse, it still thinks the mouse button is pressed! Only if I press the mouse button again it'll no more think that it is pressed.

12
Feature requests / Bugtracker/Forum
« on: August 20, 2008, 02:53:43 pm »
There is nor a bugtracker neither a special forum where to post bugs. Would be appreciated!

PS: Okay there already is a tracker (standard SF tracker) but it is not configured and noone uses it. Maybe you should make that link public somewhere and configure the tracker?

http://sourceforge.net/tracker/?group_id=188964&atid=927427

13
Feature requests / C++ (And others too) aliases for functions
« on: August 20, 2008, 02:36:08 pm »
The standard is to write methods with a lower-case letter, so could you make aliases for functions to have them as lower-case version too?

So for example

sf::String::GetText you make an alias sf::String::getText in the c++ version. This won't hurt anybody but will surely help your libraries in spreading!

PS: You need any help in coding? Your library is exactly what I always wanted :p

14
Feature requests / Width of a sf::String?
« on: August 20, 2008, 02:32:08 pm »
Just as you say it I found it! I posted too fast :/
It was not in the tutorial though! ;)

I didn't see the "GetRect()" function even though i looked 2 times over all functions of the string class -.-

Can be closed, sorry :p

ATM I'm using 1.3 though..

15
Feature requests / Width of a sf::String?
« on: August 20, 2008, 02:21:09 pm »
Is there any way to find out the width of a text? For example to cut it if it gets too long or to display a cursor?

Pages: [1]
anything