Recent Posts

Pages: [1] 2 3 ... 10
1
Other Projects / Re: More Random 3D Stuff
« Last post by White Claw on Today at 08:09:13 PM »
SCAT! Just make sure it doesn't look like shit  ;)

Well played, good sir. :P
2
Other Projects / Re: More Random 3D Stuff
« Last post by White Claw on Today at 08:02:56 PM »
Thanks for the warm welcome. :)

Since you asked...Here are a couple cargo truck concepts. The first is as near as I can figure from the videos (just the front end without the cargo bay). The second is a more rounded concept.





3
Outpost 2 Programming & Development / Re: Decompiling
« Last post by Sirbomber on Today at 02:50:33 PM »
Has anyone ever tried to decompile op2 and in that way maybe get a close resemblence to what the source code was?

Short answer: Yes.  It's highly impractical.  To give you an idea, it took someone with decades of experience several months to decompile one of the demo missions that play out if you idle on the main menu.
4
Outpost 2 Programming & Development / Decompiling
« Last post by Exoduz on Today at 01:39:34 PM »
Has anyone ever tried to decompile op2 and in that way maybe get a close resemblence to what the source code was?

I have decompiled one of the dlls, and am wondering if it is correct c++ lang or not, and if it would be able to compile back and be playable?

IŽll add what i got from cep1.dll

please do check and see if it would be usefull, and if so then i can decompile the rest of the game.
i tried decompiling the exe too and got a shitload of code...

due to limits of 20000 characters in message i could only add part of what i got from dll, but i put it in a txt if you want to examine it closer!

Code: [Select]
/*
 * ?CreateBeacon@TethysGame@@SIHW4map_id@@HHHHH@Z
 * public: static int __fastcall TethysGame::CreateBeacon(enum map_id,int,int,int,int,int)
 */
int32_t CreateBeacon_TethysGame_SIHW4map_id_HHHHH_Z = 0xd5ba;

uint32_t fun_11001de0(int32_t ecx, int32_t a2, int32_t a3, int32_t a4, int32_t a5) {
    uint32_t eax6;
    int32_t eax7;
    int32_t eax8;
    uint32_t eax9;
    int32_t eax10;
    uint32_t edx11;

    eax6 = eax7 - (eax8 + reinterpret_cast<uint1_t>(eax9 < eax10 + reinterpret_cast<uint1_t>(edx11 < 1))) & 2;
    switch (ecx) {
        addr_0x11001fdd_3:
    default:
        return eax6;
    case 0:
        CreateBeacon_TethysGame_SIHW4map_id_HHHHH_Z(81);
        goto 4;
    case 1:
        CreateBeacon_TethysGame_SIHW4map_id_HHHHH_Z(81);
        goto 34;
    case 2:
        CreateBeacon_TethysGame_SIHW4map_id_HHHHH_Z(81);
        goto 0x8e;
    case 3:
        CreateBeacon_TethysGame_SIHW4map_id_HHHHH_Z(81);
        goto 94;
    case 4:
        CreateBeacon_TethysGame_SIHW4map_id_HHHHH_Z(81);
        goto 18;
    case 5:
        CreateBeacon_TethysGame_SIHW4map_id_HHHHH_Z(81);
        goto 66;
    case 6:
        CreateBeacon_TethysGame_SIHW4map_id_HHHHH_Z(81);
        goto 0x71;
    case 7:
        CreateBeacon_TethysGame_SIHW4map_id_HHHHH_Z(81);
        goto 72;
    case 8:
        CreateBeacon_TethysGame_SIHW4map_id_HHHHH_Z(81);
        goto 0x9d;
    case 9:
        CreateBeacon_TethysGame_SIHW4map_id_HHHHH_Z(81);
        goto 0xd7;
    case 10:
        CreateBeacon_TethysGame_SIHW4map_id_HHHHH_Z(81);
        goto 0x9b;
    case 11:
        CreateBeacon_TethysGame_SIHW4map_id_HHHHH_Z(81);
        goto 0xbf;
    case 12:
        CreateBeacon_TethysGame_SIHW4map_id_HHHHH_Z(81);
        goto 0xc6;
    case 13:
        CreateBeacon_TethysGame_SIHW4map_id_HHHHH_Z(81);
        goto 0xed;
    case 14:
        CreateBeacon_TethysGame_SIHW4map_id_HHHHH_Z(81);
        goto 0xe5;
    case 15:
        CreateBeacon_TethysGame_SIHW4map_id_HHHHH_Z(81);
        goto 0xe3;
    case 16:
        CreateBeacon_TethysGame_SIHW4map_id_HHHHH_Z(81);
        goto 0xbe;
    case 17:
        CreateBeacon_TethysGame_SIHW4map_id_HHHHH_Z(81);
        goto 61;
    case 18:
        eax6 = reinterpret_cast<uint32_t>(CreateBeacon_TethysGame_SIHW4map_id_HHHHH_Z(81, 87, 0, eax6, 0xff));
        goto addr_0x11001fdd_3;
    }
}

