GithubHelp home page GithubHelp logo

skaa_editor's People

Contributors

olreich avatar sraboy avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

skaa_editor's Issues

No color dropper tool

It's hard to identify colors in use without a color-picker/dropper tool. This is something that exists in the SkaaColorChooser (derived from ColorGrid) but hasn't been implemented yet.

Loading sprites with different filenames breaks saving

A Sprite objects SpriteId is based on the filename. This should be exposed to the user and the user should be notified when game set data was not found for a sprite due to the SpriteId not being found in the database.

Unknown color remap tables

The color remap tables used by 7KAA need to be exposed to the user so they know which colors will be remapped for different nations' colors in-game.

Better About Box

There's a simple one in there but it's been disabled. I'd like a tabbed one with tabs like this:

  1. General information, copyright
  2. Readme
  3. License Information
    (maybe) 4. Changelog

The Readme, License and Changelog should use https://github.com/ArthurHub/HTML-Renderer, which supports Markdown, so we can just use the same docs from the repo. See Cyotek's ImageBox demo app for an example of using the control with Markdown.

ActiveSecondaryColor Not Fully Implemented

Most of the code is there but it's not exposed in the UI yet and various different points in the code set it to some different default. It should just remain null within ImageEditorBox until set and the main form can set a default, once the palette is loaded.

Simple right-clicking on a color in the color chooser should use that for the secondary color, which is applied with a right-click on the image.

Additionally, I'm not sure the ImageEditorBox control actually needs the ActiveSecondaryColor property. It may be easier/better for an ActiveColor property to be set based on whether a right- or left-click was detected. There is an ActiveColorChangedEventArgs class in SkaaEditorControls not being used; if not removed entirely, it should be part of the ImageEditorBox project and used by SkaaColorChooser to set an active color.

Loading GameSet Freezes UI

This is due to ObjectListView and the fact that a tab containing the GameSet data is set up by default. This should be done asynchronously and/or ObjectListView can be swapped for its lighter-weight version, FastListView.

I consider a bug as it can cause the application to crash if the user is impatient and starts randomly clicking the window while waiting for it to paint.

Unknown default colors

The ImageEditorBox gets Black/Transparent for default colors but these are not shown to the user, which could lead to accidental editing.

Fix/remove todo items in source

Most of the todo items mentioned in source should be issues here, either as bugs, enhancements or feature requests. Some are also out of date and probably not needed anymore.

Paint bucket leaves some unpainted lines

When filling the large transparent spaces on either side of the weapon in catapult.spr, the paint bucket left the left/right edges of the image transparent, lines one pixel wide.

Can't open non-sprite resources

There are a ton of *.res files used throughout the game. The file format appears the same as, or extremely similar to, SPR files. Being able to edit these or create new ones would allow for adding new game features requiring new buttons or menu options.

  • ResIdxMultiBmp
  • i_raw.res (special version of ResIdxMultiBmp)
  • Edit DBF tables that are stored in some RES files
  • Edit TXT-based ResIdx files

Ref this thread for an example of where a new button or other control may be needed.

Project can't use std.set and other DataTables simultaneously

It's probably going to be kludgy code to maintain the backwards compatibility with 7KAA code but a user should be able to open multiple files, including those with their own data. See issues #11 and #12.

This is really only an issue when trying to save changes. The non-standard tables (not in std.set) should still be added to the ActiveGameSet but Project will need to iterate through the tables and pick out the (hardcoded) names of the standard game set and only save/return the appropriate ones (whether saving a ResIdx, dBaseIII or std.set).

Small To-Do Items

  • Check for "std.set" in the active game set to enable/disable "Save Game Set" in File menu (see ToggleUISaveEditOptions() in main form)
  • Prompt to save the game set when saving an SPR file (saveSpriteToolStripMenuItem_Click in main form)

DockPanelSuite, MVP Implementation & Code Cleanup

