News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

SWGPTG - 02 - Drawing Basic Shapes

Started by avcaballero, May 15, 2018, 10:21:14 PM

Previous topic - Next topic

avcaballero

The last example for palette: copper bars, widly used years ago in MS-DOS. Already uploaded to my site in the third chapter.

This time poasm version for 32 and 64 bits.

daydreamer

Quote from: caballero on August 17, 2019, 06:05:42 PM
Keep working with Palette examples, here a classical bars demo in 32 and 64 bits, made in fasm.
nice :thumbsup:
my none asm creations
https://masm32.com/board/index.php?topic=6937.msg74303#msg74303
I am an Invoker
"An Invoker is a mage who specializes in the manipulation of raw and elemental energies."
Like SIMD coding

avcaballero

Ops, I almost forgot my old good friend worm demo. I finish copper bars for nasmx and goasm and incorporate this one too... when I have time. This one made with tinyc.

Thank you, daydreamer. :thumbsup:

daydreamer

nice
I read about you wannat go 3d
I am open for suggestions of different palettes,that is used for landscapes,LUT of colors use by heightmap
my none asm creations
https://masm32.com/board/index.php?topic=6937.msg74303#msg74303
I am an Invoker
"An Invoker is a mage who specializes in the manipulation of raw and elemental energies."
Like SIMD coding

avcaballero

>that is used for landscapes

Yeah, you can move with cursor keys. :thumbsup:

> you wanna go 3d
Yes, I did

I have a lot of things that I will gradually uploading

HSE

Equations in Assembly: SmplMath

avcaballero


avcaballero

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.

avcaballero

Hello, I'm uploading the 4th chapter, for graphics files. At the moment only in the Spanish version, though I will upload it 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.

HSE

Hi caballero!

In calWM01 and 02 in MASM:.DATA?
  CommandLine   DD          ?
  wc            WNDCLASSEX  <>
  MainhWnd      HWND        <>
  MainHdc       HDC         <>


must be:.DATA?
  CommandLine   DD          ?
  wc            WNDCLASSEX  <>
  MainhWnd      HWND        ?
  MainHdc       HDC         ?


Regards,
Equations in Assembly: SmplMath

TimoVJL

Fix for TinyC example BMP8bitsWC01.c#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <stdlib.h>
#include <stdio.h>
...
// Variables globales
DWORD              *pMainDIB    = NULL;  // line 48
...
      *(pMainDIB+index) = *(DWORD*)(miBMP->data + k);   // Lo pasamos a pantalla line 116
after that msvc, clang and Pelles C compiles it.
May the source be with you

avcaballero

Hello

@HSE
Ok, thank you. I had to look where these files were :)

@TimoVJL
Yes, thank you. In fact, it should be this way, but I like more the other one:


*(pMainDIB+index) = (miBMP->data[k].Rojo<<16) |
                    (miBMP->data[k].Verde<<8) |
                     miBMP->data[k].Azul;


avcaballero

uploaded the fixed codes and bmp and tga versions for masm32 at the moment, and a 8 bitmap from resources also.

avcaballero

hello, I have uploaded nearly all the masm32 versions: readers for bmp, pcx, tga, ppm for files and in resources, 8 and 24 bits. Only lefts writing gif and the tiny raytracer. And the versions for the other compilers.

Martik C :eusa_boohoo:

avcaballero

#29
To compensate the scam's thread, here it is a tiny game with source, one of the first in history. I believe that Mr Bill Gates did it some decades ago. TinyC source code, 8 kb :thumbsup:

And a great song