void fun_11001c70(int32_t ecx, int32_t a2, int32_t a3, int32_t a4, int32_t a5) {
    switch (ecx) {
        addr_0x11001db3_3:
    default:
        return;
    case 0:
        CreateBeacon_TethysGame_SIHW4map_id_HHHHH_Z(81);
        goto 0xcf;
    case 1:
        CreateBeacon_TethysGame_SIHW4map_id_HHHHH_Z(81);
        goto 0xdf;
    case 2:
        CreateBeacon_TethysGame_SIHW4map_id_HHHHH_Z(81);
        goto 0xe5;
    case 3:
        CreateBeacon_TethysGame_SIHW4map_id_HHHHH_Z(81);
        goto 0xfb;
    case 4:
        CreateBeacon_TethysGame_SIHW4map_id_HHHHH_Z(81);
        goto 0xfb;
    case 5:
        CreateBeacon_TethysGame_SIHW4map_id_HHHHH_Z(81);
        goto 0xdd;
    case 6:
        CreateBeacon_TethysGame_SIHW4map_id_HHHHH_Z(81);
        goto 0xf6;
    case 7:
        CreateBeacon_TethysGame_SIHW4map_id_HHHHH_Z(81);
        goto 0xe9;
    case 8:
        CreateBeacon_TethysGame_SIHW4map_id_HHHHH_Z(81);
        goto 0xe9;
    case 9:
        CreateBeacon_TethysGame_SIHW4map_id_HHHHH_Z(81);
        goto 0xd7;
    case 10:
        CreateBeacon_TethysGame_SIHW4map_id_HHHHH_Z(81, 0xc9, 1, 2, 0xff);
        goto addr_0x11001db3_3;
    }
}

void fun_11001af0(int32_t ecx, int32_t a2, int32_t a3, int32_t a4, int32_t a5) {
    int32_t edx6;

    switch (ecx) {
        addr_0x11001c31_3:
    default:
        return;
    case 0:
        CreateBeacon_TethysGame_SIHW4map_id_HHHHH_Z(81);
        goto 0xa4;
    case 1:
        CreateBeacon_TethysGame_SIHW4map_id_HHHHH_Z(81);
        goto 0xbc;
    case 2:
        CreateBeacon_TethysGame_SIHW4map_id_HHHHH_Z(81);
        goto 0x87;
    case 3:
        CreateBeacon_TethysGame_SIHW4map_id_HHHHH_Z(81);
        goto 0x80;
    case 4:
        CreateBeacon_TethysGame_SIHW4map_id_HHHHH_Z(81);
        goto 0x9b;
    case 5:
        CreateBeacon_TethysGame_SIHW4map_id_HHHHH_Z(81);
        goto 78;
    case 6:
        CreateBeacon_TethysGame_SIHW4map_id_HHHHH_Z(81);
        goto 27;
    case 7:
        CreateBeacon_TethysGame_SIHW4map_id_HHHHH_Z(81);
        goto 12;
    case 8:
        CreateBeacon_TethysGame_SIHW4map_id_HHHHH_Z(81);
        goto 17;
    case 9:
        CreateBeacon_TethysGame_SIHW4map_id_HHHHH_Z(81);
        goto 55;
    case 10:
        CreateBeacon_TethysGame_SIHW4map_id_HHHHH_Z(81);
        goto 74;
    case 11:
        CreateBeacon_TethysGame_SIHW4map_id_HHHHH_Z(81, 0xf7, edx6, 1, 0xff);
        goto addr_0x11001c31_3;
    }
}

