Jump to content
COMBATSIM Forum

TFXplorer and Windows 10


mikew
 Share

Recommended Posts

Yes,thanks! It's just a case of formulating the question in a way that the Wine people can't argue against.

I'll deal with that so that you can provide the finishing touches to TFXplorer. :)

 

 

Link to comment
Share on other sites

  • Replies 94
  • Created
  • Last Reply

Top Posters In This Topic

That’s too kind of you!

 

It’s pretty cumbersome to pack ZIPs and hand them around, so I just created a git repository for TFXplorer. It’s read-only and represents the “stable” branch, meaning as little as “it compiles and the EXE opens without crashing right away”.

 

But it means that you can always get the latest version, or browse old versions (I included ~300 revisions reaching back to 2011, but of course I can’t guarantee that any of them still compiles).

 

You’re a Linux guy, so you will know your way around git’s command line. If you want to use the repo from Visual Studio:

  1. start VS
  2. on the right of the start screen, choose “Clone a repository”
  3. repository location: http://krishty.com/taw/tfxplorer.git
  4. click Clone
  5. it should open TFX/TFX.sln automatically
  6. hit F5 to build and run a debug version
    (for some reason it doesn’t find the HUD texture; I’m on it)

 

It breaks my heart to see how little progress I made since 2016 … the last commits were entirey GUI-focused, and it will be like that for a while as I’m currently using TFXplorer’s GUI for a commercial project of mine. I have a huge changeset regarding HID/keyboard mapping via GUI and I hope it can land in the upcomings months so that we can finally work towards a new release …

Link to comment
Share on other sites

On 4/7/2021 at 6:53 PM, Krycztij said:

That’s too kind of you!

A bit short of time, so I still haven't got around to writing the Wine bug report.
Despite being able to paste in your information which identifies the problem and suggests how to fix it, I'm not sure that will guarantee that they will act on it.
Is there a performance gain in using the 'dialog window' over other types of window?

 

There are more involved issues involving the keyboard and joystick with TFXplorer and Wine, so I want to work out the best way to deal with them...

 

On 4/7/2021 at 6:53 PM, Krycztij said:

You’re a Linux guy

Only for the last few years. Everything MS do seems to annoy me these days, so would like to diversify as much as possible.
On Linux, I've done a 'git clone' on your repo and can receive it OK. I haven't tried from within VS yet.
By the way, it was indeed VS that needed updating on that native Win10 PC and TFXplorer builds fine now. The only update it was nagging me about was something called 'web share' but apparently the updater itself needed updating so I was not informed of anything actually useful.

 

On 4/7/2021 at 6:53 PM, Krycztij said:

...I’m currently using TFXplorer’s GUI for a commercial project of mine

That's intriguing! A secret commercial project for a client, or something that enriches humanity that anyone can buy?

Link to comment
Share on other sites

3 hours ago, mikew said:

Is there a performance gain in using the 'dialog window' over other types of window?

 

It was the preferred way of creating windows for several years because

  1. you have a graphical editor and a preview – no way to do this for CreateWindow() calls
  2. you can pass these dialog resources to your localization department to translate them along with the other localized resources.
    Most native windows in Windows ’95–7 were designed and localized that way – e.g the File Properties dialog and various Control Panel windows – but they don’t have problems because they are fixed-size dialogs or don’t rely on 0x80000000 to compute the dimensions for them.
     
3 hours ago, mikew said:

so I want to work out the best way to deal with them...

 

I was never involved with Wine, but I hope “this worked for ages in Windows but doesn’t in Wine, and here’s two applications that display wrong because of it” is understood :)

 

3 hours ago, mikew said:

Only for the last few years. Everything MS do seems to annoy me these days

Same here. Amen.

 

Glad you got it compiling!

 

3 hours ago, mikew said:

A secret commercial project for a client, or something that enriches humanity that anyone can buy?

 

 

Hard to say at this point. I try to obtain rights to intellectual property of my old company, which filed bancruptcy. If I get them, anyone will be able to buy. If not, I will at least be able to sell the product to the new rightsholder. Or maybe if I work harder and program more, I will not need the rights at all … we’ll see.

 

Link to comment
Share on other sites

  • 2 weeks later...

Almost finished: Simple Briefings.

image.png.6a73ba506e32f5fdf5f5b45093cd1656.png

 

image.png.aaf9a7cf70d62c9bde681a543dee819b.png

 

I’m using Rich Text Format because that’s what Windows supports natively. But I’m seemingly stuck on a pretty old version of the formatter – no embedded images, no auto-scaling tables, little control over background color. No text shadows or custom fonts.

But whatever, you can use it for an atmospheric touch, it is much faster than the modern HTML/CSS crap. That’s probably sufficient.

 

Since the data is passed to the engine from the extension that provides the scenario, and RTF is a simple text-based format, it should be no problem to auto-generate the briefings from TAW’s briefing files in the future.

Link to comment
Share on other sites

9 hours ago, mikew said:

Looks good! Is the difference between the two pictures just artistic style?

 

