Quotemdbrimwow, I go away on vacation and LordAshes takes the reins and runs with them... SWEET! Mdbrim, I hope me running with this is okay with you. Your example was great but I want to get this wrapped up in a nice library of some sort so that the desired Mii can be drawn in projects with only a couple of commands. To this end...I did exactly as was suggested by other above. QuoteI.by LordAshes - Coding
Thanks guys. I will play with your suggestions and see what I can come up with. I really appreciate all your help. I am a fairly savy programmer but C is not my strongest language so many times I run into stupid error like this. So I really appreciate you guys helping me out. I'll keep you posted on progress.by LordAshes - Coding
QuoteI.R.onWell your approach is not right... the best place to put the mii rendering functions is Grrlib which I think is the main intention by mdbrim hence the naming of the functions starting with Grrlib... So, instead of trying to make it another library you can just create another file under Grrlib and add the functionality there... So it becomes part of Grrlib... You "libogc addition.by LordAshes - Coding
Quotecalvinss4So I'm guessing you have a declaration in mii_heads.h: extern SomeType mii_heads; Well, where do actually define it? Do you have a corresponding mii_heads.c with the following? SomeType mii_heads; Your build directory must contain a mii_heads.o (which contains the definition for the variable mii_heads). If you don't have a mii_heads.c, then I will assume mii_heads.by LordAshes - Coding
Quotecalvinss4Remove the static; you can't see anything when the picture has too much static: I removed all the static (changed them to regular variables) and fixed a search and replace bug...but the problem persists. I still get the Undefined Reference error. The line of code that the compiler points to is the assignment lines indicated in read in the original post. The other interestiby LordAshes - Coding
I am taking the libMii sample code (available on Wiibrew.org) that mdbrim has posted and I am trying to turn it into a nice library. I like mdbrim's selection menu so I kept all that and just wrapped it into a function that one can call. I also added a function that draws the selected Mii so the main program does not need to be bothered with any of the library variables (such as img_mii).by LordAshes - Coding
Thanks for the notice...I will add it the WCS Installation Forum.by LordAshes - Coding
Doh! Right...the sensor bar has the IR LEDs and the Wiimotes' camera reads those. In that case the same advice as above applies except that the sensor bar or whatever is going to be generating the LEDs for the wiimotes to detect needs to be synchronized and ensure that only 4 LEDs are active at one time. Then your wiimote detection code needs to either be linked into this synchronizationby LordAshes - Coding
I have created a FREE program that helps write Wii platform compatible C code. It uses a graphical interface to add images, set up objects and uses a Pseudo Code language to enter the actual code. The program then converts this into Wii platform compatible c code which can then be compiled using the DevKitPro toolset (or any other compiler). Although WCS does not actually compile the code (leavinby LordAshes - Coding
Well, assuming it does switch (which Daid seems to indicate is not the case), you sould be able to figure out the pattern. Write a simple program that checks all 4 of the IR LEDs and stores the IR dot location in memory or writes it out to SD card. I suggets storing in memory and then after a while dumping to SD card so that you get the fastest possible response time. Then you can run the pby LordAshes - Coding
Update: I reshuffled the code and changed some of the statics and suddnly it started working. Original Post: I am working on a generic project. The program spreds over 4 main files: "main.c" defines some higher level object functions and the main loop "Object.c" defines low level object functions (implemented with a Linked List) "Support.h" defines project specific code such as textby LordAshes - Coding
For simple platform games, you generally want to create a gravity variable for each of your objects and if there is no collision between the object and somthing tangible (like the floor) then you increase this variable and then move the object that amount towards the gravity source (usually the floor in platform games). This simulates acceleration...the longer that the object is not touching theby LordAshes - Coding
Re: Banning WGS I am aware of this and that is why I answered very carefully without providing any links and/or direct software details. I hope I an provide a brief background for WiiFan without getting myself banned. I am going to word the next info, from WiiFan, in a neutral tone (I hope) using the words "claim" so that, hopefully, I don't offend those who support the claim but I also dby LordAshes - Coding
There are also come products that will allow beginners to code using a drag and drop type env't. One is WGS and the other one, free, coming out end of March will be Wii Construction Set. The advantage of the second one, if you are not too familiar with writing C code for Wii, is that it will translate the drag and drop coding into very nice C code full of comments, so it can be used asby LordAshes - Coding
The GRRLIB package that I downloaded had full installion, docs and examples. The examples covered many different topics like basic drawing, 2D, 3D, etc.by LordAshes - Coding
Well it should not be all that hard to code from scratch... If I remember correctly, the force of gravity (between to objects) is proportional to the product of their masses (multiplied by a constant) and inversly proportional to the square of the distance. Please, anyone, feel free to correct the formula if it is not correct, I am recalling this from highschool physics and that was a long timby LordAshes - Coding
Here is the code pertaining to the Collison Detection... int Fine_Collision_Detection() { // This function returns 1 if Objs1 and Objs2 have collided. This function returns 0 otherwsie. // Collision detection is based on checking overlapping pixels to see if both are non-transparent. u32 pixel1; // Storage For Pixel Alpha for Object 1 u32 pixel2; // Storage For Pixel Alpha foby LordAshes - Coding
Yes. I am only using client as an example. The code is actually for an unofficial upgrade to WGS (a gui based program that helps beginners write programs for the Wii). I would like to implement object level variables for this program. The object structure is already set by WGS but I can add to it. So to answer your question, the user of the program will remember which objects have which additiby LordAshes - Coding
Okay...I guess I should have noted that I am implementing this code as a modification to an existing program which uses an earlier version of GRRLIB. Since the original program is not mine, I can not upgrade it to latest version and the user, due to the change in licenses between the eralier version and current version, does not want to upgrade (at least not at this time). Thanks for the noteby LordAshes - Coding
SOLVED. Since I know the positions of my 2 objects, I just run a loop through the x and y coordinates over the combined object's area. If the point does not map into both objects then discard it and continue. If the point maps into both objects then use GRRLIB's get pixel from texture function to compare the alpha values. If both points are not transparent then you have a collision.by LordAshes - Coding
GRRLIB_SetBackgroundColour can be used to set the background color if you are using GRRLIB graphics. I am assuming you are using the DevKitPro toolset t compile. In that case see your \devkitPro\examples\wii\audio directory for examples of how to implement MOD, MP3 and OOG players.by LordAshes - Coding
I am trying to code a resize function. I have found that the Scale parameters in GRRLIB_DrawImg seem to work in increments of whole numbers (ie. 100%, 200%, 300%) but they don't allow for partial increments inbetween. They also don't seem to draw anything if the scale is less than 100%. So my theory. Create an empty texture and then map the original texture to the empty one using theby LordAshes - Coding
Sorry. I guess it is. The code I am modifying is for the Wii but you are correct that the question itself is not Wii related. Thanks for the advice. The original structure (clients) will each have only one of the contact structures and each one can have a different one, so I think I need to use your advice of making it void and then setting it later when I populate it. Once again sorry forby LordAshes - Coding
I am writting my code in C. I am an intermediate C programmer so I am not sure if this is an easy task where I have overlooked something obvious or if this is more difficult that is sounds. I am modifying previously written code so I am somewhat limited in what I can do. I will use a simplified example to illustrate what I am trying to accomplish. Say I have one structure (Client) with infrby LordAshes - Coding
Actually the functions within functions is not how C is usually written but it seems to work. I have code that generates some dynamic variables and other dynamic code which uses these dynamic variables. This makes it more difficult to pass variables to the functions because the number and types of variables are not know before hand. I know that it is an odd case and I could probably write funcby LordAshes - Coding
Thanks for the catch on the first issue. I keep forgetting that in C array dimensions represent the number of elements (4 elements from 0 to 3) instead of the highest element number (like in VB). Yes...I am a VB programmer and I am not ashamed to say so . The second fix (re active), however, should not be necessary. There are only 4 controllers and thus I created (hard coded) 4 variables (actiby LordAshes - Coding
Not sure how to check but I used the DevKitProUpdater 1.5.0 to download the version. I believe I have the latest version.by LordAshes - Coding
I switched to using WPAD_Probe and WPAD_Data. There relevant section of code is as follows... I tried: u32 ext; WPAD_Init(); int active1=(WPAD_Probe(WPAD_CHAN_0, &ext)!=WPAD_ERR_NO_CONTROLLER); int active2=(WPAD_Probe(WPAD_CHAN_1, &ext)!=WPAD_ERR_NO_CONTROLLER); int active3=(WPAD_Probe(WPAD_CHAN_2, &ext)!=WPAD_ERR_NO_CONTROLLER); int active4=(Wby LordAshes - Coding
Okay...I am trying to figure out how to determine what devices (Wiimotes, Classic Controller, Balanceboard, etc) are connected. I am guessing I need to use WPAD_GetStatus() or WPAD_Probe() but I can't see to find any documentation on these functions. Anyone know were I can get details on these functions? (wiipad.h and wiiuse.h did not seem to cover any explanation) * UPDATE * I tby LordAshes - Coding
Thanks. I just found out that SetHandle is even easier to use for Rotations because it DOES NOT affect position. I wrote a bunch of code that would compensate for the handles to get my image in the right position but when I ran it on the Wii I discovered that setting handles does not apply to position so it is just as easy as Scanff wrote. Thanks everyone.by LordAshes - Coding