void fun_11001930(int32_t ecx, int32_t a2, int32_t a3, int32_t a4, int32_t a5, int32_t a6) {
    int32_t edx7;
    int32_t edx8;
    int32_t edx9;
    int32_t edx10;
    int32_t edx11;
    int32_t edx12;
    int32_t edx13;
    int32_t edx14;
    int32_t edx15;
    int32_t edx16;
    int32_t edx17;
    int32_t edx18;

    switch (ecx) {
        addr_0x11001ab7_3:
    default:
        return;
    case 0:
        CreateBeacon_TethysGame_SIHW4map_id_HHHHH_Z(81);
        goto edx7;
    case 1:
        CreateBeacon_TethysGame_SIHW4map_id_HHHHH_Z(81);
        goto edx8;
    case 2:
        CreateBeacon_TethysGame_SIHW4map_id_HHHHH_Z(81);
        goto edx9;
    case 3:
        CreateBeacon_TethysGame_SIHW4map_id_HHHHH_Z(81);
        goto edx10;
    case 4:
        CreateBeacon_TethysGame_SIHW4map_id_HHHHH_Z(81);
        goto edx11;
    case 5:
        CreateBeacon_TethysGame_SIHW4map_id_HHHHH_Z(81);
        goto edx12;
    case 6:
        CreateBeacon_TethysGame_SIHW4map_id_HHHHH_Z(81);
        goto edx13;
    case 7:
        CreateBeacon_TethysGame_SIHW4map_id_HHHHH_Z(81);
        goto edx14;
    case 8:
        CreateBeacon_TethysGame_SIHW4map_id_HHHHH_Z(81);
        goto edx15;
    case 9:
        CreateBeacon_TethysGame_SIHW4map_id_HHHHH_Z(81);
        goto edx16;
    case 10:
        CreateBeacon_TethysGame_SIHW4map_id_HHHHH_Z(81);
        goto edx17;
    case 11:
        CreateBeacon_TethysGame_SIHW4map_id_HHHHH_Z(81, 0x8c, edx18, a2, 0xff);
        goto addr_0x11001ab7_3;
    }
}

struct s0 {
    signed char[12] pad12;
    int32_t f12;
    uint32_t f16;
    int32_t f20;
};

/* ?Player@@3PAV_Player@@A */
struct s0* Player_3PAV_Player_A = reinterpret_cast<struct s0*>(0xd4ba);

/*
 * ?Difficulty@_Player@@QBEHXZ
 * public: int __thiscall _Player::Difficulty(void)const
 */
int32_t Difficulty__Player_QBEHXZ = 0xd636;

/*
 * ?GetRand@TethysGame@@SIHH@Z
 * public: static int __fastcall TethysGame::GetRand(int)
 */
int32_t GetRand_TethysGame_SIHH_Z = 0xd696;

void fun_11002030(struct s0* ecx, int32_t a2, int32_t a3, int32_t a4, int32_t a5) {
    struct s0* ecx6;
    int32_t edi7;
    int32_t esi8;
    int32_t eax9;
    int32_t esi10;
    int32_t edi11;
    int32_t eax12;
    int32_t eax13;
    int32_t eax14;
    int32_t eax15;
    int32_t eax16;
    int32_t eax17;
    int32_t eax18;
    int32_t eax19;
    int32_t eax20;
    int32_t eax21;
    int32_t eax22;
    int32_t eax23;
    int32_t eax24;
    int32_t eax25;

5
Outpost 2 Programming & Development / Re: Outpost 2 art
« Last post by Exoduz on Today at 03:25:56 AM »
Would there be a way to change op2 to read other  types of palettes with higher bit depth?
Or do we need the whole op2 source code for that?
Or can we use a higher bit with modifying the prt file only?
6
Projects / Re: OP2MapImager Development
« Last post by Hooman on Today at 03:06:29 AM »
I was just doing some reading on this and found some interesting stuff. Seems there are lossy pre-processors that take PNG encoding into consideration. It modifies the image before being saved as PNG, so the compressor is able to handle it better and compress to smaller images. The actual PNG encoding process itself is still loseless, but the pre-rprocessing step done before saving is lossy. That would make it pretty similar to JPEG, though with a 2-step process.

On a related note, if you do many edit/save cycles with a lossy encoder, there is generational loss. For a video: JPEG generation loss.
7
Other Projects / Re: More Random 3D Stuff
« Last post by Hooman on Today at 02:13:24 AM »
Yes, I think the next priorities should be Cargo Truck, Convec, and Tiger. Nobody likes Panthers :P

Welcome back
8
Outpost 2 Programming & Development / Re: Outpost 2 art
« Last post by Hooman on Today at 01:47:36 AM »
Quote from: leeor_net
Quote from: Exoduz
I think it would be fun to play a HD op2 of some sort :)
I can agree with that. :D
leeor_net!  ::)

Outpost 2 uses palettized images. One of the reasons is the way day/night is handled. The game will create several pre-scaled copies of the palette, with different light intensities. When it draws the graphics, it looks up which palette to use based on the day/night light intensity. The actual image itself is not modified, just the palette used to display that image.

