/* Mario interpreter for the iPod * Written from scratch by Joseph Constan (Saintjimmy5294) * This is just an Early Alpha Release, but * I plan to have the Interpreter open an external text file * with level data in it and load the level from there. * I haven't done it yet (still confused a bit w/ file pointers) * But until then, It's just a simple Mario Game, demo, thingy. */ /* Oh, and special thanks to * zacaj, for the idea * Mike Sweeney (ichaelmay8), for writing iBolo, * whose level loading system I based mine off of ;) * Nintendo, for wowing the world with the invention of Mario, * Apple, for making the iPod, * And, of course, the iPodlinux team, without whom this would not be possible. */ //May 17, 2007, in this program, I wrote my first 1,000 lines of code. This one's goin' in the baby book :D #include #include #include #include "pz.h" #include #include #define LBLUE 0, 240, 255 //defines value for teh color Light Blue #define SHEIGHT (ttk_screen->h - ttk_screen->wy) //sets SHEIGHT to the height of the screen #define SHWIDTH (ttk_screen->w) //sets SWIDTH to the height of the screen static PzModule *module; /*images (for the ones with arrays, ie. goomba[2], the number represents the frames)*/ static ttk_surface small_mario_left[2]; //small mario facing left static ttk_surface small_mario_right[2]; //small mario facing right static ttk_surface mario_left[3]; //mario facing left static ttk_surface mario_right[3]; //mario facing right static ttk_surface flower_mario_left[3]; //flower mario facing left static ttk_surface flower_mario_right[3]; //flower mario facing right static ttk_surface mario_crouch_right; //mario crouching & facing right static ttk_surface mario_crouch_left; //mario crouching & facing left static ttk_surface goomba[2]; //goomba static ttk_surface goomba_squish; //goomba squished static ttk_surface gkoopa_l[2]; //green koopa facing left static ttk_surface gkoopa_r[2]; //green koopa facing right static ttk_surface rkoopa_l[2]; //red koopa facing left static ttk_surface rkoopa_r[2]; //red koopa facing right static ttk_surface redshell[4]; //red shell spinning static ttk_surface greenshell[4]; //green shell spinning static ttk_surface ground; //image of ground (brick) static ttk_surface block; //coin block static ttk_surface qblock[4]; //question mark (powerup) block static ttk_surface coin[4]; //coin image static ttk_surface mushroom; //mushroom static ttk_surface 1up; //green mushroom (extra life) static ttk_surface flower; //power flower //static ttk_surface star[4]; //star for to give you teh invinsiblity!!!11!1!! static ttk_surface fireball[4]; //OH NOES!! T3h f1r3b4l1 0f z3h d34th!!1! run 4w4yz! /*variable declarations (brace yourself there's a lot of them)*/ static int mario_x; //x coordinate of mario static int mario_y; //y coordinate of mario static int goomba_x[10]; //x coordinate of goomba static int goomba_y[10]; //y coordinate of goomba static int gkoopa_x[10]; //x coordinate of teh green koopa static int gkoopa_y[10]; //y coordinate of teh green koopa static int rkoopa_x[10]; //x coordinate of teh red koopa static int rkoopa_y[10]; //y coordinate of teh red koopa static int ground_x[100]; //x coordinate of the ground static int ground_y[100]; //y coordinate of the ground static int block_x[100]; //x coordinate of block static int block_y[100]; //y coordinate of block static int qblock_x[100]; //x coordinate of question mark block static int qblock_y[100]; //y coordinate of question mark block static int coin_x[100]; //x coordinate of coin static int coin_y[100]; //y coordinate of coin static int mushroom_x; //I think you get the idea by now, if not, get some help static int mushroom_y; static int 1up_x; static int 1up_y; static int flower_x; static int flower_y; //static int star_x; //static int star_y; static int fireball_x[2]; static int fireball_y[2]; static int start_x; static int start_y; static int end_x; static int view_x=0; //left end of viewport static int view_y=0; //bottom of viewport static int view_w=SWIDTH; //width of viewport, automatically set to the width of the iPod's screen static int view_h=SHEIGHT; //height of viewport, automatically set to the height of the iPod's screen static int eframe=0; //frame for the animation of koopas and goombas static int mframe=0; //frame for the animation of mario static int mdirection; //direction mario [0], green koopa [1] or red koopa [2] is facing, 1=left. 2=right static int mwalk=0; //if mario is moving (running or walking), 1=yes, 0=no static int mjump=0; //if mario is jumping, 1=yes, 0=no static int mrun=0; //if mario is running, 1=running, 0=walking static int mcrouch=0; //if mario is crouching, 1=yes, 0=no static int invincible=0; //if mario is unnnnn-tuchable static int fallpt; //when mario starts falling after he jumps static int onground; //if mario is on the ground static int buttondown[5]={0,0,0,0,0}; //if button is down, 1=yes, 2=no; [0]=select, 1=menu, 2=prev, 3=next, 4=down static int rkoopa_direction[10]=; static int gkoopa_direction[10]; static int i=0, j=0, k=0, l=0, m=0, n=0, o=0, s=0, t=0, u=0, v=0, w=0, a=0, b=0; //don't ask static int goomba_state[10]; /*whether goomba is alive (1), squished (2), or dead(0)*/ static int rkoopa_state[10]; /*whether red koopa is alive (1), in shell (2), or dead(0)*/ static int gkoopa_state[10]; /*whether green koopa is alive (1), in shell (2), or dead(0)*/ static int item_state[4]={1,1,1,1}; /*whether item is unused (item_state[]=1) or used(=0). Array: [1] - mushroom, [2] - green mushroom, [3] - power flower, [0] - star*/ static int item_direction[3]={1,1,1}; //self explanatory, 1=left, 2=right, [0] - mushroom, [2] - green mushroom, [0] - star static int block_state[100]; //whether block is unhit (block_state[]=1, being hit(2), or hit(=0) static int qblock_state[100]; //same as above static int coin_state[100]; //same as above static int mario_state=1; //whether mario is small (1), big (2), flower (3), or, heaven forbid, dead (0) static int mxspeed=0; //mario's horizontal speed static int myspeed=0; //No, not "my speed", mario's vertical speed static int rkxspeed[10]; //red koopa's horizontal speed static int rkyspeed[10]; //red koopa's vertical speed static int gkxspeed[10]; //green koopa's horizontal speed static int gkyspeed[10]; //green koopa's vertical speed static int gxspeed[10]; //goomba's horizontal speed static int gyspeed[10]; //goomba's vertical speed static int lives=3; static int coins=0; static int score=0; static int lvl_width=20; static int lvl_height=14; static int lvl_tiles=lvl_width*lvl_height; static char leveldata1[lvl_tiles]={ .,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,., .,Q,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,., .,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,., C,C,C,C,C,C,.,.,.,.,.,.,.,.,.,.,.,.,.,., B,B,B,B,B,B,C,.,.,.,.,.,.,.,.,.,.,.,.,., .,.,.,.,.,.,B,C,.,.,.,.,.,.,.,.,.,.,.,., .,.,.,.,.,.,.,B,C,.,.,.,.,.,.,.,.,.,.,., .,.,.,.,.,.,.,.,B,.,.,.,.,r,.,.,.,.,.,., .,.,.,.,.,.,.,.,.,B,B,B,B,B,B,.,.,.,.,., //The Leveldata is the information .,Q,B,.,.,.,.,.,.,.,.,.,.,.,.,.,.,B,.,., //used to load the level, such as .,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,B,B,.,., //locations of start and end loca- S,.,.,.,B,g,.,.,.,k,.,B,C,C,C,B,B,B,.,E, //tions. It uses an array based on G,G,G,G,G,G,G,G,G,G,G,G,G,G,G,G,G,G,G,G, //the size of the level, which is G,G,G,G,G,G,G,G,G,G,G,G,G,G,G,G,G,G,G,G}; //height * width. //Done with declarations, starting the game (sorta) static void draw_mario(PzWidget *wid, ttk_surface srf) { int i=0; int j=0; int k=0; int l=0; int m=0; int n=0; int o=0; int x=0; int y=0; int tilex=0; int tiley=0; ttk_fillrect (srf, 0, 0, SWIDTH, SHEIGHT, ttk_makecol(LBLUE)); //fills the screen with the color (LBLUE = light blue) defined above /*Level Drawing (I'm confused on this part and will probably screw up, but bear with me here) (Most of the stuff is explained in the block functiony thingy)*/ while(yview_x && ground_x[i]view_y && ground_y[i]view_x && block_x[j]view_y && block_y[j]view_x && qblock_x[k]view_y && qblock_y[k]view_x && coin_x[l]view_y && coin_y[l]view_x && goomba_x[m]view_y && goomba_y[m]view_x && rkoopa_x[n]view_y && rkoopa_y[n]view_x && gkoopa_x[o]view_y && gkoopa_y[o]view_x && fireball_x[0]!view_y && fireball_y[0]!view_x && fireball_x[1]!view_y && fireball_y[1]!=fallpt) //the (fake and badly coded) gravity kicks in and mario starts to fall myspeed--; if(myspeed<-4) //caps the vertical speed myspeed=-4; if(myspeed>4) //caps (the other end of) the vertical speed myspeed=4; if(mario_state!=0 && myspeed!=0) //mario is not on the ground mario_y=mario_y-myspeed; if(mario_state!=0 && mxspeed!=0) mario_x=mario_x+mxspeed; if(onground=0 && myspeed<=0 && myspeed!=-4)//there's probably a better way to do this, I'm just too lazy to figure it out myspeed--; if(mario_state==1) //Mario is small { if(mario_xground_x[u] && mario_y+19<=ground_y[u]+16 && mario_y+19>=ground_y[u]) //mario is on a block of ground onground=1; if(mario_xblock_x[u] && mario_y+19<=block_y[u]+16 && mario_y+19>=ground_y[u]) //mario is on a block onground=1; if(mario_xqblock_x[u] && mario_y+19<=qblock_y[u]+16 && mario_y+19>=ground_y[u]) //mario is on a [?] block onground=1; else onground=0; if(mario_x>=rkoopa_x[v]-16 && mario_x<=rkoopa_x[v]+8 && mario_y+19>=rkoopa_y[v] && mario_y+19<=rkoopa_y[v]+16 && myspeed<0) { if(rkoopa_state[v]==1) { if(mario_y+19>rkoopa_y[v]+8 && myspeed<0) { mario_state=0; } else { myspeed=4; rkoopa_state[v]=2; } } else if(rkoopa_state[v]==2) { if(mario_y+19>rkoopa_y[v]+8 && myspeed<0) { mario_state=0; } else { rkxspeed[v]=-6; myspeed=4; } } } if(mario_x>rkoopa_x[v]+8 && mario_x<=rkoopa_x[v]+16 && mario_y+19>=rkoopa_y[v] && mario_y+19<=rkoopa_y[v]+16 && myspeed<0) { if(rkoopa_state[v]==1) { if(mario_y+19>rkoopa_y[v]+8 && myspeed<0) { mario_state=0; } else { myspeed=4; rkoopa_state[v]=2; } } else if(rkoopa_state[v]==2) { if(mario_y+19>rkoopa_y[v]+8 && myspeed<0) { mario_state=0; } else { rkxspeed[v]=-6; myspeed=4; } } } if(mario_x>=gkoopa_x[v]-16 && mario_x<=gkoopa_x[v]+8 && mario_y+19>=gkoopa_y[v] && mario_y+19<=gkoopa_y[v]+16 && myspeed<0) { if(gkoopa_state[v]==1) { if(mario_y+19>gkoopa_y[v]+8 && myspeed<0) { mario_state=0; } else { myspeed=4; gkoopa_state[v]=2; } } else if(gkoopa_state[v]==2) { if(mario_y+19>gkoopa_y[v]+8 && myspeed<0) { mario_state=0; } else { gkxspeed[v]=-6; myspeed=4; } } } if(mario_x>gkoopa_x[v]+8 && mario_x<=gkoopa_x[v]+16 && mario_y+19>=gkoopa_y[v] && mario_y+19<=gkoopa_y[v]+16 && myspeed<0) { if(gkoopa_state[v]==1) { if(mario_y+19>gkoopa_y[v]+8 && myspeed<0) { mario_state=0; } else { myspeed=4; gkoopa_state[v]=2; } } else if(gkoopa_state[v]==2) { if(mario_y+19>gkoopa_y[v]+8 && myspeed<0) { mario_state=0; } else { gkxspeed[v]=-6; myspeed=4; } } } if(mario_x>=goomba_x[v]-16 && mario_x<=goomba_x[v]+16 && mario_y+19>=goomba_y[v] && mario_y+19<=goomba_y[v]+16 && myspeed<0) { if(myspeed<0) { myspeed=4; goomba_state[v]=2; } else if(myspeed!<0) { mario_state=0; } } } if(mario_state==2 || mario_state==3) //Mario is big or flower { if(mario_xground_x[u] && mario_y+28<=ground_y[u]+16 && mario_y+28>=ground_y[u]) //mario is on a block of ground onground=1; if(mario_xblock_x[u] && mario_y+28<=block_y[u]+16 && mario_y+28>=block_y[u]) //mario is on a block onground=1; if(mario_xqblock_x[u] && mario_y+28<=qblock_y[u]+16 && mario_y+28>=qblock_y[u])) //mario is on a [?] block onground=1; else onground=0; if(mario_x>=rkoopa_x[v]-16 && mario_x<=rkoopa_x[u]+8 && mario_y+28>=rkoopa_y[v] && mario_y+28<=rkoopa_y[v]+16 && myspeed<0) //mario landed on a red koopa { if(rkoopa_state[v]==1) { if(mario_y+28>rkoopa_y[v]+8 && myspeed<0) { mario_state=1; } else { myspeed=4; rkoopa_state[v]=2; } } else if(rkoopa_state[v]==2) { if(mario_y+28>rkoopa_y[v]+8 && myspeed<0) { mario_state=1; } else { rkxspeed[v]=-6; myspeed=4; } } } if(mario_x>rkoopa_x[v]+8 && mario_x<=rkoopa_x[v]+16 && mario_y+28>=rkoopa_y[v] && mario_y+28<=rkoopa_y[u]+16 && myspeed<0) { if(rkoopa_state[v]==1) { if(mario_y+28>rkoopa_y[v]+8 && myspeed<0) { mario_state=1; } else { myspeed=4; rkoopa_state[v]=2; } } else if(rkoopa_state[v]==2) { if(mario_y+28>rkoopa_y[v]+8 && myspeed<0) { mario_state=1; } else { rkxspeed[v]=-6; myspeed=4; } } } if(mario_x>=gkoopa_x[v]-16 && mario_x<=gkoopa_x[v]+8 && mario_y+28>=gkoopa_y[v] && mario_y+28<=gkoopa_y[v]+16 && myspeed<0) { if(gkoopa_state[v]==1) { if(mario_y+28>gkoopa_y[v]+8 && myspeed<0) { mario_state=1; } else { myspeed=4; gkoopa_state[v]=2; } } else if(gkoopa_state[v]==2) { if(mario_y+28>gkoopa_y[v]+8 && myspeed<0) { mario_state=1; } else { gkxspeed[v]=-6; myspeed=4; } } } if(mario_x>gkoopa_x[v]+8 && mario_x<=gkoopa_x[v]+16 && mario_y+28>=gkoopa_y[v] && mario_y+28<=gkoopa_y[v]+16) //Mario is touching the l eft side of the green koopa { if(gkoopa_state[v]==1) { if(mario_y+28>gkoopa_y[v]+8 && myspeed<0) { mario_state=1; } else { myspeed=4; gkoopa_state[v]=2; } } else if(gkoopa_state[v]==2) { if(mario_y+28>gkoopa_y[v]+8 && myspeed<0) { mario_state=1; } else { gkxspeed[v]=-6; myspeed=4; ) } } if(mario_x>=goomba_x[v]-16 && mario_x<=goomba_x[v]+16 && mario_y+28>=goomba_y[v] && mario_y+28<=goomba_y[v]+16 && goomba_state[v]==1) { if(myspeed<0) { myspeed=4; goomba_state[v]=2; } else if(myspeed!<0) { mario_state=1; } } if(mario_x>=mushroom_x-16 && mario_x<=mushroom_x+16 && mario_y+28>=mushroom_y && mario_y+28<=mushroom_y+16) { mario_state=2; score=score+1000; item_state[1]=0; } if(mario_x>=1up_x-16 && mario_x<=1up_x+16 && mario_y+28>=1up_y && mario_y+28<=1up_y+16) { lives++; score=score+1000; item_state[3]=0; } if(mario_x>=flower_x-16 && mario_x<=flower_x+16 && mario_y+28>=flower_y && mario_y+28<=flower_y+16) { mario_state=3; score=score+1000; item_state[3]=0; } if(mario_x>=coin_x[u]-16 && mario_x<=coin_x[u]+16 && mario_y+28>=coin_y[u] && mario_y+28<=coin_y[u]+16) { coins++; score=score+100; coin_state[u]=0; } } if(onground==1 && myspeed<0) //If Mario is falling and hits the ground myspeed=0; //break the fall (so he doesn't go through the ground of course) if(mario_x<=block_x[u]+16 && mario_x+16>=block_x[u] && mario_y<=block_y[u]+16 && mario_y>=block_y[u] && myspeed>2) //mario hits a block (from under it) { myspeed=myspeed*-1; //reverse vertical speed block_state[u]=2; //tell the computer that the block was hit but hasn't paid its coin yet } /*All the stuff for the viewport system*/ if(view_x+(view_w/2)lvl_width*16) view_x=view_x+mxspeed; if(view_x+(view_w/2)>mario_x && view_x!<0) view_x=view_x+mxspeed; if(view_y+(view_h/2)lvl_height*16) view_y=view_y+myspeed; if(view_y+(view_h/2)>mario_y && view_y!<0) view_y=view_y+myspeed; /***************************************/ if(rkoopa_state[v]!=0) { if(rkoopa_y[v]block_y[w]-16 && rkoopa_x[v]<=block_x[w] && rkoopa_x[v]>=block_x[w]-16 && ) { rkxspeed[v]=rkxspeed[v]*-1; if(rkoopa_state[v]=2) block_state[w]=2; } else if(rkoopa_y[v]block_y[w]-16 && rkoopa_x[v]>=block_x[w] && rkoopa_x[v]<=block_x[w]+16) { rkxspeed[v]=rkxspeed[v]*-1; if(rkoopa_state[v]=2) block_state[w]=2; } else if(rkoopa_y[v]qblock_y[w]-16 && rkoopa_x[v]<=qblock_x[w] && rkoopa_x[v]>=qblock_x[w]-16) { rkxspeed[v]=rkxspeed[v]*-1; if(rkoopa_state[v]=2) qblock_state[w]=2; } else if(rkoopa_y[v]qblock_y[w]-16 && rkoopa_x[v]>=qblock_x[w] && rkoopa_x[v]<=qblock_x[w]+16) { rkxspeed[v]=rkxspeed[v]*-1; if(rkoopa_state[v]=2) qblock_state[w]=2; } else if(rkoopa_y[v]ground_y[w]-16 && rkoopa_x[v]<=ground_x[w] && rkoopa_x[v]>=ground_x[w]-16) { rkxspeed[v]=rkxspeed[v]*-1; } else if(rkoopa_y[v]ground_y[w]-16 && rkoopa_x[v]>=ground_x[w] && rkoopa_x[v]<=ground_x[w]+16) { rkxspeed[v]=rkxspeed[v]*-1; } /*this is the part where a red koopa is at the edge of a platform and turns around (badly coded cuz I'm tired, but it should do)*/ else if((rkoopa_y[v]+25!>ground_y[w] && rkoopa_y[v]+39!ground_x[w] && rkoopa_x[v]!block_y[w] && rkoopa_y[v]+39!block_x[w] && rkoopa_x[v]!qblock_y[w] && rkoopa_y[v]+39!qblock_x[w] && rkoopa_x[v]!block_y[a]-16 && gkoopa_x[v]<=block_x[a] && gkoopa_x[v]>=block_x[a]-16) { gkxspeed[v]=gkxspeed[v]*-1; if(gkoopa_state[v]=2) block_state[a]=2; } else if(gkoopa_y[v]block_y[a]-16 && gkoopa_x[v]>=block_x[a] && gkoopa_x[v]<=block_x[a]+16) { gkxspeed[v]=gkxspeed[v]*-1; if(gkoopa_state[v]=2) block_state[a]=2; } else if(gkoopa_y[v]qblock_y[a]-16 && gkoopa_x[v]<=qblock_x[a] && rkoopa_x[v]>=qblock_x[a]-16) { gkxspeed[v]=gkxspeed[v]*-1; if(gkoopa_state[v]=2) qblock_state[a]=2; } else if(gkoopa_y[v]qblock_y[a]-16 && gkoopa_x[v]>=qblock_x[a] && gkoopa_x[v]<=qblock_x[a]+16) { gkxspeed[v]=gkxspeed[v]*-1; if(gkoopa_state[v]=2) qblock_state[a]=2; } else if((gkoopa_y[v]+25!>ground_y[a] && gkoopa_y[v]+39!ground_x[a] && gkoopa_x[v]!block_y[a] && gkoopa_y[v]+39!block_x[a] && gkoopa_x[v]!qblock_y[a] && gkoopa_y[v]+39!qblock_x[a] && gkoopa_x[v]!block_y[u]-16 && mushroom_x<=block_x[u] && mushroom_x>=block_x[u]-16) //mushroom hit the left of the block { item_direction[1]=2; } else if(mushroom_yblock_y[u]-16 && mushroom_x>=block_x[u] && mushroom_x<=block_x[u]+16) //mushroom hit the right of the block { item_direction[1]=1; } else if(mushroom_yqblock_y[u]-16 && mushroom_x<=qblock_x[u] && mushroom_x>=qblock_x[u]-16) //mushroom hit the left of the [?] block { item_direction[1]=2; } else if(mushroom_yqblock_y[u]-16 && mushroom_x>=qblock_x[u] && mushroom_x<=qblock_x[u]+16) //mushroom hit the right of the [?] block { item_direction[1]=1; } else if(v==99) v=0; else v++; } v++; if(v==9) v=0; u++; if(u==99) u=0; if(mario_y==end_y) { level_won=1; if(mario_yview_x && mushroom_xview_y && mushroom_yview_x && flower_xview_y && flower_yview_x && 1up_xview_y && 1up_yview_x && goomba_x[p]view_y && goomba_y[p]view_x && gkoopa_x[q]view_y && gkoopa_y[q]view_x && rkoopa_x[r]view_y && rkoopa_y[r]view_x && star_x[b]view_y && star_y[b]view_x && mario_xview_y && mario_ywid->dirty = 1; int ret = TTK_EV_CLICK; switch(e->type) { case PZ_EVENT_BUTTON_DOWN: switch (e->arg) { case PZ_BUTTON_ACTION: buttondown[0]=1; mrun=1; if(mario_state==3) { if(t!=2) { fireball_x[t]=mario_x+16; fireball_y[t]=mario_y-16; t++; } } break; case PZ_BUTTON_MENU: buttondown[1]=1; mjump=1; break; case PZ_BUTTON_NEXT: mwalk=1; mdirection=2; buttondown[3]=1; break; case PZ_BUTTON_PREVIOUS: mwalk=1; mdirection=1; buttondown[2]=1; break; case PZ_BUTTON_PLAY: buttondown[4]=1; if(onground==1 && (mario_state==2 || mario_state==3)) { mcrouch=1; mario_y=mario_y-12; } break; } break; case PZ_EVENT_BUTTON_UP: switch (e->arg) { case PZ_BUTTON_ACTION: buttondown[0]=0; mrun=0; break; case PZ_BUTTON_MENU: buttondown[1]=0; mjump=0; break; case PZ_BUTTON_NEXT: mwalk=0; buttondown[3]=0; break; case PZ_BUTTON_PREVIOUS: mwalk=0; buttondown[2]=0; break; case PZ_BUTTON_PLAY: buttondown[4]=0; mcrouch=0; break; } break; default: ret = TTK_EV_UNUSED; break; } return ret; } static PzWindow *new_mario_window() { PzWindow *ret; ret = pz_new_window(_("Mario"), PZ_WINDOW_NORMAL); pz_add_widget(ret, draw_mario, mario_events); return pz_finish_window(ret); } static void init_mario() { /*Load the images and assign them to a surface.*/ module = pz_register_module("Mario", NULL); pz_menu_add_action("/Extras/Games/Mario", new_mario_window); small_mario_left[0] = ttk_load_image (pz_module_get_datapath (module, "smallmarioleft.png")); small_mario_left[1] = ttk_load_image (pz_module_get_datapath (module, "smallmarioleft2.png")); small_mario_right[0] = ttk_load_image (pz_module_get_datapath (module, "smallmarioright.png")); small_mario_right[1] = ttk_load_image (pz_module_get_datapath (module, "smallmarioright2.png")); mario_left[0] = ttk_load_image (pz_module_get_datapath (module, "marioleft.png")); mario_left[1] = ttk_load_image (pz_module_get_datapath (module, "marioleft2.png")); mario_left[2] = ttk_load_image (pz_module_get_datapath (module, "marioleft3.png")); mario_right[0] = ttk_load_image (pz_module_get_datapath (module, "marioright.png")); mario_right[1] = ttk_load_image (pz_module_get_datapath (module, "marioright2.png")); mario_right[2] = ttk_load_image (pz_module_get_datapath (module, "marioright3.png")); mario_crouch_left = ttk_load_image (pz_module_get_datapath (module, "mariocrouchright.png")); mario_crouch_right = ttk_load_image (pz_module_get_datapath (module, "mariocrouchleft.png")); flower_mario_left[0] = ttk_load_image (pz_module_get_datapath (module, "flowermarioleft1.png")); flower_mario_left[1] = ttk_load_image (pz_module_get_datapath (module, "flowermarioleft2.png")); flower_mario_left[2] = ttk_load_image (pz_module_get_datapath (module, "flowermarioleft3.png")); flower_mario_right[0] = ttk_load_image (pz_module_get_datapath (module, "flowermarioright1.png")); flower_mario_right[1] = ttk_load_image (pz_module_get_datapath (module, "flowermarioright2.png")); flower_mario_right[2] = ttk_load_image (pz_module_get_datapath (module, "flowermarioright3.png")); mario_dead = ttk_load_image (pz_module_get_datapath (module, "mariodead.png")); goomba[0] = ttk_load_image (pz_module_get_datapath (module, "goomba1.png")); goomba[1] = ttk_load_image (pz_module_get_datapath (module, "goomba2.png")); goomba_squish = ttk_load_image (pz_module_get_datapath (module, "goomba_squished.png")); gkoopa_l[0] = ttk_load_image (pz_module_get_datapath (module, "greenkoopaleft.png")); gkoopa_l[1] = ttk_load_image (pz_module_get_datapath (module, "greenkoopaleft2.png")); gkoopa_r[0] = ttk_load_image (pz_module_get_datapath (module, "greenkooparight.png")); gkoopa_r[1] = ttk_load_image (pz_module_get_datapath (module, "greenkooparight2.png")); rkoopa_l[0] = ttk_load_image (pz_module_get_datapath (module, "redkoopaleft.png")); rkoopa_l[1] = ttk_load_image (pz_module_get_datapath (module, "redkoopaleft2.png")); rkoopa_r[0] = ttk_load_image (pz_module_get_datapath (module, "redkooparight.png")); rkoopa_r[1] = ttk_load_image (pz_module_get_datapath (module, "redkooparight2.png")); greenshell[0] = ttk_load_image (pz_module_get_datapath (module, "greenshell1.png")); greenshell[1] = ttk_load_image (pz_module_get_datapath (module, "greenshell2.png")); greenshell[2] = ttk_load_image (pz_module_get_datapath (module, "greenshell3.png")); greenshell[3] = ttk_load_image (pz_module_get_datapath (module, "greenshell4.png")); redshell[0] = ttk_load_image (pz_module_get_datapath (module, "redshell1.png")); redshell[1] = ttk_load_image (pz_module_get_datapath (module, "redshell2.png")); redshell[2] = ttk_load_image (pz_module_get_datapath (module, "redshell3.png")); redshell[3] = ttk_load_image (pz_module_get_datapath (module, "redshell4.png")); ground = ttk_load_image (pz_module_get_datapath (module, "brick.png")); block = ttk_load_image (pz_module_get_datapath (module, "block.png")); qblock[0] = ttk_load_image (pz_module_get_datapath (module, "qblock1.png")); qblock[1] = ttk_load_image (pz_module_get_datapath (module, "qblock2.png")); qblock[2] = ttk_load_image (pz_module_get_datapath (module, "qblock3.png")); qblock[3] = ttk_load_image (pz_module_get_datapath (module, "qblock4.png")); usedblock = ttk_load_image (pz_module_get_datapath (module, "usedblock.png")); coin[0] = ttk_load_image (pz_module_get_datapath (module, "coin.png")); coin[1] = ttk_load_image (pz_module_get_datapath (module, "coin2.png")); coin[2] = ttk_load_image (pz_module_get_datapath (module, "coin3.png")); coin[3] = ttk_load_image (pz_module_get_datapath (module, "coin4.png")); mushroom = ttk_load_image (pz_module_get_datapath (module, "mushroom.png")); 1up = ttk_load_image (pz_module_get_datapath (module, "1up.png")); flower = ttk_load_image (pz_module_get_datapath (module, "flower.png")); fireball[0] = ttk_load_image (pz_module_get_datapath (module, "fireball1.png")); fireball[1] = ttk_load_image (pz_module_get_datapath (module, "fireball2.png")); fireball[2] = ttk_load_image (pz_module_get_datapath (module, "fireball3.png")); fireball[3] = ttk_load_image (pz_module_get_datapath (module, "fireball4.png")); star[0] = ttk_load_image (pz_module_get_datapath (module, "star1.png")); star[1] = ttk_load_image (pz_module_get_datapath (module, "star2.png")); star[2] = ttk_load_image (pz_module_get_datapath (module, "star3.png")); star[3] = ttk_load_image (pz_module_get_datapath (module, "star4.png")); win = ttk_load_image (pz_module_get_datapath (module, "win1.png")); } PZ_MOD_INIT(init_mario)