GithubHelp home page GithubHelp logo

rangi42 / polished-map Goto Github PK

View Code? Open in Web Editor NEW
180.0 13.0 20.0 30.21 MB

A map and tileset editor for pokecrystal, pokered, and projects based on them. Written in C++ with FLTK.

Home Page: https://hax.iimarckus.org/topic/7222/

License: Other

C 32.58% C++ 64.79% HTML 1.65% Batchfile 0.17% Makefile 0.29% Assembly 0.52%
map-editor game-development pokemon tileset-editor tileset c-plus-plus fltk gui maps tilesets

polished-map's People

Contributors

louroboros avatar meithecatte avatar mid-kid avatar rangi42 avatar roukaour avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

polished-map's Issues

linux mint install; issue

Linux Mint 18.1

this may be a 'linux newbie' error, so forgive me if I'm missing something obvious.

I'm following the install.md instructions step-by-step, pasting them into terminal to make sure everything is accurate.

At the final make and make install steps, I receive the following error:

make: fltk-config: Command not found g++ -c -std=c++11 -Isrc -Ires -DNDEBUG -O3 -flto -march=native -o tmp/colors.o src/colors.cpp src/colors.cpp:7:19: fatal error: FL/Fl.H: No such file or directory #include <FL/Fl.H> ^ compilation terminated. Makefile:55: recipe for target 'tmp/colors.o' failed make: *** [tmp/colors.o] Error 1

FLTK seems to be installing and configuring correctly, and I've verified that /home/username/polished-map/lib/bin: is in my $PATH, and that fltk-config is indeed inside this directory. Yet, make and make install don't seem to be able to access it.

I've tried cleaning and reinstalling FLTK, but otherwise I can't really find any information on how to proceed.

Any insight would be greatly appreciated, as I'm quite new to all this.

Build fails on Linux

_countof is not defined (it is in Tilemap Studio), and FL/fl_utf8.h may have the wrong extension case.

Bug report: Weird saving error

I had a really weird error where i am not sure what has happened.

2 days ago i created a map that i saved as "Lighthouse.blk".

Yesterday i did some minor edits to said file and saved it as "Axylla_Lighthouse_22x12_JOHTO1.blk" to have the projectname, filesize and tileset displayed in the filename. The editor said that it had saved the map succesfully and it also displayed the new name in the top bar of the program.

Then i went ahead and opened another map (Route44 from the vanilla crystal) in a second instance of the program as i wanted to build a map that should properly connect to the lighthouse map and i wanted to use route 44 as a base for that map. i then went ahead and resized the map - did the actual mapping and then saved it as "Axylla_Route25_24x16_JOHTO1.blk" - again it said that it had saved the map succesfully and displayed the new name in the top bar of the program. I also exported both maps as PNGs which worked just fine.

I then opened the folder where i saved the files to and could only find "Lighthouse.blk" i then went ahead and saved both maps multiple times to the project folder and to other newly created empty folders. The new folders were still empty and the project folder still only had the normal vanilla pokecrystal maps + Lighthouse.
Then i thought well maybe the files will appear after closing the editor - nope.
Then i opened Lighthouse.blk and it was the initial version, before the minor touchup that i did.
There was still no other new file and Route44.blk was also still in the vanilla state.

