gpdraw undeclared it's normal, your variable is called gpDraw
Add the prototypes or your functiuns after the includes, and global variables or type your function in order of use for exemple first Init, then AllDraw, follow by GameEngine and finally GpMain :)