Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
44 user(s) are online (30 user(s) are browsing Forums)

Members: 2
Guests: 42

bigmac, smf, more...

Headlines

Forum Index


Board index » All Posts (BSzili)




Re: BSzili port requests
Quite a regular
Quite a regular


FlightGear 1.x uses PLIB, just as TORCS so I could port that one, but it might be too demanding for the curent hardware. There's a Strike Commander rewrite in progress, that one might be a better fit: http://fabiensanglard.net/reverse_eng ... trike_commander/index.php

This is just like television, only you can see much further.
Go to top


Re: BSzili port requests
Quite a regular
Quite a regular


If there was a port previously, then it's definitely possible, but I'm not very keen on duplicating someone else's work. Maybe you could persuade him to update his port, or share the source

This is just like television, only you can see much further.
Go to top


Re: BSzili port requests
Quite a regular
Quite a regular


It's probably related to the GL state, because the menu isn't buggy to begin with, it breaks after some gameplay.
There's also some issue with the GL_LINE_LOOP drawing. The lines sometimes get really thick, even tough glLineWidth is called before drawing them.

This is just like television, only you can see much further.
Go to top


Re: BSzili port requests
Quite a regular
Quite a regular


Definitely, this is the file which renders the loading screen:
https://github.com/timdetering/Homewor ... ster/src/Game/HorseRace.c

edit: Menu backgrounds have some issues too. On kas1e's second screenshot besides the missing triangles, you can see that there's no background for the menu at all.

This is just like television, only you can see much further.
Go to top


Re: BSzili port requests
Quite a regular
Quite a regular


