GithubHelp home page GithubHelp logo

wario-land / wl4editor Goto Github PK

View Code? Open in Web Editor NEW
43.0 8.0 7.0 15.98 MB

Wario Land 4 Level Editor.

License: GNU General Public License v3.0

C++ 99.15% QMake 0.50% C 0.35%
wario warioland4 level-editor editor cpp qt qt6

wl4editor's Introduction

WL4Editor

WL4Editor icon

CodeFactor Github All Releases

This repository contains the most feature complete Wario Land 4 Editor yet.

Based on old and deprecated projects, we made a new one and are trying to make it the best one possible.

WL4Editor sample image

Download: Releases

If you're interested in our project and want to get the latest news and enjoy Wario Land hacking, you can join our Discord server with the link down below. You can not only share levels there, but also in the website. You can also see what levels other people have made using the editor on the website (also below).

Useful links

wl4editor's People

Contributors

chanchancl avatar chn-student avatar goldensunboy avatar kleymanstuff avatar kleyment avatar shinespeciall 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wl4editor's Issues

Re-saving with the Patch Manager causes "P" hooks to continually get longer

  • Open a ROM
  • Open the Patch Manager
  • Press the "Add" button
  • Press Browse and select a C patch file* which includes the "P" signifier in the Hook
  • Press OK, then Save
  • Open the Patch Manager again. The Hook is now (correctly) 4 bytes longer. If you press Edit, you can see that it comes after the "P".
  • Save the Patch Manager, then Open it again. Notice that the Hook is 4 bytes longer.
  • Repeat the previous step any number of times; the Hook will continue to grow.

*Here is an example of a file which will generate the problem: https://hatebin.com/cbbiomfryi

Patch feature causes game to crash if the code is optimized with stdlib calls

If the patch code would cause GCC to compile a function with several local variables, then building the stack frame is optimized with bl memcpy. The address of the memcpy symbol is unknown by the assembler but it compiles the code anyway, and the resulting binary crashes the game.

Suggested solution is to populate the assembly with a symbol for memcpy, or disable this specific optimization.

Repro:

  • Open vanilla ROM
  • Add the attached patch file "BoardReact.c" BoardReact2.zip
  • Save
  • Set breakpoint in No$gba to 0878F97C
  • Go to the Big Board, and land the roulette on a Wario space
  • Observe that 0878F986 branches to itself, causing a softlock (bl #0x878F986)

Corruption when adding new room

beco: seems like adding new room corrupts the rom if it's already edited before. i tried to add a room in my hack but it made the rom unopenable with the editor, also got the same result with your hack (HW).

layer 0 alpha blending cannot be rendered correctly in the editor on transparent pixels

according to the gbatek documentations:
the top-most non-transparent pixel must be selected as 1st Target, and the next-lower non-transparent pixel must be selected as 2nd Target, if so - and only if so, then color intensities of 1st and 2nd Target are mixed together by using the parameters in BLDALPHA register.

so we should disable alpha blending for pixels if pixels in either layers are transparent.

Patch feature causes game to crash if gcc compiles a jump table

If the patch code would cause GCC to compile a jump table, then that code will crash the ROM. This reason is twofold; one is that the jumptable entries have addresses in ARM format, and the second is that the .s file is not assembled with a .org directive to specify the code's starting address.

Suggested solution for first issue unknown

Suggested solution for second issue is to emit a .org assembly directive when compiling the source code file.

Repro:

  • Open vanilla ROM
  • Add the attached patch file "BoardReact.c" BoardReact1.zip
  • Save
  • Set breakpoint in No$gba to 0878F97C
  • Go to the Big Board, and land the roulette on a Wario space
  • Observe that 0878F98C loads PC with an invalid jumptable address (mov r15, r3)

WL4Editor.ini

We would like to be able to save particular settings in an ini file. These would include:

  • The last file which was opened by the editor
  • The location of the arm-none-eabi installation
    Programming would include high level functions in a static utility class to read or write key-value pairs with WL4Editor.ini in some format.

Initial framework support for other languages

QT allows support for other languages using the i18n framework and placing translatable string constants in tr() or QT_TR_NOOP() symbols. Significant work will need to be done to the existing code before any translation work can start:

  • We must place translatable strings within member functions in tr()
  • We must place translatable strings within a static context in QT_TR_NOOP()
  • Anywhere that a string is built through operator overloading, such as QString("The value is: ") + val, we need to parameterize the string so that no manual construction is being done
  • We must set up the infrastructure to produce the actual translations

Once this item is closed, we can create a separate issue for each additional language, and assign them each to someone for whom it is their native language.

Undo and Redo cannot work for entity and door changes

the title says everything and there is a lot of things need to do to fix it:
1). the Door class needs some reimplementation since the current door destination finding code is bad
2). the current Door class make it hard to implement Undo and Redo, and also it affect the undo and redo of spriteset and sprites.

