b8 P880D€€@€P€þÿüðÊ€.text€€0F .rdata0F€0F€p0f.data H€ H€P h@.sdataðJ€ðJ€�ðj.sbss€K€€K€.bss K€ K€ÐB€retty simple program. * * See other demos for a much easyier to understand example of * * the tod animation. * *********************************************************************/ // INCLUDE FILES //--------------- #include #include #include "pad.h" /* pad control */ #include "tod.h" /* definition for TOD functions */ #include "IDLists.h" /* TMD ID list (not used) */ #include "graphics.h" /* Various graphic and animation*/ #include "addrs.h" /* Model and TOD addresses */ // DEFINES //------------ #define ALIVE (0) #define DYING (1) #define DEAD (2) #define BORED (0) #define BREATHE (1) #define COMEON (2) #define FOOT (3) #define PUNCH (4) #define PUNCH1 (5) #define PUNCH2 (6) #define RUN (7) #define SIT (8) #define WALK (9) // PROTOTYPES //-------- long UpdateWorld(); void RenderWorld(); void ProcessInput(); // GLOBALS //---------- u_long pad; // For controller GsRVIEW2 view; // For viewing LinkObjectStruct theModel; // The animated model u_long world_time=0; u_long button_held[4] = {FALSE,FALSE,FALSE,FALSE}; // button states // FUNCTIONS //---------- ////////////////////////////////////////////////////////////////////////////////// // Update the animation keeping track of frame speeds // and controlling the animation according to the // animationState varible. long UpdateWorld() { int i; static int flip=0; int hold=FALSE; // control playback. if(theModel.currentTod == SIT) { if(NextFrame(&theModel,FALSE)) { return(DEAD); } return(DYING); } // Play one of the idle animations alternatly when // the character has done nothing for a short while. if(world_time > 400) { if(flip == 0) { ResetAnim(&theModel,BORED); flip=1; } else { ResetAnim(&theModel,COMEON); flip=0; } world_time=0; } // check to see if a button is held down for(i=0;i<4;i++) { if(button_held[i]==TRUE) hold= TRUE; } // Advance animation. If animation reaches end reset // to the default breathing animation. if(hold ==TRUE) { if(button_held[2]==TRUE) { if(NextFrame(&theModel,FALSE)) { //switch(theModel.currentTod) //{ // case PUNCH: // ResetAnim(&theModel,PUNCH1); break; // case PUNCH1: // ResetAnim(&theModel,PUNCH2); break; // case PUNCH2: // ResetAnim(&theModel,PUNCH); break; //} if((world_time==25) && (theModel.currentTod == PUNCH)) ResetAnim(&theModel,PUNCH1); else if((world_time==45) && (theModel.currentTod == PUNCH1)) ResetAnim(&theModel,PUNCH2); } } else { NextFrame(&theModel,TRUE); world_time=0; } } else { if(NextFrame(&theModel,FALSE)) { ResetAnim(&theModel,BREATHE); } } // increment world counter. world_time++; return ALIVE; } ////////////////////////////////////////////////////////////////////////////////////////////////////// // Handle Object drawing function calls void RenderWorld() { int i; RenderPrepare(); //create a delay. (Pause should be for ????frames???) for(i=0;i<500;i++){VSync(1);}; DrawObjectLink(theModel.objs); RenderFinish(); } ///////////////////////////////////////////////////////////////////////////////////////////////////////// // Process Joypad controller input. Controls camera positioning. void ProcessInput() { static int camera=0; static int pressed=0; pad = PadRead(); if(pressed==0) { if((pad & PADRleft) > 0) { ResetAnim(&theMoàÿ½'¿¯¾¯!ð À¯€<üËBŒ$ C€< Ë„$+  !(@“$“$€‚�‘C,`€‚� @€< Ë„$å  !($€‚¯*€< Ë„$å  $€€¯€€¯À¯Â�C(`GÂ�!@€€<ˆIc$!CCŒ$b$¯Ã�b$!@-ïÂ�$8C€<�IBŒ$,C€< Ë„$+  !(@€‚�$ C€<üËBŒ$C€< Ë„$å  $r€‚�-$ C€<üËBŒ$C€< Ë„$å  $y€< Ë„$å  $€€¯€€< Ë„$+  $€€¯Œ€< Ë„$+  !(@€< Ë„$å  $€ƒ�b$!@€ƒ¯“!!èÀ¿�¾�à ½'àÿ½'¿¯¾¯O… !ð €<„K"¬€<„KBŒ! @@!b@!! ‚À#b@€<°Ìc$!C˜Š ! @€<„KBŒ! @€!b€€<€Ìc$!C! !(“‰ !0@À¯Â�ôC(`Íšò $Ã�b$!@¾ï€< Ì„Œ€<$Ì¥Œ€<(ÌÆŒ” S  ! šò ! H† €<„KBŒ! @€!b€€<€Ìc$!C! !(!0… !8@€<„KBŒ! @€!b€€<€Ìc$!CЉ ! @!èÀ¿�¾�à ½'Ðÿ½',¿¯(¾¯~ !ð €<€K"¬ €‚�…@€<€KcŒ€b0 @€< Ë„$å  $€€¯$ €‚¯$€<ˆI"¬€<€KcŒb0 @€< Ë„$å  $€€¯$ €‚¯$€<ŒI"¬€<€KcŒ b0@€< Ë„$å  $€€¯€<€KcŒ@b0 @€< Ë„$å  $€€¯$ €‚¯$€<�I"¬€<€KcŒb0@€<€KcŒ€b0@€ƒ�ÿÿb$!@€ƒ¯€‚�A $€‚¯$ €‚¯€<€KcŒ b0@€ƒ�b$!@€ƒ¯€‚� C(`€€¯$ €‚¯€<€KcŒ@b0@€<€KcŒb0@€<€KcŒb0@€<€KcŒb0@€< Ë„$å  $€€¯ €‚�$5C€<€KcŒ€b0@€<ˆI ¬€<€KcŒb0@€<ŒI ¬€<€KcŒ@b0@€<�I ¬€<€KcŒ€b0@€<€KcŒ b0@€<ˆIBŒ @€<ŒIBŒ@€<�IBŒ@ €€¯€‚� C,¦`€‚�!@€€<0Fc$!CCŒ`Xž$¢¯@$¢¯ ¯ ¯  ¯€<0Ì„$d$!0y   $l`ð$¢¯ˆ$¢¯ ¯ ¯  ¯€<0Ì„$d$!0y  Ð$l`ð$¢¯@$¢¯ ¯Àà$¢¯  ¯€<0Ì„$d$!0y   $lÀà$¢¯0u$¢¯ ¯Àà$¢¯  ¯€<0Ì„$d$!0y  !8lÀà$¢¯˜:$¢¯ ¯Àà$¢¯  ¯€<0Ì„$d$!0y  !8lÀà$¢¯ ¯ ¯Àà$¢¯  ¯€<0Ì„$d$!0y  hÅ$lÀà$¢¯ ¯ ¯Àà$¢¯  ¯€<0Ì„$d$!0y  Њ$lÀà$¢¯ÐŠ$¢¯ ¯Àà$¢¯  ¯€<0Ì„$d$!0y  !8l¨a$¢¯@$¢¯ ¯ ¯  ¯€<0Ì„$d$!0y   $l'$¢¯@$¢¯ ¯ ¯  ¯€<0Ì„$d$!0y   $l€<ÑŠ 0Ì„$!èÀ,¿�(¾�à0½'Èÿ½'4¿¯0¾¯w !ð p (À¯I  0ø$¢¯`ð$¢¯ ¯ ¯  ¯€<0Ì„$d$!0y  !8¬  $  ¯ ¯ €<¢¯€< Ë„$$ $â !8€< Ë„$!(!0 €<_  $€ç4€< Ë„$$!0 €<_  äDç4€< Ë„$$!0 €<_  pç4€< Ë„$$!0 €<_  ”Çç4€< Ë„$$!0 €<_  ¤¹ç4€< Ë„$$!0 €<_   ç4€< Ë„$$!0 €<_  Øóç4€< Ë„$$!0 €<_  œ–ç4€< Ë„$$!0 €<_  Èç4€< Ë„$ $!0€<_  Üjç4€< Ë„$å  !(€@,Â�Ä�ƒŒ ¶<·`„4d@¨È¯¨È�! *Ã'#¤C¤,Â�Ã�d$ƒŒ ¶<·`„4d@¨È¯¨È�! *Ã'#¤C¤,Â�Ã�d$ƒŒ ¶<·`„4d@¨È¯¨È�! *Ã'#¤C¤Â� C$ï,Ã�b$! @0Å�¾· Ã�b0)@,Â�Ã�d„D¬,Â�Ä�ƒ$d„D¬,Â�Ä�ƒ$d„D¬Â�C$ïÃ�b0@,Ã�b$! @0Å�¾· 0Ä�,Å�nµ Ã�b0@,Â�Ã�dŒD¬,Â�Ä�ƒ$dŒD¬,Â�Ä�ƒ$dŒ D¬Â� C$ï,Ã�b$0Ä�bµ !(@…ÌÂ�@Â�CŒÿÿb0ÌÄ�ÈÅ� !0@! @(Å�=� !0…ÐÂ�$+CÂ�CŒ `Â�CŒÿÿ4bv(Â�CŒH`¬Ã�b$!@‡ïÂ�C$ïÄÄ�EŒô 4¯(Ã�bŒ4Ã�dŒHD¬…ÄÂ�@Â�@$ C¢ÄÄ�Å�, ¢ÄÄ�Å�¥ ¢…Ã�b0e@Ã�b0<@Â�!@Ã�! `Ä�€:zc%C1À¬<Ò#Û2îI�Z9¾ÀWÚ¥‚¦¢µ2ä-64OS®Îk%ÞŸÎÒÈÝ¦Ø €@@€¾?�� ¨`f¸4ŽØŽÀŽàŽè»ü‰áŒÒŽÐ‰ÜRQèX[ŽÓ‰Äa©¡Ï.ÿ-ÏxV4Í«~ffffVWè_^ffüf‹f&‰G*f‹Ff&‰G,f&ƒG.Ïf‹Ff&‰G f&ƒG.Ï��/ÀÀÀÀì¿Þ¿Ê¿¼¿ª¿œ¿�¿ƒ¿o¿b¿X¿J¿&¿¿¿jÓhÓjÓjÓjÓjÓjÓjÓjÓ¿¿¿¿.ÿ5Xî.ÿ5Zî.ÿ5\î¡.ÿ5^î©Í!Ã��� @È@@œ @ ¼¾@¿ÉŽ4@žµp+¨­Å�i@Õ¦ÏÿIxÂÓ@àŒé€ÉGº“¨AŽÞù�ûë~ªQCÇ‘¦® ã£F u�†uvÉHMå]=Å];‹ž’Z›— ŠR`Ä%umain.w.shÉô-´EÔ-H€„€À€€@€€€¼€ø€8 €t € INSTRUCTIONS --------------- Left = Back cycle through cameras. Right = Forward cycle through cameras. Triangle = Run Square = Walk Circle = Hurting Foot Cross = Punch Hold the walk or run button for continuous animation. Press the punch button once for a single punch animation. Hold the punch button through the first animation for a double punch. Again hold the punch through the first and second punch for a super third punch! Press select to quit (plays end animation). t€À€€d€"€"€�€"€$€ "€    ÿÿÿÿÿÿÿÿðÊ€pŽ€„ÖÚD³„µ²×„¶ĹDׄ¹D°ÖDØØDµÄ·ĺ¹„°D¶DÖDÓ¸„ÑÄØb