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

556
Announcements / Re: Encryption
« on: March 02, 2010, 04:58:47 PM »
I don't care about encryption; I'll probably make all of my games open-source, anyways.

557
Tips, Tutorials, Examples / Re: lol streams
« on: February 25, 2010, 07:59:47 PM »
Duly noted.
Yeah, I figured that out recently, and decided to mess around with it.

Code: [Select]
typedef char int8;
typedef unsigned char uint8;
std::ostream &operator <<(std::ostream &outstream,int8 value)
 {
 return outstream << (int)value;
 }
std::ostream &operator <<(std::ostream &outstream,uint8 value)
 {
 return outstream << (unsigned int)value;
 }

558
Tips, Tutorials, Examples / lol streams
« on: February 24, 2010, 01:47:59 PM »
Something useful for ENIGMA:

Code: [Select]
std::ostream &operator <<(std::ostream &outstream,__variant &variable)
 {
 if (variable.type)
  {
  return outstream << variable.doubleval;
  }
 return outstream << variable.stringval;
 }
std::istream &operator >>(std::istream &instream,__variant &variable)
 {
 char c,c2;
 c=instream.get();
 if (c>=48 && c<=57)
  {
  instream.putback(c);
  return instream >> variable.doubleval;
  }
 else if (c==46)
  {
  c2=instream.get();
  if (c2>=48 && c2<=57)
   {
   instream.putback(c2);
   instream.putback(c);
   return instream >> variable.doubleval;
   }
  }
 instream.putback(c);
 return instream >> variable.stringval;
 }

You probably should add a typecast operator for var to cast to __variant.

This is from r3's source, though, so, IDK what you've changed.

Also, because I wouldn't know, would this also work for iostream, fstream, and stringstream because they are inherited from istream and ostream, or would it not because this is defined after that?

559
Announcements / Re: Rejoice
« on: February 23, 2010, 08:54:20 PM »
It can't be worse than GM, where one of the constants was cr_arrrow.
...are you serious?

560
Announcements / Re: Rejoice
« on: February 21, 2010, 09:16:58 PM »
types
These are used at compile time only.
I wouldn't know, but thanks for letting me know.

561
Announcements / Re: Rejoice
« on: February 20, 2010, 12:21:59 PM »
http://old.nabble.com/how-to-remove-unused-code--td15548009.html
Yep, that's exactly what I was looking for.  This is what I usually use on compile:
g++ file.cpp -o file -Os -s
and now when I use this:
g++ file.cpp -o file -Os -s -ffunction-sections -fdata-sections -Wl,-gc-sections

It is slightly or significantly smaller depending on how many unused functions/variables/types/whatever that there are.

562
Issues Help Desk / Re: A replacement for draw_text
« on: February 19, 2010, 06:54:28 PM »
I have to put my vote towards doing it in the loading screen, or when draw_text is called, not upon building the .exe, because if the font is not on your computer, Game Maker uses the default font.
...are you suggesting that this should be done in ENIGMA?  ENIGMA won't have a loading screen; it's compiled, and will start instantly.

Unless you mean that you think that GM does it that way.

563
Announcements / Re: Rejoice
« on: February 19, 2010, 06:52:41 PM »
As far as I know, removing unused functions, etc. has a G++ flag, someplace.  Either way, it's great that the parser does it.

And for the record, I have 64-bit Arch Linux installed, in the case that you need a test for a 64-bit Linux machine.

564
Issues Help Desk / Re: A replacement for draw_text
« on: February 19, 2010, 12:31:26 PM »
Retro:
That's when decryption is done and trees are generated.
It still could be done during the loading screen.

565
Issues Help Desk / Re: A replacement for draw_text
« on: February 18, 2010, 10:09:43 PM »
It's probably converted during the massive "LOADING" part of the game.

566
Announcements / Re: Domain Name Provider Transfer
« on: February 18, 2010, 04:36:12 PM »

567
Announcements / Re: Domain Name Provider Transfer
« on: February 17, 2010, 10:20:07 PM »
They could probably save space by using Josh's GMzip's technique. Integrate it into the browser plugin, and they'd lower bandwidth too. Perhaps that's how they already go about it? I'd hope

Also, Retro, why are you talking about compiling bash scripts?
bash applications, meaning, applications that run under bash

probably the wrong term; they're really just unix applications

568
Issues Help Desk / Re: A replacement for draw_text
« on: February 17, 2010, 10:16:35 PM »
Luis:
That would definitely be a consideration if GM was unicode-friendly, but since we know exactly how GM does it, I don't think that's a good idea here. Perhaps for future extensions of draw_text (Listen to us talking about drawing text like we're some sort of connoisseurs. Hmph).
You could probably just check how SFML does it because while it is Unicode-friendly, it probably won't be too far-off.

Also, it makes sense to support both Unicode and ASCII, because there's no point in limiting it to how GM does it.

569
Announcements / Re: Domain Name Provider Transfer
« on: February 13, 2010, 10:45:07 PM »
The only problem is that while MinGW does have Linux/Unix versions, Windows does not have a version of the GCC that can compile bash applications.

570
Announcements / Re: Domain Name Provider Transfer
« on: February 13, 2010, 05:22:13 PM »
u compile..doh