It is currently Wed Jul 17, 2019 12:23 pm




Post new topic Reply to topic  [ 121 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7, 8, 9  Next
Minor things worth mentioning 
Author Message
MJ12

Joined: Sun Oct 04, 2009 6:54 pm
Posts: 403
Post Re: Minor things worth mentioning
I managed to make a map:
http://coding.hanfling.de/HanMadeAMap.jpg

_________________
I demand my DXE User ID back. Launcher for DeusEx, Rune, Nerf, Unreal & Botpack. HX on Mod DB. Revision on Steam.


Mon Mar 14, 2016 6:11 am
Profile
NSF
User avatar

Joined: Sat Sep 19, 2009 3:24 pm
Posts: 86
Location: between your synaptic gap
Post Re: Minor things worth mentioning
Hanfling wrote:
While working on improving my bitmap font exporter I ended up writing this line:
Code:
guard(HandleTTF);


What this code does, in particular?


Mon Mar 14, 2016 2:16 pm
Profile
MJ12

Joined: Sun Oct 04, 2009 6:54 pm
Posts: 403
Post Re: Minor things worth mentioning
Remember the callstack trace when a crash/voluntary app error occurs, like (when you enter DEBUG GPF):
Code:
Critical: UEngine::Exec
Critical: UGameEngine::Exec
Critical: DDeusExGameEngine::Exec
Critical: UHXGameEngine::Exec
Critical: UPlayer::Exec
Critical: UViewport::Exec
Critical: UWindowsViewportLite::Exec
Critical: UObject::ProcessEvent
Critical: (HXConsole Transient.HXConsole0, Function Engine.Console.Typing.KeyEvent)
Critical: UEngine::InputEvent
Critical: UWindowsViewportLite::CauseInputEvent
Critical: KeyDown
Critical: UWindowsViewportLite::ViewportWndProc
Critical: (Message=WM_KEYDOWN,wParam=13,lParam=1835009)
Critical: WWindow::StaticProc
Critical: (Message=WM_KEYDOWN)
Critical: LaunchMainLoop

The guard[Slow] and corrosponding unguard[Slow|f] macros are responsible for this. And the HandleTTF guard block is around a detection of an imported TTF font and putting out an unsupported image in this case on my bitmap font exporter (which reconstruct those lines seperating the glyphs for import).

The pun is that in DeusEx's Engine\Classes\Canvas.uc is this line:
Code:
#exec new TrueTypeFontFactory Name="LargeFont" FontName="HandelGothic BT" Height=32 AntiAlias=1 XPad=2 CharactersPerPage=64

Which samples the HandleGothic BT TTF font into an imported font.

_________________
I demand my DXE User ID back. Launcher for DeusEx, Rune, Nerf, Unreal & Botpack. HX on Mod DB. Revision on Steam.


Mon Mar 14, 2016 2:58 pm
Profile
NSF
User avatar

Joined: Sat Sep 19, 2009 3:24 pm
Posts: 86
Location: between your synaptic gap
Post Re: Minor things worth mentioning
Neat, thanks for your detailed explanation! I am happy to see there are improvements for localisation-related things in Deus Ex. One thing I was wondering about is DropShadowX/Y parameters does not seem to be implemented for TrueTypeFontFactory, thus one cannot recreate {FONTNAME}_DS Fonts.

Drawing font-sets with realistic dropshadow is extremely hard and tedious to do, how developers did that with that broken parameter is a mystery. Wish I could write proper code so I could help. I am very excited about your QtConEdit too.


Mon Mar 14, 2016 3:17 pm
Profile
MJ12

Joined: Sun Oct 04, 2009 6:54 pm
Posts: 403
Post Re: Minor things worth mentioning
Bird wrote:
Neat, thanks for your detailed explanation! I am happy to see there are improvements for localisation-related things in Deus Ex. One thing I was wondering about is DropShadowX/Y parameters does not seem to be implemented for TrueTypeFontFactory, thus one cannot recreate {FONTNAME}_DS Fonts.

I never heard about this option.

I used this code for some tests with removing the flash fog when traveling and displaying a small half-life style loading messages with a drop shadow by rendering the same font two times.
Code:
class RevConsole extends Console;

var(ActionMessage) bool bOldActionMessages; /** Use ugly old style action messages. */
var(ActionMessage) bool bShadeActionMessages; /** Whether to draw a fake font shadow for action messages. */
var(ActionMessage) Color ActionColor; /** Color of action messages. */
var(ActionMessage) Color ActionShadeColor; /** Shadow color of fake font shadow for action messages. */
var(ActionMessage) Font ActionFont; /** Font used for action messages. */

/** Renders the level action like LOADING or PRECACHING on screen. */
function DrawLevelAction( canvas C )
{
   local string BigMessage;

   // DEUS_EX AJY - don't want to print any text
   // if the game is paused because we're in a menu
   if (Viewport.Actor.bShowMenu )
   {
      BigMessage = "";
      return;
   }
   if ( (Viewport.Actor.Level.Pauser != "") && (Viewport.Actor.Level.LevelAction == LEVACT_None) )
   {
      if ( bOldActionMessages )
      {
         C.Font = C.BigFont;
         C.Style = 1;
         C.DrawColor.R = 255;
         C.DrawColor.G = 255;
         C.DrawColor.B = 255;

         BigMessage = PausedMessage; // Add pauser name?
         PrintActionMessage(C, BigMessage);
      }
      else
         PrintShadedActionMessage( C, BigMessage );
      return;
   }
   else if ( Viewport.Actor.Level.LevelAction==LEVACT_Loading )
      BigMessage = LoadingMessage;
   else if ( Viewport.Actor.Level.LevelAction==LEVACT_Saving )
      BigMessage = SavingMessage;
   else if ( Viewport.Actor.Level.LevelAction==LEVACT_Connecting )
      BigMessage = ConnectingMessage;
   else if ( Viewport.Actor.Level.LevelAction==LEVACT_Precaching )
      BigMessage = PrecachingMessage;
   
   if ( BigMessage != "" )
   {
      if ( bOldActionMessages )
      {
         C.Style = 3;
         C.DrawColor.R = 0;
         C.DrawColor.G = 0;
         C.DrawColor.B = 255;
         C.Font = C.LargeFont;   
         PrintActionMessage(C, BigMessage);
      }
      else
         PrintShadedActionMessage( C, BigMessage );
   }
}

/** Helper for DrawLevelAction(), Location of action message is set here. */
function PrintActionMessage( Canvas C, string BigMessage )
{
   local float XL, YL;

   C.bCenter = False;
   C.StrLen( BigMessage, XL, YL );
   //C.SetPos( FrameX/2 - XL/2, FrameY/2 - YL/2 );
   // REV_HAN: Move this slightly over crosshair.
   // Probably 16-24 is better for 1x, but would conflict on 2x.
   C.SetPos( FrameX/2 - XL/2, FrameY/2 - YL/2 - 32);
   C.DrawText( BigMessage, False );
}

/** Helper for DrawLevelAction() with shading support, Location of action message is set here. */
function PrintShadedActionMessage( Canvas C, string BigMessage )
{
   local float X, Y, XL, YL;

   // All style related properties here.
   C.Style   = 1;
   C.Font    = ActionFont;
   C.bCenter = False;
   C.StrLen( BigMessage, XL, YL );

   // Move this slightly over crosshair. Probably 16-24 is better for 1x, but would conflict on 2x.
   X = FrameX/2 - XL/2;
   Y = FrameY/2 - YL/2 - 32;

   // Draw fake shadow first.
   if ( bShadeActionMessages )
   {
      C.DrawColor = ActionShadeColor;
      C.SetPos( X+1, Y+1 );
      C.DrawText( BigMessage, False );
   }

   // Draw action message.
   C.DrawColor = ActionColor;
   C.SetPos( X, Y );
   C.DrawText( BigMessage, False );
}

// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------

defaultproperties
{
   bShadeActionMessages=False
   bOldActionMessages=True
   ActionColor=(R=127,G=127,B=127)
   ActionShadeColor=(R=0,G=0,B=0)
   ActionFont=Font'Engine.SmallFont'
}


But for an art only solution, you could try by copying the font and just move the font by (1px,1px) and making it black, but dont use your mask palette index for it. Because you sound like you use the TTF font importer, you could use batchexport to export the fontpages textures, do this copy, black & move, and reimport the texture in Editor afterwards. If that doesnt work over GUI, just use the commandline in the logwindow.

_________________
I demand my DXE User ID back. Launcher for DeusEx, Rune, Nerf, Unreal & Botpack. HX on Mod DB. Revision on Steam.


Mon Mar 14, 2016 4:02 pm
Profile
NSF
User avatar

Joined: Sat Sep 19, 2009 3:24 pm
Posts: 86
Location: between your synaptic gap
Post Re: Minor things worth mentioning
DropShadow stuff: https://wiki.beyondunreal.com/Legacy:Tr ... ontFactory
Long ago, I was working on some code-improvements to get that dropshadow effect in-game. Just copy and compile. Works best with newly-imported TTF.


Attachments:
File comment: DropShadow ramblings.
backport_shadow.zip [15.5 KiB]
Downloaded 221 times
Mon Mar 14, 2016 5:12 pm
Profile
MJ12

Joined: Sun Oct 04, 2009 6:54 pm
Posts: 403
Post Re: Minor things worth mentioning
Well the Wiki entry clearly says only UT2003.

If you can get me the exact calculations UT2003 uses for the offset, e.g. how DropShadowX/Y relates to the offset itsself, I'll try to make a subclass of the existing truetype font factory and do the shadow adding as a post process step as i can easily use the XPad/YPad options to get more space for the shadow itsself on the texture.

/edit:
At the same time i should add an option for premultiplying alpha, as the PF_Highlighted rendering mode used for antialiased TTF fonts is pre multiplied alpha blending, while the font textures themself seem to be non premultiplied alpha, though this can be an issue when the texture is not stored in an sRGB format, which in turn would require a dependency on my renderdevice. Maybe I add an sRGB option too.

/edit2:
Looks like they use a Compress option and passing the texture format id, that looks resonble. I want to add code for this anyway to HTK, so this perfectly fits in.

_________________
I demand my DXE User ID back. Launcher for DeusEx, Rune, Nerf, Unreal & Botpack. HX on Mod DB. Revision on Steam.


Mon Mar 14, 2016 6:35 pm
Profile
MJ12

Joined: Sun Oct 04, 2009 6:54 pm
Posts: 403
Post Re: Minor things worth mentioning
http://www.catb.org/jargon/html/F/frobnicate.html

_________________
I demand my DXE User ID back. Launcher for DeusEx, Rune, Nerf, Unreal & Botpack. HX on Mod DB. Revision on Steam.


Mon Mar 14, 2016 8:50 pm
Profile
MJ12

Joined: Sun Oct 04, 2009 6:54 pm
Posts: 403
Post Re: Minor things worth mentioning
Some interessting read:
http://www.oldunreal.com/cgi-bin/yabb2/ ... 1459155406

_________________
I demand my DXE User ID back. Launcher for DeusEx, Rune, Nerf, Unreal & Botpack. HX on Mod DB. Revision on Steam.


Tue Mar 29, 2016 9:36 am
Profile
MJ12

Joined: Sun Oct 04, 2009 6:54 pm
Posts: 403
Post Re: Minor things worth mentioning
So we had yesterday a discussion about the PSX2 version of Deus Ex.

Some findings:
The *.RAW files are loading screens stored as raw 640x480 24bpp data. You can use IrfanViews open raw option to view those.
The *.PSS files are videos with MPEG2 video and PS2 PCM data. You can play them back with the proper codecs installed on your system.
For the music files one should try out ea's sx.exe and see if one can convert those with it (left in release version of Brother Bear), or maybe find some codec/converter/program which can handle them.

Now to the fun part. The game data is apparently stored in three *.UMD files, while one of those (the most interessting one) is somehow hidden or sth.
These *.UMD files contain the unreal packages, and are "arc" files. There is some FFileManagerArc.h header in ut432pubsrc. The code is enough to know how to extract them (I just wrote some commandlet for HTK to do it). To my huge suprise these packages seem to be at least partially binary compatible with the PC version of Deus Ex. DeusExUIDynamic.u contains the datavault images and some ui screens and can just be extracted with batchexport. The DeusExTextData.u assumes the ExtString class to be in DeusExText package instead of beeing in Extension package. I made up some new DeusExText.dll with some basic implementation of ExtString (just implementing Serialize() should be enough). Afterward I just used my HTK ExtString exporter code to export it. Apparently not much has changed compared to DeusExText, though they have some tags for keycodes and logins inside the text files. Seems like a nice idea to copy for making the login stuff a bit more automatic (for controller support). Fun fact: The quotes file seems to be in spanish in the english version. Some further packages failed to load due to unsatisfied dependencies, so adding these and trying to load the packages again might for. The level files have the extension *.lin and crash upon load, haven't yet checked into this in detail yet though.

_________________
I demand my DXE User ID back. Launcher for DeusEx, Rune, Nerf, Unreal & Botpack. HX on Mod DB. Revision on Steam.


Tue May 17, 2016 3:31 pm
Profile
NSF
User avatar

Joined: Sat Sep 19, 2009 3:24 pm
Posts: 86
Location: between your synaptic gap
Post Re: Minor things worth mentioning
Interesting stuff! I used to have a Spanish version of Deus Ex (had no chance to look at the files back then).

I wonder if conversation audio files would be the same 8000 Hz quality MP3's as on the PC version.

This was exciting to read, thanks for posting it.


Tue May 17, 2016 6:42 pm
Profile
MJ12

Joined: Sun Oct 04, 2009 6:54 pm
Posts: 403
Post Re: Minor things worth mentioning
New HTK build. Changes include, but are not limited too:

UnArcCommandlet
Extract those PSX2LINS.UMD/PSX2SHIP.UMD of the PSX2 version of Deus Ex.

FullBatchExportCommandlet
Extracts what it can out of package and places the contents into the appropreciate directory structure for build commandlet.

FontExporter
Reconstructs the source texture of bitmap fonts (NOT TTF!). As far as I can tell this works perfectly for Nerf and Deus Ex. After import you get exact the same result as it was before (so no screwups with characters in the CP850 to Latin1 range anymore).

FontPageDiffCommandlet
Compares the glypth texture coordinates of two fonts. I created this to make sure the FontExporter works correct as this can be used to make sure the font ended up as before after reimport.

http://coding.hanfling.de/launch/releas ... 160618.zip

_________________
I demand my DXE User ID back. Launcher for DeusEx, Rune, Nerf, Unreal & Botpack. HX on Mod DB. Revision on Steam.


Last edited by Hanfling on Mon Jun 20, 2016 5:59 pm, edited 1 time in total.

Sat Jun 18, 2016 9:03 pm
Profile
UNATCO
User avatar

Joined: Wed Mar 21, 2007 5:36 am
Posts: 150
Location: Somewhere in Russia
Post Re: Minor things worth mentioning


The link is broken :?

_________________
Delta ]2[ videos


Sun Jun 19, 2016 2:55 am
Profile ICQ WWW
NSF
User avatar

Joined: Sat Sep 19, 2009 3:24 pm
Posts: 86
Location: between your synaptic gap
Post Re: Minor things worth mentioning
That sounds fantastic. I need to get FontExporter a spin when I have the chance.


Sun Jun 19, 2016 7:31 am
Profile
MJ12

Joined: Sun Oct 04, 2009 6:54 pm
Posts: 403
Post Re: Minor things worth mentioning
Andrievskaya Veronika wrote:
The link is broken :?

Fixed it now.

Maybe worth to mention, if you use batchexport commandlet, you need some ucc executable which autoloads UExporters by int entries. The LCC inside my Launch release does that, links should be above. If you use the HTK fullbatchallexport commandlet it gets autoloaded as the native dll gets bounds, so it's not needed for the fullbatchexport commandlet.

_________________
I demand my DXE User ID back. Launcher for DeusEx, Rune, Nerf, Unreal & Botpack. HX on Mod DB. Revision on Steam.


Mon Jun 20, 2016 6:02 pm
Profile
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 121 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7, 8, 9  Next


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © phpBB Group.
Designed by Vjacheslav Trushkin for Free Forum/DivisionCore.