Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.image text in transcribed

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 arrays

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Concepts of Database Management

Authors: Philip J. Pratt, Joseph J. Adamski

7th edition

978-1111825911, 1111825912, 978-1133684374, 1133684378, 978-111182591

Students also viewed these Databases questions