diff options
-rw-r--r-- | files/demo/title/titledemo/.gitignore | 2 | ||||
-rw-r--r-- | files/demo/title/titledemo/narc_0008.NSCR | bin | 1572 -> 0 bytes | |||
-rw-r--r-- | files/demo/title/titledemo/narc_0008_map.json | 32 | ||||
-rw-r--r-- | files/demo/title/titledemo/narc_0008_tileset.json | 14 | ||||
-rw-r--r-- | files/demo/title/titledemo/narc_0012.NSCR | bin | 1572 -> 0 bytes | |||
-rw-r--r-- | files/demo/title/titledemo/narc_0012_map.json | 32 | ||||
-rw-r--r-- | files/demo/title/titledemo/narc_0012_tileset.json | 14 | ||||
-rw-r--r-- | files/demo/title/titledemo/narc_0017.NSCR | bin | 1572 -> 0 bytes | |||
-rw-r--r-- | files/demo/title/titledemo/narc_0017_map.json | 44 | ||||
-rw-r--r-- | files/demo/title/titledemo/narc_0017_tileset.json | 14 | ||||
-rw-r--r-- | filesystem.mk | 5 | ||||
-rw-r--r-- | graphics_rules.mk | 5 | ||||
-rw-r--r-- | tools/nitrogfx/json.c | 13 |
13 files changed, 171 insertions, 4 deletions
diff --git a/files/demo/title/titledemo/.gitignore b/files/demo/title/titledemo/.gitignore index 6dee0d75..78663883 100644 --- a/files/demo/title/titledemo/.gitignore +++ b/files/demo/title/titledemo/.gitignore @@ -1,3 +1,3 @@ -narc_0000.NSCR +*.NSCR *.NCLR *.NCGR diff --git a/files/demo/title/titledemo/narc_0008.NSCR b/files/demo/title/titledemo/narc_0008.NSCR Binary files differdeleted file mode 100644 index 28f4f6c6..00000000 --- a/files/demo/title/titledemo/narc_0008.NSCR +++ /dev/null diff --git a/files/demo/title/titledemo/narc_0008_map.json b/files/demo/title/titledemo/narc_0008_map.json new file mode 100644 index 00000000..b5dd26ce --- /dev/null +++ b/files/demo/title/titledemo/narc_0008_map.json @@ -0,0 +1,32 @@ +{ "compressionlevel":-1, + "height":24, + "infinite":false, + "layers":[ + { + "data":[3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741832, 1073741831, 1073741831, 1073741831, 1073741831, 1073741831, 1073741831, 1073741831, 1073741831, 1073741831, 1073741831, 1073741831, 1073741831, 1073741831, 1073741831, 1073741831, 1073741831, 1073741831, 1073741831, 1073741831, 1073741831, 1073741831, 1073741831, 1073741831, 1073741831, 1073741831, 1073741831, 1073741831, 1073741831, 1073741831, 1073741831, 1073741831, 1073741831, 1073741830, 1073741830, 1073741830, 1073741830, 1073741830, 1073741830, 1073741830, 1073741830, 1073741830, 1073741830, 1073741830, 1073741830, 1073741830, 1073741830, 1073741830, 1073741830, 1073741830, 1073741830, 1073741830, 1073741830, 1073741830, 1073741830, 1073741830, 1073741830, 1073741830, 1073741830, 1073741830, 1073741830, 1073741830, 1073741830, 1073741830, 1073741830, 1073741829, 1073741829, 1073741829, 1073741829, 1073741829, 1073741829, 1073741829, 1073741829, 1073741829, 1073741829, 1073741829, 1073741829, 1073741829, 1073741829, 1073741829, 1073741829, 1073741829, 1073741829, 1073741829, 1073741829, 1073741829, 1073741829, 1073741829, 1073741829, 1073741829, 1073741829, 1073741829, 1073741829, 1073741829, 1073741829, 1073741829, 1073741829, 1073741828, 1073741828, 1073741828, 1073741828, 1073741828, 1073741828, 1073741828, 1073741828, 1073741828, 1073741828, 1073741828, 1073741828, 1073741828, 1073741828, 1073741828, 1073741828, 1073741828, 1073741828, 1073741828, 1073741828, 1073741828, 1073741828, 1073741828, 1073741828, 1073741828, 1073741828, 1073741828, 1073741828, 1073741828, 1073741828, 1073741828, 1073741828, 1073741827, 1073741827, 1073741827, 1073741827, 1073741827, 1073741827, 1073741827, 1073741827, 1073741827, 1073741827, 1073741827, 1073741827, 1073741827, 1073741827, 1073741827, 1073741827, 1073741827, 1073741827, 1073741827, 1073741827, 1073741827, 1073741827, 1073741827, 1073741827, 1073741827, 1073741827, 1073741827, 1073741827, 1073741827, 1073741827, 1073741827, 1073741827, 1073741826, 1073741826, 1073741826, 1073741826, 1073741826, 1073741826, 1073741826, 1073741826, 1073741826, 1073741826, 1073741826, 1073741826, 1073741826, 1073741826, 1073741826, 1073741826, 1073741826, 1073741826, 1073741826, 1073741826, 1073741826, 1073741826, 1073741826, 1073741826, 1073741826, 1073741826, 1073741826, 1073741826, 1073741826, 1073741826, 1073741826, 1073741826], + "height":24, + "id":1, + "name":"Tile Layer 1", + "opacity":1, + "type":"tilelayer", + "visible":true, + "width":32, + "x":0, + "y":0 + }], + "nextlayerid":2, + "nextobjectid":1, + "orientation":"orthogonal", + "renderorder":"right-down", + "tiledversion":"1.4.3", + "tileheight":8, + "tilesets":[ + { + "firstgid":1, + "source":"narc_0008_tileset.json" + }], + "tilewidth":8, + "type":"map", + "version":1.4, + "width":32 +}
\ No newline at end of file diff --git a/files/demo/title/titledemo/narc_0008_tileset.json b/files/demo/title/titledemo/narc_0008_tileset.json new file mode 100644 index 00000000..ab2d9989 --- /dev/null +++ b/files/demo/title/titledemo/narc_0008_tileset.json @@ -0,0 +1,14 @@ +{ "columns":8, + "image":"narc_0007.png", + "imageheight":8, + "imagewidth":64, + "margin":0, + "name":"narc_0007", + "spacing":0, + "tilecount":8, + "tiledversion":"1.4.3", + "tileheight":8, + "tilewidth":8, + "type":"tileset", + "version":1.4 +}
\ No newline at end of file diff --git a/files/demo/title/titledemo/narc_0012.NSCR b/files/demo/title/titledemo/narc_0012.NSCR Binary files differdeleted file mode 100644 index c08a3247..00000000 --- a/files/demo/title/titledemo/narc_0012.NSCR +++ /dev/null diff --git a/files/demo/title/titledemo/narc_0012_map.json b/files/demo/title/titledemo/narc_0012_map.json new file mode 100644 index 00000000..6be67eef --- /dev/null +++ b/files/demo/title/titledemo/narc_0012_map.json @@ -0,0 +1,32 @@ +{ "compressionlevel":-1, + "height":24, + "infinite":false, + "layers":[ + { + "data":[2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 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"opacity":1, + "type":"tilelayer", + "visible":true, + "width":32, + "x":0, + "y":0 + }], + "nextlayerid":2, + "nextobjectid":1, + "orientation":"orthogonal", + "renderorder":"right-down", + "tiledversion":"1.4.3", + "tileheight":8, + "tilesets":[ + { + "firstgid":1, + "source":"narc_0012_tileset.json" + }], + "tilewidth":8, + "type":"map", + "version":1.4, + "width":32 +}
\ No newline at end of file diff --git a/files/demo/title/titledemo/narc_0012_tileset.json b/files/demo/title/titledemo/narc_0012_tileset.json new file mode 100644 index 00000000..fee292d7 --- /dev/null +++ b/files/demo/title/titledemo/narc_0012_tileset.json @@ -0,0 +1,14 @@ +{ "columns":8, + "image":"narc_0011.png", + "imageheight":8, + "imagewidth":64, + "margin":0, + "name":"narc_0011", + "spacing":0, + "tilecount":8, + "tiledversion":"1.4.3", + "tileheight":8, + "tilewidth":8, + "type":"tileset", + "version":1.4 +}
\ No newline at end of file diff --git a/files/demo/title/titledemo/narc_0017.NSCR b/files/demo/title/titledemo/narc_0017.NSCR Binary files differdeleted file mode 100644 index c308cd91..00000000 --- a/files/demo/title/titledemo/narc_0017.NSCR +++ /dev/null diff --git a/files/demo/title/titledemo/narc_0017_map.json b/files/demo/title/titledemo/narc_0017_map.json new file mode 100644 index 00000000..6f09ac3d --- /dev/null +++ b/files/demo/title/titledemo/narc_0017_map.json @@ -0,0 +1,44 @@ +{ "compressionlevel":-1, + "height":24, + "infinite":false, + "layers":[ + { + "data":[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 0, 0, 0, 0, 0, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 0, 0, 0, 0], + "height":24, + "id":2, + "name":"Tile Layer 2", + "opacity":1, + "type":"tilelayer", + "visible":true, + "width":32, + "x":0, + "y":0 + }], + "nextlayerid":3, + "nextobjectid":1, + "orientation":"orthogonal", + "renderorder":"right-down", + "tiledversion":"1.4.3", + "tileheight":8, + "tilesets":[ + { + "firstgid":1, + "source":"narc_0017_tileset.json" + }], + "tilewidth":8, + "type":"map", + "version":1.4, + "width":32 +}
\ No newline at end of file diff --git a/files/demo/title/titledemo/narc_0017_tileset.json b/files/demo/title/titledemo/narc_0017_tileset.json new file mode 100644 index 00000000..f1b0b682 --- /dev/null +++ b/files/demo/title/titledemo/narc_0017_tileset.json @@ -0,0 +1,14 @@ +{ "columns":32, + "image":"narc_0015.png", + "imageheight":256, + "imagewidth":256, + "margin":0, + "name":"narc_0015", + "spacing":0, + "tilecount":1024, + "tiledversion":"1.4.3", + "tileheight":8, + "tilewidth":8, + "type":"tileset", + "version":1.4 +}
\ No newline at end of file diff --git a/filesystem.mk b/filesystem.mk index 8f78dee6..8aaff73f 100644 --- a/filesystem.mk +++ b/filesystem.mk @@ -2296,13 +2296,16 @@ files/demo/title/titledemo.narc: \ files/demo/title/titledemo/narc_0003.NCGR \ files/demo/title/titledemo/narc_0003.NCLR \ files/demo/title/titledemo/narc_0007.NCGR \ + files/demo/title/titledemo/narc_0008.NSCR \ files/demo/title/titledemo/narc_0009.NCLR \ files/demo/title/titledemo/narc_0010.NCLR \ files/demo/title/titledemo/narc_0011.NCGR \ + files/demo/title/titledemo/narc_0012.NSCR \ files/demo/title/titledemo/narc_0013.NCLR \ files/demo/title/titledemo/narc_0014.NCLR \ files/demo/title/titledemo/narc_0015.NCGR \ - files/demo/title/titledemo/narc_0016.NCLR + files/demo/title/titledemo/narc_0016.NCLR \ + files/demo/title/titledemo/narc_0017.NSCR files/poketool/trgra/trbgra.narc: \ files/poketool/trgra/trbgra/narc_0000.NCGR \ diff --git a/graphics_rules.mk b/graphics_rules.mk index bd5c187d..dd2525f1 100644 --- a/graphics_rules.mk +++ b/graphics_rules.mk @@ -882,4 +882,7 @@ NCLR_CLEAN_LIST := files/application/wifi_earth/wifi_earth/narc_0006.NCLR \ NCER_CLEAN_LIST := files/poketool/icongra/poke_icon/narc_0002.NCER -NSCR_CLEAN_LIST := files/demo/title/titledemo/narc_0000.NSCR +NSCR_CLEAN_LIST := files/demo/title/titledemo/narc_0000.NSCR \ + files/demo/title/titledemo/narc_0008.NSCR \ + files/demo/title/titledemo/narc_0012.NSCR \ + files/demo/title/titledemo/narc_0017.NSCR diff --git a/tools/nitrogfx/json.c b/tools/nitrogfx/json.c index fa9f9e5e..7804a2ba 100644 --- a/tools/nitrogfx/json.c +++ b/tools/nitrogfx/json.c @@ -174,6 +174,7 @@ struct JsonToScreenOptions *ParseNSCRJson(char *path) cJSON *layer = NULL; cJSON *layers = cJSON_GetObjectItemCaseSensitive(json, "layers"); + int palette = 0; cJSON_ArrayForEach(layer, layers) { cJSON *tile = NULL; @@ -181,9 +182,19 @@ struct JsonToScreenOptions *ParseNSCRJson(char *path) int i = 0; cJSON_ArrayForEach(tile, data) { - options->data[i] = (short)(GetInt(tile) - 1); //TODO horizontal and vertical flips + int tileInt = GetInt(tile) - 1; + if (tileInt != -1) + { + bool vFlip = tileInt >> 30; + bool hFlip = tileInt >> 31; + tileInt |= vFlip << 11; + tileInt |= hFlip << 10; + tileInt |= palette << 12; + options->data[i] = (short) (tileInt & 0xFFFF); + } i++; } + palette++; } cJSON_Delete(json); |