so basically 2 things:
1). re-implement the door class
2). add the code to support undo & redo of doors and sprites changes in Operation class. The door changes should be in the global operation queue, the sprite changes should be in the room operation queue.

Find a method to support searching Entity in the Door Config Dialog

Idk if we really need to do this, i just put it here, since a single enemy can have different names, and the UI logic has to be edited in the code, not some easy property things, so i don't want to do it by myself.
There is another problem that in the future, people will perhaps inserting their own enemies, and we will support spriteset slot editing in the future, and the old of this will need more modifications.

status bar disappears

The status bar will disappear if your screen's height cannot hold both output window and status bar when you switch to camera editing mode and the tall camera settings dock widget squashes the output window down.

Allow save chunks to be larger than 0xFFFF in size

This will be needed for some types of really large layers if someone has a 0xFF by 0xFF room, or if we allow people to import sound samples sometime way in the future.

This can be achieved by using one of the reserved bytes of the RATS tag to indicate that an additional 0x10000 should be added to the chunk size.

Changing Layer 0 Mapping Type to Tile8x8 related value will crash the editor

  • Open a ROM
  • Load Level: Sapphire Passage - Third Level (Fiery Cavern)
  • Switch to Room 2
  • Open Room Config
  • Change Layer 0 Mapping Type to "0"(Disabled) from "22"(Tile8x8 & autoscroll)
  • Press OK (close Room Config)
  • Open Room Config
  • Change Layer 0 Mapping Type to "22"(Tile8x8 & autoscroll) from "0"(Disabled)
  • Press OK (close Room Config)
  • The editor crashes

Map16 tile selector bug when changing rooms

When changing rooms or levels, the selected tile in the map16 selector changes to tile 0, and the previous tile you had selected cannot be selected again. You can select it if you choose another tile first.

  • Open ROM
  • Select tile 10 (the small block)
  • Press the next room button
  • Observe that tile 0 is now selected (not a bug by itself)
  • Click tile 10 (the small block)
  • Observe that it cannot be selected (bug)
  • Click some other tile, such as tile 8 (blue gem)
  • Click tile 10
  • Observe that tile 10 can now be selected again

Support multiple hooks in one patch

we discuessed about a possible feature (deprecated) when implementing the patch things that people only want to replace a pointer from some function pointer table, so they can completely replace a funciton but no need to change the vanilla code by injection. and gsb said it is possible that there are more than one pointers in the whole rom they need to replace.
so to do this, we can let users be able to add multiple hook addresses, and apply the same hook into different places, they can choose only to put a P in the hook string and do the multiple replacement.
you only need to change that int in the structure to some QString, and add a big loop in the patch application code to do the multiple hook for a same function (perhaps in patch withdraw part too)

blank Layer render problem

background layers will have weird things from other Rooms' layers or even non-map layers sometimes due to Qt internal memory problems perhaps.
image

Crash when un-doing changes

N.B. You don't need to change the tile selected, the editor will crash the next time you try to place a tile.
ezgif com-video-to-gif

Add a low level save data analyzer/hex editor

We should have a dialog that allows you to see the save data:

  • Should look similar to modern hex editors
  • Should color code individual save chunks by type
  • Which parts are considered free space should be apparent
  • A percentage of the used space and fragmented space should be shown
  • A bar should be shown as well which demonstrates which space is used from the start of free space to the end of the ROM
  • A label should indicate that the ROM is or is not capable of being expanded to a larger size at this point
  • Information about the save data chunk would be useful, such as what type of chunk this is, which level it is used in, which locations in the ROM point to it, and which other save chunks are pointed to by this chunk (for example, camera boundary table chunk)
  • Identify orphaned chunks
  • If we implement a defragmentation function in the future, this would be the place to put it
  • Allow editing the data (and provide a warning that you may corrupt the ROM if you don't know what you are doing)

DPI problem

Different DPI settings in different systems will cause the render of widgets in most of the windows vary, sometimes text cannot be displayed correctly due to the too big fontsize, we suggest you to set DPI to be 100% for now to use the editor.
image

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.