Allow changes to individual characters
[uccvend-snackrom.git] / ROM2 / display.c
index 85582f3..af96921 100644 (file)
@@ -21,7 +21,7 @@ void display_send_byte(char c);
 void display_reset();
 void display_update();
 
-void set_msg(char* newmsg) {
+void set_msg(char* newmsg, u8 wrap) {
        char* dest = current_message;
        /* equivalent of a string copy */
        /* while (dest++ = newmsg++); */
@@ -30,13 +30,15 @@ void set_msg(char* newmsg) {
                dest++;
                newmsg++;
        }
+       wrap_mode = wrap;
        scroll_point = 0;
        display_update();
 }
 
-extern inline void set_wrap_mode(u8 new_wrap_mode) {
-       /* in theory it should be inlined anyway? */
-       wrap_mode = new_wrap_mode;
+void set_char(char c, u8 pos) {
+       /* sets a single character */
+       display_buffer[pos] = c;
+       display_update();
 }
 
 void display_send_byte(char c) {
@@ -64,7 +66,7 @@ void display_reset() {
 }
 
 void display_update() {
-       int i;
+       u8 i;
        display_reset();
        
        for (i=0; i < 10; i++) {

UCC git Repository :: git.ucc.asn.au