Posts: 13
Threads: 1
Joined: Apr 2015
04-14-2015, 08:39 PM
(This post was last modified: 04-14-2015, 08:41 PM by Kim_Bo.)
Quote:The program currently only decrypts files via the import. Else it works entirely in unencrypted .txt format. What you did was save unencrypted text into a .dat file and then tried to decrypt that unencrytped file (you can do the same with a normal data changer: rename any .txt file to .dat and open that with it).
So I can use txt files instead of *.dat? Or files don't have to be decrypted after importing?
Quote:In turn every updated line has two undo steps, which is rather awkward. If anyone can find out how to modify the undo stack of the fast text box or replace a line in one step that'd help.
I will think about it.
You have infinite undo moves? Maybe it would be easier to just assign menu tool strip for undo to run double time the undo function?
like:
Code: If (focus_set_to viewer mode_
{
undo()
undo()
}
Else{
undo()
}
This wouldn't be clean way for doing this but it might help temporary. Like I said, will think about it.
Posts: 2,343
Threads: 79
Joined: Mar 2008
04-15-2015, 11:35 AM
(This post was last modified: 04-15-2015, 11:37 AM by YinYin.)
(04-14-2015, 08:39 PM)Kim_Bo Wrote: Quote:The program currently only decrypts files via the import. Else it works entirely in unencrypted .txt format. What you did was save unencrypted text into a .dat file and then tried to decrypt that unencrytped file (you can do the same with a normal data changer: rename any .txt file to .dat and open that with it).
So I can use txt files instead of *.dat? Or files don't have to be decrypted after importing? Yes, LF2 can load txt files.
(04-14-2015, 08:39 PM)Kim_Bo Wrote: Quote:In turn every updated line has two undo steps, which is rather awkward. If anyone can find out how to modify the undo stack of the fast text box or replace a line in one step that'd help.
I will think about it.
You have infinite undo moves? Maybe it would be easier to just assign menu tool strip for undo to run double time the undo function?
like:
Code: If (focus_set_to viewer mode_
{
undo()
undo()
}
Else{
undo()
}
This wouldn't be clean way for doing this but it might help temporary. Like I said, will think about it. Well it would kind of mess up the normal undo behaviour when editing the text box yourself. I'll give it a try though.
edit: yup, that's a great temporary solution for the frame viewer only (and it appears to require 3 un/redos) - to not mess with the normal editing I left the other functions in the text editor singular. It would still be best to condense my update from 3 to 1 action.
Never mind what I said about any time soon on v1.2. Full .dat support is here. Be sure to test it backwards and upside down and keep making backups before you save over your .dat files.
(04-02-2015, 04:19 PM)YinYin Wrote: v1.3
Full .dat support! Including a crude settings dialogue allowing you to change the font and the 123 characters preceding your saved .dat files. Also custom notifications in case your bitmaps don't show up in the frame viewer and triple undo/redo to skip the line delete/insert steps. Also if you aren't working in a folder structure containing an lf2.exe consider creating an empty file named lf2.exe to mark your root folder.
Posts: 746
Threads: 55
Joined: Apr 2008
@ YinYin: You could try to implement the following in order to not rely on lf2.exe being called lf2.exe (or that it even exists):
C++-Code:
string Directory = GetFileDirectory();
bool DirectoryFound = false;
while(UpOneDirectory(Directory) && !DirectoryFound){
bool FoundAllFiles = true;
for(int i = 0;i<BitmapFilenames.size();++i){
if(!FileExists(Directory+BitmapFilenames[i])){
FoundAllFiles = false;
break;
}
}
}
if(!DirectoryFound) return;//could not find directory
//load files
|
Age ratings for movies and games (and similar) have never been a good idea.
One can learn a lot from reinventing wheels.
An unsound argument is not the same as an invalid one.
volatile in C++ does not mean thread-safe.
Do not make APIs unnecessarily asynchronous.
Make C++ operator > again
Trump is an idiot.
Posts: 2,343
Threads: 79
Joined: Mar 2008
(04-15-2015, 12:49 PM)Someone else Wrote: @YinYin: You could try to implement the following in order to not rely on lf2.exe being called lf2.exe (or that it even exists): I'd very much like it to be that way, but my implementation is awfully slow whenever the folder structure is a bit deeper or the directory could not be found:
CSHARP-Code:
private void open(string args)
{
//
//opening stuff and bmp_begin parsing
//
lf2root = Path.GetDirectoryName(args) + "\\";
bool DirectoryFound = false;
do
{
DirectoryFound = true;
for (int i = 0; i < global.objectfile.bmp_begin.bmps.Count; i++)
{
if (!File.Exists(lf2root + global.objectfile.bmp_begin.bmps[i].path))
{
DirectoryFound = false;
break;
}
}
} while (!DirectoryFound && UpOneDirectory(ref lf2root));
if (!DirectoryFound) lf2root = "\\\\"; //indication of unfound root directory from previous implementation
/*/get lf2.exe path - previous implementation
lf2root = Path.GetDirectoryName(args) + "\\lf2.exe";
while (!File.Exists(lf2root) && lf2root.Length > 10)
lf2root = lf2root.Substring(0,
lf2root.Length
- new DirectoryInfo(Path.GetDirectoryName(lf2root)).Name.Length
- Path.GetFileName(lf2root).Length - 2) + "\\lf2.exe";
lf2root = Path.GetDirectoryName(lf2root) + "\\";*/
}
private bool UpOneDirectory(ref string lf2root)
{
if (lf2root.Length > 4)
{
lf2root = lf2root.Substring(0, lf2root.Length - new DirectoryInfo(Path.GetDirectoryName(lf2root + "\\")).Name.Length);
return true;
}
return false;
}
|
With the lf2.exe marker it's all snappy and fast, with a quick note on what to do in case no marker was found.
Thanks given by:
Posts: 746
Threads: 55
Joined: Apr 2008
(04-15-2015, 02:45 PM)YinYin Wrote: With the lf2.exe marker it's all snappy and fast, with a quick note on what to do in case no marker was found. I tried this code out:
CSHARP-Code:
using System.IO;
using System.Diagnostics;
using System.Collections.Generic;
namespace StupidLanguage
{
class Bmp
{
public Bmp(string path_) {
path = path_;
}
public string path;
}
class BmpBegin
{
public BmpBegin() {
bmps.Add(new Bmp("sprite\\sys\\knight_0.bmp"));
bmps.Add(new Bmp("sprite\\sys\\knight_1.bmp"));
bmps.Add(new Bmp("sprite\\sys\\knight_2.bmp"));
bmps.Add(new Bmp("sprite\\sys\\knight_0b.bmp"));
bmps.Add(new Bmp("sprite\\sys\\knight_1b.bmp"));
bmps.Add(new Bmp("sprite\\sys\\knight_2b.bmp"));
}
public List<Bmp> bmps = new List<Bmp>();
}
class ObjectFile
{
public BmpBegin bmp_begin = new BmpBegin();
}
class Global
{
public ObjectFile objectfile = new ObjectFile();
}
class Program
{
static Global global = new Global();
static void Main(string[] args)
{
Stopwatch Countdown = Stopwatch.StartNew();
string a = open("D:\\LF2\\LF2_v2.0a\\data\\knight.dat");
Countdown.Stop();
System.Console.WriteLine(Countdown.Elapsed);
System.Console.WriteLine(a);
}
private static string open(string args)
{
string lf2root = Path.GetDirectoryName(args) + "\\";
bool DirectoryFound = false;
do
{
DirectoryFound = true;
for (int i = 0; i < global.objectfile.bmp_begin.bmps.Count; i++)
{
if (!File.Exists(lf2root + global.objectfile.bmp_begin.bmps[i].path))
{
DirectoryFound = false;
break;
}
}
} while (!DirectoryFound && UpOneDirectory(ref lf2root));
if (!DirectoryFound) lf2root = "\\\\"; //indication of unfound root directory from previous implementation
/*/get lf2.exe path - previous implementation
lf2root = Path.GetDirectoryName(args) + "\\lf2.exe";
while (!File.Exists(lf2root) && lf2root.Length > 10)
lf2root = lf2root.Substring(0,
lf2root.Length
- new DirectoryInfo(Path.GetDirectoryName(lf2root)).Name.Length
- Path.GetFileName(lf2root).Length - 2) + "\\lf2.exe";
lf2root = Path.GetDirectoryName(lf2root) + "\\";*/
return lf2root;
}
private static bool UpOneDirectory(ref string lf2root)
{
if (lf2root.Length > 4)
{
lf2root = lf2root.Substring(0, lf2root.Length - new DirectoryInfo(Path.GetDirectoryName(lf2root + "\\")).Name.Length);
return true;
}
return false;
}
}
}
|
It runs in 0.0004920 seconds on my PC. How long does it take on yours?
Age ratings for movies and games (and similar) have never been a good idea.
One can learn a lot from reinventing wheels.
An unsound argument is not the same as an invalid one.
volatile in C++ does not mean thread-safe.
Do not make APIs unnecessarily asynchronous.
Make C++ operator > again
Trump is an idiot.
Posts: 2,343
Threads: 79
Joined: Mar 2008
(04-15-2015, 03:42 PM)Someone else Wrote: It runs in 0.0004920 seconds on my PC. How long does it take on yours?
~0.0006 seconds
~0.001 if I ramp up to 7 folders deep instead of 3.
Guess I gotta look for my culprit elsewhere.
Posts: 2,343
Threads: 79
Joined: Mar 2008
Update (04-02-2015, 04:19 PM)YinYin Wrote: v1.4
A smaller update. Mostly allowing you to still edit frame data visually even if there is no picture found. Also working without an lf2.exe to locate bitmaps. And auto indenting and formatting has been improved to better work with single line tags and you can also turn it off in the settings.
Posts: 1,554
Threads: 77
Joined: May 2011
05-20-2015, 06:01 PM
(This post was last modified: 05-20-2015, 06:03 PM by A-Man.)
(05-20-2015, 05:56 PM)Gad Wrote: I easly approve this.
This is great tool.
I am still missing 'go to frame x' option, sometimes helpful.
You can do Ctrl+F -> type in "> x"
Posts: 1,341
Threads: 32
Joined: Jan 2011
05-21-2015, 12:25 AM
(This post was last modified: 05-21-2015, 12:27 AM by bashscrazy.)
Wow thanks to Gad posting in here I decided to give VDC another go for frame viewer and ZOMG!! I don't know why I didn't keep using it last month when I tried it...
So many frames in my dbz lf2 mod with bad bdys and itrs. Time to fix them all with ease!
YAY!
So thanks for the application! Great help with DC
Thanks given by:
Posts: 2,343
Threads: 79
Joined: Mar 2008
05-21-2015, 10:16 AM
(This post was last modified: 05-21-2015, 10:35 AM by YinYin.)
(04-02-2015, 04:19 PM)YinYin Wrote: v1.4g
g for gad, goes to frames
little list for myself once I fully pick up developing this again- make more hot keys from the text box available in the frame viewer
- see if I can make things run faster ...
- add frame element selection capabilities (much like layers)
- build create and delete frame element functionality
|