Angband 64 x 64 pixel tileset

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Shockbolt
    Knight
    • Jan 2011
    • 635

    Item set, made from various parts of dragons:

    Last edited by Shockbolt; April 15, 2014, 19:43.
    http://www.rpgartkits.com/
    Fantasy art kits for personal and commercial use. Commercial use requires a Developer license, also available through my website.

    Comment

    • Shockbolt
      Knight
      • Jan 2011
      • 635

      And for the oldschool players :

      http://www.rpgartkits.com/
      Fantasy art kits for personal and commercial use. Commercial use requires a Developer license, also available through my website.

      Comment

      • Nick
        Vanilla maintainer
        • Apr 2007
        • 9634

        Originally posted by Shockbolt
        And for the oldschool players :
        Awesome - Angband has been needing a Plumber class forever
        One for the Dark Lord on his dark throne
        In the Land of Mordor where the Shadows lie.

        Comment

        • Shockbolt
          Knight
          • Jan 2011
          • 635

          Originally posted by Foehammer
          Hi Shockblot

          These tiles are awesome. I really really hope you finish them - no small task tho!!

          You can see from the number of posts I make, I'm not an avid poster - but commenting on your tiles was non-optional imho!
          Thanks for the nice feedback!
          http://www.rpgartkits.com/
          Fantasy art kits for personal and commercial use. Commercial use requires a Developer license, also available through my website.

          Comment

          • Blue Baron
            Adept
            • Apr 2011
            • 103

            Hi I play z+Angband and modified it for my own use. One of the changes I made was to use different tilesets easier. I did two things. First, I added a new command to pref files: I:<elementwidth>:<elementheight>:<filename>{:<mask filename>}. Second I added $GRAFC <number>, so I don't have to add names of files in bunches of places, and just use the number in use_graphics directly.

            Using these I do not have to recompile to add new tilesets. I edit graf-win.prf to add :
            #Resized David Geravis' tiles
            ?:[EQU $GRAFC 6]
            %graf1213.prf

            graf1213.prf is just:
            %:graf-dvg.prf
            I:12:13:12x13.bmp:12x13msk.bmp

            lastly in the ini I change the Graphics line to:
            Graphics=6
            (the hard coded constants are 0-5)
            this does not allow the tile set to be selected from the menu, but it does work. (it would require a recompile to add the menu selection.)

            I have not compiled V, but to implement you might want to:
            in variable.c and externs.h add some global variables:
            char graf_name[32];
            char graf_mask[32];
            byte graf_width;
            byte graf_height;

            in main-win.c in init_graphics() add/change:
            if (graf_width && graf_height)
            {
            wid = graf_width;
            hgt = graf_height;

            name = graf_name;
            if (strlen(graf_mask) > 2)
            {
            mask = graf_mask;
            use_transparency = FALSE;
            } else {
            use_transparency = TRUE;
            mask = NULL;
            }
            }
            else if (arg_graphics == GRAPHICS_DAVID_GERVAIS)

            since the pref filese are loaded in reset_visuals(), need to reset the variables in reset_visuals and call reset visuals() after init_graphics().
            in main-win.c in Termxtra_win_react() change the section between /* Initialize (if needed) */ and reset_visuals(TRUE) to:

            /* Change setting */
            use_graphics = arg_graphics;

            /* Reset visuals */
            reset_visuals(TRUE);

            /* Initialize (if needed) */
            if (use_graphics && !init_graphics())
            {
            /* Warning */
            plog("Cannot initialize graphics!");

            /* Cannot enable */
            use_graphics = GRAPHICS_NONE;
            /* Reset visuals */
            reset_visuals(TRUE);
            }
            the equivalent work for z+, but it does not have the use_graphics_nice option, so I do not know where that should go for V.

            in main-win.c in Term_pict_win() there are 3 if blocks with arg_graphics==graphics mode. the first one should be changed to if (infMask.hBitmap) the secondand third should be if (hdcMask)

            in obj-util.c in reset_visuals() add in or above if (use_graphics) :
            graf_width = 0;
            graf_height = 0;
            graf_name[0] = 0;
            graf_mask[0] = 0;

            in prefs.c in init_parse_prefs() add:
            parser_reg(p, "I sym ew sym eh str name ?str mask", parse_prefs_i);

            in prefs.c in process_pref_file_expr() add/change:
            else if (streq(b+1, "GRAF"))
            v = ANGBAND_GRAF
            else if (streq(b+1, "GRAFC"))
            {
            /* temp string is another global variable I created since I
            * did not know of a better one to use */
            strnfmt(temp_string, 32, "%d", use_graphics);
            v = temp_string;
            }

            in prefs.c add:
            static enum parser_error parse_prefs_i(struct parser *p)
            {
            struct prefs_data *d = parser_priv(p);
            assert(d != NULL);
            if (d->bypass) return PARSE_ERROR_NONE;

            graf_width = (byte)parser_getint(p,"ew");
            graf_height = (byte)parser_getint(p,"eh");
            text_to_ascii(graf_name, 32, parser_getstr(p,"name"));
            if (parser_hasval(p,"mask"))
            {
            text_to_ascii(graf_mask, 32, parser_getstr(p,"mask"));
            }

            return PARSE_ERROR_NONE;
            }

            That should do it. hmm a serch through the code shows a bunch of references to GRAPHICS_DAVID_GERVAIS incave.c and one in spell1.c. these might be changed to use_graphics > 2 or 3 .

            Phew. quite alot for my first post, but I hope this helps.
            BTW, great tiles.
            Also, about PNG support, it may be possible to use DirectX to load the image, then copy the data to a GDi bitmap. Perhaps just write and use a function called ReadDXImage instead of ReadDIB. I will give it a try.
            Lastly, about the faced tiles, a solution may be to just do another pass at the end of dungeon level generation. as it goes through the map, is the tile is known to have facings (hard coded) test the surrounding tiles, and replace the center tile with the right faced tile. The generation functions will not have to know about the faced tiles. ie if the wall index is 56 just replace it after generation with 64-78 as appropriate.

            Comment

            • buzzkill
              Prophet
              • May 2008
              • 2939

              Originally posted by Blue Baron
              Hi I play z+Angband and modified it for my own use. One of the changes I made was to use different tilesets easier. I did two things. First, I added a new command to pref files: I:<elementwidth>:<elementheight>:<filename>{:<mask filename>}. Second I added $GRAFC <number>, so I don't have to add names of files in bunches of places, and just use the number in use_graphics directly.
              Am I missing something? What does this do that couldn't be accomplished by simply editing the first few lines of the angband.ini.
              www.mediafire.com/buzzkill - Get your 32x32 tiles here. UT32 now compatible Ironband and Quickband 9/6/2012.
              My banding life on Buzzkill's ladder.

              Comment

              • Blue Baron
                Adept
                • Apr 2011
                • 103

                Originally posted by buzzkill
                Am I missing something? What does this do that couldn't be accomplished by simply editing the first few lines of the angband.ini.
                the graphics = 3 ( or 0, 1, 2) line in the ini file refers to the graphics mode. there are also hard coded constants that use those numbers (GRAPHICS_DAVID_GERVAIS, GRAPHICS_NONE, GRAPHICS_ORIGINAL, GRAPHICS_ADAM_BOLT respectively) there aer several places in the code that use these constants by name. In main-win.c and the other main-xxx.c files the tile sizes and file names are hard coded using those constants. To change them or to add to them the entire program must be rebuilt. I added the I: line so only the pref files and the ini file have to be changed to use an additional tileset.

                Comment

                • Derakon
                  Prophet
                  • Dec 2009
                  • 9022

                  DiretX is problematic for PNG support simply because it is not cross-platform. We'd be better off hooking into SDL or OpenGL or just accessing libpng directly.

                  Comment

                  • Nick
                    Vanilla maintainer
                    • Apr 2007
                    • 9634

                    Originally posted by Derakon
                    DiretX is problematic for PNG support simply because it is not cross-platform. We'd be better off hooking into SDL or OpenGL or just accessing libpng directly.
                    The gtk, sdl and Mac ports already use png, though - it's pretty much only been the windows port that it's needed for. So if DirectX can be called (or whatever you do with it) in main-win.c, then (a) we can use Shockbolt's tiles and (b) we get to ditch .bmp files altogether.

                    Whether using DirectX like this is possible or not I have no clue.
                    One for the Dark Lord on his dark throne
                    In the Land of Mordor where the Shadows lie.

                    Comment

                    • Blue Baron
                      Adept
                      • Apr 2011
                      • 103

                      As Nick said, those three reference png files in their main-xxx.c files. However, the real reason I used DirectX is that I am familiar with it, I am not familiar with the others.

                      I have created a function that works for me in z+ 0.3.3. To use it add the function prototype somewher, perhaps in readdib.h or above init_graphics() in main-win.c. the funtion prototype is:

                      extern BOOL ReadDIB_DX9(HWND, LPSTR, DIBINIT*);

                      then in init_graphics() change all ReadDIB to ReadDIB_DX9
                      and add readdx9.c to your project. Also make sure the DirectX headers are in your include path, and link against d3d9.lib and d3dx9.lib.

                      If you want to replace ReadDIB() entirely (after testing this alot), remember that FreeDIB() in readdib.c is still needed.

                      readdx9.c if attached to this message as readdx9.txt
                      Attached Files

                      Comment

                      • Shockbolt
                        Knight
                        • Jan 2011
                        • 635

                        How is the graphics handled on the mac os version of angband? Are the tiles separate or fetched from a tilemap, like on the win bmp version?
                        http://www.rpgartkits.com/
                        Fantasy art kits for personal and commercial use. Commercial use requires a Developer license, also available through my website.

                        Comment

                        • d_m
                          Angband Devteam member
                          • Aug 2008
                          • 1517

                          Originally posted by Blue Baron
                          then in init_graphics() change all ReadDIB to ReadDIB_DX9
                          and add readdx9.c to your project. Also make sure the DirectX headers are in your include path, and link against d3d9.lib and d3dx9.lib.
                          Thanks so much for your work here! I'm going to test it out and see if I can get it working for me (on Linux using Mingw cross-compilation and WINE).

                          I will try to figure it out myself, but if you get this can you list the actual DirectX headers I need to include? Are they just d3d9.h and d3dx9.h?

                          Thanks again...
                          linux->xterm->screen->pmacs

                          Comment

                          • takkaria
                            Veteran
                            • Apr 2007
                            • 1951

                            Originally posted by Shockbolt
                            How is the graphics handled on the mac os version of angband? Are the tiles separate or fetched from a tilemap, like on the win bmp version?
                            It's a tilemap PNG file, with transparency included. Everything apart from Windows uses a PNG tilemap.
                            takkaria whispers something about options. -more-

                            Comment

                            • Shockbolt
                              Knight
                              • Jan 2011
                              • 635

                              Some monster tiles are larger than 64x64:

                              Last edited by Shockbolt; April 15, 2014, 19:45.
                              http://www.rpgartkits.com/
                              Fantasy art kits for personal and commercial use. Commercial use requires a Developer license, also available through my website.

                              Comment

                              • Shockbolt
                                Knight
                                • Jan 2011
                                • 635

                                The same goes for this one, some of the tiles are larger than 64x64 pixels:
                                Last edited by Shockbolt; April 15, 2014, 19:45.
                                http://www.rpgartkits.com/
                                Fantasy art kits for personal and commercial use. Commercial use requires a Developer license, also available through my website.

                                Comment

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