Another complication is the player colors drawn on units. This is again done through palette trickery.

I believe the tile sets check the bit depth, so a 24 bit image would fail to load. I think a 16 bit image might load, but assumptions about the use of a palette could cause a crash. For the sprites, I don't believe it stores a bit depth so much as an image type, which has an implied bit depth. Shadow images would have a bit depth of 1. Normal images would have a bit depth of 8.

Total maps colors may exceed 256 colors (8 bits), since each tileset has it's own palette, and a map consists of multiple tilesets. You can break tiles up into tilesets based on common colors, and which tiles can share a palette.

The total colors in one frame of animation may exceed 256 colors (8 bits), due to the game using composite images. A vehicle might consist of separate images for the wheels/tracks, the chasis, the turret, and the shadow(s). Similarly, buildings would have separate images for the dock, the building itself, and the shadow.

The sprite image data is split between OP2_ART.BMP and OP2_ART.PRT (stored in maps.vol). The BMP file is structured like a regular BMP file, but with invalid header fields and is not viewable with normal bitmap editing software. It contains a dummy header, followed by all bitmap data for all game graphics, appended one after another in the file. Since the interpretation of the bitmap data depends on header info, and each image has different header parameters, there is no way to interpret this file with one single header and get sensible data out of it. It is simply the raw bits, interpreted according to external info.

The PRT file contains the info needed to interpret the bitmap data. It starts with an array of palettes. Then it contains an array of header information (width, height, bit depth, palette index), with offsets into the BMP file for the chunk of data each header describes. It also contains an array of animation info, where each animation has an array of frames, and each frame references several component images, as described above.


This is the nature of the images you would be editing. The game only understand this format. It would likely by done by extracting and editing numbered images. When those images are re-inserted, they would be composed into frames, which would be placed in animation sequences.

The easiest starter project would be to change just the images without modifying width, height, bit depth, or how frames or animation sequences are composed. That could even be done by careful copy/paste with a hex editor. You could copy the bitmap data (excluding the header) from an extracted edited bitmap, back into OP2_ART.BMP, without needing to modify OP2_ART.PRT, assuming you figured out the right size and offsets for the copy/paste. The image extraction software might be able to help figure out the paste offset.

More advanced editing will mean re-writing the PRT data. Do-able, but some tooling would need to be developed to make that easy.


@Sirbomber: lol
Looks like some bad re-pack offsets
9
General Interest / Re: Remote Pair Programming
« Last post by Vagabond on Today at 01:39:11 AM »
Hooman,

Yes, the OP2MapImager is functioning! Right now I am currently looking through your VOL Decompress code. It looks like I can adopt it without too much trouble to allow the OP2MapImager to search VOL archives in a directory for the given map and wells. I can structure the program to look first in the directory itself and then through the vol files until a map or well with the given name is found. This way a loose file in the directory takes precedent over a file archived in a VOL.

I'll want to modify your VOL decompress code a little to allow sending a list of all filenames within the VOL among other things. How sensitive are you to me mucking around in the VOL decompress code? I would like to make a branch preserving what you have stable. (I've never done this in SVN, so hopefully fairly straightforward).

The other piece is loading the non-standard Outpost 2 TileSet BMPs into memory. I've designed a function within the MapImager class that accepts the raw bits instead of loading a file from the hard drive. I could use some help getting the BMPs into memory. Without help here, I will probably just distribute the modified BMP files with the application instead of hacking my way through the process.

Feel free to work on the MapImager as you see fit. I'm being good about uploading my progress regularly to SVN and checking for updates to keep from getting out of sync with any possible work you do.

Depending on where we want to draw the line on adding new features, the OP2MapImager should be ready for initial release within 2-3 weeks (hopefully????). There is still a lot of cleanup that should be done to the code.

I printed off some talking points about what D is supposed to be and an interview article with one of the 2 creators to read through. It is currently on the TIOBE index as number 22, 1.416% (https://www.tiobe.com/tiobe-index/). Just starting to warm up to trying something in the language and you are already off to Ruby on Rails!

Anyways, I will probably not be available again for pair programming until around middle of August. Once we are in August or my schedule changes earlier then expected, I will see where everyone stands and what the interests are.
10
Other Projects / Re: More Random 3D Stuff
« Last post by Vagabond on Today at 01:06:41 AM »
White Claw,

Welcome back after the move!

I'd go with the cargo truck since it is in several videos and there is lots of concept art with different views in it.

-Brett
Pages: [1] 2 3 ... 10