Beispiel #1
0
void FileAccess::store_16(uint16_t p_dest) {

	uint8_t a, b;

	a = p_dest & 0xFF;
	b = p_dest >> 8;

	if (endian_swap) {

		SWAP(a, b);
	}

	store_8(a);
	store_8(b);
}
void FileAccessEncrypted::store_buffer(const uint8_t *p_src,int p_length) {

	ERR_FAIL_COND(!writing);

	if (pos<data.size()) {

		for(int i=0;i<p_length;i++) {

			store_8(p_src[i]);
		}
	} else if (pos==data.size()) {

		data.resize(pos+p_length);
		for(int i=0;i<p_length;i++) {

			data[pos+i]=p_src[i];
		}
		pos+=p_length;
	}
}
Beispiel #3
0
void FileAccess::store_buffer(const uint8_t *p_src, int p_length) {

	for (int i = 0; i < p_length; i++)
		store_8(p_src[i]);
}
Beispiel #4
0
void FileAccess::store_line(const String &p_line) {

	store_string(p_line);
	store_8('\n');
}