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.
void WorldManager::draw(void) {
for (int i=0; i < m_updates.getCount(); i++) {
*p_o = m_updates[i]
Object -> draw();
p_o
}
}
This code doesn’t do what we want yet. Update it, providing code that does.
Each person in a group should submit their answers:
https://wpi.qualtrics.com/jfe/form/SV_039eHUbBuJmHorA
Make sure to include the names of all group members.
Happy layer-ing!
– Mark