2016-02-24 05:16:08 +00:00
|
|
|
/*
|
|
|
|
* Mr. 4th Dimention - Allen Webster
|
|
|
|
*
|
|
|
|
* 23.02.2016
|
|
|
|
*
|
|
|
|
* Types shared by custom and application
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
// TOP
|
|
|
|
|
|
|
|
#ifndef FRED_BUFFER_TYPES_H
|
|
|
|
#define FRED_BUFFER_TYPES_H
|
|
|
|
|
|
|
|
static Buffer_Seek
|
2016-08-29 01:03:26 +00:00
|
|
|
seek_pos(int32_t pos){
|
2016-02-24 05:16:08 +00:00
|
|
|
Buffer_Seek result;
|
|
|
|
result.type = buffer_seek_pos;
|
|
|
|
result.pos = pos;
|
2016-09-24 06:17:06 +00:00
|
|
|
return(result);
|
|
|
|
}
|
|
|
|
|
|
|
|
static Buffer_Seek
|
|
|
|
seek_character_pos(int32_t pos){
|
|
|
|
Buffer_Seek result;
|
|
|
|
result.type = buffer_seek_character_pos;
|
|
|
|
result.pos = pos;
|
2016-02-24 05:16:08 +00:00
|
|
|
return(result);
|
|
|
|
}
|
|
|
|
|
|
|
|
static Buffer_Seek
|
2016-08-29 01:03:26 +00:00
|
|
|
seek_wrapped_xy(float x, float y, int32_t round_down){
|
2016-02-24 05:16:08 +00:00
|
|
|
Buffer_Seek result;
|
|
|
|
result.type = buffer_seek_wrapped_xy;
|
|
|
|
result.x = x;
|
|
|
|
result.y = y;
|
|
|
|
result.round_down = round_down;
|
|
|
|
return(result);
|
|
|
|
}
|
|
|
|
|
|
|
|
static Buffer_Seek
|
2016-08-29 01:03:26 +00:00
|
|
|
seek_unwrapped_xy(float x, float y, int32_t round_down){
|
2016-02-24 05:16:08 +00:00
|
|
|
Buffer_Seek result;
|
|
|
|
result.type = buffer_seek_unwrapped_xy;
|
|
|
|
result.x = x;
|
|
|
|
result.y = y;
|
|
|
|
result.round_down = round_down;
|
|
|
|
return(result);
|
|
|
|
}
|
|
|
|
|
2016-02-25 00:04:08 +00:00
|
|
|
static Buffer_Seek
|
2016-12-24 21:09:53 +00:00
|
|
|
seek_xy(float x, float y, bool32 round_down, bool32 unwrapped){
|
2016-02-25 00:04:08 +00:00
|
|
|
Buffer_Seek result;
|
2016-02-25 12:12:09 +00:00
|
|
|
result.type = unwrapped?buffer_seek_unwrapped_xy:buffer_seek_wrapped_xy;
|
|
|
|
result.x = x;
|
|
|
|
result.y = y;
|
|
|
|
result.round_down = round_down;
|
2016-02-25 00:04:08 +00:00
|
|
|
return(result);
|
|
|
|
}
|
|
|
|
|
2016-02-24 05:16:08 +00:00
|
|
|
static Buffer_Seek
|
2016-08-29 01:03:26 +00:00
|
|
|
seek_line_char(int32_t line, int32_t character){
|
2016-02-24 05:16:08 +00:00
|
|
|
Buffer_Seek result;
|
|
|
|
result.type = buffer_seek_line_char;
|
|
|
|
result.line = line;
|
|
|
|
result.character = character;
|
|
|
|
return(result);
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// BOTTOM
|
|
|
|
|