Sangband wall fix for windows vista

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Fuma
    Adept
    • May 2007
    • 114

    #16
    Originally posted by takkaria
    SDL
    I knew I got that acronym wrong.

    EDIT:
    I'm more than willing to do the FON -> PNG conversion. At least for a few font sizes.
    As for coding, I don't really have the will to study source code and learn what does what. Nor do I know any programming language.
    www.snowleopard.org - International Snow Leopard Trust

    Comment

    • Nick
      Vanilla maintainer
      • Apr 2007
      • 9634

      #17
      Originally posted by Fuma
      I
      I'm more than willing to do the FON -> PNG conversion. At least for a few font sizes.
      I think (and others may correct me...) that if you want somewhere to start, this page is it.

      Amusingly, the WinCE port already uses ascii pictures, because of font handling difficulties.
      One for the Dark Lord on his dark throne
      In the Land of Mordor where the Shadows lie.

      Comment

      • Fuma
        Adept
        • May 2007
        • 114

        #18
        Originally posted by Nick
        I think (and others may correct me...) that if you want somewhere to start, this page is it.
        I already have the FON files from Sangband, what I'd like to know is how should I go about with it. Just create a PNG for each character? Arrange them in neat rows, like the tilesets? Do the rows have to be arranged in specific order?
        That sort of things.

        Of course, first I have to get my hands on some nifty little conversion tool, but that shouldn't pose a huge problem, I believe?
        www.snowleopard.org - International Snow Leopard Trust

        Comment

        • RogerN
          Swordsman
          • Jul 2008
          • 308

          #19
          I've already converted all the Sangband .FON files into bitmaps. I can upload them if anyone else is interested. The only reason I used BMP instead of PNG is so that the *band source code does not need to be linked to any external libraries.

          Comment

          • Fuma
            Adept
            • May 2007
            • 114

            #20
            Originally posted by RogerN
            I've already converted all the Sangband .FON files into bitmaps.
            So now I'm totally useless :P
            Though I'd love to help with something...
            www.snowleopard.org - International Snow Leopard Trust

            Comment

            • takkaria
              Veteran
              • Apr 2007
              • 1951

              #21
              Originally posted by RogerN
              I've already converted all the Sangband .FON files into bitmaps. I can upload them if anyone else is interested. The only reason I used BMP instead of PNG is so that the *band source code does not need to be linked to any external libraries.
              How did you go about doing it?

              It looks like shifting to using BMPs on Windows (and FON or BDF files for variants with SDL ports) might be a viable and enduring solution to font troubles to do for the various Angbands, if there's some reasonably automatic way to convert from one to the other and someone would be happy to write the BMP plotting code...
              takkaria whispers something about options. -more-

              Comment

              • RogerN
                Swordsman
                • Jul 2008
                • 308

                #22
                Download Sangband font bitmaps

                I used the test application that I was messing with (from earlier in the thread) to draw characters 0-255 in rows of 16 characters. But since this method uses the same text drawing code in Angband, the conversion wouldn't work on Vista. You'd have to create the bitmaps on a non-Vista machine, or parse the font files yourself to extract the bitmaps.

                Comment

                • RogerN
                  Swordsman
                  • Jul 2008
                  • 308

                  #23
                  I just finished a quick-and-dirty Sangband patch based on camlost's most recent unofficial version. I'd appreciate it if some Vista users would try it out (I don't have access to a Vista machine at the moment) and see if it fixes their display problems.

                  Completely Unofficial Sangband with BMPs instead of FONs

                  All .FON files have been removed and replaced with corresponding BMPs. I'm happy to release the code if this tests out OK, but it's not up to official Angband coding standards yet. That will take more time.

                  Comment

                  • Fuma
                    Adept
                    • May 2007
                    • 114

                    #24
                    Originally posted by RogerN
                    I just finished a quick-and-dirty Sangband patch based on camlost's most recent unofficial version. I'd appreciate it if some Vista users would try it out (I don't have access to a Vista machine at the moment) and see if it fixes their display problems.
                    Thank you very, very much.
                    It works well. I had to change the ".FON" in config.ini to ".BMP" to get the correct font sizes, and it worked very well.

                    I do not know if it's configurable, but when refreshing rapidly, or just running along corridors (I like to have the @ in the middle of the screen) there is this white flicker. It's not that bad compared to wallless Sangband, but if it is possible to change the flickering stripes from white to black, I'd be even more thankful.
                    www.snowleopard.org - International Snow Leopard Trust

                    Comment

                    • RogerN
                      Swordsman
                      • Jul 2008
                      • 308

                      #25
                      Originally posted by Fuma
                      I do not know if it's configurable, but when refreshing rapidly, or just running along corridors (I like to have the @ in the middle of the screen) there is this white flicker.
                      I think I know what's causing the flicker, and if I'm right then it should be easy to fix. I can try using a different method of combining the desired foreground color with the font bitmaps when blitting, and that ought to do the trick.

                      Comment

                      • Fuma
                        Adept
                        • May 2007
                        • 114

                        #26
                        Originally posted by RogerN
                        I think I know what's causing the flicker, and if I'm right then it should be easy to fix. I can try using a different method of combining the desired foreground color with the font bitmaps when blitting, and that ought to do the trick.
                        I love you.
                        www.snowleopard.org - International Snow Leopard Trust

                        Comment

                        • RogerN
                          Swordsman
                          • Jul 2008
                          • 308

                          #27
                          Updated release to fix the flicker (same link/file name as before)

                          I believe that the above file should fix your flicker problems. Nothing has changed except Sangband.exe, so you can just copy the executable out of the archive if you like.

                          The flicker was caused by drawing the foreground color first and then merging it with the font bitmap. I had overlooked the very useful MERGECOPY operation, which essentially merges the font bitmap with the foreground color at the same time it's drawn to the screen.

                          Comment

                          • Fuma
                            Adept
                            • May 2007
                            • 114

                            #28
                            Originally posted by RogerN
                            Updated release to fix the flicker (same link/file name as before)
                            Thank you so much. I'll try to give it a more thorough testing sometime later this weekend, but after a quick dive and death, everything looks perfect.

                            Thank you so, so much
                            www.snowleopard.org - International Snow Leopard Trust

                            Comment

                            • takkaria
                              Veteran
                              • Apr 2007
                              • 1951

                              #29
                              Originally posted by RogerN
                              Updated release to fix the flicker (same link/file name as before)

                              I believe that the above file should fix your flicker problems. Nothing has changed except Sangband.exe, so you can just copy the executable out of the archive if you like.

                              The flicker was caused by drawing the foreground color first and then merging it with the font bitmap. I had overlooked the very useful MERGECOPY operation, which essentially merges the font bitmap with the foreground color at the same time it's drawn to the screen.
                              Can has source code pls? Kthxbai.
                              takkaria whispers something about options. -more-

                              Comment

                              • RogerN
                                Swordsman
                                • Jul 2008
                                • 308

                                #30
                                Originally posted by takkaria
                                Can has source code pls? Kthxbai.
                                My ugly hacks are based on camlost's unofficial Sangband code. Only three source files were modified:

                                intrface.h
                                intrface.c
                                main-win.c

                                Download changed files

                                Disclaimers:
                                - SDL stuff won't compile because I broke it and didn't bother fixing it
                                - USE_GRAPHICS is a must because the bitmap routines are needed for reading the font bitmaps
                                - I also broke the function Term_text_special_win, which I think is only used when graphical tiles are in play. It can be fixed by creating another version of the font bitmaps with an alpha channel which can be used to draw transparent characters

                                Comment

                                Working...
                                😀
                                😂
                                🥰
                                😘
                                🤢
                                😎
                                😞
                                😡
                                👍
                                👎