Commit Graph

209 Commits

Author SHA1 Message Date
Nathan Fulton
f2b0fc4136 Add Android assets htdata2432 symlink 2017-10-21 20:46:52 -04:00
Nathan Fulton
dae13feb99 Remove Android assets htdata832.pdb symlink 2017-10-21 20:46:51 -04:00
Nathan Fulton
f61cb69a3b Adjust range of smoke loops
art2432 has more frames in the smoke animations. Hence range for the amount of loops for the animation was decreased.
2017-10-21 20:44:24 -04:00
Nathan Fulton
9cd0c1eca0 Add missing asserts in Simulation::OneTimeInit() 2017-10-21 20:44:23 -04:00
Nathan Fulton
8a872bad5e Update use of FillTo() in ButtonControl::OnPaint() 2017-10-21 20:42:34 -04:00
Nathan Fulton
2105ceff19 Add todo for FancyTextCore 2017-10-21 20:42:33 -04:00
Nathan Fulton
489399dfb4 Rotate miner south west to enter processor
art2432 processor faces more towards the south west compared to the art824 processor which faced basically south. The coordinates used for the fakeMiner animation have been modified to compensate for this and the miner now rotates to the south west before entering.
2017-10-21 20:42:32 -04:00
Nathan Fulton
d64d09c1ad Update hudbar for art2432 2017-10-21 20:42:32 -04:00
Nathan Fulton
467418f089 Help.cpp PaintChunk() use GetColor() 2017-10-21 20:42:31 -04:00
Nathan Fulton
b4e88ab312 SceneryGob::SaveState use Bitmap::GetFileName() 2017-10-21 20:42:30 -04:00
Nathan Fulton
47199e390f FogMap walls.anir -> wall.anir
The animation data for walls in the art2432 repo uses "wall" instead of "walls"
2017-10-21 20:42:29 -04:00
Nathan Fulton
c564578a70 Ecom cache tbm pointer 2017-10-21 20:42:28 -04:00
Nathan Fulton
3ed85e5813 Game::ClearDisplay() null check gaclrFixed
gaclrFixed may be null if a game database is not found. Calling
GetColor() in this case may result in a crash.
2017-10-21 20:42:27 -04:00
Nathan Fulton
05f1755637 Add max FPS to game options 2017-10-21 20:41:49 -04:00
Nathan Fulton
7932f4cc00 Implement FPS cap 2017-10-21 20:41:48 -04:00
Nathan Fulton
aa342e4b7f virtual GetIdleCountdown()
GetIdleCountdown() is now virtual as art2432 needs certain units to have different idle countdowns
2017-10-21 20:41:47 -04:00
Nathan Fulton
278aecfb70 Show walls on mini-map 2017-10-21 20:41:46 -04:00
Nathan Fulton
8d2da3075c Read RGBA mini-map data 2017-10-21 20:41:45 -04:00
Nathan Fulton
00a92e2f6c Animation read updated anir structure
- StripData count is now dword
- Added chars for bitmap and bitmap2 name
- ibm and ibm2 are now words

