Stilllegung des Forums
Das Forum wurde am 05.06.2023 nach über 20 Jahren stillgelegt (weitere Informationen und ein kleiner Rückblick).
Registrierungen, Anmeldungen und Postings sind nicht mehr möglich. Öffentliche Inhalte sind weiterhin zugänglich.
Das Team von spieleprogrammierer.de bedankt sich bei der Community für die vielen schönen Jahre.
Wenn du eine deutschsprachige Spieleentwickler-Community suchst, schau doch mal im Discord und auf ZFX vorbei!
Werbeanzeige
idontknow
unregistriert
C-/C++-Quelltext |
|
1 2 3 4 5 6 |
void DrawLine(int x, int y, int width, int length) { ::HDC myDC = ::GetDC(::GetConsoleWindow()); ::Rectangle(myDC, x, y, x+length, y+width); ::DeleteDC(myDC); } |
C-/C++-Quelltext |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
#include <windows.h> #include <iostream> #include <KonsolenRendererAllIncludes.h> using namespace std; #pragma comment(lib,"KonsolenRenderer.lib") int main() { PointRenderer* g_pPR = NULL; CKonsoleVector vk = CKonsoleVector(7,6); CKonsoleVector kv = CKonsoleVector(7,1); int Points = 20; for(int i = 0;i < Points;i++) { g_pPR->RenderPoint(vk,7); g_pPR->RenderPoint(vk - kv,7); vk.x += 7; vk.y += 7; } for(int i = 20;i > Points; Points++) { g_pPR->RenderPoint(vk,7); g_pPR->RenderPoint(vk + kv,7); vk.x += 7; vk.y -= 7; } cin.get(); return 0; } |
idontknow
unregistriert
Zitat von »"Fabian Kock"«
C-/C++-Quelltext
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 #include <windows.h> #include <iostream> #include <KonsolenRendererAllIncludes.h> using namespace std; #pragma comment(lib,"KonsolenRenderer.lib") int main() { PointRenderer* g_pPR = NULL; CKonsoleVector vk = CKonsoleVector(7,6); CKonsoleVector kv = CKonsoleVector(7,1); int Points = 20; for(int i = 0;i < Points;i++) { g_pPR->RenderPoint(vk,7); g_pPR->RenderPoint(vk - kv,7); vk.x += 7; vk.y += 7; } for(int i = 20;i > Points; Points++) { g_pPR->RenderPoint(vk,7); g_pPR->RenderPoint(vk + kv,7); vk.x += 7; vk.y -= 7; } cin.get(); return 0; }
Wenn das nicht vereinfacht sein soll weiß ich auch nicht :?
C-/C++-Quelltext |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
#include <windows.h> #include <iostream> #include <KonsolenRendererAllIncludes.h> #pragma comment(lib,"KonsolenRenderer.lib") int main() { PointRenderer* g_pPR = NULL; CKonsoleVector vk = CKonsoleVector(7,6); CKonsoleVector kv = CKonsoleVector(7,1); int Points = 20; for(int i = 0;i < Points;i++) { g_pPR->RenderPoint(vk,7); g_pPR->RenderPoint(vk - kv,7); vk.x += 7; vk.y += 7; } cin.get(); return 0; } |
idontknow
unregistriert
Werbeanzeige