For Dragonfly, we’d like to provide the ability to draw in layers - for the game programmer to control order of Objects to be drawn. i.e., Draw these Objects first (in the background), then these objects second (on top), …
Assume this is called altitude.
What code needs to be added to Dragonfly to keep track of an Object’s altitude?
Consider the below code:
// Draw world bottom up, from 0 to MAX_ALTITUDE.
::draw() {
WorldManager
(&m_updates);
ObjectListIterator li
while (!li.isDone()) {
*p_temp_o = li.currentObj();
Object
-> draw();
p_temp_o
.next();
li}
}
This code doesn’t do what we want. Why not? Fix it, providing code that does.
Have ONE person from each group submit the group’s answers:
https://wpi.qualtrics.com/jfe/form/SV_6P5PdnqkovHPuHY
Make sure to include the names of all group members.
Happy layer-ing!
– Mark