Page 36 of 37

Re: Development Blah: Comments

Posted: Thu Apr 30, 2015 1:59 am
by Sirius
:joy:
DLE's texture editor is looking much better in the version I built off the SVN. Looks like the one on the website needs a recompile though? It says .12 but doesn't have some of the fixes in .12.
There are a few robot textures that are split up rather than appearing as single textures, but at least they're in the right place and you can get to all the frames... so maybe I can give DFW the "okay, try now" :mrgreen:

And then I can move on to features/improvements again :coding:

Re: Development Blah: Comments

Posted: Thu Apr 30, 2015 1:20 pm
by karx11erx
Oops, strange. I will rebuild and repost it.

Which textures weren't displayed right?

Re: Development Blah: Comments

Posted: Fri May 01, 2015 12:14 am
by Sirius
The only ones I found were under the "robots" filter.

bosspot1 (split into 5 textures)
ctrl05 (5)
energy01 (2; second one animated)
eye01 (2; second one animated)
eye02 (2; second one animated)
eye03 (10)
eye04 (6)
eye05 (2; second one animated)
eye06 (11)
flare (2; second one animated)
glow02 (5)
react004 (5)
water07 (2; second one animated)

Re: Development Blah: Comments

Posted: Sun May 03, 2015 1:11 pm
by Sirius
On the undo issue I was looking at today: I am guessing Unroll is intended to be used when an action is cancelled due to an error (and so is automatically rolled back), but if the action hasn't done anything yet, it seems to revert the previous action instead.

Is that a bug? Using End instead for the case I was fixing (in CSegmentManager::AddSegments) seemed to work fine.

Re: Development Blah: Comments

Posted: Sun May 03, 2015 3:03 pm
by karx11erx
Yeah, that was a bug. GJ finding it. :thumb:

Re: Development Blah: Comments

Posted: Mon May 04, 2015 9:29 am
by Sirius
OK. May take a while to submit a fix since I'll be travelling a lot this week and need to spend a little time to more fully understand why the problem occurs. I don't want to accidentally break something in undo, we've had enough grief there already...

Re: Development Blah: Comments

Posted: Mon May 04, 2015 9:34 am
by karx11erx
Oh - I thought you had already submitted that fix. If you tell me what functions to look at, I will fix them.

Re: Development Blah: Comments

Posted: Mon May 04, 2015 10:08 am
by Sirius
The fix I submitted was to correct the AddSegments call (along with a separate case in the .blx reader that I was worried about). It previously had a code path where it wouldn't close out the undo item at all, which caused all sorts of bad stuff, and was seemingly what broke in the bug reported on SourceForge.

The lingering problem, though, is that my fix isn't ideal; CUndoManager::Unroll caused the side-effect I reported, so I avoided it and used CUndoManager::End instead, which seemed to work - but the right fix would be to make Unroll work properly and use it in CSegmentManager::AddSegments when the call to Create fails. After all, it could be breaking other functions that still use Unroll.

Re: Development Blah: Comments

Posted: Mon May 04, 2015 10:22 am
by karx11erx
The main problem is that for convenience undoManager.Begin often is called at the beginning of a function that might change mine data, and if an error occurs, either Unroll or End are called although no game data has been changed. Unroll will erroneously restore a previous mine data state, while End will leave an empty state buffer. The undo manager should have a Cancel function, simply allowing to discard all backups made "just in case".

In the concrete case of AddSegment, the underlying Create function is preceded by undoManager.Begin. If Create returns an error, then in only has done some checks and hasn't altered mine data at all. In that case, the backup that has been created in AddSegment for the case it would change mine data can (and should) be discarded. There are more cases than that.

Unroll has the prolem that the undoManager accumulates changes via its Begin - End mechanics, which can be nested. The undoManager will only create a new mine data backup when Begin is called at nesting level zero. So if an error occurs deep in some nested undo Begins, unrolling will revert all the way back through all changes made since the Begin call at level zero.

However, I think that shouldn't mess up the mine data. Only if a Begin hasn't a matching End / Unroll, it should.

I have added CUndoManager::Cancel (char* szFunction, int dataFlags) to allow fixing that particular problem with the undo manager.

Cel Shading ...

Posted: Tue May 05, 2015 1:25 am
by karx11erx
[posts moved to dev blah thread]

Re: Development Blah: Comments

Posted: Tue May 05, 2015 3:58 pm
by Pumo
Hey, that's pretty cool, I didn't thought that you would actually implement cel shading on D2X-XL officially!

It looks pretty cool, although I feel the textures got way too blurry, maybe a bit less blur would make them look better.
But overall it looks great! :D

Re: Development Blah: Comments

Posted: Tue May 05, 2015 5:25 pm
by karx11erx
It will look much better than on this screen shot, particularly when using hires textures. ;)

Re: Development Blah: Comments

Posted: Wed May 06, 2015 7:49 am
by Weyrman
I like the look. It changes things a bit yet again. :clap:

Re: Development Blah: Comments

Posted: Sat May 09, 2015 3:52 pm
by Alter-Fox
Ok so this finally tempted me enough to make me start playing D2X-XL again and I think I figured out that my mysterious problem was windows being an idiot. Even though I'd been keeping the game updated the exe I'd been running was somehow still from version 1.16.27. And I bet that could cause all sorts of weird lockups and crashes... good job screwing yourself up even further windows.

Anyway I found some interesting behaviour with the cel shader -- doesn't look like something intentional though for all I know it might be. I'll make a ticket on the tracker and if it's something you wanted to happen just delete it or whatever.

Even so the cel shading is beautiful, I totally know how I'll be playing Pumo Mines. :D And everything until then probably.

Re: Development Blah: Comments

Posted: Mon May 11, 2015 12:53 am
by Alter-Fox
Can't download 1.18.3...
The normal download link just links to the main downloads page.