News:

One Minute Game Review by The Happy Friar: https://ugetube.com/@OneMinteGameReviews
Also on Rumble: https://rumble.com/c/c-1115371

idTech 4 (aka Doom 3 tech) Discord Server! https://discord.gg/9wtCGHa

Main Menu
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - bitterman

#331
As I think we should not combine the code with vanilla Doom3 code. Stupid idea :)

I did some unsuccessful experiments with autogenerated .sln (MSVC->File->New->Project From Existed Code).

In addition to problems with dependencies and build order there are difficulties with the compilation of rudimentary code, MFC options etc.


The author doesn't respond, furthermore it is not clear whether the code completed.

#332
motorsep

I think this code is uncomplete. Perhaps it's a part of private project.
Anyway, author don't answers to me.


nbohr1more, did you manage to get working code (D3 GLSL)?


How to compile the files from the SDK?
Wasn't there an .sln file?


**************************

QuoteTo create a project from existing code files

    On the File menu, click New, and then click Project From Existing Code.

    The Create New Project from Existing Code Files wizard opens.

    Use the wizard to specify the details of the existing code files that will be added to the project and the application that will be created when you build the project.


https://msdn.microsoft.com/en-us/library/754c3hy7.aspx

Ok, now I get error in curl_GUSIConfig.cpp from neo\curl\src\macos\src:

Quote#include <GUSIConfig.h>

QuoteFile GUSIConfig.h not found

Why MSVC try to compile this code (it's for MAC OS)?
How to disable this?
#333
Quote from: nbohr1more on October 22, 2015, 01:54:58 PM
"We expect the solution file is compatible with the Express releases"

It's from original disclaimer. Original D3 can be compiled without MFC and MFC-tools (like editor, editGUIs, editAFs).

I tried to compile this one with MSVC2013CE5 + MBCS.

This package haven't any .sln. Then I merged it (not sure about this) with original doom3.gpl-TTimo and now get errors:

Quote
1. ...glext.h ... Line 1361: can't evaluate '__STDC_VERSION__', not defined

2. MSB3073: The command "...Debug/TypeInfo.exe: VCEnd" exited with code -1.

See picture below.

I found this:

https://msdn.microsoft.com/en-us/library/b0084kay%28v=vs.120%29.aspx

But still don't understood how to fix it.
#335
id Tech 4 Engine Coding / Re: SWF problems
October 20, 2015, 11:43:56 PM
http://idtechforums.fuzzylogicinc.com/index.php?topic=280.msg3340#msg3340

Thanks trebor looked at the structure of the shell.bswf (and dialog.bswf).

As I think it's working with frames and a little actionscript.

Looks like the menu is mostly based on the timeline and only use opensource FlashDevelop will not work (as I tried above).

Remains trial version of Flash Professional. Not sure about this.

And hard-coded transitions (from one screen to other) are still the problem.
#336
Yes, it's impressive. Thanks, nbohr1more.

https://github.com/raynorpat/Doom3/commit/71ba367fcc58336237669bbbf8b6c267a6f219a3

As I understand the main idea: the calls of the ARB (red marker) replaced with the appropriate calls GLSL (green marker), right?

What mod was used for this project?

Can I freely use this project for third party mods?

And do I need to compile it with MBCS (multybyte character set)?
#337
What if I need only glsl instead arb 1.0?

The code for both projects is available, but I don't understand the amount of changes required.

I believe that a simple replacement of the files is not limited.

With BFG I learned a lot about swf, binarization and other advanced things but didn't create any new content.

Dream bogged down in technical details.
#338
id Tech 4 Mod Coding / Re: RBDOOM3-BFG GUI system
October 12, 2015, 10:15:48 PM
Amazing!

Thanks, Robert (or mr. Beckebans, if you wish)!

:)

P.S. SWF-related topic is there: http://idtechforums.fuzzylogicinc.com/index.php?topic=315.0

*************************

A new WriteSWF() and WriteJSON() looks great. I thought the binarization process is irreversible.
#339
id Tech 4 Engine Coding / Re: SWF problems
October 11, 2015, 09:40:59 PM
Well, it's sounds too hard for me.

By the way, code can be inserted directly into loadBinary().

After that my custom .swf (2 Kb) was converted to bswf (114 Kb).

Very nice 8)

But as I think all this movements are hopeless without original .swf (.actionscript) source code.
Guys, do you know who wrote it?
May be few tips from that guy...

P.S. Hey, motorsep, your remarks make me move, but where? :))))
#340
id Tech 4 Engine Coding / Re: SWF problems
October 09, 2015, 11:31:39 PM
Ок, looks like the problem with class and consrtuctor:

class idSWF {
public:
...
private:
   friend class idSWFSprite;
   friend class idSWFSpriteInstance;

   bool       LoadSWF( const char * fullpath );
   void       WriteBinary( const char * bfilename );


So I can't use just "LoadSWF()" anywhere where I want.

Some like:

idSWF LoadSWF(filename)

This example was compiled but worked incorrect.

But I see a great potential of CONSOLE_COMMAND.

Perhaps this is much easier than creating an separate tools.
#341
id Tech 4 Engine Coding / Re: SWF problems
October 09, 2015, 03:41:55 AM
Then I vote for the revision of the original D3 engine only with ARB -> GLSL (binary resources are also not a sugar).

What kind of lamp I have to rub? :)

No kidding, how to add console command in my case?

***********

Ok, this is also wrong

if (!WriteBinary(fileName))

because:

void       WriteBinary( const char * bfilename );
#342
id Tech 4 Engine Coding / Re: SWF problems
October 08, 2015, 11:47:26 AM
Ok, filename -> fileName.

But why these native funsc (LoadSWF, WriteBinary) are "undefined"?
#343
id Tech 4 Engine Coding / Re: SWF problems
October 05, 2015, 10:14:55 PM
How to place custom shell.swf as a mod to debug it in MSVC?

Ok, now I'm trying to add custom console command:


CONSOLE_COMMAND(swfToBswf, "Convert SWF to BSWF", NULL) {

idStr fileName = args.Argv(1);

if ( LoadSWF(filename) ) {
fileName.SetFileExtension(".bwsf");

if (!WriteBinary(fileName)){
idLib::Printf("BSWF write error");
}

idLib::Printf("SWF to BSWF converted");
}
else {
idLib::Printf("Can't load SWF");
}

}


But it gives an unexpected errors:

4 IntelliSense: this operator is not allowed in a constant expression d:\DOOM-3-BFG-master\neo\idlib\geometry\DrawVert.h 182 1 Doom3BFG
5 IntelliSense: this operator is not allowed in a constant expression d:\DOOM-3-BFG-master\neo\idlib\geometry\DrawVert.h 183 1 Doom3BFG
6 IntelliSense: this operator is not allowed in a constant expression d:\DOOM-3-BFG-master\neo\idlib\geometry\DrawVert.h 184 1 Doom3BFG
7 IntelliSense: this operator is not allowed in a constant expression d:\DOOM-3-BFG-master\neo\idlib\geometry\DrawVert.h 719 1 Doom3BFG
8 IntelliSense: this operator is not allowed in a constant expression d:\DOOM-3-BFG-master\neo\idlib\geometry\DrawVert.h 745 1 Doom3BFG
9 IntelliSense: this operator is not allowed in a constant expression d:\DOOM-3-BFG-master\neo\idlib\geometry\DrawVert.h 746 1 Doom3BFG
10 IntelliSense: this operator is not allowed in a constant expression d:\DOOM-3-BFG-master\neo\idlib\geometry\DrawVert.h 747 1 Doom3BFG
11 IntelliSense: this operator is not allowed in a constant expression d:\DOOM-3-BFG-master\neo\idlib\geometry\JointTransform.h 58 1 Doom3BFG
12 IntelliSense: this operator is not allowed in a constant expression d:\DOOM-3-BFG-master\neo\idlib\geometry\JointTransform.h 59 1 Doom3BFG
13 IntelliSense: enumeration value is out of 'int' range d:\DOOM-3-BFG-master\neo\renderer\Material.h 290 26 Doom3BFG
14 IntelliSense: PCH warning: cannot find a suitable header stop location.  An IntelliSense PCH file was not generated. d:\DOOM-3-BFG-master\neo\swf\SWF_Main.cpp 32 16 Doom3BFG
15 IntelliSense: identifier "LoadSWF" is undefined d:\DOOM-3-BFG-master\neo\swf\SWF_Main.cpp 715 6 Doom3BFG
16 IntelliSense: identifier "filename" is undefined d:\DOOM-3-BFG-master\neo\swf\SWF_Main.cpp 715 14 Doom3BFG
17 IntelliSense: identifier "WriteBinary" is undefined d:\DOOM-3-BFG-master\neo\swf\SWF_Main.cpp 718 7 Doom3BFG


Why this code not work?
#344
id Tech 4 Engine Coding / SWF problems
October 04, 2015, 10:40:04 AM
Spent a lot of time with try to change engine from D3 to D3BFG.

The main reason was the possibility of using glsl in D3BFG (unlike ARB shaders in D3).

But there are a few ground problems.

First it's a new GUI system based on SWF.

As I suggest guys from ID make a own swf-parser based on ActionScript 2.0 and commandset swf version 7. Moreover the engine convert swf into bswf and then run it with code.

All menus found in base/generated/swf. A main menu (shell.bswf) contain a one main sprite (MovieClip) and ~20 sub-sprites placed in certain sequence. Every sprite action (event) is hardcoded and handled with own proc (HandleAction). Transition between sprites (menu screens) is also hardcoded via SetNextScreen().

In D3BFG a game start with simple "map game/mars_city1" after exec ShowDoomIntro().

There are a few CVARs for swf (swf_loadBinary, swf_debug).

The next shell.swf (Flashdevelop AS2, 1280x960) is compiled and exec in Flash but not working as well in Game:

class Main
{

public static function main(swfRoot:MovieClip):Void
{
// entry point

var menuScreens : Array = new Array(
"NULL",
"menuRoot",
"menuCampaign",
"menuSettings",
"menuLoad",
"menuNewGame",
"menuSystemOptions",
"menuGameOptions",
"menuPartyLobby",
"menuGameLobby",
"menuStereo",
"menuDifficulty",
"menuControls",
"menuKeyboard",
"menuResolution",
"menuController",
"menuDev",
"menuLeaderboards",
"menuGamepad",
"menuMatch",
"menuModeSelect",
"menuBrowser",
"menuCredits");

var myClip : MovieClip = new MovieClip;

myClip = _root.createEmptyMovieClip("menuStart", 0);

for (var i = 1; i < 23; i++) {
// trace( menuScreens[i] );
myClip.attachMovie( menuScreens[i], menuScreens[i], i);
}
}
public function Main()
{

}


And there is no original shell.as or a manual like iddevnet.

Have anyone an idea how to proceed reverse-engineering this process?

Is it possible to ask the developer of the code listing for shell.bswf (e.g. for education/modding purposes)?
How to make it correct?





#345
id Tech 4 Mod Coding / Re: RBDOOM3-BFG GUI system
September 06, 2015, 10:57:59 PM
Ok, week have passed and the result is still not very impressive.

Since a typical .SWF file uses typical Flash events can be assumed that these events handles by SWF_Events.cpp.

if ( spriteInstance->scriptObject->HasValidProperty( "onRelease" )
|| spriteInstance->scriptObject->HasValidProperty( "onPress" )
|| spriteInstance->scriptObject->HasValidProperty( "onRollOver" )
|| spriteInstance->scriptObject->HasValidProperty( "onRollOut" )
|| spriteInstance->scriptObject->HasValidProperty( "onDrag" )
) {
parentObject = spriteInstance->scriptObject;
}



bool idSWF::HandleEvent( const sysEvent_t * event ) {
if ( !IsLoaded() || !IsActive() || ( !inhibitControl && useInhibtControl ) ) {
return false;
                ...
idSWFScriptObject * hitObject = HitTest( mainspriteInstance, swfRenderState_t(), mouseX, mouseY, NULL );
if ( hitObject != NULL ) {
mouseObject = hitObject;
mouseObject->AddRef();

var = hitObject->Get( "onPress" );
if ( var.IsFunction() ) {
idSWFParmList parms;
parms.Append( event->inputDevice );
var.GetFunction()->Call( hitObject, parms );
parms.Clear();
return true;
}


/*

class idSWFParmList : public idStaticList< idSWFScriptVar, SWF_MAX_PARMS > {
public:
idSWFParmList() {
}
explicit idSWFParmList( const int num_ ) {
SetNum( num_ );
}

void Append( const idSWFScriptVar & other );
void Append( idSWFScriptObject * o );
void Append( idSWFScriptFunction * f );
void Append( const char * s );
void Append( const idStr & s );
void Append( idSWFScriptString * s );
void Append( const float f );
void Append( const int32 i );
void Append( const bool b );
};


So now I think 'var.GetFunction()->Call( hitObject, parms );' looks like first candidate.

******************** update **********************

   
The truth is out there ))

It is necessary to understand the meaning of this expression:

idMenuHandler_Shell * shellMgr = dynamic_cast< idMenuHandler_Shell * >( menuData );


#ifndef __MENUDATA_H__
#define __MENUDATA_H__

enum shellAreas_t {
SHELL_AREA_INVALID = -1,
SHELL_AREA_START,
SHELL_AREA_ROOT,
SHELL_AREA_DEV,
SHELL_AREA_CAMPAIGN,
SHELL_AREA_LOAD,
SHELL_AREA_SAVE,
SHELL_AREA_NEW_GAME,
SHELL_AREA_GAME_OPTIONS,
SHELL_AREA_SYSTEM_OPTIONS,
SHELL_AREA_MULTIPLAYER,
SHELL_AREA_GAME_LOBBY,
SHELL_AREA_STEREOSCOPICS,
SHELL_AREA_PARTY_LOBBY,
SHELL_AREA_SETTINGS,
SHELL_AREA_AUDIO,
SHELL_AREA_VIDEO,
SHELL_AREA_KEYBOARD,
SHELL_AREA_CONTROLS,
SHELL_AREA_CONTROLLER_LAYOUT,
SHELL_AREA_GAMEPAD,
SHELL_AREA_PAUSE,
SHELL_AREA_LEADERBOARDS,
SHELL_AREA_PLAYSTATION,
SHELL_AREA_DIFFICULTY,
SHELL_AREA_RESOLUTION,
SHELL_AREA_MATCH_SETTINGS,
SHELL_AREA_MODE_SELECT,
SHELL_AREA_BROWSER,
SHELL_AREA_CREDITS,
SHELL_NUM_AREAS
};