Buy me a coffee
본문 바로가기
728x90
SMALL

전체 글153

[ChatGPT][SDL2][2D 게임 개발] Player 구조체 및 관련 기능을 정의하는 player.h 파일의 예제 샘플 Player 구조체 및 관련 기능을 정의하는 player.h 파일의 예제 샘플 // Here is an example of a player.h file that defines the Player struct and its associated functions #ifndef PLAYER_H #define PLAYER_H #include #define PLAYER_WIDTH 64 #define PLAYER_HEIGHT 64 typedef struct { int x; int y; SDL_Texture* texture; } Player; void initPlayer(Player* player); int loadPlayerMedia(Player* player, SDL_Renderer* renderer); void.. 2023. 1. 14.
[ChatGPT][SDL2][2D 게임 개발] SDL(Simple DirectMedia Layer) 라이브러리를 사용하여 창을 만들고 플레이어 이미지를 표시하는 player.c 파일의 예제 샘플 SDL(Simple DirectMedia Layer) 라이브러리를 사용하여 창을 만들고 플레이어 이미지를 표시하는 player.c 파일의 예제 샘플 // Here is an example of a player.c file that uses the Simple DirectMedia Layer (SDL) library to create a window and display an image of a player #include "player.h" #include void initPlayer(Player* player) { player->x = 0; player->y = 0; player->texture = NULL; } int loadPlayerMedia(Player* player, SDL_Renderer* .. 2023. 1. 14.
[ChatGPT][SFML][커스텀 2D 게임 엔진 개발] C++에서 자체 SFML 게임 엔진에 SFML을 사용하는 기본 게임 루프의 예제 샘플 C++에서 자체 SFML 게임 엔진에 SFML을 사용하는 기본 게임 루프의 예제 샘플 // Here is an example of a basic game loop using SFML for your own SFML Game engine in C++ #include #include "engine.hpp" int main() { // Initialize the engine if (!Engine::init()) { std::cout 2023. 1. 14.
[ChatGPT][SDL2][커스텀 2D 게임 엔진 개발] C에서 자체 SDL기반 게임 엔진에 SDL2를 사용하는 기본 게임 루프의 예제 샘플 C에서 자체 SDL기반 게임 엔진에 SDL2를 사용하는 기본 게임 루프의 예제 샘플 // Here is an example of a basic game loop using SDL2 for your own SDL Game engine in C #include #include "engine.h" int main(int argc, char* argv[]) { // Initialize the engine if (!engine_init()) { printf("Error initializing engine: %s\n", SDL_GetError()); return 1; } // Main loop flag int quit = 0; // Event handler SDL_Event e; // While applicatio.. 2023. 1. 14.
728x90
LIST