경일 메타버스 20220512 6주차 4일 수업내용. 프레임 워크 - 텍스트 색 변화, 씬
#include <stdio.h>
#include <Windows.h>
int main(void)
{
HANDLE h = GetStdHandle(STD_OUTPUT_HANDLE);
// FOREGROUND_RGB
//
// 1 2 4 8
// BACKGROUND_RGB
SetConsoleTextAttribute(h, BACKGROUND_BLUE | BACKGROUND_GREEN | FOREGROUND_RED | FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_INTENSITY);
puts("Hello World!");
SetConsoleTextAttribute(h, FOREGROUND_RED | FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_INTENSITY);
char ch;
WORD Attributes;
return 0;
}
Text.c 코드
#include "Text.h"
void TextCopy(Text* dest, const WCHAR* src, WORD attributes)
{
while (*src)
{
dest->Char.UnicodeChar = *src; // src 내용을 dest에 복사
dest->Attributes = attributes;
++dest;
++src;
}
}
int32 TextLen(const Text* text)
{
int32 count = 0;
while (text -> Char.UnicodeChar)
{
count++;
text++;
}
return count;
}
해당 게임(월드)을 구현하기 위한 객체들, 그리고 그 객체들을 관리하는 단위.
여러 씬을 구현할 필요가 있을 때, 한 파일에 모두 구현하기는 힘들다.
static : 정적 ⇒ 프로그램 실행 전에.
extern : 선언에 주로 사용. 정적 데이터.
- 새로운 필터의 작성 시, 디렉토리를 구성할 것.
솔루션 탐색기 - 프로젝트 속성 - VC++디렉토리 - 포함 디렉토리