Ok, I accidentally copied the wrong function. The one which draws the background disables backface culling:
void hrDrawBackground(void)
{
    
rndClearToBlack();

    if (
hrBackgroundTexture)
    {
        
real32 x = -((real32)hrBackXSize / (real32)MAIN_WindowWidth);
        
real32 y = -((real32)hrBackYSize / (real32)MAIN_WindowHeight);
        
GLfloat v[8], t[8];

        
sdword oldTex rndTextureEnable(TRUE);
        
udword oldMode rndTextureEnvironment(RTE_Replace);
        
bool cull glIsEnabled(GL_CULL_FACE) ? TRUE FALSE;
        
bool blend glIsEnabled(GL_BLEND) ? TRUE FALSE;
        
glDisable(GL_CULL_FACE);
        
glEnable(GL_BLEND);

        
trClearCurrent();
        
glBindTexture(GL_TEXTURE_2DhrBackgroundTexture);

        
t[0] = 0.0f;        t[1] = 0.0f;
        
t[2] = hrBackXFract[3] = 0.0f;
        
t[4] = 0.0f;        t[5] = hrBackYFrac;
        
t[6] = hrBackXFract[7] = hrBackYFrac;

        
v[0] = primScreenToGLX(hrScaleMissionLoadingScreens feResRepositionScaledX(0) : feResRepositionCentredX(0));
        
v[1] = primScreenToGLY(hrScaleMissionLoadingScreens feResRepositionScaledY(0) : feResRepositionCentredY(0));
        
v[2] = primScreenToGLX(hrScaleMissionLoadingScreens feResRepositionScaledX(640) : feResRepositionCentredX(640));
        
v[3] = primScreenToGLY(hrScaleMissionLoadingScreens feResRepositionScaledY(0) : feResRepositionCentredY(0));
        
v[4] = primScreenToGLX(hrScaleMissionLoadingScreens feResRepositionScaledX(0) : feResRepositionCentredX(0));
        
v[5] = primScreenToGLY(hrScaleMissionLoadingScreens feResRepositionScaledY(480) : feResRepositionCentredY(480));
        
v[6] = primScreenToGLX(hrScaleMissionLoadingScreens feResRepositionScaledX(640) : feResRepositionCentredX(640));
        
v[7] = primScreenToGLY(hrScaleMissionLoadingScreens feResRepositionScaledY(480) : feResRepositionCentredY(480));

        
glEnableClientState(GL_VERTEX_ARRAY);
        
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
        
glTexCoordPointer(2GL_FLOAT0t);
        
glVertexPointer(2GL_FLOAT0v);
        
glDrawArrays(GL_TRIANGLE_STRIP04);
        
glDisableClientState(GL_VERTEX_ARRAY);
        
glDisableClientState(GL_TEXTURE_COORD_ARRAY);

        
rndTextureEnvironment(oldMode);
        
rndTextureEnable(oldTex);
        if (
cullglEnable(GL_CULL_FACE);
        if (!
blendglDisable(GL_BLEND);
    }
}


hrRectSolidTextured2 is used to draw some red arrows, which aren't seen on the screenshot above, but are displayed correctly.

This is just like television, only you can see much further.
Go to top


Re: BSzili port requests
Quite a regular
Quite a regular


I tried running the game using a debug build of minigl, but all the debug output slowed things down to a crawl. I couldn't even pick an option from the menu. Before I start to cherry-pick which prints I want from the library, I'll wait for Hans' answer, maybe there's some obvious problem with the way HomeWorld renders the 2D primitives.

edit: These random unit sounds are starting to really piss me off. After a few instances it thrashes the mixer's memory, what a mess. No wonder they didn't bother fixing the sound engine for the PPC Mac port.


Edited by BSzili on 2014/4/22 20:05:59
This is just like television, only you can see much further.
Go to top


Re: BSzili port requests
Quite a regular
Quite a regular


@Hans
Thanks, I'll try to build a debug version of MiniGL if everything else fails. The loading screen uses glDrawArrays, which is kind of a waste for a single quad. Here's the code which does the loading screen:
#define primScreenToGLX(x) (((real32)(x)+0.325f) / (real32)(MAIN_WindowWidth) * 2.0f - 1.0f)

#define primScreenToGLY(y) (1.0f - ((real32)(y)+0.325f) / (real32)(MAIN_WindowHeight) * 2.0f)

udword rndTextureEnvironment(udword textureMode)
{
    
udword oldMode rndTextureEnviron;
    
    if (
rndTextureEnviron != textureMode)
    {
        
rndTextureEnviron textureMode;
        
glTexEnvi(GL_TEXTURE_ENVGL_TEXTURE_ENV_MODErndTextureEnviron);
    }
    
    return 
oldMode;
}

sdword rndTextureEnable(sdword bEnable)
{
    
sdword enabled rndTextureEnabled;
    if (
bEnable)
    {
        if (!
rndTextureEnabled)
        {
            
glEnable(GL_TEXTURE_2D);
            
rndTextureEnabled TRUE;
        }
    }
    else
    {
        if (
rndTextureEnabled)
        {
            
glDisable(GL_TEXTURE_2D);
            
rndTextureEnabled FALSE;
        }
    }
    return(
enabled);
}

void hrRectSolidTextured2(rectangle *rect)
{
    
GLfloat t[8] = { 0.0f1.0f1.0f1.0f0.0f0.0f1.0f0.0f };
    
GLfloat v[8] = { primScreenToGLX(rect->x0), primScreenToGLY(rect->y1 1),
                     
primScreenToGLX(rect->x1), primScreenToGLY(rect->y1 1),
                     
primScreenToGLX(rect->x0), primScreenToGLY(rect->y0),
                     
primScreenToGLX(rect->x1), primScreenToGLY(rect->y0) };

    
glColor4f(1.0f1.0f1.0f1.0f);

    
rndTextureEnvironment(RTE_Replace);
    
rndTextureEnable(TRUE);

    
glEnableClientState(GL_VERTEX_ARRAY);
    
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
    
glVertexPointer(2GL_FLOAT0v);
    
glTexCoordPointer(2GL_FLOAT0t);
    
glDrawArrays(GL_TRIANGLE_STRIP04);
    
glDisableClientState(GL_VERTEX_ARRAY);
    
glDisableClientState(GL_TEXTURE_COORD_ARRAY);

    
rndTextureEnable(FALSE);
    
rndTextureEnvironment(RTE_Modulate);
}

This is just like television, only you can see much further.
Go to top


Re: BSzili port requests
Quite a regular
Quite a regular


I know about the missing triangles. I have the same issue, but I don't know the dos and don'ts if MiniGL, and the same code works on MorphOS, Linux, etc. Unless someone knows how to debug this, it's going to stay this way.
You were lucky not to get any crashes, the code which picks random unit sounds is broken. Eventually it will pick a huge value for the variation, try to play a non-existent sound, and crash. I more or less fixed it, but I still have no unit sounds, so it needs some more work before I upload it.

edit: Contrary to my previous post, the debug versions are hardcoded to run in a window, so I can always see the console output.

This is just like television, only you can see much further.
Go to top


Re: BSzili port requests
Quite a regular
Quite a regular


Nice! Was half of the loading screen missing? (the upper left triangle)

This is just like television, only you can see much further.
Go to top


Re: BSzili port requests
Quite a regular
Quite a regular


Either way here's a debug build for testing:
http://bszili.morphos.me/ports/homeworld-os4.lha
It's full of debugging junk, so it's going to be slow. This is not the final version! If you want to test it, you need the data files (Update.big, HW_Music.wxd, Homeworld.big, HW_Comp.vce) from Homeworld patched to v1.05.

edit: Reuploaded the archive with a couple of bugs fixed: no speech, audio crackling, startup in window mode only.


Edited by BSzili on 2014/4/21 17:25:22
Edited by BSzili on 2014/4/22 8:58:08
This is just like television, only you can see much further.
Go to top


Re: BSzili port requests
Quite a regular
Quite a regular


More updates on Homeworld. Since the fix was simple enough, I've dealt with the save game issue on the tutorial mission. The sound is mostly working too, after I fixed the endianness issues. They have just disabled it for the PPC Mac build.. neat. There's one remaining issue, the sound mixer thread won't stop at exit. After I've dealt with this one, I'll upload a debug build for testing.

This is just like television, only you can see much further.
Go to top


Re: BSzili port requests
Quite a regular
Quite a regular


Good for you, but I'm talking about the the OS4 port I'm working on, not the MorphOS version.

edit: A small update: the Save/Load issue only happens with saves from the tutorial mission. It's not OS4 specific, I had the same issue on Linux too. Since the tutorial isn't very long I might leave fixing this to later. This leaves me with the no sound issue.


Edited by BSzili on 2014/4/20 13:04:46
This is just like television, only you can see much further.
Go to top


Re: BSzili port requests
Quite a regular
Quite a regular


I wouldn't bet my life on it. I had some slowdowns when I was selecting multiple units from all the rectangles being drawn.

This is just like television, only you can see much further.
Go to top


Re: BSzili port requests
Quite a regular
Quite a regular


It looks like Homeworld was a good idea. The game has an almost complete support for big endian platforms. It only took me an afternoon to get a working version. Not everything is perfect though, there's no sound, saving/loading is broken and there are some graphic glitches in the menu. It's unlikely that I can fix the latter, so I appriciate any help from the Warp3D/MiniGL guys.
Once I fixed the former issues I'll upload the game for testing.

This is just like television, only you can see much further.
Go to top


Re: How to access to the intuition window when it created by SDL ?
Quite a regular
Quite a regular


It is easy to implement indeed, but neither the AROS or MorphOS port of SDL fills out the WM info.
The first step is defining a structure, since SDL_SysWMinfo on different platforms (Windows, X11, RISCOS etc.). A struct Window pointer should be enough, with maybe a couple of reserved fields for future extensions.

This is just like television, only you can see much further.
Go to top


Re: How to access to the intuition window when it created by SDL ?
Quite a regular
Quite a regular


SDL_Window is an opaque structure, and it it's not the same as an intuition window. SDL 1.2 can return the window handle in SDL_SysWMinfo, but it is not implemented in the OS4 SDL.
When I had to do something like this, I iterated through the intuition window list, and picked one with the identical title. Crude, but this way you won't break the forward compatibility.

This is just like television, only you can see much further.
Go to top


Re: BSzili port requests
Quite a regular
Quite a regular


@terminills
This looks neat, but it's for DX9, and not DX7. Different DirectX versions aren't really backwards compatible, plus DX9 is based around programmable shaders, which are not available on OS4.

This is just like television, only you can see much further.
Go to top


Re: BSzili port requests
Quite a regular
Quite a regular


Arx Libertatis is the same deal as JA, the file loaders aren't endian agnostic. I fixed 3/4 of them and shelved it, since it takes a lot of time to crunch through all the headers.
I'll try go for HomeWorld SDL next. It has a MorphOS port, so it should be endian savvy already. Plus it's not an FPS.

edit: I want to stress that I'm going to finish these ports, I just want to do those first which take less time to finish. I'm currently doing my master's degree, plus I work as an intern at my university, so I have only so much time a week for amiga related stuff. I'm doing a terrible job at picking games to port, which makes it look like I'm not doing anything :\


Edited by BSzili on 2014/4/7 17:52:51
This is just like television, only you can see much further.
Go to top


Re: BSzili port requests
Quite a regular
Quite a regular


Darn the luck, darn. It seems like every program I touch turns out to be a real porting disaster. I naively thought Jedi Academy will be a safe choice, since it uses the id Tech 3 engine. Well what do you know, every enhancement Raven added (Ghoul2, ICARUS, etc.) works little-endian only. I already fixed various loaders (fonts, TGA) to work on big endian too, and Ghould2 models mostly work too. By golly, those data structures... Offsets to 3 byte indexes conviniently lumped in after the header. I have no idea how much time fixing other parts might take, but I'm slowly pushing my changes into the main repo.
About transmissing, I think I'll give up. If anyone can debug these weird TCP/IP stack problems, and wants to continue my work, contact me. Both the CLI client and the Qt GUI works when I'm offline, I can add/remove torrents, it tries to connect, etc. The library itself should be mostly done.


Edited by BSzili on 2014/4/7 11:35:34
This is just like television, only you can see much further.
Go to top


Re: E-UAE (Amigfx) - do we need a bounty?
Quite a regular
Quite a regular


@spotUP
Or even better, PUAE: https://github.com/GnoStiC/PUAE

This is just like television, only you can see much further.
Go to top



TopTop
« 1 ... 27 28 29 (30) 31 32 33 ... 37 »




Powered by XOOPS 2.0 © 2001-2023 The XOOPS Project