go-susapp/overlayrenderer.go

20 lines
582 B
Go
Raw Normal View History

package main
import "codehub.onpointcoding.net/sean/go-susapp/enum"
var taskMapTypeMapped = map[byte]map[byte]enum.TaskData{
enum.MAP_THE_SKELD: enum.TASKS_SKELD,
enum.MAP_MIRA_HQ: enum.TASKS_MIRA,
enum.MAP_POLUS: enum.TASKS_POLUS,
enum.MAP_THE_AIRSHIP: enum.TASKS_AIRSHIP,
}
func renderTaskOverlay(r *Renderer) {
if r.state.CurrentGame.MyTasks != nil {
mapped := taskMapTypeMapped[r.state.CurrentGame.MapType]
for i, item := range r.state.CurrentGame.MyTasks {
r.DrawText(0, float64(40+20*i), mapped[item].Text, defaultRenderFont, 10, 0xffffff)
}
}
}