Compare commits
	
		
			2 Commits
		
	
	
		
			2bdc3def74
			...
			087c834b25
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 087c834b25 | |||
| 79bdbf2eaa | 
| @@ -101,13 +101,13 @@ struct TileSheet { | ||||
| 		 * Reads all pixels of this sheet or its children into the given pixel list | ||||
| 		 * @param pixels | ||||
| 		 */ | ||||
| 		void readPixelsTo(ox::Vector<uint8_t> *pPixels, int8_t pBpp) const noexcept; | ||||
| 		void readPixelsTo(ox::Vector<uint8_t> &pPixels, int8_t pBpp) const noexcept; | ||||
|  | ||||
| 		/** | ||||
| 		 * Reads all pixels of this sheet or its children into the given pixel list | ||||
| 		 * @param pixels | ||||
| 		 */ | ||||
| 		void readPixelsTo(ox::Vector<uint8_t> *pPixels) const noexcept; | ||||
| 		void readPixelsTo(ox::Vector<uint8_t> &pPixels) const noexcept; | ||||
|  | ||||
| 		[[nodiscard]] | ||||
| 		constexpr std::size_t size() const noexcept { | ||||
| @@ -308,6 +308,7 @@ oxModelBegin(TileSheetV2) | ||||
| oxModelEnd() | ||||
|  | ||||
| oxModelBegin(TileSheetV3::SubSheet) | ||||
| 	oxModelField(id); | ||||
| 	oxModelField(name); | ||||
| 	oxModelField(rows); | ||||
| 	oxModelField(columns); | ||||
|   | ||||
| @@ -28,12 +28,12 @@ void AddSubSheetCommand::redo() noexcept { | ||||
| 	auto &parent = m_img.getSubSheet(m_parentIdx); | ||||
| 	if (m_addedSheets.size() < 2) { | ||||
| 		auto i = parent.subsheets.size(); | ||||
| 		parent.subsheets.emplace_back(m_img.idIt++, ox::sfmt("Subsheet {}", i), 1, 1, m_img.bpp); | ||||
| 		parent.subsheets.emplace_back(++m_img.idIt, ox::sfmt("Subsheet {}", i), 1, 1, m_img.bpp); | ||||
| 	} else { | ||||
| 		parent.subsheets.emplace_back(m_img.idIt++, "Subsheet 0", parent.columns, parent.rows, std::move(parent.pixels)); | ||||
| 		parent.subsheets.emplace_back(++m_img.idIt, "Subsheet 0", parent.columns, parent.rows, std::move(parent.pixels)); | ||||
| 		parent.rows = 0; | ||||
| 		parent.columns = 0; | ||||
| 		parent.subsheets.emplace_back(m_img.idIt++, "Subsheet 1", 1, 1, m_img.bpp); | ||||
| 		parent.subsheets.emplace_back(++m_img.idIt, "Subsheet 1", 1, 1, m_img.bpp); | ||||
| 	} | ||||
| } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user