| 12345678910111213141516171819202122232425262728293031323334353637 |
- #ifndef PATTERN_H
- #define PATTERN_H
- #include "struct.h"
- /**
- * Read a buffer to convert into an dynamically pattern
- * Structure of the pattern data:
- * <pre>
- * XX <=> Pattern length (uint_8)
- * AABBBBCCCC
- * AABBBBCCCC
- * AABBBBCCCC
- * ...
- * </pre>
- * Legend
- * <pre>
- * AA <=> side (uint_8)
- * BBBB <=> distance(uint_16)
- * CCCC <=> wall_length(uint_16)
- * </pre>
- * @param data Data to read
- * @return A brand new pattern
- */
- Pattern* readPattern(Pattern* pattern, unsigned char* data);
- /**
- * Add the whole patter to the current game.
- * @param data data
- * @param offset Offsets the sides to rotate the pattern
- */
- void addPattern(Game_Data* data, Pattern* pattern, unsigned char offset);
- Pattern* freePattern(Pattern* pattern);
- #endif
|