Ok I did that and it worked. Two different ftImages worked fine. I even made one of them a pointer to a ftImage and it worked fine. I did get it to fail with the same problem when I defined an ftImage like this: ftImage *levelNumTxt[5] = {new ftImage(640,480)}; What this should do is create an array of pointers to ftImages right? Then it should assign the first pointer to a new ftImage.by g_man - Coding
Ok, that didn't change anything. I changed it so that malloc allocates the correct number of pointers, and your right, it was a copy error, my bad, the revised code (just the first half), is here: ftImage **levelNumTxt = (ftImage**) malloc(totalLevels*sizeof(ftImage*)); for(i=0;i<totalLevels;i++){ levelNumTxt = new ftImage(640,480); }by g_man - Coding
sure. Your idea may seem too ambitious now, but it time you will have the skills to get it done. Also as a tip when you start to work on it, build it in chunks. Don't just start out building the game, build one feature. For example you might first want to make the ninja move. Then go onto making the screen move with him. then build from there. When I first starting my game I didn't starby g_man - Coding
Start off on your home computer. Learn C. Make some basic examples. Make sure you know the language in and out before you start with homebrew development. Trust me, I tried to just dive in and it lead to many months of frustration. The best thing to do would be to get a book, read it, and when examples are given, build off of them. Make sure you know exactly what each part of the code does. As foby g_man - Coding
You should also have my game[Gravitii] and also you should get [Homebrew Browser] It lets you download most homebrew games created without having to remove your SD Card.by g_man - Getting Started
Well, I still have the problem. Here is the edited version of the code: ftImage **levelNumTxt = (ftImage**) malloc(12*sizeof(ftImage)); for(i=0;i = new ftImage(640,480); } for(i=0;i<totalLevels||i<12;i++){ levelNumTxt->setFont(hyperspd_ttf, hyperspd_ttf_size); <-This line still causes problems levelNumTxt->setSize(50); levelNumTxt->setColor(Color::Color(0,0,0));by g_man - Coding
For the second problem go to the website and enter the error code. This will tell you the cause of it so that you can try to fix it.by g_man - Homebrew General
Thanks for that help, but the problem with my code still exists. When I call: levelNumTxt.setFont(hyperspd_ttf, hyperspd_ttf_size); the code still doesn't run on my wii, and dolphin gives me an error. Here is the whole code I have for this part: std::vector< ftImage > levelNumTxt(12, ftImage(640,480)); for(i=0;i<totalLevels||i<12;i++){ levelNumTxt.setFont(hyperspd_by g_man - Coding
Sorry that's supposed to be a 12. The number isn't a number in my real code, but I'm simplifying it here.by g_man - Coding
Thanks, but I'm trying to create an array of ftImages, but there initializer need two arguments. The code above doesn't compile. I was wondering if there is a way to make the staitment. EDIT: Ok, I solved the problem with this code: ftImage *levelNumTxt = (ftImage*) malloc(12*sizeof(ftImage)); for(i=0;i<20;i++){ levelNumTxt = ftImage(640,480); } but, now when I callby g_man - Coding
I want to declare an array of objects, but the problem is that the object requires two arguments in it's initializer. ftImage levelNumTxt[12](640,480); Here is what I want to do. Is there any way to accomplish this?by g_man - Coding
have you tried Indiana Pwns or Smash Stack yet?by g_man - Getting Started
Ok, sorry i was unclear about my intentions. I have made a simple library that sends a variable and a string idetifier to my computer. My computer recieves this message and saves it into a file so that I have a list of a variables changes throughout the life of the program. I add a new entry to this by calling the function addVariableTYPE(var number,variable value,str indetifier) where TYPE is thby g_man - Coding
Thanks, that was the problem. But I have another question. Righ now if I don't have a total of six variables then I set the variables with that I don't want to use with a constant. So NOTAVAR is a number, which I set as 1111111111. There has to be a better way to detected if a value is a variable or not. Is there?by g_man - Coding
I'm new to using the preproccessor, and I have a problem. I am trying to take an argument and convert it to a string and get it's value, but it doesn't work. That was probably confusing so here is my code: #define SENDVARIABLES(x,arg1,arg2,arg3,arg4,arg5,arg6) \ do{ \ if(arg1!=NOTAVAR) \ addVariableDouble(x*6,arg1,(char*)"Player 2 arg1 x");\ if(arg2!=NOTAVAR) \ addVariabby g_man - Coding
QuoteiSubaruThank You very much There is another way - I think - to detour some work, it's to find a program that can on PC read such signals and has open source code (not mentioning as easy build as possible) then trying to port it to Wii or at least some parts of it, so we will have readings correct, then just to translate them in some way... Why I feel it will be a lot of work...mwahahaby g_man - Homebrew General
can't they have ISP's block connections to the sites?by g_man - Offtopic
Ok, I replaced it and nothing changed. EDIT: Nevermind, I had the wrong IP, everything works, thanks.by g_man - Offtopic
ok, but that still doesn't work. I had a look at sockettest, but it didn't help. int main(int argc, char **argv) { //--------------------------------------------------------------------------------- initialization(); net_init(); int mySocket; struct sockaddr_in mySockaddr; char buffer[256]; char *msg = "Hello from the WII!!!\0"; char localip[16] = {0}; charby g_man - Offtopic
I am just getting started with network programming, and I need a little help. I have made a successful client and server on windows, but I can't get a client on the wii to connect to my windows client. I know my windows server works because I have gotten it to send and recieve messages from other computers in my house running different OS's. I have double checked my port and Ip numbers,by g_man - Offtopic
On top of that, if a user can't install devkitpro, there is NO way they will want to mess with partitions, and installing a second OS. And just to reiterate, developing an OS is the hardest thing you can in the programming world. You need years of experience in both C and ASM to even think about developing. And then it will take a year or two to get it stable enough for somebody to trust itby g_man - Offtopic
What if someone made a base installer. They could release the source code, and all the developer of the channel would have to do is change one or two lines of code, and include the channel. This way a custom installer is created in a quick and easy way.by g_man - Ideas, requests
Ok that would explane my errors. So that means it has to be declared with the code in every c file I plane to use it in?by g_man - Coding
thanks, I really appreciate the feedback. I'm definatly not a graphic artist at all, and I knew that from the start. The only reason that I have planets with no gravity is for a wall-like feature, and as soon as I organize this then I won't have a need for zero-gravity planets. As for the different levels of gravity my options from this point on would be like you said to calculate the sby g_man - Homebrew Applications
QuotetueidjPutting a function's code in a header file is basically the same as declaring it inline, except you avoid multiple definition errors by using inline.are you sure? but declaring it static inline would also solve the same problem.by g_man - Coding
oh, It worked for me, but that was a while ago.by g_man - Software
that makes sense, but isn't it bad practice to put c code in a header file. Would it be a better idea to just copy the code and put it in fileB.c.by g_man - Coding
Gravitii This is the first game I have created, and I was wondering what people thought of it. What do you like about it, What needs work. Sugesstions? I know that the graphics aren't very good, so if anyone is interested in working on those for me just send me a PM. Thank you for any responces.by g_man - Homebrew Applications
I'm having problems linking to a function that I made and have declared inline. I have it declared in fileA.c and I have it in fileA.h, but when I try to use it in fileB.c which has fileA.h included it doesn't find the function. Here is an example: FileA.c: float inline myInlineFunc(int foo,int bar){ return foo/bar; } FileA.h: float inline myInlineFunc(int foo,int bar); Filby g_man - Coding