Just convention, I think. Parenthesis make it look like a function when its an operator. I've never actually seen it used like that before.short wrote:What is the difference between the lack of parenthesis?
Search found 384 matches
- Mon May 17, 2010 6:04 pm
- Forum: Programming Discussion
- Topic: deleting an object
- Replies: 9
- Views: 625
Re: deleting an object
- Mon May 17, 2010 12:31 pm
- Forum: General/Off-Topic
- Topic: Global Case Race!!!
- Replies: 20
- Views: 2044
Re: Global Case Race!!!
Okay guys... I just had fucking TWELVE shots of Captain Morgans' spiced Rum. Fucking TWELVE. Imagine how fucked I am. Rofl!! Good thing I'm not dumb enough to fuck with the toolkit's source. XD I love you guys. Thx. I had a night like that while playing a drinking game. I haven't touched rum since.
- Mon May 17, 2010 12:18 am
- Forum: Programming Discussion
- Topic: SFML VS 2010 Binaries
- Replies: 8
- Views: 841
Re: SFML VS 2010 Binaries
Just started playing with SFML about an hour ago. Fuuuck, why have I been such a little SDL gay baby for so long? This shit owns.
- Sat May 15, 2010 11:27 am
- Forum: Programming Discussion
- Topic: SDL_Surface passing
- Replies: 5
- Views: 538
Re: SDL_Surface passing
Code: Select all
bool Player::Render(SDL_Surface* screen);
- Fri May 14, 2010 10:33 am
- Forum: Programming Discussion
- Topic: Fixing bad code
- Replies: 13
- Views: 1044
Re: Fixing bad code
This is C# with XNA.
- Fri May 14, 2010 9:33 am
- Forum: Programming Discussion
- Topic: Fixing bad code
- Replies: 13
- Views: 1044
Re: Fixing bad code
^ Yep. You'll wanna do something like this accessing the properties instead of creating new instances. vertices = new VertexPositionColor[3]; vertices[0].Position = new Vector3(-0.5f, -0.5f, 0f); vertices[0].Color = Color.Red; vertices[1].Position = new Vector3(0, 0.5f, 0f); vertices[1].Color = Colo...
- Wed May 12, 2010 11:01 am
- Forum: Programming Discussion
- Topic: Encrypting 8-bit ASCII in XOR
- Replies: 10
- Views: 1210
Re: Encrypting 8-bit ASCII in XOR
Good lord, I don't even know where to start or even if I should. If your intention is to be helpful, you're not doing a very good job of it. if u have done technology studies or physics u will know that a XOR gate is the opposite of an OR gate The "opposite" of an OR gate is a NOR gate. Ex...
- Wed May 12, 2010 6:44 am
- Forum: Game Development
- Topic: Blade Brothers Engine: Creating my first 2D Game Engine
- Replies: 272
- Views: 35858
Re: Blade Brothers Engine: Creating my first 2D Game Engine
For collision of things like entities and trees, you could try having their collision bounds be a circle at their base. Then if you walk into something offset a bit, you can have your character slightly slide over to be able to get around the object, ala Zelda: Link to the Past. I'll give a hint to ...
- Tue May 11, 2010 11:42 pm
- Forum: Programming Discussion
- Topic: Removing glow around pictures
- Replies: 24
- Views: 1595
Re: Removing glow around pictures
This... this is what I suggested...LeonBlade wrote:Why don't you instead just use transparency and use SDL Image and use IMG_Load?
- Tue May 11, 2010 12:35 am
- Forum: Programming Discussion
- Topic: using functions
- Replies: 4
- Views: 447
Re: using functions
Your functions in the second example need to be pass by reference.
edit: Wait, hold on, I'm drunk. You're doing something different, I think.
Code: Select all
void candlestick(int&);
void setflame(int&);
- Mon May 10, 2010 7:25 pm
- Forum: Programming Discussion
- Topic: Removing glow around pictures
- Replies: 24
- Views: 1595
Re: Removing glow around pictures
I've used alpha images in a shmup with hundreds of objects on screen and it still runs well over 200 FPS. Its kind of a non-issue unless you're porting SDL to the DS or something.Ginto8 wrote:Yes, but using alpha colors will be slow as hell compared to colorkeying.
- Mon May 10, 2010 6:47 pm
- Forum: Programming Discussion
- Topic: Removing glow around pictures
- Replies: 24
- Views: 1595
Re: Removing glow around pictures
SDL_image would be plenty fine for a game of Tic-Tac-Toe.Ginto8 wrote:Unfortunately that doesn't quite work with SDL. If it were OpenGL (or even SFML IIRC), it'd be fine. But SDL's alpha is crazy slow so colorkeying is his best bet.K-Bal wrote:You should use a picture format with alpha channel.
- Sat May 01, 2010 8:48 pm
- Forum: Programming Discussion
- Topic: coding improvement
- Replies: 13
- Views: 1098
Re: coding improvement
so how would you go about changing a surfaces picture, should I just say tilesheet = IMG_Load("water.png"); or tilesheet = IMG_Load("dessert.png"); ? that is all I am really want to do, as you can see by compiling it with random pictures (with the right names) that are 128x128. ...
- Sat May 01, 2010 6:16 pm
- Forum: Programming Discussion
- Topic: coding improvement
- Replies: 13
- Views: 1098
Re: coding improvement
I don't see you polling for events anywhere, so your mouse functionality isn't going to work. I kept on getting a segmentation fault when I changed tileSheet by pressing 1,2, or 3. so I took away the SDL_FreeSurface() for desert, water, and grass, and it screw up anymore, is this the correct way of ...
- Thu Apr 29, 2010 3:42 pm
- Forum: Programming Discussion
- Topic: SDL help
- Replies: 3
- Views: 294
Re: SDL help
http://www.sdltutorials.com/ There's some good lessons here and I've written one article.