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.


Messages - gigaherz

Pages: 1 2 3 [4] 5
76
Q-Gears / Re: Psx blending to opengl.
« on: 2006-11-23 13:25:42 »
I was thinking, fragment programs were introduced with opengl 2.0 right? IIRC, then they are "equivalents" to Pixel Shaders 2.0 in Direct3d... and none of my 2 gfx cards can do them (yes I klnow I need new gfx cards... :P)

77
Q-Gears / Re: Problem in file path specification
« on: 2006-11-23 13:21:43 »
IMO, the file driver should only be used to access the game files, while savemaps and other files could work without a"file driver" or with it's own. That way the game file driver would "know" if it should use "program dir/data/" "cdrom/" or read the files from a disk image, and not afect the saves at all.

78
Q-Gears / Re: Psx blending to opengl.
« on: 2006-11-21 23:27:00 »
The only place where "special" texture usage (basically, framebuffer reads) make sense is in the battle start effect (I can't really remember how did the ff7 battles start tho), but unless that part is scripted, it can just be reimplemented using simple PC methods...

79
Q-Gears / Re: Psx blending to opengl.
« on: 2006-11-21 15:48:15 »
That's most probably why psx emulators use alpha multipass (one for the 0.25 and then the other 0.25 left I suppose).

I don't really know what do the B and F in there mean so, assuming F=source and B=dest, seems right.

As for subtractive blending, there is an extension that lets you change the blending equation from D=D+S to D=D-S or D=S-D:
http://oss.sgi.com/projects/ogl-sample/registry/EXT/blend_subtract.txt

if you want to get more accurate results, and subtractive blending is available, you can do two passes like:
if you have 0.5*B + 0.25*F, you could do a 0.5*B+0.5*F, and then a 1*B-0.25*F, so it effectively gets you 0.5 and 0.25.

EDIT: just as a note, the extension depends on EXT_blend_minmax, so here is the link to that extension:
http://oss.sgi.com/projects/ogl-sample/registry/EXT/blend_minmax.txt

80
Q-Gears / Re: (This post is fluff) I keep thinking...
« on: 2006-11-18 23:16:31 »
Most other ppl would just reply "Wow Akari you are cool" in the other thread...

81
Q-Gears / Re: other platforms
« on: 2006-11-17 01:11:29 »
Yeh, ports to xbox, psp and even dreamcast would be cool to see too, but I don't have any of those consoles so I wouldn't be able to use them.
I have a nds tho, but I think the nds screens are too small if the game had to be single-screen (256x192 or something like that), and using 2 screens vertically would make it too tall (and obviously doing it rotated would be even move annoying), that's if the nds hardware can run it...

82
Q-Gears / Re: Q-Gears.0.08
« on: 2006-11-13 00:56:39 »
hm, with ODE being lots of things, I was wondering if it was "Open Dynamics Engine", or something else... but I suppose I will know when I try to use that one. :P

83
Cool. Nice. (and all other positive one-word adjectives english has). :P

84
Q-Gears / Re: other platforms
« on: 2006-11-13 00:34:03 »
One of the coders is trying to make it work in a pda, but I think the rest of us jsut want to play ff7 in their favorite os and cpu (I dont' really WANT to play ff7, I just enjoy coding).

I suppose so...

If the psx version has it scripted that way, it will work that way, I suppose.

This will be seen when it's working, but probably depends on the target cpu, gpu and optimizations. They don't plan to make it "improved" xcept in screen resolution, so the requirements shouldn't be much higher than the original ones...

85
Q-Gears / Re: Q-Gears.0.08
« on: 2006-11-11 13:22:40 »
Ooh cool, you rock Akari, I'm really looking forward to the day you can commit all this to svn.  :wink:

86
I think I exaplined myself way too poorly before...

I never wanted anyoen to remove automake, it's a really useful tool, and when so many projects use it, that means it works.
What I don't really like is that way of doing the includes. Mostly because it's the FIRST time I see it, even though I have read or used code from a few projects that did use automake. Maybe I was kind of lucky (or un-lucky) that none of them did, but I have always coded using relative paths for includes so that's what I'm used to do now, can't do much about it xcept getting used to it for this project (I personally will keep using relative includes in other coding, at least for now).
Also in Visual Studio it's easy to setup, it has an environment variable for the project directory, so that's not a problem to work with QGears.

87
Is it really that needed to do that with the includes? I mean, it breaks relativity (you can't rename a dir, or move a class arround without changing all the #includes), and makes it harder for everyone xcept for automake. I think it would have been nicer to just try to get a working make/build script or something like that...

88
Meh, the "include everything from src root" thing broke my vs2005 project files.
vs2005 compiler sets the current directory to the source directory, so they don't work there. I will try to find a way to add "project root" as an additional include dir, but not sure if that will be possible (in that case it would either need #ifs or a branch from the project trunk).

EDIT: Ok it was easy. :p

89
Q-Gears / Re: New Jobs!
« on: 2006-10-17 19:18:35 »
Just as a note, my nick doesn't have a T, and it's not a spelling problem, I just don't like "hertz" with a T.  :p

90
Q-Gears / Re: Q-Gears.0.06a
« on: 2006-10-13 23:45:16 »
I foudn a problem when compiling using VS2005:

In FieldModule::LoadMap(const u16& id) you call mpUnitManager->Clear().
The code generated by vs2005 sets the mapid (passed by reference) to 0xfeee when the destructor executes, so the value is lost!
I solved this by doing this:

Code: [Select]
FieldModule::LoadMap(const u16& tid)
{
u16 id=tid;
...

I also found a crash at UnitManager::CheckTriggers. There are script errors and it doesn't load any unit, so the unit vector is empty.

Code: [Select]
    for (u8 i = 0; i < mGateways.size(); ++i)
    {
if ( mUnits.size() <= mPC ) break;
    mGateways[i]->CheckCollision(mUnits[mPC].position, collision);
    }
...

I suppose this only happens because of the script errors, but anyway.

EDIT: I moved the if outside of the for whiule typing this because I thought it would work, but it seems it needs to be in it to work correctly.

91
Q-Gears / Re: To Do
« on: 2006-10-13 22:47:32 »
Ah good to know. I have already implemented this, and planned to get mul/div/and/or/xor done later. But if something else to do comes up, I will give preference to that. :P

Code: [Select]
7F RDMSD
81 SETWORD
82 BITON
83 BITOFF
84 BITXOR
85 PLUS
86 PLUS2
87 MINUS
88 MINUS2
95 INC
96 INC2
97 DEC
98 DEC2
99 RANDOM
9A LBYTE
9B HBYTE
9C 2BYTE
(plus/minus/inc/dec are just copies of the saturated ones, without the saturation code)

92
Q-Gears / Re: To Do
« on: 2006-10-13 20:58:26 »
Hm... I was already trying to implement the math opcodes for scripts (I mean, before you posted this todo list). I could stop now and let you do it, but I'm bored so I will probably continue to do the only "easy" thing I saw in it (I'm not good at writing 3D code, and battles and worldmap need exactly that). You have it planned for after 0.10 so by then things might have changed.

Oh and I'm doing it based on the info in the Wiki. I'm assuming the info there is correct.

93
Q-Gears / Re: Q-Gears.0.06a
« on: 2006-10-13 18:10:09 »
Wow, qgears has improved a lot on maps already. You can even load startmap without an xml and walk arround in a few of the maps you can jump from it!
Too bad there are still many unknown upcodes and missing features.

P.D.: Any specific reason you haven't updated the svn? I would like to play with the code. :P

94
Q-Gears / Re: Help with the Q-gears website.
« on: 2006-10-08 04:12:05 »
Because this is Qhimm's website, mostly.

95
Q-Gears / Re: Walking on walkmesh.
« on: 2006-10-08 00:15:54 »
Hmm, just some fast thoughts (I don't know the map name for that section so I can't really check it):
If the walkmesh contains all the walkable areas in the map, wouldn't the walkable areas in the train and car be already included in the walkmesh?
If not, then the game must check collisions on the train and car meshes too.
I don't really see the problem here.

On a side note:
I know there are some map viewers for the prerendered part. Has anyone tried to draw the walkmesh on top of it to see if it matches?

96
Q-Gears / Re: Help with the Q-gears website.
« on: 2006-10-07 23:22:03 »
Sourceforge.net used to support php and mysql, I suppose that hasn't changed.

97
Q-Gears / Re: Visual Studio 2005 Project Files and Patch
« on: 2006-09-28 18:40:47 »
The build from akari made me realise qgears is supposed to be a console app. SDL_main seems to setup file pointers to "stdout.txt" and "stderr.txt" when you link as windowed (no console), so it works both ways. Given ppl usually doesn't need to see the console when they aren't debugging, I don't think I need to change that (anyone who wants to debug using my project files can go to project properies->linker->system and set it to console).

Sorry if you are against double-posting, but IMO, my previous post was getting too long.

98
Q-Gears / Re: Visual Studio 2005 Project Files and Patch
« on: 2006-09-25 20:08:26 »
Yeah I know about block devices. Reading the user data in a cdrom should be as easy as opening "/dev/cdromX" or something similar, but I don't know if you can "tell" the device to use raw (2352 bytes) sectors, I suppose it's some ioctl call or something.
In windows you can't do that so easily, but you can open cdroms in raw mode using IOCTL (in win2k and newer), and also send SCSI commands. That's why I suggested the plugin system used in most psx emulators, so you don't have to code all that again (and users can choose the plugin that works best in their system).
Using an internal ISO9660 parser is fine anyway, specially since we also need raw reading for Xenogears, and using an external plugin won't affect that xcept in the way you read the data (you would need to call the plugin instead of using the f* functions or whatever you use), and it's also easy to give it an internal ISO image reader, and "link" the function pointers to it when no external plugin is used.

EDIT:
I got some files from a friend (while I wait for my ff7 discs), and tried to run qgears/ff7.
I only have INIT/KERNEL.BIN, INIT/KERNEL2.BIN and WINDOW.BIN. It crashes in OpcodesToRawScript, and I don't know if it's missing data, or the scripts part is still too buggy.

EDIT2:
Ok I kicked my lazyness out for a while and debugged the crash, and found out I was missing startmap.dat. That didn't seem to fix the problem though. It's not really a crash, the debug runtime detects an improper access to an unused memory location arround the variable "hex" (debug runtime checks areas surrounding allocated buffers and variables for invalid writes).

I narrowed down the problem to this:

                        u8 hex = 0x00;
                        sscanf(value.c_str(), "%02x", &hex);

sscanf is writing 32 bits to hex, when it's only 1 byte! so I changed the type to u32 for safety.
That solved the debug exceptions. After that, I then found out I also "needed" md1stin.dat, and that's all the story, it works well (at least the wireframe thing).

EDIT3:
I thought about a nicer way to do the project structure, it would simplify the editing and make building faster:
My project files have all the files needed for each project included, that means, if you compile both, you are compiling /common/ twice.
I will make "common" be a static library included brom both projects.
I'm going to bed now, I will do this tomorrow when I get up.

EDIT4:
New project files with common in a static lib.
 http://bin.mypage.sk/FILES/vs2005-2.rar
(this rar file doesn't include any patch, just new project files)

I don't know if the game also does this in the linux builds, but the dialogs were showing all black (no gradient).
I made the Gamestate constructor initialize them to blue gradient. As it can be later changed by the game scripts, it seems to be a good default value.

Code: [Select]
Gamestate::Gamestate()
{
mSavemap.WindowRGBUpperLeft[0] = 0; mSavemap.WindowRGBUpperLeft[1] = 0; mSavemap.WindowRGBUpperLeft[2] = 192;
mSavemap.WindowRGBUpperRight[0]= 0; mSavemap.WindowRGBUpperRight[1]= 0; mSavemap.WindowRGBUpperRight[2]= 128;
mSavemap.WindowRGBLowerRight[0]= 0; mSavemap.WindowRGBLowerRight[1]= 0; mSavemap.WindowRGBLowerRight[2]= 64;
mSavemap.WindowRGBLowerLeft[0] = 0; mSavemap.WindowRGBLowerLeft[1] = 0; mSavemap.WindowRGBLowerLeft[2] = 128;
}

99
Q-Gears / Re: Visual Studio 2005 Project Files and Patch
« on: 2006-09-24 13:48:44 »
I don't have my ff7(psx) discs in here so I can't test it. When I get them back I will look at it.

I tried Xenogears (NTSC/US CD1) and the map renderer seems to work fine.

Has anyone thought about using psx emulator plugins for the cd reading? That would make it really simple to read the data directly from the cdrom drive.
I could do it for windows, it's easy, but I never used dynamically loaded libs in linux, so I wouldn't be able to make it portable (and AFAIK, linux doesn't need that anyway).

100
Q-Gears / Visual Studio 2005 Project Files and Patch
« on: 2006-09-22 20:37:08 »
I checked the svn today and saw you changed the structure to add support for xenogears, so I built new project files, this time for vs2005.

I only had to add 3 #ifdef blocks to make it work, and none of them change the code too much:
One in DisplayOgl.cpp, to make it include windows.h before gl.h
One in Main.cpp to "rename" main() to SDL_main, so it links correctly using SDL
One in StdString.h because vc doesn't have a va_copy function, and it has _snprintf isntead of snprintf

That means the code is (should be) 100% compatible with other compilers.

To build it you need win32 versions of libxml, libiconv and zlib (all with binary builds available) configured in the vs2005 C++ paths.

http://bin.mypage.sk/FILES/vs2005.zip

EDIT: forgot to say: the project files and the patch should be in trunk/src/ (the patch doesn't need to be there, but you need to CD there to use patch)

EDIT2: in case someone wants to use it, but has trouble with the libs, just tell me and I will upload the ones I used.

Pages: 1 2 3 [4] 5