flat assembler
Message board for the users of flat assembler.
![]() Goto page 1, 2 Next |
Author |
|
avcaballero 24 Jun 2018, 17:19
With GDI functions and with our owns. Mostly of them are still only in the TinyC folder
_________________ Siempre aprendiendo |
|||||||||||
![]() |
|
avcaballero 01 Jul 2018, 19:05
This is a beta version, there are still some mistakes, but it admits your flag design and saves it as a waving flag in an animated gif. Made with the "all-made-by-hand" GDI.
Main known bugs: - Always saves the gif - Always with the name of "spain.gif" - The background is always black How does it work? - It appears the waving flag of Spain - If you press the "1" key it appears a window for let your own design - If you press "Accept" the waving flag is now your design - It saves the waving flag in an animated gif in the same folder of the exe with the name "spain.gif" Please, let me know if you have done some nice designs. Fisher in trance <-- Sorry, this is just a tune to accompany the presentation ![]() Edited: I've just cleaned some annoying black points on the flag and fixed the "main" known bugs. ![]()
_________________ Siempre aprendiendo |
|||||||||||
![]() |
|
avcaballero 24 Jul 2018, 20:44
Using Windows fonts to create a 3d lattice logo (not finished yet)
Edited: enhanced versión. Three types of visualización with keys 1, 2, 3
_________________ Siempre aprendiendo |
|||||||||||
![]() |
|
avcaballero 04 Aug 2018, 10:16
This time a tiny 3d world with some shapes. You can move around and rotate with the mouse and some keys: E, D, A, Z, Q, W, X, C, R, F, T, Y and cursor keys.
You have to unzip the three files of the 7z in the same folder to execute it. Try to be soft with the mouse movement. Turn on your speakers. Any comments? Any body out there?
_________________ Siempre aprendiendo |
|||||||||||
![]() |
|
Picnic 11 Aug 2018, 20:57
Hi avcaballero,
I just tried it. Runs quite smooth on my pc. Yeah, it's kind of hard to control it with the mouse, especially once you lose it. I like it's ambient mood. Falling into Gargantua. ![]() |
|||
![]() |
|
avcaballero 12 Aug 2018, 11:01
Thank you for watching it guys
![]() _________________ Siempre aprendiendo |
|||
![]() |
|
avcaballero 27 Aug 2018, 18:40
Here is my version of Aizawa's attractor, just a starting point, I have to improved it. No zbuffer, etc. When finished, if anyone interested, I may release the source code. Nacho división
_________________ Siempre aprendiendo |
|||||||||||
![]() |
|
avcaballero 28 Aug 2018, 15:52
Source code in my new website. Zbuffering added. If you wait a few minutes you will see all the points displacing on the shape.
|
|||
![]() |
|
avcaballero 17 Aug 2019, 16:53
If anyone's interested, I have started the AOWG with the two chapters in SWGPTG and a new one, the third, at the moment, for palette programming.
As an example, a copper bars demo in 32 and 64 bits made with fasm. By the way, there are no executables in my site due to usual false + of av, just code to be compiled. Regards
_________________ Siempre aprendiendo |
|||||||||||
![]() |
|
avcaballero 17 Aug 2019, 17:51
Here a worm demo made with tinyc
_________________ Siempre aprendiendo |
|||||||||||
![]() |
|
avcaballero 24 Aug 2019, 13:33
The logo
_________________ Siempre aprendiendo |
|||||||||||
![]() |
|
edfed 26 Aug 2019, 07:45
funny, the worm demo miss the timer when resizing the window.
![]() |
|||
![]() |
|
avcaballero 26 Aug 2019, 18:21
Well, just disallowing resizing the window and it would be fixed
![]() _________________ Siempre aprendiendo |
|||
![]() |
|
edfed 27 Aug 2019, 08:00
i think it's more like a timer bypassed by WM_RESIZE code...
something like Code: WMrepaint: call timer call paint jmp .end WMresize: call resize call paint jmp .end .end: |
|||
![]() |
|
avcaballero 27 Aug 2019, 14:40
All of its windowproc is nearly the same as any other of my demos
Code: LRESULT CALLBACK WndProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { static HDC bufDIBDC; static HBITMAP hMainDIB; HDC hdc ; PAINTSTRUCT ps ; static HGDIOBJ hOldDIB=0, hGDITmp; int bResult; switch (message) { case WM_CHAR : if (wParam == VK_ESCAPE) { goto wmDestruimos; } return 0 ; case WM_CREATE: hdc = GetDC(hWnd); // Crea un búfer dib para PintaObjeto. pMainDIB es un puntero a él bufDIBDC = CreateCompatibleDC (hdc); hMainDIB = CreateDIBSection(hdc, (BITMAPINFO *) &bi, DIB_RGB_COLORS, (void **) &pMainDIB, NULL, 0); hOldDIB = SelectObject (bufDIBDC, hMainDIB); ReleaseDC (hWnd, hdc); // Libera device context Inicio (); SetTimer (hWnd, cdIdTimer, 40, NULL) ; return 0 ; case WM_TIMER : InvalidateRect (hWnd, NULL, FALSE) ; return 0 ; case WM_SIZE : vdxClient = lParam & 0xFFFF; vdyClient = lParam >> 0x10; return 0 ; case WM_PAINT : hdc = BeginPaint(hWnd, &ps); PintaObjeto (); // bResult = BitBlt(hdc, 0, 0, cdXSize, cdYSize, bufDIBDC, 0, 0, SRCCOPY); bResult = StretchBlt (hdc, 0, 0, vdxClient, vdyClient, bufDIBDC, 0, 0, cdXSize, cdYSize, SRCCOPY); EndPaint(hWnd, &ps); return 0 ; case WM_DESTROY : wmDestruimos: KillTimer (hWnd, cdIdTimer) ; hGDITmp = SelectObject (bufDIBDC, hOldDIB); bResult = DeleteDC (bufDIBDC); bResult = DeleteObject (hMainDIB); bResult = DestroyWindow (hWnd); PostQuitMessage (0) ; return 0 ; } return DefWindowProc (hWnd, message, wParam, lParam) ; } _________________ Siempre aprendiendo |
|||
![]() |
|
edfed 28 Aug 2019, 08:58
ok, i get it.
WM_RESIZE will induce a InvalidateRect, and then call the WM_PAINT without waiting for the timer. to avoid this, maybe you can jump over the WM_PAINT procedure if WM_TIMER is not met. something like Code: case WM_TIMER: timeout = true; ... case WM_PAINT: if (timeout) { paint(); } timeout = false; ... of course, it will induce a delay when resizing. when dealing with time dependent actions, i use time dependent formlas using a milli second timer to get a tick, and animate with a function of this tick. |
|||
![]() |
|
avcaballero 28 Aug 2019, 14:41
Hello, edfed, in fact it is easier than that. The problem is including the calling to "PintaObjeto" within WM_PAINT instead in WM_TIMER that is where it should be, because each time you resize the window, a WM_PAINT is met.
I never gave much importance to this, but it looks better this way, undoubtedly. Thank you. Here the new version.
_________________ Siempre aprendiendo |
|||||||||||
![]() |
|
avcaballero 01 Sep 2019, 19:12
Hello. Image files, this time bitmap 24 bits in resources. Reading it and dump its data image in an array. Also for pcx, tga and even for saving gif. The example is a bmp rotozoomer. It accepts any bmp file that you can drag and drop over the program window, don't use a big one, better a 200x200 for example. Don't pretend to be an image reader, just manage bmp, pcx, tga for our purposes.
_________________ Siempre aprendiendo |
|||||||||||
![]() |
|
avcaballero 15 Sep 2019, 16:32
Hello, I'm uploading the 4th chapter, for graphics files. At the moment only in the Spanish version, though I will upload soon the English one too.
Graphics files: - BMP. 8 and 24 bits. Reading from files and resources - TGA. 8 and 24 bits. Reading from files. - PCX. 8 bits. Reading from file. - PPM. 24 bits. Writing and reading from file. Using a little raytracing program for that. - GIF. 8 bits. Writing to file. Using a little program to gerating it. At the moment only for tinyc. I will make the rest when time permits. |
|||
![]() |
|
Goto page 1, 2 Next < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.