After restarting the computer there was still no change in the above situation so i descided to fuck all that and try to figure out what the problem is or remap my stuff today.
As in today when i opened up the project folder besides the vanilla crystal maps i also found "Lighthouse.blk" and a file called "Axylla_Route25.blk" (i'm 95% sure that i never saved a map named like that), when i opened them it turned out that they are what were supposed to be "Axylla_Lighthouse_22x12_JOHTO1.blk" and "Axylla_Route25_24x16_JOHTO1.blk", while route 44 was still in its vanilla state. The non-project folders that i created are still empty though.

So yeah i really don't know what the fuck has happened here and i just hope that this was a one time problem and that this was just a weird windows error. However i thought that i should let you know of this and if something like this ever occurs again i will let you know immediately.

cheers

Creating a new map crashes

Salrei's Hope: "Whenever I try to make a new map in polished map, the program just exits out of itself after I hit "ok" without an error."

image

Feature Request: Keybinding tiles

I think it would be awesome to be able to keybind tiles as it would save lots of time.

when i select a tile in the bar on the left and press a control + number key it should get bound to said number, so that i can quick acces up to 10 different tiles.

A really nice addition to that would be if you were able to quickly flick through the different tiles by scrolling the mousewheel. As you can see in the picture below there should be a bar at the bottom of the editor showing which tile is bound to which key and you should see the currently selected one with the same indicator as on the left bar.

screenshot with added quick access bar

thank you for your time and for creating this neat map editor.

[Feature Request] Quick Access tab

Something such as, "after you open a blk from a folder, open the quick access tab, allowing you to travel through the files quickly". Additionally an "open->recent->(list)" tab at the top would be great too. Helps when you're working on a map several times, but would rather not have to browse the folder themselves.

image

Doesn't build on linux

I'm unsure if it's just my setup (Running Slackware 14.2, GCC version 5.3.0), but I'm getting errors when trying to compile this:

g++ -c -std=c++11 -I include -I /usr/include -Isrc -Ires -DNDEBUG -O3 -flto -march=native -o tmp/option-dialogs.o src/option-dialogs.cpp
In file included from src/option-dialogs.cpp:10:0:
src/config.h:20:38: error: expected ‘,’ or ‘...’ before ‘default’
  static int get(const char *key, int default = 0);
                                      ^
In file included from src/themes.h:8:0,
                 from src/option-dialogs.cpp:11:
src/tile.h: In member function ‘void Tile::clear()’:
src/utils.h:51:19: error: ‘push’ was not declared in this scope
  __pragma(warning(push)) \
                   ^
src/tile.h:33:28: note: in expansion of macro ‘FILL’
  inline void clear(void) { FILL(_rgb, WHITE, sizeof(_rgb)); }
                            ^
src/utils.h:51:23: error: ‘warning’ was not declared in this scope
  __pragma(warning(push)) \
                       ^
src/tile.h:33:28: note: in expansion of macro ‘FILL’
  inline void clear(void) { FILL(_rgb, WHITE, sizeof(_rgb)); }
                            ^
src/utils.h:51:24: error: ‘__pragma’ was not declared in this scope
  __pragma(warning(push)) \
                        ^
src/tile.h:33:28: note: in expansion of macro ‘FILL’
  inline void clear(void) { FILL(_rgb, WHITE, sizeof(_rgb)); }
                            ^
src/utils.h:58:19: error: ‘pop’ was not declared in this scope
  __pragma(warning(pop))
                   ^
src/tile.h:33:28: note: in expansion of macro ‘FILL’
  inline void clear(void) { FILL(_rgb, WHITE, sizeof(_rgb)); }
                            ^
Makefile:53: recipe for target 'tmp/option-dialogs.o' failed
make: *** [tmp/option-dialogs.o] Error 1

Did you recently upgrade the C++ version requirement and forgot to update the Makefile or something?

Support reorganized pokered

  • data/mapObjects/*.asm is now data/maps/objects/*.asm
  • data/mapHeaders/*.asm is now data/maps/headers/*.asm
  • The map header defines the tileset within a map_header macro, not as the first db

[Feature Request] Block fill

This was requested by someone on the /rheg/ Discord.
It's a feature present in RPG Maker XP, that allows you dragging your mouse over an area to fill the entire area with a certain tile. Makes filling an entire map (especially the trees) from scratch much easier.

Persisting "0xc000007b" error

I've been trying to get polishedmap running for a while now, but no matter how much i troubleshoot it, whether by reinstalling NET Framework, Visual C++, or PolishedMap itself, trying to install PolishedMap++, doing a disk check, the program always gives me this error.
image

I've tried basically everything i can and i'm not sure what would be causing this, and my hack can't really go anywhere without it. Any help is appreciated, thanks.

Warn if maps might overflow RAM

wram.asm (or ram/wram0.asm in Polished Crystal) defines wOverworldMap (or previously OverworldMap) as ds 1300 is both pokecrystal and pokered. If a map does not satisfy (width + 6) × (height + 6) ≤ 1300 (padded for map connections), it will overflow this buffer.

Saving a too-large map should show a warning. If the size can be read from .asm (as dec, $hex, or %bin) use that, otherwise default to 1300.

Compiler warning

src/metatileset.cpp: In member function ‘bool Metatileset::write_asm_collisions(const char*)’:
src/metatileset.cpp:196:98: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 7 has type ‘size_t {aka long unsigned int}’ [-Wformat=]
    mt->collision(Quadrant::BOTTOM_LEFT).c_str(), mt->collision(Quadrant::BOTTOM_RIGHT).c_str(), i);
                                                                                                  ^

ax6: "pass %02zx instead of %02x"

[Feature Request] Generate map images from the command-line

Maybe it's just me. If it's just me I'll just hack this program to do this, but I think it'd be useful to provide the user a minimal command-line interface to export a map as an image. This would help for example with automatically updating a public gallery of map images on a wiki or the like.

The interface could work as follows:

polishedmap [options] <map>

Operation:
-i|--info                 Give autodetected information on the map [Default]
-o|--output <file.png>    Output a png image.

Options:
-p|--project <directory>  Set the project directory. [Default: Auto]
-w|--width <size>         Set the width of the map. [Default: Auto]
-h|--height <size>        Set the height of the map. [Default: Auto]
-t|--tileset <tileset>    Set the tileset of the map. [Default: Auto]
-l|--lighting <timeofday> Set the map's lighting. [Default: Day]
-m|--monochrome           Use monochrome colors.
-e|--extended             Allow 255-tile tileset.

PM doesn't append .blk to file name after saving if .blk is removed

I'm making new maps and I found that if I edit the name of the file and end up removing ".blk" from the generated file name, it won't add ".blk" after the file name. Polished Map will show "Saved " without ".blk" after saving for the first time and the file will be "" without ".blk". If saved after the fact, saving (not save as) will continue to use the ".blk"-less file name. I'm on windows 7 if that matters.

Adapt to Mac Os

First of all, I have to say you have done an awesome work with polished-map. You deserve big kudos for creating it.

Do you think it would possible to adapt the code so it could also work with Mac?

[Feature request] Support relative paths

Right now, when opened through a terminal, polishedmap maps/NewBarkTown.blk won't work. I'd have to explicitly run polishedmap "$PWD"/maps/NewBarkTown.blk. While this isn't the biggest issue ever, it's definitely annoying.

Does not run on arch linux

Followed INSTALL.md, and polished map does not start with a seg fault. It worked fine for someone else despite arch not being explicitly supported, so clearly I must be missing something..
I know it's not affiliated, but the version of polished map on the aur has the same behavior.
Following tilemap studio's INSTALL.md works totally fine, though. Is there a difference between the two in terms of some dependency even though they seem super similar?
Screenshot_2021-12-08_12-32-39

Failing to load a map doesn't clear the tileset

Ketsuban in #pokecrystal: "I'm using Polished Map 3.5.3 and I notice if I repeatedly try to load a map and fail (I'm guessing at the map dimensions and getting it wrong) I start getting a "more than 256 tiles defined" error. By the looks of it it's appending the metatiles to a buffer which isn't cleared when the map fails to load."

Prompt the defined COLL_* constants

Use something like the Fl_Input_Choice widget, but with the dropdown menu properly aligned with the whole input, and filtered to the ones starting with the current value.

If collision constants were read, new blocks could also be initialized to use the first one, instead of blank values.

Palette features

  • Support the DARKNESS palette
  • Let users pick the default time of day, instead of using Day (or Night for dark themes)

Detect files modified by another program

Polished Map edits many files at once: the map .blk, script .asm, tileset .png, palette_map.asm, metatiles.bin, collision.asm, roof .png... Some of these, like the script .asm, are more likely to have been edited in a separate program even if they're already open in Polished Map.

Polished Map could record the modification time of each file it opens/loads, and when saving, compare that with the current modification time. If the current time is newer, confirm before overwriting. (Canceling the save of one file should continue with the rest, since Ctrl+S saves them all.)

  • save_tileset
  • save_roof
  • save_metatileset
  • save_event_script
  • save_map

[Feature Request] Shift+scroll scrolls horizontally

I know middle-click works, but a lot of programs let you scroll both vertically and with shift for horizontal scrolling, and that's a bit more natural to me.
If this is more of a toolkit issue, I'll report it there.

[Feature Request] Guess tileset from data/maps/maps.asm

What it says on the tin. It's annoying to have to look up the tileset name manually just as much as looking up its size.
It's not too difficult a format to parse and the file names should match the constants in lowercase sans the leading TILESET_.

It might be useful to tell the user if the options have been autodetected or not. Could be as simple as having "Select a tileset..." as default option.

Preserve underscores between digits in map constant to filename conversion

Event::warp_map_name converts the map constant to a label, e.g. UNION_CAVE_1F to UnionCave1F. However, it doesn't appropriately handle a case that doesn't come up in pokecrystal, when the constant has an underscore between digits. LUSTER_APARTMENT_1_1F should convert to LusterApartment1_1F, not LusterApartment11F.

Here's a Python implementation for testing:

def constant2label(constant):
    label = ''
    downcase = False
    for c in constant:
        if downcase:
            c = c.lower()
        if c == '_':
            downcase = False
        else:
            label += c
            downcase = not c.isdigit()
    return label

Ubuntu: Polished Map builds and installs fine, but can't open maps.

Following the install instructions for Linux in Install.md works fine, but I am unable to open any maps with it.
If I try to open it using the open dialog, it gives the error:
This is not a valid project! Make sure the Options are correct.
And if I try to drag the map file:
Could not find the project directory for MapName.blk! Make sure it contains a main.asm file.
A temporary solution is to run the Windows version via Wine.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.