Results 1 to 11 of 11

Thread: It's funny how sometimes you over-complecate things

  1. #1

    Thread Starter
    Addicted Member Cuallito's Avatar
    Join Date
    Apr 2001
    Location
    You know that chest that you could never get opened? If you ever do, I'm there.
    Posts
    136

    Red face It's funny how sometimes you over-complecate things

    I'm making a program that loads a heightmap and then displays it in 3D. So I start writing methods to load a .dds file, turn it into a DX8 surface, copy the bits to an 1D array, copy the 1D array's bits to a 2D array so I can access the bits easier. Right when I get all this mess actually working I relise I could have just loaded the original .bmp file into a PictureBox class an used the point command.
    BTW, Thanks for all your help

    Member of the anti-gay cross-dressing trans-species wolves alliance.

  2. #2
    Zaei
    Guest
    A Memory DC would have been more efficient. I had problems before, where Point would only give me -1, when the PictureBox was hidden. You dont get this problem using a Memory DC, and GetPixel().

    Z.

  3. #3
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    Remove the DC layer and use the bimap directly, there's huge performance difference.
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  4. #4
    Zaei
    Guest
    Then you have to muck around with bitmap Headers, and all of that. Better even, you could preprocess the Bitmap, and write out a .raw file containing a single byte for each height value.

    Z.

  5. #5
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    Originally posted by Zaei
    Then you have to muck around with bitmap Headers, and all of that. Better even, you could preprocess the Bitmap, and write out a .raw file containing a single byte for each height value.

    Z.
    or learn C++
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  6. #6
    Zaei
    Guest
    Here's a quote I think you'll like kedaman =).

    "It is practically impossible to teach good programming style to students that have had prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration." - Edsger Dijkstra.

    Z.

  7. #7
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    Originally posted by Zaei
    Here's a quote I think you'll like kedaman =).

    "It is practically impossible to teach good programming style to students that have had prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration." - Edsger Dijkstra.

    Z.
    I'm a living miracle to survive that
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  8. #8
    Zaei
    Guest
    As am I =).

    Z.

  9. #9
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134
    I have learned C++ and I understand it, while before I was taught BASIC. Ta!
    All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
    (Just a heads-up)

  10. #10
    Addicted Member Osiris's Avatar
    Join Date
    Oct 2000
    Location
    Dimension Hole
    Posts
    142
    i think C++ & Visual Basic are almost the same thing except for their formats,
    but since i'm a newbie in C++ i like VB better cause
    in C++ i can only program in that Black window that displays only texts...
    ؊Ϯϊ

  11. #11
    Zaei
    Guest
    C++ and VB are quite different. When you get better, and learn more of the nuances, you being to understand that =).

    Z.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width