Author Topic: Try patience solitaire  (Read 5479 times)

minor28

  • Member
  • **
  • Posts: 121
Re: Try patience solitaire
« Reply #15 on: September 28, 2016, 01:25:14 AM »
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

  • Member
  • *****
  • Posts: 1382
Re: Try patience solitaire
« Reply #16 on: September 28, 2016, 01:35:58 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

  • Member
  • **
  • Posts: 121
Re: Try patience solitaire
« Reply #17 on: September 28, 2016, 03:10:08 PM »
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

  • Member
  • **
  • Posts: 121
Re: Try patience solitaire
« Reply #18 on: September 28, 2016, 06:03:51 PM »
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

  • Member
  • *****
  • Posts: 1065
Re: Try patience solitaire
« Reply #19 on: September 28, 2016, 11:21:24 PM »
Hi minor28,

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

Regards,

Steve N.

raymond

  • Member
  • **
  • Posts: 236
    • Raymond's page
Re: Try patience solitaire
« Reply #20 on: September 29, 2016, 01:11:04 AM »
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

  • Member
  • **
  • Posts: 121
Re: Try patience solitaire
« Reply #21 on: September 29, 2016, 05:20:27 PM »
Hello Steve N,

Which dll did you copy over to your system?

FORTRANS

  • Member
  • *****
  • Posts: 1065
Re: Try patience solitaire
« Reply #22 on: September 29, 2016, 10:25:51 PM »
Hello,

Hello Steve N,

Which dll did you copy over to your system?

   gdiplus.dll

HTH,

Steve N.

minor28

  • Member
  • **
  • Posts: 121
Re: Try patience solitaire
« Reply #23 on: September 29, 2016, 10:44:36 PM »
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

  • Member
  • *****
  • Posts: 1065
Re: Try patience solitaire
« Reply #24 on: September 30, 2016, 07:52:07 AM »
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