SlideShare une entreprise Scribd logo
1  sur  24
Delphi
- 파스칼 + 객체지향 -> 진화
- 비쥬얼 컴포넌트 라이브러리 프레임워크로 win32를 지원함.
장점
- 윈도 아래 모든 부분을 프로그래밍 가능
- 높은 생산성
- 간결한 코드…?
- c++과 비슷한 low level 프로그래밍 가능
- 빠른 컴파일 속도
- 버전별 호환성이 좋음
- 멀티 플렛폼 지원을 위해 발전 중
단점
- 팀 단위 작업은 힘듬.
- 버그가 산발적으로 많이 생김
델파이 vs c#
- 순수 네이티브 / net 가상 머신 위에서 도는
- 메모리 관리
- 20년째 같은 개발환경 / 변화 실버라이트, WPF….
이걸 누가씀??
- win10 솔리테어 게임…
- 병원 관리 시스템
- 회계
- 등등…
햇갈림
- C++ / Delphi
- = / :=
- == / =
- != / <>
햇갈림
- C++ / Delphi
- / (나누기) / div(정수 나누기) / (실수 나누기)
- % / mod
- ! / not
햇갈림
- C++ / Delphi
- << / shl
- >> / shr
햇갈림
- C++ / Delphi
- |, || / or
- &, && / and
햇갈림
- C++ / Delphi
- &a / @a
- *a / ^a
햇갈림
- C++ / Delphi
- null / nil
- { } / begin end
- if (NOT list.Count > 0) then ~~~~~
- NOT 연산자의 우선순위가 높다
- NOT list.Count를 먼저 해버림
- count가 0 이면
- ~0 이라 -1이 나옴..
- -1 > 0 이라 if문을 넘어간다
으아아아 미친
- 델파이의 식별자 (변수 명, 함수 명)은 대소문자를 구분하지 않는다.
- Setter를 정의하면 대입 연산자 := 사용 시 자동으로 setter가 호출된다.
카메라 설정 따라 뷰 프러스텀 만듬.
d3dPenel render
Vector3 originDir, dir;
GetCenterRay(&originDir, &dir);
float x, z;
x = originDir.x - dir.x * originDir.y / dir.y;
z = originDir.z - dir.z * originDir.y / dir.y;
terrain render
//버퍼 락
if (viewTile1_)
{
pMesh_->LockVertexBuffer(D3DLOCK_NOSYSLOCK,
(void**)&pVertices);
pMesh_->LockAttributeBuffer(D3DLOCK_NOSYSLOCK, &pAttribute);
pMesh_->LockIndexBuffer(D3DLOCK_NOSYSLOCK, (void**)&pIndices);
}
terrain render
//버퍼 락
if (viewTile2_)
{
pMesh2_->LockVertexBuffer(D3DLOCK_NOSYSLOCK,
(void**)&pVertices2);
pMesh2_->LockAttributeBuffer(D3DLOCK_NOSYSLOCK, &pAttribute2);
pMesh2_->LockIndexBuffer(D3DLOCK_NOSYSLOCK,
(void**)&pIndices2);
if (viewTile1_ || viewTile2_)
{
for (auto tc : terrainList_)
if (텍셀이 시야 범위 안인가)
tc->FillVertices(&pVertices, &pAttribute, &pVertices2, &pAttribute2, ix,
iz, viewRange_, &cellCount, &cellCount2);
if (viewTile1_)
memset(pAttribute, 0xff, 2 * ((2 * viewRange_ - 1) * (2 * viewRange_ - 1) -
cellCount) * sizeof(DWORD));
if (viewTile2_)
memset(pAttribute2, 0xff, 2 * ((2 * viewRange_ - 1) * (2 * viewRange_ - 1) -
cellCount2) * sizeof(DWORD));
}
FillVertics
int x1 = qMax(0, qMin(x - viewRange + 1, 255));
int x2 = qMax(0, qMin(x + viewRange - 1, 255));
int z1 = qMax(0, qMin(z - viewRange + 1, 255));
int z2 = qMax(0, qMin(z + viewRange - 1, 255));
-> cellVisible[255][255] memset
FillVertics
Vector3 vHeight;
for (int i = x1; i <= x2; ++i) {
for (int j = z1; j <= z2; ++j) {
vHeight = Vector3((indexX_ * 256 + i) * CELL_SIZE, 0, (indexZ_ * 256 + j) *
CELL_SIZE);
vHeight.y = terrainMgr->heightmap2_ ? heightMap2_[i][j] : heightMap_[i][j];
cellVisible_[i][j] = CullObject(&vHeight, 1);
}
}
FillVertics
for (셀 x1 ~ x2, z1~z2)
if (!보이는셀) continue;
for (int k = 0; k < terrainMgr->textureMgr_->curList.size(); ++k) {
//attribue 버퍼 셋팅
**attribute = k; ++(*attribute);
**attribute = k; ++(*attribute);
done = true;
break;
}
// 보조선 보기
if (viewTile1_)
for (int i = 0; i < cellCount; ++i)
{
pIndices[0] = i * 4; pIndices[1] = i * 4 + 2;
pIndices[2] = i * 4 + 1; pIndices[3] = i * 4;
pIndices[4] = i * 4 + 3; pIndices[5] = i * 4 + 2;
pIndices += 6;
}
pMesh_->UnlockIndexBuffer();
pMesh_->UnlockAttributeBuffer();
pMesh_->UnlockVertexBuffer();
if (viewTile2_)
for (int i = 0; i < cellCount2; ++i)
{
pIndices2[0] = i * 4; pIndices2[1] = i * 4 + 2;
pIndices2[2] = i * 4 + 1; pIndices2[3] = i * 4;
pIndices2[4] = i * 4 + 3; pIndices2[5] = i * 4 + 2;
pIndices2 += 6;
}
pMesh2_->UnlockIndexBuffer();
pMesh2_->UnlockAttributeBuffer();
pMesh2_->UnlockVertexBuffer();

Contenu connexe

Tendances

02장 자료형과 연산자
02장 자료형과 연산자02장 자료형과 연산자
02장 자료형과 연산자
웅식 전
 
7급 공무원도 쉽게 따라하는 쉘 스크립트
7급 공무원도 쉽게 따라하는 쉘 스크립트7급 공무원도 쉽게 따라하는 쉘 스크립트
7급 공무원도 쉽게 따라하는 쉘 스크립트
Young-Ho Cha
 
AIbyExample - Ch7 raven. version 0.8
AIbyExample - Ch7 raven. version 0.8AIbyExample - Ch7 raven. version 0.8
AIbyExample - Ch7 raven. version 0.8
Ryan Park
 
12 2. dynamic allocation
12 2. dynamic allocation12 2. dynamic allocation
12 2. dynamic allocation
웅식 전
 

Tendances (18)

TestBCD2018-2(answer)
TestBCD2018-2(answer)TestBCD2018-2(answer)
TestBCD2018-2(answer)
 
ES6 for Node.js Study 5주차
ES6 for Node.js Study 5주차ES6 for Node.js Study 5주차
ES6 for Node.js Study 5주차
 
GCGC- CGCII 서버 엔진에 적용된 기술 (3) - Exception
GCGC- CGCII 서버 엔진에 적용된 기술 (3) - ExceptionGCGC- CGCII 서버 엔진에 적용된 기술 (3) - Exception
GCGC- CGCII 서버 엔진에 적용된 기술 (3) - Exception
 
02장 자료형과 연산자
02장 자료형과 연산자02장 자료형과 연산자
02장 자료형과 연산자
 
javascript02
javascript02javascript02
javascript02
 
7급 공무원도 쉽게 따라하는 쉘 스크립트
7급 공무원도 쉽게 따라하는 쉘 스크립트7급 공무원도 쉽게 따라하는 쉘 스크립트
7급 공무원도 쉽게 따라하는 쉘 스크립트
 
shell and process
shell and processshell and process
shell and process
 
Data Structure - 1st Study
Data Structure - 1st StudyData Structure - 1st Study
Data Structure - 1st Study
 
GCGC- CGCII 서버 엔진에 적용된 기술 (1)
GCGC- CGCII 서버 엔진에 적용된 기술 (1)GCGC- CGCII 서버 엔진에 적용된 기술 (1)
GCGC- CGCII 서버 엔진에 적용된 기술 (1)
 
[OpenTRS-001] Hotel California
[OpenTRS-001] Hotel California[OpenTRS-001] Hotel California
[OpenTRS-001] Hotel California
 
Data Structure. Linked List
Data Structure. Linked ListData Structure. Linked List
Data Structure. Linked List
 
Geveloper 160816
Geveloper 160816Geveloper 160816
Geveloper 160816
 
옛날 웹 개발자가 잠깐 맛본 Vue.js 소개
옛날 웹 개발자가 잠깐 맛본 Vue.js 소개옛날 웹 개발자가 잠깐 맛본 Vue.js 소개
옛날 웹 개발자가 잠깐 맛본 Vue.js 소개
 
GCGC- CGCII 서버 엔진에 적용된 기술 (5) - Executor with Exception
GCGC- CGCII 서버 엔진에 적용된 기술 (5) - Executor with ExceptionGCGC- CGCII 서버 엔진에 적용된 기술 (5) - Executor with Exception
GCGC- CGCII 서버 엔진에 적용된 기술 (5) - Executor with Exception
 
AIbyExample - Ch7 raven. version 0.8
AIbyExample - Ch7 raven. version 0.8AIbyExample - Ch7 raven. version 0.8
AIbyExample - Ch7 raven. version 0.8
 
windows via c++ Ch 5. Job
windows via c++ Ch 5. Jobwindows via c++ Ch 5. Job
windows via c++ Ch 5. Job
 
12 2. dynamic allocation
12 2. dynamic allocation12 2. dynamic allocation
12 2. dynamic allocation
 
Blockchain 4th dapp programming
Blockchain 4th dapp programmingBlockchain 4th dapp programming
Blockchain 4th dapp programming
 

Similaire à 190821 delphi

[0312 조진현] good bye dx9
[0312 조진현] good bye dx9[0312 조진현] good bye dx9
[0312 조진현] good bye dx9
진현 조
 
Manage book project
Manage book projectManage book project
Manage book project
Ann Byung Hyun
 
김민욱, (달빛조각사) 엘릭서를 이용한 mmorpg 서버 개발, NDC2019
김민욱, (달빛조각사) 엘릭서를 이용한 mmorpg 서버 개발, NDC2019김민욱, (달빛조각사) 엘릭서를 이용한 mmorpg 서버 개발, NDC2019
김민욱, (달빛조각사) 엘릭서를 이용한 mmorpg 서버 개발, NDC2019
min woog kim
 
[Td 2015]녹슨 c++ 코드에 모던 c++로 기름칠하기(옥찬호)
[Td 2015]녹슨 c++ 코드에 모던 c++로 기름칠하기(옥찬호)[Td 2015]녹슨 c++ 코드에 모던 c++로 기름칠하기(옥찬호)
[Td 2015]녹슨 c++ 코드에 모던 c++로 기름칠하기(옥찬호)
Sang Don Kim
 

Similaire à 190821 delphi (20)

NDC11_슈퍼클래스
NDC11_슈퍼클래스NDC11_슈퍼클래스
NDC11_슈퍼클래스
 
NDC11_김성익_슈퍼클래스
NDC11_김성익_슈퍼클래스NDC11_김성익_슈퍼클래스
NDC11_김성익_슈퍼클래스
 
DEVIEW-FULL-감독판.pptx
DEVIEW-FULL-감독판.pptxDEVIEW-FULL-감독판.pptx
DEVIEW-FULL-감독판.pptx
 
Deview 2019 눈발자국
Deview 2019 눈발자국Deview 2019 눈발자국
Deview 2019 눈발자국
 
[2012 CodeEngn Conference 07] nesk - Defcon 20th : 본선 CTF 문제풀이
[2012 CodeEngn Conference 07] nesk - Defcon 20th : 본선 CTF 문제풀이[2012 CodeEngn Conference 07] nesk - Defcon 20th : 본선 CTF 문제풀이
[2012 CodeEngn Conference 07] nesk - Defcon 20th : 본선 CTF 문제풀이
 
ffmpeg optimization using CUDA
ffmpeg optimization using CUDAffmpeg optimization using CUDA
ffmpeg optimization using CUDA
 
[0312 조진현] good bye dx9
[0312 조진현] good bye dx9[0312 조진현] good bye dx9
[0312 조진현] good bye dx9
 
Manage book project
Manage book projectManage book project
Manage book project
 
Manage book project
Manage book projectManage book project
Manage book project
 
불어오는 변화의 바람, From c++98 to c++11, 14
불어오는 변화의 바람, From c++98 to c++11, 14 불어오는 변화의 바람, From c++98 to c++11, 14
불어오는 변화의 바람, From c++98 to c++11, 14
 
Android ndk jni 설치및 연동
Android ndk jni 설치및 연동Android ndk jni 설치및 연동
Android ndk jni 설치및 연동
 
Ndc12 2
Ndc12 2Ndc12 2
Ndc12 2
 
[NDC17] Unreal.js - 자바스크립트로 쉽고 빠른 UE4 개발하기
[NDC17] Unreal.js - 자바스크립트로 쉽고 빠른 UE4 개발하기[NDC17] Unreal.js - 자바스크립트로 쉽고 빠른 UE4 개발하기
[NDC17] Unreal.js - 자바스크립트로 쉽고 빠른 UE4 개발하기
 
3ds maxscript 튜토리얼_20151206_서진택
3ds maxscript 튜토리얼_20151206_서진택3ds maxscript 튜토리얼_20151206_서진택
3ds maxscript 튜토리얼_20151206_서진택
 
김민욱, (달빛조각사) 엘릭서를 이용한 mmorpg 서버 개발, NDC2019
김민욱, (달빛조각사) 엘릭서를 이용한 mmorpg 서버 개발, NDC2019김민욱, (달빛조각사) 엘릭서를 이용한 mmorpg 서버 개발, NDC2019
김민욱, (달빛조각사) 엘릭서를 이용한 mmorpg 서버 개발, NDC2019
 
ARTIK 710 IoT class 02
ARTIK 710 IoT class 02ARTIK 710 IoT class 02
ARTIK 710 IoT class 02
 
7가지 동시성 모델 - 데이터 병렬성
7가지 동시성 모델 - 데이터 병렬성7가지 동시성 모델 - 데이터 병렬성
7가지 동시성 모델 - 데이터 병렬성
 
[신경망기초] 퍼셉트론구현
[신경망기초] 퍼셉트론구현[신경망기초] 퍼셉트론구현
[신경망기초] 퍼셉트론구현
 
[Td 2015]녹슨 c++ 코드에 모던 c++로 기름칠하기(옥찬호)
[Td 2015]녹슨 c++ 코드에 모던 c++로 기름칠하기(옥찬호)[Td 2015]녹슨 c++ 코드에 모던 c++로 기름칠하기(옥찬호)
[Td 2015]녹슨 c++ 코드에 모던 c++로 기름칠하기(옥찬호)
 
[TechDays Korea 2015] 녹슨 C++ 코드에 모던 C++로 기름칠하기
[TechDays Korea 2015] 녹슨 C++ 코드에 모던 C++로 기름칠하기[TechDays Korea 2015] 녹슨 C++ 코드에 모던 C++로 기름칠하기
[TechDays Korea 2015] 녹슨 C++ 코드에 모던 C++로 기름칠하기
 

Plus de Hyeon-Woo Sa (10)

190507 synchronization
190507 synchronization190507 synchronization
190507 synchronization
 
190311 factory
190311 factory190311 factory
190311 factory
 
190325 synchro
190325 synchro190325 synchro
190325 synchro
 
190421 coroutine
190421 coroutine190421 coroutine
190421 coroutine
 
190701 c# gram
190701 c# gram190701 c# gram
190701 c# gram
 
190121 unfitness get set
190121 unfitness get set190121 unfitness get set
190121 unfitness get set
 
190409 parallel patterns library (ppl)
190409 parallel patterns library (ppl)190409 parallel patterns library (ppl)
190409 parallel patterns library (ppl)
 
190909 ambient
190909 ambient190909 ambient
190909 ambient
 
Next 16 1학기_휴디프_게임_bump it now
Next 16 1학기_휴디프_게임_bump it nowNext 16 1학기_휴디프_게임_bump it now
Next 16 1학기_휴디프_게임_bump it now
 
NEXT INSTITUTE 실전프로젝트 Team Horde YaloYalo
NEXT INSTITUTE 실전프로젝트 Team Horde YaloYaloNEXT INSTITUTE 실전프로젝트 Team Horde YaloYalo
NEXT INSTITUTE 실전프로젝트 Team Horde YaloYalo
 

190821 delphi

  • 1. Delphi - 파스칼 + 객체지향 -> 진화 - 비쥬얼 컴포넌트 라이브러리 프레임워크로 win32를 지원함.
  • 2. 장점 - 윈도 아래 모든 부분을 프로그래밍 가능 - 높은 생산성 - 간결한 코드…? - c++과 비슷한 low level 프로그래밍 가능 - 빠른 컴파일 속도 - 버전별 호환성이 좋음 - 멀티 플렛폼 지원을 위해 발전 중
  • 3. 단점 - 팀 단위 작업은 힘듬. - 버그가 산발적으로 많이 생김
  • 4. 델파이 vs c# - 순수 네이티브 / net 가상 머신 위에서 도는 - 메모리 관리 - 20년째 같은 개발환경 / 변화 실버라이트, WPF….
  • 5. 이걸 누가씀?? - win10 솔리테어 게임… - 병원 관리 시스템 - 회계 - 등등…
  • 6. 햇갈림 - C++ / Delphi - = / := - == / = - != / <>
  • 7. 햇갈림 - C++ / Delphi - / (나누기) / div(정수 나누기) / (실수 나누기) - % / mod - ! / not
  • 8. 햇갈림 - C++ / Delphi - << / shl - >> / shr
  • 9. 햇갈림 - C++ / Delphi - |, || / or - &, && / and
  • 10. 햇갈림 - C++ / Delphi - &a / @a - *a / ^a
  • 11. 햇갈림 - C++ / Delphi - null / nil - { } / begin end
  • 12. - if (NOT list.Count > 0) then ~~~~~ - NOT 연산자의 우선순위가 높다 - NOT list.Count를 먼저 해버림 - count가 0 이면 - ~0 이라 -1이 나옴.. - -1 > 0 이라 if문을 넘어간다
  • 13. 으아아아 미친 - 델파이의 식별자 (변수 명, 함수 명)은 대소문자를 구분하지 않는다. - Setter를 정의하면 대입 연산자 := 사용 시 자동으로 setter가 호출된다.
  • 14.
  • 15. 카메라 설정 따라 뷰 프러스텀 만듬.
  • 16. d3dPenel render Vector3 originDir, dir; GetCenterRay(&originDir, &dir); float x, z; x = originDir.x - dir.x * originDir.y / dir.y; z = originDir.z - dir.z * originDir.y / dir.y;
  • 17. terrain render //버퍼 락 if (viewTile1_) { pMesh_->LockVertexBuffer(D3DLOCK_NOSYSLOCK, (void**)&pVertices); pMesh_->LockAttributeBuffer(D3DLOCK_NOSYSLOCK, &pAttribute); pMesh_->LockIndexBuffer(D3DLOCK_NOSYSLOCK, (void**)&pIndices); }
  • 18. terrain render //버퍼 락 if (viewTile2_) { pMesh2_->LockVertexBuffer(D3DLOCK_NOSYSLOCK, (void**)&pVertices2); pMesh2_->LockAttributeBuffer(D3DLOCK_NOSYSLOCK, &pAttribute2); pMesh2_->LockIndexBuffer(D3DLOCK_NOSYSLOCK, (void**)&pIndices2);
  • 19. if (viewTile1_ || viewTile2_) { for (auto tc : terrainList_) if (텍셀이 시야 범위 안인가) tc->FillVertices(&pVertices, &pAttribute, &pVertices2, &pAttribute2, ix, iz, viewRange_, &cellCount, &cellCount2); if (viewTile1_) memset(pAttribute, 0xff, 2 * ((2 * viewRange_ - 1) * (2 * viewRange_ - 1) - cellCount) * sizeof(DWORD)); if (viewTile2_) memset(pAttribute2, 0xff, 2 * ((2 * viewRange_ - 1) * (2 * viewRange_ - 1) - cellCount2) * sizeof(DWORD)); }
  • 20. FillVertics int x1 = qMax(0, qMin(x - viewRange + 1, 255)); int x2 = qMax(0, qMin(x + viewRange - 1, 255)); int z1 = qMax(0, qMin(z - viewRange + 1, 255)); int z2 = qMax(0, qMin(z + viewRange - 1, 255)); -> cellVisible[255][255] memset
  • 21. FillVertics Vector3 vHeight; for (int i = x1; i <= x2; ++i) { for (int j = z1; j <= z2; ++j) { vHeight = Vector3((indexX_ * 256 + i) * CELL_SIZE, 0, (indexZ_ * 256 + j) * CELL_SIZE); vHeight.y = terrainMgr->heightmap2_ ? heightMap2_[i][j] : heightMap_[i][j]; cellVisible_[i][j] = CullObject(&vHeight, 1); } }
  • 22. FillVertics for (셀 x1 ~ x2, z1~z2) if (!보이는셀) continue; for (int k = 0; k < terrainMgr->textureMgr_->curList.size(); ++k) { //attribue 버퍼 셋팅 **attribute = k; ++(*attribute); **attribute = k; ++(*attribute); done = true; break; }
  • 23. // 보조선 보기 if (viewTile1_) for (int i = 0; i < cellCount; ++i) { pIndices[0] = i * 4; pIndices[1] = i * 4 + 2; pIndices[2] = i * 4 + 1; pIndices[3] = i * 4; pIndices[4] = i * 4 + 3; pIndices[5] = i * 4 + 2; pIndices += 6; } pMesh_->UnlockIndexBuffer(); pMesh_->UnlockAttributeBuffer(); pMesh_->UnlockVertexBuffer();
  • 24. if (viewTile2_) for (int i = 0; i < cellCount2; ++i) { pIndices2[0] = i * 4; pIndices2[1] = i * 4 + 2; pIndices2[2] = i * 4 + 1; pIndices2[3] = i * 4; pIndices2[4] = i * 4 + 3; pIndices2[5] = i * 4 + 2; pIndices2 += 6; } pMesh2_->UnlockIndexBuffer(); pMesh2_->UnlockAttributeBuffer(); pMesh2_->UnlockVertexBuffer();