News:

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

Main Menu

Try patience solitaire

Started by minor28, September 20, 2016, 04:15:22 AM

Previous topic - Next topic

minor28

Thank you for testing.

I think I know what is causing the error. I will try to solve this, but it takes a while when I have lots of other things to do the next few weeks.


rrr314159

Quote from: raymond on September 21, 2016, 03:20:23 AM... your .exe is 1578 kb as compared to a mere 35 kb for mine (no external library) ...

in another thread http://masm32.com/board/index.php?topic=5684 jj2007 mentions Cards.dll from Windows. Just curious, are either of you (Raymond and minor28) using it? Raymond says "no external library" so I guess not, but did you perhaps get your cards images from it? If not where did you get the images - are they readily available elsewhere? Are any of these sets of images any better than other sets? How big is Cards.dll? Would either of you benefit from using it?

Just curious
I am NaN ;)

minor28

I use no other external libraries than Microsoft´s api, not Cards.dll. I retrieved the cards from the net and I did some copy and paste. Later I also redused the size by changing the cards.bmp from 24 to 8 bit color. Now the size of the exe is 566 kB.

minor28

It was not so much work after I took out my old XP machine and got it to work.

Edit: bonus was not added and I change the bonus calculation

FORTRANS

Hi minor28,

   Now it runs on Windows 2000, and Win98 after copying a DLL
over to the system.

Regards,

Steve N.

raymond

Re Cards.dll from Windows.

As I mentioned in my first post, I wrote the initial program some 30 years ago, on a 386 till running with MS-DOS.  I thus needed to draw my own cards but, not having any drawing program, I had to first make one of those to draw the face cards and aces using 8-bit colors. That was a learning process.

That data is then compiled with the program into the .data section; appropriate numbers and small suit icons are also part of the .data section. The 52 cards are then drawn into RAM as part of the initializing process of the program.

The only difference today is the fact that I use Windows APIs to draw into a buffer and then transfer it to the monitor instead of drawing directly to the video memory. Although the base data remains 8-bit color for a 640x480 screen resolution, the image is still quite acceptable when the size is doubled by Windows.
Whenever you assume something, you risk being wrong half the time.
http://www.ray.masmcode.com

minor28

Hello Steve N,

Which dll did you copy over to your system?

FORTRANS

Hello,

Quote from: minor28 on September 29, 2016, 05:20:27 PM
Hello Steve N,

Which dll did you copy over to your system?

   gdiplus.dll

HTH,

Steve N.

minor28

OK,
I use gdiplus.dll only in function DrawPauseBoard to draw a white transparent image over the board. I thought that the dll was included in XP.

FORTRANS

Hi,

   The gdiplus.dll now on both the Windows 2000 and 98 computers
probably originally came from an XP installation.  I remember having
a bit of reconfiguring the Win2k system a while back for a GDI+
program.

Regards,

Steve