The Moosader Community

Visit the IRC at irc.freenode.net #Moosader! Community dedicated to programming and game development! Moosader.com
It is currently Wed Oct 16, 2019 7:01 pm

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 63 posts ]  Go to page Previous  1 ... 3, 4, 5, 6, 7  Next
Author Message
PostPosted: Sat Oct 30, 2010 1:30 pm 
Offline
Niccolo
Niccolo
User avatar

Joined: Thu May 06, 2010 3:20 pm
Posts: 326
programmerinprogress wrote:
I downloaded from the repository, compiled it and ran it, however I had a minor issue you might want to look into.

on line 21 at Widget.cpp (and I think the error is repeated in the same kind of place in one of the other GUI components) I have some problems with the collision detection function, the compiler moans about passing a non-const Rectangle to the collision function, I think it's because you're creating a Rectangle on the stack and then passing its reference, the compiler didn't seem to like that, I was able to fix it simply by declaring the Rectangle before the function was called with the same arguments, and then just passing that, I guess this must be a problem that's dependent on your compiler, i'm using MinGW through the code::blocks IDE, but the problem is easy to solve, just thought I'd let you know, apart from that, I'd like to see where you go with this :D

there is one easy fix: change the function from
Code:
bool Collision(core::Rectangle& A, core::Rectangle& B);

to
Code:
bool Collision(const core::Rectangle& A, const core::Rectangle& B);

this will allow it to be passed with only pointer-sized overhead if the Rectangle is already allocated, while not requiring edit capabilities.

_________________
Please note that any and all of this user's opinions and/or data may or may not be complete and utter bullshit.
Ducky wrote:
Give a man some wood, he'll be warm for the night. Put him on fire and he'll be warm for the rest of his life.


Top
 Profile  
 
PostPosted: Sat Oct 30, 2010 3:22 pm 
Offline
Zora
Zora

Joined: Mon Feb 01, 2010 8:15 am
Posts: 256
Location: England
yeah, adding the constraint to the collision function worked like a charm, I tried it earlier and it didn't work because I only changed the implementation and missed the signature, silly me, whoever is working on PoS should add gintos solution in the next version.

_________________
I have a blog and I'm not afraid to update it (I promise) http://www.michaeldsharp.tumblr.com, website and other good things coming soonish :D


Top
 Profile  
 
PostPosted: Sun Oct 31, 2010 11:21 am 
Offline
Niccolo
Niccolo
User avatar

Joined: Thu May 06, 2010 3:20 pm
Posts: 326
I fixed and committed, just svn up for the fixed revision.

Edit: however, a few .h files don't seem to exist (Slider.h, CheckBox.h, RadioBox.h), but main.cpp uses them.

_________________
Please note that any and all of this user's opinions and/or data may or may not be complete and utter bullshit.
Ducky wrote:
Give a man some wood, he'll be warm for the night. Put him on fire and he'll be warm for the rest of his life.


Top
 Profile  
 
PostPosted: Sun Oct 31, 2010 11:49 am 
Offline
Goblin
Goblin

Joined: Tue May 04, 2010 2:01 pm
Posts: 112
that's weird.. works for me.. they also appear on google code :|


Top
 Profile  
 
PostPosted: Sun Oct 31, 2010 2:46 pm 
Offline
Zora
Zora

Joined: Mon Feb 01, 2010 8:15 am
Posts: 256
Location: England
I had to re-add a few of the new GUI objects .h files again, I had one issue with the enum WidgetType, again my compiler doesn't like the forward declaration and the definition in each file, I had to do the unthinkable and place the enum definition into some ifndef guards to get the code to compile.

I think you have a dependency issue there, you might want to consider grouping your Collision function and WidgetType enum into a file that always gets called first by your other files, because every time you add a new GUI component, you're having to declare the collision function and some of them are missing the all important const that allows you to pass Rectangles as references, I guess it's just my compiler that's having these issues, is anyone else experiencing similar errors?

after getting it to compile, I am pretty damn impressed with the sliders and checkboxes though :D


EDIT: in my own personal build I added a header called "Global.h" and just included it in GUIManager.h and Widget.h, I wouldn't recommend this as the name "Global.h" is a little ambiguous, I would either find a better solution to the declaration problem or put it in a filed named "GUIGlobals.h" or something to that effect, who I am to tell you how to do your job :lol:

_________________
I have a blog and I'm not afraid to update it (I promise) http://www.michaeldsharp.tumblr.com, website and other good things coming soonish :D


Top
 Profile  
 
PostPosted: Sun Oct 31, 2010 3:52 pm 
Offline
Goblin
Goblin

Joined: Tue May 04, 2010 2:01 pm
Posts: 112
visual studio doesn't seem to be bothered... i'll get code::blocks and compile the code in both of those to check if it works next time. :P
programmerinprogress wrote:
after getting it to compile, I am pretty damn impressed with the sliders and checkboxes though

Thanks :D . Those sliders sure took a lot of brain power to make them work properly.. but damn .. those babies can slide! :D


Top
 Profile  
 
PostPosted: Sat Jun 18, 2011 4:45 pm 
Offline
Rabite
Rabite

Joined: Thu Aug 06, 2009 8:53 am
Posts: 51
I've edited the grass to make it tile better (I just ran it through GIMP's "Make Seamless" filter).

Here's the new tile:
Image
I also have a request. May I be added to the contributors? I'll mostly do programming if I'm added.


Top
 Profile  
 
PostPosted: Sat Jun 18, 2011 7:55 pm 
Offline
Site Admin
User avatar

Joined: Wed May 14, 2008 4:43 am
Posts: 2328
Location: Kansas City
lotios611 wrote:
I've edited the grass to make it tile better (I just ran it through GIMP's "Make Seamless" filter).

Here's the new tile:
Image
I also have a request. May I be added to the contributors? I'll mostly do programming if I'm added.


PM Me your email address

_________________
Android apps by Moosader! - Open Source projects - Moosader.com


Top
 Profile  
 
PostPosted: Mon Jun 20, 2011 4:30 pm 
Offline
Rabite
Rabite

Joined: Thu Aug 06, 2009 8:53 am
Posts: 51
Ok, I'm ready to work on the game.


Top
 Profile  
 
PostPosted: Mon Jun 20, 2011 9:05 pm 
Offline
Smushed Goomba
Smushed Goomba

Joined: Tue May 24, 2011 3:52 am
Posts: 14
Location: California
Well welcome to the team :), Please be sure to review the rest of the topics below and any input on the working subjects. There are not many items on the books to do, but there is a lot of cleaning up needed.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 63 posts ]  Go to page Previous  1 ... 3, 4, 5, 6, 7  Next

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron