Home » MODDING HQ 1.13 » v1.13 Idea Incubation Lab  » [Linux] ja2 1.13 linux port (alpha release)
Re: [Linux] ja2 1.13 linux port (alpha release)[message #178411] Mon, 17 March 2008 17:43 Go to previous messageGo to next message
Lesh 2 is currently offline Lesh 2

 
Messages:107
Registered:September 2006
Location: Izhevsk, Russia
InHuMan
I have question about src/laptop/files.cpp, line 870

...

ubFormat is UINT8 and ENRICO_BACKGROUND is 0. (Could be found in src/laptop/files.h)

So, that if is useless, because UINT can't be smaller than 0.

There are many such "pearls" in ja2 code. Maybe Sir-Tech programmers were paranoid? :bluesuspect:

Report message to a moderator

Sergeant
Re: [Linux] ja2 1.13 linux port (alpha release)[message #178412] Mon, 17 March 2008 17:53 Go to previous messageGo to next message
Sleepyfox is currently offline Sleepyfox

 
Messages:50
Registered:March 2003
Location: Belgium
Eh Lesh, you'll get more time to work on the port now or you are still busy?

Report message to a moderator

Corporal
Re: [Linux] ja2 1.13 linux port (alpha release)[message #178414] Mon, 17 March 2008 18:06 Go to previous messageGo to next message
Lesh 2 is currently offline Lesh 2

 
Messages:107
Registered:September 2006
Location: Izhevsk, Russia
I am still learning GNU autoconf together with gettext to internalise (i18n) the project. So there isn't much time left to do other things.

Report message to a moderator

Sergeant
Re: [Linux] ja2 1.13 linux port (alpha release)[message #178428] Mon, 17 March 2008 21:04 Go to previous messageGo to next message
lynxlynxlynx is currently offline lynxlynxlynx

 
Messages:109
Registered:September 2005
Location: Slovenija
it's internationalise. Wink What's the point though, ja2 already has some crappy system in place.

and autotools are a big mess, why not use plain makefiles or something leaner. You could probably use the build system of ja2-stracciatella with some tweaks for new/removed files.

Report message to a moderator

Sergeant
Re: [Linux] ja2 1.13 linux port (alpha release)[message #178822] Sat, 22 March 2008 01:38 Go to previous messageGo to next message
InHuMan is currently offline InHuMan

 
Messages:44
Registered:November 2006
Location: Czech Republic
I found a bug - The game do not create profiles/mod113/shadetables directory, which cause game crash when loading map. The problem is in tile_engine/shade_table_util.cpp in "DirectoryExists" function call. It always return 1, because there is another shadetables directory "base/data/shadetables"

Report message to a moderator

Corporal
Re: [Linux] ja2 1.13 linux port (alpha release)[message #178861] Sat, 22 March 2008 15:17 Go to previous messageGo to next message
Lesh 2 is currently offline Lesh 2

 
Messages:107
Registered:September 2006
Location: Izhevsk, Russia
That another "shadetables" directory should be deleted. The game will automaticly create it and it contents during game process in profile. It will need write access to directory where "shadetables" will be located.

Report message to a moderator

Sergeant
Re: [Linux] ja2 1.13 linux port (alpha release)[message #179622] Mon, 31 March 2008 16:02 Go to previous messageGo to next message
InHuMan is currently offline InHuMan

 
Messages:44
Registered:November 2006
Location: Czech Republic
@Lesh 2: Ok, my fault...

Another bug - History and finances in laptop do not work.

These patches should fix it:
Index: ../src/sgp/file_man.cpp
===================================================================
--- ../src/sgp/file_man.cpp     (revision 1907)
+++ ../src/sgp/file_man.cpp     (working copy)
@@ -435,6 +435,13 @@
                result = handler != NULL;
                useSLF = FALSE;
        }
+       else if (uiOptions & FILE_ACCESS_APPEND)
+       {
+               // open for append through PhysFS
+               handler = PHYSFS_openAppend(name);
+               result = handler != NULL;
+               useSLF = FALSE;
+       }
        else
        {
                // open for read through PhysFS first, then try SLF


Index: ../src/laptop/finances.cpp
===================================================================
--- ../src/laptop/finances.cpp  (revision 1941)
+++ ../src/laptop/finances.cpp  (working copy)
@@ -219,6 +219,8 @@

        // clear list
        ClearFinanceList( );
+
+       OpenAndReadFinancesFile();

        pFinance=pFinanceListHead;

@@ -1215,11 +1217,11 @@
        while( pFinanceList != NULL )
        {
                // write in other data
-               FileRead( hFileHandle, &pFinanceList->ubCode, sizeof(UINT8), NULL );
-               FileRead( hFileHandle, &pFinanceList->ubSecondCode, sizeof(UINT8), NULL );
-               FileRead( hFileHandle, &pFinanceList->uiDate, sizeof(UINT32), NULL );
-               FileRead( hFileHandle, &pFinanceList->iAmount, sizeof(INT32), NULL );
-               FileRead( hFileHandle, &pFinanceList->iBalanceToDate, sizeof(INT32), NULL );
+               FileWrite( hFileHandle, &pFinanceList->ubCode, sizeof(UINT8), NULL );
+               FileWrite( hFileHandle, &pFinanceList->ubSecondCode, sizeof(UINT8), NULL );
+               FileWrite( hFileHandle, &pFinanceList->uiDate, sizeof(UINT32), NULL );
+               FileWrite( hFileHandle, &pFinanceList->iAmount, sizeof(INT32), NULL );
+               FileWrite( hFileHandle, &pFinanceList->iBalanceToDate, sizeof(INT32), NULL );
                pFinanceList = pFinanceList->Next;
        }


Index: ../src/laptop/history.cpp
===================================================================
--- ../src/laptop/history.cpp   (revision 1900)
+++ ../src/laptop/history.cpp   (working copy)
@@ -1568,7 +1568,7 @@


        // open file
-       hFileHandle=FileOpen( gzHistoryDataFile, FILE_ACCESS_WRITE|FILE_CREATE_ALWAYS, FALSE);
+  hFileHandle=FileOpen( gzHistoryDataFile, FILE_ACCESS_APPEND, FALSE);

        // if no file exits, do nothing
        if(!hFileHandle)


EDIT: Maybe is a good idea to rewrite and clean some function in laptop/finances.cpp file...

Report message to a moderator

Corporal
Re: [Linux] ja2 1.13 linux port (alpha release)[message #179639] Mon, 31 March 2008 20:15 Go to previous messageGo to next message
Lesh 2 is currently offline Lesh 2

 
Messages:107
Registered:September 2006
Location: Izhevsk, Russia
I hope you made reuse of append file access, appeared recently, to fix these bugs. I was slightly confused, when I saw physfs append function call, written recently, in your patch.

Ok, patched. Need to test!

Quote:
EDIT: Maybe is a good idea to rewrite and clean some function in laptop/finances.cpp file...

I believe, most of the game code requires refactoring, but my resources are limited. :wb:

Report message to a moderator

Sergeant
Re: [Linux] ja2 1.13 linux port (alpha release)[message #179646] Mon, 31 March 2008 20:57 Go to previous messageGo to next message
InHuMan is currently offline InHuMan

 
Messages:44
Registered:November 2006
Location: Czech Republic
Problem with PHYSFS_openWrite() is, that it delete file contents first. And with PHYSFS_openAppend(name), that you can write only at end of the file.

Quote:
I believe, most of the game code requires refactoring, but my resources are limited


I will try to do something by myself. I hope it won't be even worst... Very Happy

Report message to a moderator

Corporal
Re: [Linux] ja2 1.13 linux port (alpha release)[message #179650] Mon, 31 March 2008 21:41 Go to previous messageGo to next message
Lesh 2 is currently offline Lesh 2

 
Messages:107
Registered:September 2006
Location: Izhevsk, Russia
InHuMan
Problem with PHYSFS_openWrite() is, that it delete file contents first. And with PHYSFS_openAppend(name), that you can write only at end of the file.

Yea, I know. Documentation didn't lie to me. Very Happy

Report message to a moderator

Sergeant
Re: [Linux] ja2 1.13 linux port (alpha release)[message #179761] Tue, 01 April 2008 22:40 Go to previous messageGo to next message
InHuMan is currently offline InHuMan

 
Messages:44
Registered:November 2006
Location: Czech Republic
Another bug - I can't type in nickname field in IMP begin screen. (It is strange similar bug was fixed 11.11.2007 and I am sure, that "nickname type in" were functional).


Quote:
Index: imp_begin_screen.cpp
===================================================================
--- imp_begin_screen.cpp (revision 1900)
+++ imp_begin_screen.cpp (working copy)
@@ -669,7 +669,7 @@
}

// make sure we haven't moved too far
- if( ( uiNickNameCursorPosition + StringPixLength( (CHAR16 *)&(uiKey ), FONT14ARIAL ) ) > (UINT32)NICK_NAME_REGION_WIDTH + 196 + LAPTOP_SCREEN_UL_X )
+ if( ( uiNickNameCursorPosition + CharPixLength( (CHAR16)&(uiKey ), FONT14ARIAL ) ) > (UINT32)NICK_NAME_REGION_WIDTH + 196 + LAPTOP_SCREEN_UL_X )
{
// do nothing for now, when pop up is in place, display
break;

[Updated on: Fri, 13 June 2008 15:38] by Moderator

Report message to a moderator

Corporal
Re: [Linux] ja2 1.13 linux port (alpha release)[message #179877] Wed, 02 April 2008 19:00 Go to previous messageGo to next message
Lesh 2 is currently offline Lesh 2

 
Messages:107
Registered:September 2006
Location: Izhevsk, Russia
That patch fixed only full name entry. I didn't notice, that nickname switch-section was using the same buggy code. Patch applied. Thanks!

Report message to a moderator

Sergeant
Re: [Linux] ja2 1.13 linux port (alpha release)[message #180041] Thu, 03 April 2008 20:59 Go to previous messageGo to next message
InHuMan is currently offline InHuMan

 
Messages:44
Registered:November 2006
Location: Czech Republic
Found another bug - If ja2.ini doesn't exist, game will crash with segmentation fault
This patch fix it and load default settings (800x600, windowed)

Index: sgp.cpp
===================================================================
--- sgp.cpp     (revision 1980)
+++ sgp.cpp     (working copy)
@@ -293,6 +293,8 @@
        // Runtime settings - for now use INI file - later use registry
        STRING512               INIFile;                // Path to the ini file
        CFG_File                cfg;
+
+       iResolution = -1;

        // Get Executable Directory
        GetHomeDirectory( INIFile );
@@ -300,26 +302,34 @@
        strcat(INIFile, "ja2.ini");

        printf("Reading run-time settings from: %s
", INIFile);
-       if ( CFG_OpenFile( INIFile, &cfg ) != CFG_OK )
+       if ( CFG_OpenFile( INIFile, &cfg ) == CFG_OK )
        {
-               printf("Failed to open run-time ini
");
+               if ( CFG_SelectGroup( "Ja2 Settings", CFG_False ) == CFG_OK )
+               {
+                       gfFullScreen = CFG_ReadInt("FULLSCREEN", 0);
+#ifndef JA2EDITOR
+                       iResolution = CFG_ReadInt("SCREEN_RESOLUTION", 1);
+#else
+                       iResolution = CFG_ReadInt("EDITOR_SCREEN_RESOLUTION", 1);
+#endif
+
+               }
+               else
+               {
+                       printf("Failed to select Ja2 Settings group in ini
");
+
+               }
+
+               CFG_CloseFile( &cfg );
+
        }
-
-       if ( CFG_SelectGroup( "Ja2 Settings", CFG_False ) != CFG_OK )
+       else
        {
-               printf("Failed to select Ja2 Settings group in ini
");
+               printf("Failed to open run-time ini
");
        }
-
-       iResolution = -1;

-
-#ifndef JA2EDITOR
-       iResolution = CFG_ReadInt("SCREEN_RESOLUTION", 1);
-#else
-       iResolution = CFG_ReadInt("EDITOR_SCREEN_RESOLUTION", 1);
-#endif

-       int     iResX;
+       int iResX;
        int iResY;

        switch (iResolution)
@@ -355,9 +365,6 @@
        SCREEN_HEIGHT = GetPrivateProfileInt( "SGP", "HEIGHT", iResY, INIFile );
 #endif

-       gfFullScreen = CFG_ReadInt("FULLSCREEN", 0);
-
-       CFG_CloseFile( &cfg );

        iScreenWidthOffset = (SCREEN_WIDTH - 640) / 2;
        iScreenHeightOffset = (SCREEN_HEIGHT - 480) / 2;

Report message to a moderator

Corporal
Re: [Linux] ja2 1.13 linux port (alpha release)[message #180125] Fri, 04 April 2008 18:17 Go to previous messageGo to next message
Lesh 2 is currently offline Lesh 2

 
Messages:107
Registered:September 2006
Location: Izhevsk, Russia
Patched. Thanks again!

Report message to a moderator

Sergeant
Re: [Linux] ja2 1.13 linux port (alpha release)[message #180152] Fri, 04 April 2008 21:53 Go to previous messageGo to next message
InHuMan is currently offline InHuMan

 
Messages:44
Registered:November 2006
Location: Czech Republic
Lesh 2
InHuMan
Problem with PHYSFS_openWrite() is, that it delete file contents first. And with PHYSFS_openAppend(), that you can write only at end of the file.

Yea, I know. Documentation didn't lie to me. Very Happy


I wrote to Physfs mailing list and they fix it it in the latest svn revision. (revision #940 for the 1.1 branch and #941 for the 1.0 branch.) So it is now possible to seek and write with PHYSFS_openAppend()

Report message to a moderator

Corporal
Re: [Linux] ja2 1.13 linux port (alpha release)[message #180757] Thu, 10 April 2008 22:16 Go to previous messageGo to next message
InHuMan is currently offline InHuMan

 
Messages:44
Registered:November 2006
Location: Czech Republic
Another bug - After enemy attack a city with militia, temp/tactical/r_XYY.dat gets corrupted. It's caused by FILE_ACCESS_READWRITE flag. Opening a file with this flag is same like with FILE_ACCESS_WRITE flag (It will blank file all contents).

This patch fix it...
Index: tactical_save.cpp
===================================================================
--- tactical_save.cpp   (revision 2006)
+++ tactical_save.cpp   (working copy)
@@ -2351,7 +2351,7 @@
        if( FileExists( zMapName ) )
        {
                //Open the file for reading
-               hFile = FileOpen( zMapName, FILE_ACCESS_READWRITE | FILE_OPEN_EXISTING, FALSE );
+               hFile = FileOpen( zMapName, FILE_ACCESS_READ, FALSE );
                if( hFile == 0 )
                {
                        //Error opening map modification file,

Report message to a moderator

Corporal
Re: [Linux] ja2 1.13 linux port (alpha release)[message #180923] Fri, 11 April 2008 18:06 Go to previous messageGo to next message
Lesh 2 is currently offline Lesh 2

 
Messages:107
Registered:September 2006
Location: Izhevsk, Russia
Very nice! I patched the code.

Report message to a moderator

Sergeant
Re: [Linux] ja2 1.13 linux port (alpha release)[message #180928] Fri, 11 April 2008 18:48 Go to previous messageGo to next message
InHuMan is currently offline InHuMan

 
Messages:44
Registered:November 2006
Location: Czech Republic
By the way, FILE_ACCESS_READWRITE flag is not used anywhere else, so it could by removed from sgp/file_man.h...

Report message to a moderator

Corporal
Re: [Linux] ja2 1.13 linux port (alpha release)[message #180957] Fri, 11 April 2008 22:54 Go to previous messageGo to next message
InHuMan is currently offline InHuMan

 
Messages:44
Registered:November 2006
Location: Czech Republic
Another bug - Wrong re-initialization of history. (Start game -> quit to main menu -> start new game). In pHistoryListHead remains data from previous game. This will cause, that first record is displayed twice.

Index: history.cpp
===================================================================
--- history.cpp (revision 2006)
+++ history.cpp (working copy)
@@ -230,7 +230,7 @@
 }

 void GameInitHistory()
-{
+{      ClearHistoryList();
        OpenAndWriteHistoryFile();
        AddHistoryToPlayersLog(HISTORY_ACCEPTED_ASSIGNMENT_FROM_ENRICO, 0, GetWorldTotalMin( ), -1, -1);
 }


Another bug - First record in History has date from previous game. (Load game -> quit to main menu -> start new game)

Index: strategic/quests.cpp
===================================================================
--- strategic/quests.cpp        (revision 2006)
+++ strategic/quests.cpp        (working copy)
@@ -1296,8 +1296,9 @@
        memset(gubQuest, 0, sizeof(gubQuest));
        memset(gubFact,  0, sizeof(gubFact));

+       // InHuMan: This is not needed anymore
        // semi-hack to make the letter quest start right away
-       CheckForQuests( 1 );
+       //CheckForQuests( 1 );

        if ( gGameOptions.ubGameStyle == STYLE_SCIFI )
        {
@@ -1323,19 +1324,20 @@
 #ifdef TESTQUESTS
        ScreenMsg( MSG_FONT_RED, MSG_DEBUG, L"Checking For Quests, Day %d", uiDay );
 #endif
-
-  // -------------------------------------------------------------------------------
+
+       // InHuMan: Moved to  InitNewGame() in game_init.cpp
+       // -------------------------------------------------------------------------------
        // QUEST 0 : DELIVER LETTER
        // -------------------------------------------------------------------------------
        // The game always starts with DELIVER LETTER quest, so turn it on if it hasn't
        // already started
-       if (gubQuest[QUEST_DELIVER_LETTER] == QUESTNOTSTARTED)
-       {
-               StartQuest( QUEST_DELIVER_LETTER, -1, -1 );
-#ifdef TESTQUESTS
-               ScreenMsg( MSG_FONT_RED, MSG_DEBUG, L"Started DELIVER LETTER quest");
-#endif
-       }
+//     if (gubQuest[QUEST_DELIVER_LETTER] == QUESTNOTSTARTED)
+//     {
+//             StartQuest( QUEST_DELIVER_LETTER, -1, -1 );
+//#ifdef TESTQUESTS
+//             ScreenMsg( MSG_FONT_RED, MSG_DEBUG, L"Started DELIVER LETTER quest");
+//#endif
+//     }

        // This quest gets turned OFF through conversation with Miguel - when user hands
        // Miguel the letter

Index: strategic/game_init.cpp
===================================================================
--- strategic/game_init.cpp     (revision 2006)
+++ strategic/game_init.cpp     (working copy)
@@ -405,15 +405,16 @@
        // IF our first time, go into laptop!
        if ( gubScreenCount == 0 )
        {
-               DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"InitNewGame: first time: init laptop");
+               DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"InitNewGame: first time: init strategic layer");
+
+               printf("Initializing strategic layer
");
+               InitStrategicLayer();
+
                printf("Initializing laptop
");
-
-               //Init the laptop here
                InitLaptopAndLaptopScreens();

-               printf("Initializing strategic layer
");
-               InitStrategicLayer();

+
                // Set new game flag
                SetLaptopNewGameFlag( );

@@ -431,9 +432,13 @@
                {
                        AddEmail(MERC_INTRO, MERC_INTRO_LENGTH, SPECK_FROM_MERC, GetWorldTotalMin( ), -1 );
                }
+
+               // InHuMan: Start QUEST 0 : DELIVER LETTER
+               // This quest gets turned OFF through conversation with Miguel - when user hands
+               // Miguel the letter
+               StartQuest( QUEST_DELIVER_LETTER, -1, -1 );


-
                // ATE: Set starting cash....
                switch( gGameOptions.ubDifficultyLevel )
                {

Report message to a moderator

Corporal
Re: [Linux] ja2 1.13 linux port (alpha release)[message #181030] Sat, 12 April 2008 12:24 Go to previous messageGo to next message
Tron

 
Messages:225
Registered:August 2007
Location: Germany
The wrong date for the first history entry is a vanilla bug. I just resolved this in JA2-Stracciatella, too. Good catch!

Report message to a moderator

Sergeant 1st Class
Re: [Linux] ja2 1.13 linux port (alpha release)[message #181043] Sat, 12 April 2008 15:01 Go to previous messageGo to next message
InHuMan is currently offline InHuMan

 
Messages:44
Registered:November 2006
Location: Czech Republic
Tron
The wrong date for the first history entry is a vanilla bug. I just resolved this in JA2-Stracciatella, too. Good catch!


Hi I have just download JA2-Stracciatella and I like it how fast is it. Smile

By the way, you have bug in JA2-Stracciatella in History doesn't appear second record (DELIVER LETTER quest).

Report message to a moderator

Corporal
Re: [Linux] ja2 1.13 linux port (alpha release)[message #181077] Sat, 12 April 2008 17:50 Go to previous messageGo to next message
Tron

 
Messages:225
Registered:August 2007
Location: Germany
InHuMan
Hi I have just download JA2-Stracciatella and I like it how fast is it. Smile

What exactly do you mean?

Quote:
By the way, you have bug in JA2-Stracciatella in History doesn't appear second record (DELIVER LETTER quest).

I resolved this regression, thanks for the report.

Report message to a moderator

Sergeant 1st Class
Re: [Linux] ja2 1.13 linux port (alpha release)[message #181083] Sat, 12 April 2008 18:05 Go to previous messageGo to next message
InHuMan is currently offline InHuMan

 
Messages:44
Registered:November 2006
Location: Czech Republic
Tron
InHuMan
Hi I have just download JA2-Stracciatella and I like it how fast is it. Smile

What exactly do you mean?


Well, loading times are smaller, animations and fading in menu are faster and smoother.

Report message to a moderator

Corporal
Re: [Linux] ja2 1.13 linux port (alpha release)[message #181098] Sat, 12 April 2008 19:32 Go to previous messageGo to next message
Tron

 
Messages:225
Registered:August 2007
Location: Germany
InHuMan
Well, loading times are smaller, animations and fading in menu are faster and smoother.


The latter is explained easily: There is an in-game clock (accessed via GetJA2Clock()), which gets updated in a separate thread. The main thread uses this clock to time several animations (like the zoom in of the laptop). So the main thread is in a busy loop redrawing the animation and thus starves the other thread, which should update the clock. The animation takes one second according to this clock, but because its update cycles are starved, it takes much longer in reality. Depending on the threading policy this effect is more dramatic one some systems than others. This pseudo-clock is one of the many conceptual WTFs in the JA2 source code and is of course broken by misdesign.
I resolved this particular issue for the zoom/fade animations in r1426 and further corrected many problems like this, memory leaks, out of bounds accesses, crashes, graphics glitches etc. and cleaned up small parts of the code (to this date the source code has about 140.000 lines of code less than the vanilla source code!), but there is still much to do to improve stability and maintainability.

Report message to a moderator

Sergeant 1st Class
Re: [Linux] ja2 1.13 linux port (alpha release)[message #181194] Sun, 13 April 2008 13:32 Go to previous messageGo to next message
InHuMan is currently offline InHuMan

 
Messages:44
Registered:November 2006
Location: Czech Republic
Another bug - Shade tables regenerating every game. Bug from revision 1577.

Index: shade_table_util.cpp
===================================================================
--- shade_table_util.cpp        (revision 2017)
+++ shade_table_util.cpp        (working copy)
@@ -32,8 +32,6 @@

 void DetermineRGBDistributionSettings()
 {
-       STRING512                       DataDir;
-       STRING512                       TempDir;
        STRING512                       file1, file2;
        UINT32                          uiRBitMask, uiGBitMask, uiBBitMask;
        UINT32                          uiPrevRBitMask, uiPrevGBitMask, uiPrevBBitMask;
@@ -110,7 +108,7 @@
        { //The RGB distribution is going to be saved in a tiny file for future reference.  As long as the
                //RGB distribution never changes, the shade table will grow until eventually, all tilesets are loaded,
                //shadetables generated and saved in this directory.
-               hfile = FileOpen( file2, FILE_ACCESS_WRITE | FILE_CREATE_ALWAYS, FALSE );
+               hfile = FileOpen( file1, FILE_ACCESS_WRITE | FILE_CREATE_ALWAYS, FALSE );
                if( !hfile )
                {
                        AssertMsg( 0, "Couldn't create RGBDist.dat for writing!" );

Report message to a moderator

Corporal
Re: [Linux] ja2 1.13 linux port (alpha release)[message #181197] Sun, 13 April 2008 14:12 Go to previous messageGo to next message
Tron

 
Messages:225
Registered:August 2007
Location: Germany
InHuMan
Another bug - Shade tables regenerating every game. Bug from revision 1577.


I recommend removing saving/loading shade tables. Its sole purpose is to waste a few megabytes of disk space.

Report message to a moderator

Sergeant 1st Class
Re: [Linux] ja2 1.13 linux port (alpha release)[message #181248] Sun, 13 April 2008 20:33 Go to previous messageGo to next message
Lesh 2 is currently offline Lesh 2

 
Messages:107
Registered:September 2006
Location: Izhevsk, Russia
Arghhh! InHuMan, you are my second eyes!

Quote:
I recommend removing saving/loading shade tables. Its sole purpose is to waste a few megabytes of disk space.

Though shadetable purpose was to save time by using pre-calculated data long ago, in present modern computers can perform without shadetables with no noticable slowdown (just checked). So I agree with you, Tron.

Report message to a moderator

Sergeant
Re: [Linux] ja2 1.13 linux port (alpha release)[message #181335] Mon, 14 April 2008 14:08 Go to previous messageGo to next message
InHuMan is currently offline InHuMan

 
Messages:44
Registered:November 2006
Location: Czech Republic
Lesh 2
Arghhh! InHuMan, you are my second eyes!
Thanks... Smile
Lesh 2
Quote:
I recommend removing saving/loading shade tables. Its sole purpose is to waste a few megabytes of disk space.
Though shadetable purpose was to save time by using pre-calculated data long ago, in present modern computers can perform without shadetables with no noticable slowdown (just checked). So I agree with you, Tron.


Question is how fast it is on older computers or for example on Maemo Internet Tablets from Nokia...

Report message to a moderator

Corporal
Re: [Linux] ja2 1.13 linux port (alpha release)[message #181341] Mon, 14 April 2008 15:21 Go to previous messageGo to next message
Tron

 
Messages:225
Registered:August 2007
Location: Germany
The question rather is, how fast loading 300 (!) separate files each 8kB in size is. Assuming a sustained data rate of about 5MB per second (remember: 300 scattered files!) and a clock frequency of 250MHz (Nokia 770 Tablet PC) you have about 100 cycles to calculate per single 16bpp palette entry, which mainly consists of scaling. Plus you save some mumbo jumbo for maintaining the caching info (ugly stuff) - see r3755 for what has been removed.

Report message to a moderator

Sergeant 1st Class
Re: [Linux] ja2 1.13 linux port (alpha release)[message #181365] Mon, 14 April 2008 18:20 Go to previous messageGo to next message
InHuMan is currently offline InHuMan

 
Messages:44
Registered:November 2006
Location: Czech Republic
Tron
The question rather is, how fast loading 300 (!) separate files

OK, you have convinced me...

Report message to a moderator

Corporal
Re: [Linux] ja2 1.13 linux port (alpha release)[message #182021] Fri, 18 April 2008 17:36 Go to previous messageGo to next message
cdunigan is currently offline cdunigan

 
Messages:132
Registered:September 2007
Location: Madison, Wisconsin, USA
Wow! I turn my back for a bit, and the thing that brought me back to JA2 just explodes with activity!

:super:

I'd like to claim I was staying away from this thread because I was trying to give you a break, Lesh, but of course it was just as much my own laziness as anything else. I'm going to get the new development branch and start testing again, especially since you're helping so much, InHuman and Tron. Thanks so much, and I wish I could do more myself. I can only help with shell scripting and a bit with autotools if Lesh decides to use them. The argument for using them is that "./configure; make; make install" is practically hardwired into every Linux user who doesn't do yum or apt.

Report message to a moderator

Sergeant
Re: [Linux] ja2 1.13 linux port (alpha release)[message #182060] Fri, 18 April 2008 20:10 Go to previous messageGo to next message
Tron

 
Messages:225
Registered:August 2007
Location: Germany
JAPH
I'm going to get the new development branch and start testing again, especially since you're helping so much, InHuman and Tron.


I want to emphasize, that I maintain a separate project (see signature), which is not affiliated with JA2 1.13 in any way. In fact this JA2 1.13 Linux port uses parts of the code I wrote.

Quote:
The argument for using them is that "./configure; make; make install" is practically hardwired into every Linux user who doesn't do yum or apt.


autotools are more trouble than they're worth. I just use a small Makefile, which works well on several configurations (FreeBSD, several Linuxes, Windows with MinGW/MSYS, OSX)

Report message to a moderator

Sergeant 1st Class
Re: [Linux] ja2 1.13 linux port (alpha release)[message #182061] Fri, 18 April 2008 20:12 Go to previous messageGo to next message
cdunigan is currently offline cdunigan

 
Messages:132
Registered:September 2007
Location: Madison, Wisconsin, USA
Whoops, can't compile. branches/Lesh/lpja2/project/build_release.sh failed:

make: Entering directory `/opt/ja2svn/ja2/branches/Lesh/lpja2/bin/release'
make: *** No rule to make target `../../src/SDL/SDL.h', needed by `ani_view_screen.o'. Stop.
make: Leaving directory `/opt/ja2svn/ja2/branches/Lesh/lpja2/bin/release'

Report message to a moderator

Sergeant
Re: [Linux] ja2 1.13 linux port (alpha release)[message #182064] Fri, 18 April 2008 20:23 Go to previous messageGo to next message
cdunigan is currently offline cdunigan

 
Messages:132
Registered:September 2007
Location: Madison, Wisconsin, USA
Tron
JAPH
I'm going to get the new development branch and start testing again, especially since you're helping so much, InHuman and Tron.


I want to emphasize, that I maintain a separate project (see signature), which is not affiliated with JA2 1.13 in any way. In fact this JA2 1.13 Linux port uses parts of the code I wrote.

Quote:
The argument for using them is that "./configure; make; make install" is practically hardwired into every Linux user who doesn't do yum or apt.


autotools are more trouble than they're worth. I just use a small Makefile, which works well on several configurations (FreeBSD, several Linuxes, Windows with MinGW/MSYS, OSX)


I hope I didn't offend you. I already knew about Stracciatella, I just saw your posts here and assumed you'd decided to help Lesh, too. Sorry about that. And I don't mean to get into a debate over the value of autotools, I was just pointing out that many users will expect them. I'll happily accept whatever Lesh decides to do.

Report message to a moderator

Sergeant
Re: [Linux] ja2 1.13 linux port (alpha release)[message #182070] Fri, 18 April 2008 20:38 Go to previous messageGo to next message
InHuMan is currently offline InHuMan

 
Messages:44
Registered:November 2006
Location: Czech Republic
JAPH
Whoops, can't compile. branches/Lesh/lpja2/project/build_release.sh failed:

make: Entering directory `/opt/ja2svn/ja2/branches/Lesh/lpja2/bin/release'
make: *** No rule to make target `../../src/SDL/SDL.h', needed by `ani_view_screen.o'. Stop.
make: Leaving directory `/opt/ja2svn/ja2/branches/Lesh/lpja2/bin/release'

Have you got SDL devel package installed?

Report message to a moderator

Corporal
Re: [Linux] ja2 1.13 linux port (alpha release)[message #182071] Fri, 18 April 2008 20:41 Go to previous messageGo to next message
cdunigan is currently offline cdunigan

 
Messages:132
Registered:September 2007
Location: Madison, Wisconsin, USA
Um, probably not. Embarrassed
I'll go check on that and install it. Thanks.

Report message to a moderator

Sergeant
Re: [Linux] ja2 1.13 linux port (alpha release)[message #182074] Fri, 18 April 2008 20:58 Go to previous messageGo to next message
Tron

 
Messages:225
Registered:August 2007
Location: Germany
JAPH
I hope I didn't offend you. I already knew about Stracciatella, [...]


No offense taken, I just want to make sure, that different things aren't confused with each other.

Report message to a moderator

Sergeant 1st Class
Re: [Linux] ja2 1.13 linux port (alpha release)[message #182084] Fri, 18 April 2008 21:19 Go to previous messageGo to next message
cdunigan is currently offline cdunigan

 
Messages:132
Registered:September 2007
Location: Madison, Wisconsin, USA
Actually I do have it installed. I'm using Fedora 7, rpm -qa SDL-devel shows SDL-devel-1.2.12-1.fc7. If I remember make correctly, and I was never that good at it to begin with, doesn't "no rule to make target" mean there's a dependency that doesn't have the necessary target set up in the makefile? I should probably not talk too much about things I don't have solid skills with, but I'm just throwing out ideas for consideration.

Report message to a moderator

Sergeant
Re: [Linux] ja2 1.13 linux port (alpha release)[message #182088] Fri, 18 April 2008 21:25 Go to previous messageGo to next message
Tron

 
Messages:225
Registered:August 2007
Location: Germany
JAPH
make: *** No rule to make target `../../src/SDL/SDL.h', needed by `ani_view_screen.o'. Stop.


This looks like it searches for a SDL header in the source tree of JA2. This seems wrong.

[Updated on: Fri, 18 April 2008 21:25] by Moderator

Report message to a moderator

Sergeant 1st Class
Re: [Linux] ja2 1.13 linux port (alpha release)[message #182112] Fri, 18 April 2008 23:19 Go to previous messageGo to previous message
Lesh 2 is currently offline Lesh 2

 
Messages:107
Registered:September 2006
Location: Izhevsk, Russia
Tron
This looks like it searches for a SDL header in the source tree of JA2. This seems wrong.

Yes, JAPH, you're probably trying to build updated project when old depency information still exists. Issue "make clean" in project directory, then build again. This should help.

Report message to a moderator

Sergeant
Previous Topic: A Small Compilation of New Features
Next Topic: New Interface & Laptop folders
Goto Forum:
  


Current Time: Fri Mar 29 09:27:26 GMT+2 2024

Total time taken to generate the page: 0.02512 seconds