This has been in progress for a while and the mini todo items are starting to stack up so I'm creating this issue to track them. The move to MVP will make it easier to update the UI and add features later but it broke a lot of previously-working functionality. Completion of these items will be spread across multiple releases/milestones but should mostly be done before the beta (0.6).

  • Implement presenters (DbfFilePresenter is still unused/untested)
  • Re-implement saving std.set with updated offsets (see commit)
  • Move call to RecalculateOffsets() somewhere that doesn't slow down the UI updates (see commit)
  • The default ImageEditorContainer, when SkaaEditor is first opened, is named "New Sprite". There is no ability to edit or do anything with this. Remove the tab or implement the New Sprite functionality.
  • SkaaSprite, SkaaFrame, SkaaSpriteFrame (and maybe others) should simply mirror 7KAA's objects and/or serve as static classes for file manipulation. The presenters have re-implemented their properties anyway so they're just wasting memory and requiring extra code to support. This may wait until after the beta because, for now, the code simply works as is.
  • re-implement project loading/saving
  • separate, document and cleanup FileTyping.cs
  • IndexedBitmap shouldn't output with the SPR's 4-byte header (but it's easiest to do there so this may not be fixed). Currently, ResIdxMultiBmp just ignores the header when saving; I just think there could be a more eloquent way to do this. Maybe SkaaFrame.GetSprBytes() can have a bool parameter that specifies whether it should strip the header off for us.
  • SpriteViewer's ListView (which is an ObjectListView) doesn't update/show names for SpritePresenter objects
  • Each presenter object creates its own FileStream when saving. This is probably safe to move to PresenterBase.
  • Remove the Cyotek projects and add them as libraries instead. This will likely wait until the most/all of the drawing/editing functionality is implemented because it helps to step through the Cyotek code to see what needs to be overridden or otherwise accounted for.
  • The DataSource, DataTable and DataRow extension methods in SkaaGameDatalib don't need the "isIdx" parameter anymore (I don't think). I'm pretty sure this is left over from before the implementation of DbfFile, when I was confusing the various file formats. Every call to these just passes true.
  • Add the TraceSource logger to classes missing it and add logging messages where there may be errors

Drag/Drop for *.res Files Takes Too Long

These files have to be tested for their formats. Some way to allow the user to specify or default to ResIdxMultiBmp would be nice, probably by checking the ActiveDocument's type; if it's an ImageEditorContainer, then default to ResIdxMultiBmp. Otherwise, default to whatever other types are mapped to whatever other presenters/containers.

No file format checking

Opening bad files causes exceptions/crashes in alphav3. The files are assumed to be in a good format.

Unable to load a new game set

SkaaEditor crashes if you try to load a new game set while already having one loaded, which is done automatically.

No autosaving

No changes are ever saved unless the user explicitly chooses to save the project or individual files. Temp files should be saved in AppData. Since that temp directory we create is supposed to be deleted when SkaaEditor closes, check for its existence on startup and offer a recovery option.

Some sort of basic autosaving is necessary until the codebase is a bit more robust.

7KAA crashes w/ edited sprite

It seems that edits that change the layout, such that transparent pixels are added/removed in a way that changes the byte length of the sprite frame's data, will cause 7KAA to crash:

Exception thrown at 0x00692843 in 7kaa.exe: 0xC0000005: Access violation reading location 0x0ACAD000.

If there is a handler for this exception, the program may be safely continued.

The SPR file is loaded fine during initialization but the exception is thrown while drawing in IMGbltTransRemapDecompress() (IB_TRD.cpp @ Line 75).

7kaa.exe!IMGbltTransRemapDecompress(char * imageBuf=0x7e6f0008, int pitch=800, int desX=374, int desY=430, char * bitmapBuf=0x0ac9ab60, char * colorTable=0x006e95ce) Line 99 C++
7kaa.exe!VgaBuf::put_bitmap_trans_remap_decompress(int x=374, int y=430, char * bitmapPtr=0x0ac9ab60, char * colorTable=0x006e95ce) Line 201 C++
7kaa.exe!Unit::draw() Line 124 C++
7kaa.exe!ZoomMatrix::draw_objects_now(DynArray * unitArray=0x0113b4d4, int displayLayer=1) Line 1767 C++
7kaa.exe!ZoomMatrix::draw_objects() Line 1667 C++
7kaa.exe!ZoomMatrix::draw_frame() Line 487 C++
7kaa.exe!Sys::disp_zoom() Line 1012 C++
7kaa.exe!Sys::update_view() Line 682 C++
7kaa.exe!Sys::disp_frame() Line 571 C++
7kaa.exe!Sys::process() Line 258 C++
7kaa.exe!Sys::main_loop(int isLoadedGame=1) Line 733 C++
7kaa.exe!Sys::run(int isLoadedGame=1) Line 493 C++
7kaa.exe!Battle::run_loaded() Line 634 C++
7kaa.exe!Game::single_player_menu() Line 609 C++
7kaa.exe!Game::run_main_menu_option(int optionId=1) Line 299 C++
7kaa.exe!Game::main_menu() Line 254 C++
7kaa.exe!SDL_main(int argc=1, char * * argv=0x01650008) Line 416 C++
7kaa.exe!main(int argc=1, char * * argv=0x01650008) Line 140 C
7kaa.exe!WinMain(HINSTANCE__ * hInst=0x00350000, HINSTANCE__ * hPrev=0x00000000, char * szCmdLine=0x01124c11, int sw=10) Line 177 C
7kaa.exe!__tmainCRTStartup() Line 618 C
7kaa.exe!WinMainCRTStartup() Line 466 C
kernel32.dll!74f33744() Unknown
[Frames below may be incorrect and/or missing, no symbols loaded for kernel32.dll]
ntdll.dll!7704a064() Unknown
ntdll.dll!7704a02f() Unknown