Indeed. You can write and style anything you like in WordPad or any other RTF-compatible editor and insert that file into the TFX plugin for use as briefing.

 

Once I get image support right, you could theoretically put the menu bitmaps of EF2000 and TAW into an RTF file and have it rendered just like the briefings in the original games – or do something completely different.

Link to comment
Share on other sites

9 hours ago, DrKevDog said:

I like the simplicity of the format it grants wider room for future modifications. The Arcade level, for example, lends itself to many developmental modifications  ☺️

 

I’m still intrigued by your ehanced-texture version of the Arcade level … it’s so beautiful.

Link to comment
Share on other sites

11 hours ago, Krycztij said:

and insert the Rich Text Format you like.

I think I need to refine the workflow somewhat.

1. Create document in Wordpad

2.Save to rtf format

3 Open in Notepad

4. Copy and paste into cpp file

5. Add quotes to every line

6. change single backslashes to double backslashes

 

Could probably automate some of that though. :)

 

Not sure why the colours are out of synch with the original document, but might have missed a backslash or two.

 

rtfwtf.png.8c8cf08bed8fcfc14c56e49a2fc66504.png

Link to comment
Share on other sites

Best whaleburgers in the North!

 

Yeah, I don’t know about the colors either. Your workflow is fine and I actually look forward to just loading RTF files from our custom levels instead of hard-coding them, so your use case is absolutely valid.

Sadly, the forum downscaled the image beyond recognition so I can’t comment on the RTF. Maybe there is a space or backslash missing in the \colortbl element. Same for linebreaks via \line – I use them heavily in the EF2000 briefing, and they are fine there.

 

Sidenote: If you don’t specify any color at all, the text will use your Windows theme’s text color. For times when you want to keep it subtle. I sincerely hope that’s not related to your color rotation! :D

 

Link to comment
Share on other sites

Not sure we're allowed to choose our own theme with Win10...

 

Anyway, that was just a flippant first attempt with RTF, so no need to analyze it further,

I suppose the really hard part is coming up with an artistic theme and layout. From that, it should be relatively easy to script the RTF generation.

Link to comment
Share on other sites

Is there any situation where a single backslash is required, or can I just convert them all to double?

 

By the way, if I use the NUMPAD navigation in explorer mode, there is no block on going off the map except for south.

Link to comment
Share on other sites

1 hour ago, mikew said:

Is there any situation where a single backslash is required, or can I just convert them all to double?

No, you can covert them all.

 

1 hour ago, mikew said:

By the way, if I use the NUMPAD navigation in explorer mode, there is no block on going off the map except for south.

Yeah, the whole NUMPAD thing is in flow because a) still trying to realize levels of different tile sizes; b) it is being ported to the new key mapping stuff.

Link to comment
Share on other sites

The colour cycling must have been a manual editing error on my part.

Now, just those missing characters to find.

This may be a line ending problem, as I may lose something when reading the rtf file as text.

But if I read each line, add quotes and double space, I get this:

Quote

"{\\rtf1\\ansi\\ansicpg1252\\deff0\\nouicompat\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset0 Calibri;}{\\f1\\fnil\\fcharset0 Arial Black;}{\\f2\\fnil\\fcharset0 Courier;}}"
"{\\colortbl ;\\red0\\green77\\blue187;\\red255\\green0\\blue0;\\red0\\green176\\blue80;\\red0\\green0\\blue0;}"
"{\\*\\generator Riched20 10.0.19041}\\viewkind4\\uc1"
"\\pard\\sa200\\sl276\\slmult1\\cf1\\f0\\fs32\\lang29 Norway Cloudy Day\\par"
"Can't think\\b\\f1\\fs24  of anything to write about it\\cf2\\par"
"Cost $50 for a couple of whaleburgers and two bottles of Becks\\par"
"is about all I can remember about the place.\\par"
"\\par"
"\\cf3\\f2\\fs32 Nice Scenery though\\cf2\\f1\\fs24\\par"
"\\cf0\\b0\\f0\\fs22\\par"
"\\cf4\\i Try some italics\\par"
"\\i0\\strike\\fs28 Struck through text\\par"
"\\b\\strike0 bold\\sub with subscript\\cf0\\nosupersub\\b0\\fs22\\par"
"}"

..and pasted into TFXplorer and compared with the original in Wordpad, gives me this:

rtfnor.png.98500e246e167bce3e213218169fe93f.png

Link to comment
Share on other sites

You need to insert a space after \\par so the RTF parser doesn’t confuse it with tokens of different names! (In fact, you need spaces after every \\command except before another \\, {, or })

Furthermore, I pushed a fix for problems with files of more than 4 KiB size.

Link to comment
Share on other sites

OK! I haven't learnt to think in rtf format yet.

 

Note that I'm just blindly treating the rtf file as lines of raw text. I've opened it in Notepad, and that space after the \\par just isn't there.

So Wordpad must insert one when it opens the file. I guess I can do that as well.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share


×
×
  • Create New...