int main(int argc,char *argv[]){ Map Board; char *intro[] = {"○ : 사용자","● : 컴퓨터","방향키 : 이동","스페이스바 : 돌 놓기"}; int _x,_y,position,i,j; system("mode con:cols=60 lines=20"); system("cls"); Map_set(&Board); for(i=0;i<4;i++){ gotoxy(40,i); printf("%s",intro[i]); } _x = 16; _y = 8; gotoxy(_x,_y); while(1){ if(User_mv(&_x,&_y,&Board)){ Board.arrBoard[_y][_x/2] = USER; Board.arrDanger[_y][_x/2] = -1; Board.arrFavor[_y][_x/2] = -1; Scanner(_y,_x/2,&Board); Com_Turn(&Board); } } return 0; }
void RenderQueue_addDrawable(RenderQueue* self, Drawable* drawable, float positionX, float positionY) { smug_assert(_invariant(self)); Sprite* sprite = Drawable_getSprite(drawable); smug_assert(sprite != NULL); int id = Sprite_getTextureId(sprite); RenderBatch* renderBatch = (RenderBatch*)Map_get(self->renderBatches, &id); if (renderBatch == NULL) { renderBatch = RenderBatch_new(RENDERBATCH_INITIAL_SIZE, TRUE); Map_set(self->renderBatches, _allocInt(id), renderBatch); } Drawable_addRenderData(drawable, renderBatch, positionX, positionY); }