Notes from debugging:

data_buf=0x0AC9954D //ballista SPR
In OUNITDRW.cpp @ Unit::draw() //this.Type() = Unit
bitmapPtr=0x0ac9ab60
diff = bitmapPtr - data_buf //0x1613 = 5651

At bitmapPtr: "57 f2 f2 f8 28"
In ballista.spr_old, that's at offset 1b27
In ballista.spr (edited), it's at 1c45

File size diff = new (82864)- old (82578) = 286
This is the same diff as 1c45-1b27, confirming the change is responsible

Can't resize frames

It's not possible to resize frames in sprites. The only editable area is as defined upon loading the SPR file.

Extra project folders left

A project folder is created when a new project is created, whether or not the user is saving the file.

SelectionRegion is Inaccurate

The snap-to-grid implementation makes ImageEditorBox's SelectionRegion inaccurate. It is, for example, impossible to start selecting somewhere in the image and drag to the bottom-right to select everything; the last lines of pixels on each of the bottom and right of the image cannot be captured.

Sprite loading takes too long

This should be async to free up the UI. This isn't a huge issue for *.spr files but there are several very large RES files in the SPR format that take too long.

Pencil drawing is laggy

FastBitmap is recreated on every pixel draw for the pencil tool. This needs to be taken care of outside the PencilDraw() function to speed it up.

Cannot open projects with multiple set files

This is currently logged as a Trace error and any file after the first returned from Directory.EnumerateFile() is ignored. The user should be prompted to associate each SET file with a sprite so projects can be merged.

This is only important for databases other than SFRAME, which is all we're working on so far.

Can't add/delete frames

There is no way to add a new frame or delete a current one. This will require exposing the game set's data to the user.

Adding frames will require adding a new row to SFRAME. Removing them will require removing a row and ensuring there is either a replacement frame or the rest of the rows are adjust to ensure the frame is not referenced by 7KAA.

Need basic project support

The user shouldn't have to save the game set and sprite separately. A project should be saved in one File>>Save operation and should be loaded in one File>>Open operation. At a minimum, the project should include an SPR file and an up-to-date SET file that will have the proper frame offsets for whatever is in the SPR.

Timeline control uses Sprite and Frame

The Timeline shouldn't use SkaaGameDataLib at all. It should have, at most, just a collection of the bitmaps. Maybe Timeline could use a framed Bitmap format and SkaaEditorUI would convert to that before setting the property.

Refactoring SkaaGameDataLib required changes in Timeline even though it's irrelevant. It's no longer well-tested.

Can't Re-Open Closed Windows

When editing sprites, you can close the MDI tab. In the background, it is only hidden but there's no way to re-open it.

There's also no way to actually close the sprite. When a sprite is closed, its data needs to be removed from the game set (else, a user won't be able to re-open a file that has game set data because it already exists).

No user-configurable settings

Temp folders, project folders, 7KAA location, working directory

Everything is currently done in the EXE's current directory.

No copy/paste

ImageEditorBox is derived from Cyotek's ImageBox, which has a built-in selection capability. It may or may not be used... but we need to be able to select regions of an image and cut/copy/paste to other frames.

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.