-1
我從來沒有真正瞭解指針/引用,但在我寫的代碼我得到一個錯誤說SDL指針和引用
Invalid arguments '
Candidates are:
int SDL_UpperBlit(SDL_Surface *, SDL_Rect *, SDL_Surface *, SDL_Rect *)
'
我真的應該先了解指針,但任何人都可以幫助我嗎?
void MapManager::draw(SDL_Surface *surface, SDL_Surface &mainSurface, int x, int y){
SDL_BlitSurface(surface, NULL, mainSurface, new SDL_Rect{x, y, 32, 32});
}
用作
draw(img_brickImage, *inDisplay, x * TILE_SIZE, y * TILE_SIZE);
顯示:
SDL_Surface* display;