acrunch max structure was updated in commit 33420b0970728fde92292c525e588cfbdffd7373
2017-10-21 20:40:28 -04:00
Nathan Fulton
119cf11f08 Add 24bpp color array
Change Color to dword and add gaclr24bpp
2017-10-21 20:40:28 -04:00
Nathan Fulton
57c6e26ce2 Read RGBA TileMap data 2017-10-21 20:40:27 -04:00
Nathan Fulton
9662079334 Implement direction16 for mobile units 2017-10-21 20:40:26 -04:00
Nathan Fulton
3f83856115 Update unit strip indices for art2432 2017-10-21 20:39:58 -04:00
Nathan Fulton
dfc9e088f8 Remove old palette code 2017-10-21 20:39:57 -04:00
Nathan Fulton
dfd1d63d1a gszPrefsFilename prefs.bin -> prefs.json 2017-10-21 20:39:13 -04:00
Nathan Fulton
71dd4eb5b5 Save preferences as json
Preferences have keys as defined in ht.h. These keys can be used to read/write preferences. Preferences are saved in a .json on the disk.
This is much easier to work with than the old presences binary structures as it doesn’t require preference versioning.
2017-10-21 20:36:37 -04:00
Nathan Fulton
122a2d198f Change gnScrollSpeed to float 2017-10-21 20:36:36 -04:00
Nathan Fulton
3ecad7c281 Accept the 2432 data directory 2017-10-21 20:36:35 -04:00
Nathan Fulton
fd31d33274 Android gszMainDataDir = NULL
Using NULL as the main data dir will tell the SDL API (the current host file I/O) to fallthough and read from the .apk assets. This is currently desirable in every existing case.
2017-10-21 20:29:54 -04:00
Nathan Fulton
84b4e0f6ba Implement Android HostHelper code for SdlPackFileReader
Needed for changes SdlPackFileReader changes in commit 61e081be5690202cae1e03d6e6cc89a3e94257b7
2017-10-21 20:28:33 -04:00
Nathan Fulton
6b9241fbc5 Add Android jni method for obtaining the AssetManager 2017-10-21 20:28:33 -04:00
Nathan Fulton
5d7e0ddf3c Update SdlPackFile I/O
SdlPackFile can now push and pop directories using host file I/O. This allows for reading from directories as though they were .pdbs (like the htdata2432 dir) while maintaining the pushed hierarchy. pdbs can still be used.
2017-10-21 20:28:32 -04:00
Nathan Fulton
2ef0ab5ae8 Implement host file I/O
Host file I/O API to read files from disk
2017-10-21 20:28:31 -04:00
Nathan Fulton
e02296b6ac Add utility scripts for font processing
fontmap.py:
Maps glyph images to characters via the file name notation and then outputs a font json

fontutils.py:
Contains functions and variables that are used by both fontmap.py and glyphpos.py

glyphpos.py:
Since the game now draws glyphs directly from their image, a glyph’s placement within its image is very important. glyphpos.py is a helper script to mass (re)position the glyphs within their images.
2017-10-21 20:28:30 -04:00
Nathan Fulton
4896fbe384 Read json fonts
A font.json maps characters to image file names. The Font class caches all the glyph images then draws the appropriate one(s) at blt time.
2017-10-21 20:28:29 -04:00
Nathan Fulton
97a84b8e27 Add texture atlas manager 2017-10-21 20:28:28 -04:00
Nathan Fulton
901a201a45 Refactor: ".tbm" -> ".png" 2017-10-21 20:28:27 -04:00
Nathan Fulton
0cd8cff9c2 Change HtBitmap references to TBitmap 2017-10-21 20:27:45 -04:00
Nathan Fulton
7fa189e3da Use CreateTBitmap()
Replace:
- GetSharedTBitmap()
- LoadRawBitmap()
- LoadTBitmap()
2017-10-21 20:27:44 -04:00
Nathan Fulton
da52f61897 Implement new TBitmap code
Texture bitmap, for storing information about images in texture atlases.
2017-10-21 20:27:24 -04:00
Nathan Fulton
bc8777e56e Implement new DibBitmap code
Implemented with SDL API
2017-10-21 20:27:23 -04:00
Nathan Fulton
de281e5fd7 Remove old bitmap code
- DibBitmap
- HtBitmap
- RawBitmap
- Tbitmap
2017-10-21 20:27:23 -04:00
Nathan Fulton
f7a4eb1d69 ht.h include yajl/wrapper/jsontypes.h 2017-10-21 20:27:05 -04:00
Nathan Fulton
16be766113 chooseserverform use yajl wrapper functions 2017-10-21 20:27:04 -04:00
Nathan Fulton
cb8c198a25 PackInfoManager support new json types
- JsonNumber
- JsonBool
2017-10-21 20:27:04 -04:00
Nathan Fulton
4a644e8f36 IndexLoader support new json types
- JsonNumber
- JsonBool
2017-10-21 20:26:49 -04:00
Nathan Fulton
5274dea626 server update to support new json types
- JsonNumber
- JsonBool
2017-10-21 20:26:48 -04:00
Nathan Fulton
5e46c58727 yajl wrapper support numbers and bools 2017-10-21 20:26:48 -04:00
Nathan Fulton
ff2249995d mcl don't throw exception "Couldn't find tile index!" 2017-10-21 20:26:26 -04:00
Nathan Fulton
36afa67e5f mcl write RGBA tile data
- Remove palette references
- Write tile data and mini-map pixels as RGBA
2017-10-21 20:26:25 -04:00