[skip all navigation]

Starcraft Tileset Ripping, My program read but does not flip tile when needed

Creator: Fortis
Time: Nov 6 2011, 9:46 am

Post #1     Fortis Nov 6 2011, 9:46 am

[Avatar]
offlinecontact
Rank: Member
Found the problem. My bitshifting operations were wrong. Edited the problem code in the post but haven't updated the source cause I'm lazy :bleh:

Hello. I bough a new phone recently, an android one, and have decided to port starcraft to it. It will be a nice little learning experience. So I want the port to use the original files. (Graphics, Tilesets, scripts, etc.) with some files removed to save space. I read up on internet about how the tiles are stored.

Quote
VX4: MegaTile Graphics
This file contains references to the MiniTile images and states if they are flipped.
Struct size: 32 bytes (16 shorts)
Max ref. ID: 65535

Offset Type Name Description
+0x00 16xSHORT Images The first bit (bit0) is the horizontal flip flag, the remaining 15 bits (bit1-15) are the VR4 index.

Like the above states I use the C++ code
Quote
index = megatile.images[mit]/2;
flip = !megatile.images[mit] >> 15;//FoUND problem this should be << 15!!!!!
minitile = miniTiles[index];
And it works, but the flip isn't always read correctly. Is it something I did wrong or is the information incorrect?
This is my source
Leaving the source. Feel free to use it :) .
This post was edited 5 times, last edit by Fortis: Nov 6 2011, 11:09 am.

Top

Post #2     Sacrieur Nov 11 2011, 8:24 am

[Avatar]
offlinecontact
Rank: Regular
Fascinating, it seems you're adept at this sort of work you're doing.

Anything else you've come across that is particularly note worthy?

× ÷ ± · ∫ ƒ | ⅛ ¼ ⅓ ⅜ ½ ⅝ ⅔ ¾ ⅞ | π φ ∞ | ≡ ≈ ≥ ≤ ∴ ¬ ∩ Ø | √ ª ⁿ º ¹ ² ³ | ✓ ✗ | א
α β Γγ ∆∂ ε ζ η Θθ Ιι κ Λλ μ Ξξ Π ρ Σσς τ υ Φ Ψψ Ωω
(user posted image) (user posted image)
Top

Post #3     Tempz Nov 11 2011, 11:07 pm

[Avatar]
What a caterpillar calls death a master calls a butterfly.
offlinecontact
Rank: Regular
Plenty of people have tried to port starcraft

(sc lite = Ds starcraft homebrew which i've tried and sucks)
(sc 64 = n64 port)

Trust me you can never really capture the spirit of starcraft on a phone since its too basic. Iphone/ipad maybe but thats it.

Truth hurts. Maybe not as much as jumping on a bicycle with a seat missing, but it hurts.
- Drebin (Naked Gun 2 1/2)
Pm me for terrain requests (Jungle mostly)
(user posted image)
Top
0 members in this topic (italic members are currently writing a reply): None
+ guest(s)


[01:09 pm]
TF- -- mods just can't catch a break
[01:00 pm]
Wing Zero -- Rai I never said I wanted it to be a small map. It should be bigger then rift.
[12:41 pm]
Roy -- I think Kaias' goal is to have save files generated that you could use natively in SC, not to use a modded game to load data.
[11:43 am]
TF- -- banks in sc1 y'all
[10:35 am]
NudeRaider -- teamfight gangbang ftw. Would do it all night.
[05:19 am]
Raitaki -- Teamfight gangbang 24/7? :\
[05:19 am]
Raitaki -- Why do you want it as 5v5 or 6v6 anyway? On such a small map?
Please log in to shout.