@@ -65,6 +65,9 @@ mode7.image = {}
6565--- @class mode7.imagetable
6666mode7 .imagetable = {}
6767
68+ --- @class mode7.tilemap
69+ mode7 .tilemap = {}
70+
6871--- @class mode7.array
6972mode7 .array = {}
7073
@@ -96,6 +99,18 @@ function mode7.world:_setCeilingFillColor(gray, alpha) end
9699--- @return integer alpha
97100function mode7 .world :_getCeilingFillColor () return 0 , 0 end
98101
102+ --- @param x integer
103+ --- @param y integer
104+ --- @return integer gray
105+ --- @return integer alpha
106+ function mode7 .world :_planeColorAt (x , y ) return 0 , 0 end
107+
108+ --- @param x integer
109+ --- @param y integer
110+ --- @return integer gray
111+ --- @return integer alpha
112+ function mode7 .world :_ceilingColorAt (x , y ) return 0 , 0 end
113+
99114--- @param width integer
100115--- @param height integer
101116--- @param gray integer
@@ -172,6 +187,30 @@ function mode7.world:setCeilingBitmap(bitmap) end
172187--- @return mode7.bitmap
173188function mode7 .world :getCeilingBitmap () return {} end
174189
190+ --- Sets a tilemap for the plane.
191+ ---
192+ --- https://risolvipro.github.io/playdate-mode7/Lua-API.html#def-world-setPlaneTilemap
193+ --- @param tilemap mode7.tilemap
194+ function mode7 .world :setPlaneTilemap (tilemap ) end
195+
196+ --- Gets the plane tilemap.
197+ ---
198+ --- https://risolvipro.github.io/playdate-mode7/Lua-API.html#def-world-getPlaneTilemap
199+ --- @return mode7.tilemap
200+ function mode7 .world :getPlaneTilemap () return {} end
201+
202+ --- Sets a tilemap for the ceiling.
203+ ---
204+ --- https://risolvipro.github.io/playdate-mode7/Lua-API.html#def-world-setCeilingTilemap
205+ --- @param tilemap mode7.tilemap
206+ function mode7 .world :setCeilingTilemap (tilemap ) end
207+
208+ --- Gets the ceiling tilemap.
209+ ---
210+ --- https://risolvipro.github.io/playdate-mode7/Lua-API.html#def-world-getCeilingTilemap
211+ --- @return mode7.tilemap
212+ function mode7 .world :getCeilingTilemap () return {} end
213+
175214--- Converts a world point to a display point. The z component of the returned value is 1 if the point is in front of the camera or -1 if the point is behind the camera.
176215---
177216--- https://risolvipro.github.io/playdate-mode7/Lua-API.html#def-world-worldToDisplayPoint
@@ -484,6 +523,13 @@ function mode7.background:getCenter() return 0, 0 end
484523--- @return mode7.bitmap
485524function mode7 .bitmap .loadPGM (path ) return {} end
486525
526+ --- Returns a copy of the bitmap. The mask, if it exists, is copied too.
527+ ---
528+ --- https://risolvipro.github.io/playdate-mode7/Lua-API.html#def-bitmap-copy
529+ --- @param bitmap mode7.bitmap
530+ --- @return mode7.bitmap
531+ function mode7 .bitmap :copy (bitmap ) return {} end
532+
487533--- Gets the bitmap size.
488534---
489535--- https://risolvipro.github.io/playdate-mode7/Lua-API.html#def-bitmap-getSize
@@ -683,6 +729,52 @@ function mode7.shader.radial:setInverted(inverted) end
683729--- @return boolean
684730function mode7 .shader .radial :getInverted () return false end
685731
732+ --- Creates new tilemap from world. tileWidth and tileHeight values must be a power of 2.
733+ ---
734+ --- https://risolvipro.github.io/playdate-mode7/Lua-API.html#def-world-newTilemap
735+ --- @param tileWidth number
736+ --- @param tileHeight number
737+ --- @return mode7.tilemap
738+ function mode7 .world :newTilemap (tileWidth , tileHeight ) return {} end
739+
740+ --- Sets a bitmap at the specified position. Row and column start at 0.
741+ ---
742+ --- https://risolvipro.github.io/playdate-mode7/Lua-API.html#def-tilemap-setBitmapAtPosition
743+ --- @param bitmap mode7.bitmap
744+ --- @param row number
745+ --- @param column number
746+ function mode7 .tilemap :setBitmapAtPosition (bitmap , row , column ) end
747+
748+ --- Sets a bitmap at the specified range (from start position to end position). Row and column start at 0, pass -1 as endRow or endColumn to express the highest row or column in the grid. For example, (0, 0, -1, -1) will set the bitmap to the entire grid.
749+ ---
750+ --- https://risolvipro.github.io/playdate-mode7/Lua-API.html#def-tilemap-setBitmapAtRange
751+ --- @param bitmap mode7.bitmap
752+ --- @param startRow number
753+ --- @param startColumn number
754+ --- @param endRow number
755+ --- @param endColumn number
756+ function mode7 .tilemap :setBitmapAtRange (bitmap , startRow , startColumn , endRow , endColumn ) end
757+
758+ --- Gets the bitmap at the specified position.
759+ ---
760+ --- https://risolvipro.github.io/playdate-mode7/Lua-API.html#def-tilemap-getBitmapAtPosition
761+ --- @param row number
762+ --- @param column number
763+ --- @return mode7.bitmap
764+ function mode7 .tilemap :getBitmapAtPosition (row , column ) return {} end
765+
766+ --- Sets a bitmap to be used for the out-of-bounds space.
767+ ---
768+ --- https://risolvipro.github.io/playdate-mode7/Lua-API.html#def-tilemap-setFillBitmap
769+ --- @param bitmap mode7.bitmap
770+ function mode7 .tilemap :setFillBitmap (bitmap ) end
771+
772+ --- Gets a bitmap to be used for the out-of-bounds space.
773+ ---
774+ --- https://risolvipro.github.io/playdate-mode7/Lua-API.html#def-tilemap-setFillBitmap
775+ --- @return mode7.bitmap
776+ function mode7 .tilemap :getFillBitmap () return {} end
777+
686778--- Resize the pool to the given size in bytes. We recommend to call this function only once.
687779---
688780--- https://risolvipro.github.io/playdate-mode7/Lua-API.html#def-pool-realloc
0 commit comments