Question
Write a function called obj_draw_all in mips Make obj_draw_all. You really only need one s reg this time. Inside that function Make a loop like
Write a function called obj_draw_all in mips
Make obj_draw_all. You really only need one s reg this time.
Inside that function
Make a loop like for(s0 = cur_num_objs - 1; s0 >= 0; s0--). Notice the starting value, direction, and increment are backwards from a normal for loop! This is important, because it will cause the player object (object 0) to be drawn last and therefore on top of any other objects.
Inside that loop, you will be calling your friend display_blit_5x5_trans once again. The X argument will be object_x[s0]. The Y argument will be object_y[s0]. The pattern argument will be obj_textures[object_type[s0] * 4]. This is very similar to what you did for the tilemap, but youre just accessing a 1D array (object_type) this time.
3. Drawing the objects (and how objects work) There are actually many objects in the game world right now, but you just can't see any of them because they aren't being drawn! Let's talk about the object system for a bit. At the top of the program you will see this variable and these arraysStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started