annotate Discovery/Src/tInfo.c @ 179:a492a7a457b7 Cleanup_Compass_Wireless

Starting 'Cleanup_Compass_Wireless' branch
author ideenmodellierer
date Wed, 13 Mar 2019 20:53:05 +0100
parents 255eedad4155
children 2bb1db22b5f5
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1 ///////////////////////////////////////////////////////////////////////////////
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
2 /// -*- coding: UTF-8 -*-
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
3 ///
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
4 /// \file Discovery/Src/tInfo.c
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
5 /// \brief Main Template file for Info menu page on left side
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
6 /// \author heinrichs weikamp gmbh
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
7 /// \date 11-Aug-2014
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
8 ///
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
9 /// \details
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
10 ///
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
11 /// $Id$
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
12 ///////////////////////////////////////////////////////////////////////////////
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
13 /// \par Copyright (c) 2014-2018 Heinrichs Weikamp gmbh
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
14 ///
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
15 /// This program is free software: you can redistribute it and/or modify
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
16 /// it under the terms of the GNU General Public License as published by
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
17 /// the Free Software Foundation, either version 3 of the License, or
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
18 /// (at your option) any later version.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
19 ///
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
20 /// This program is distributed in the hope that it will be useful,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
21 /// but WITHOUT ANY WARRANTY; without even the implied warranty of
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
22 /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
23 /// GNU General Public License for more details.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
24 ///
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
25 /// You should have received a copy of the GNU General Public License
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
26 /// along with this program. If not, see <http://www.gnu.org/licenses/>.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
27 //////////////////////////////////////////////////////////////////////////////
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
28
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
29 /* Includes ------------------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
30 #include "tInfo.h"
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
31
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
32 #include "data_exchange.h"
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
33 #include "tDebug.h"
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
34 #include "gfx_fonts.h"
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
35 #include "tHome.h"
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
36 //#include "tInfoDive.h"
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
37 //#include "tInfoSurface.h"
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
38 #include "tInfoCompass.h"
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
39 #include "tMenu.h"
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
40
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
41 #include <string.h>
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
42
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
43 /* Private types -------------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
44
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
45 typedef struct
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
46 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
47 uint32_t pEventFunction;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
48 uint32_t callerID;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
49 } SInfoEventHandler;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
50
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
51 typedef struct
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
52 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
53 char orgText[32];
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
54 char newText[32];
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
55 char input;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
56 char symbolCounter;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
57 int8_t begin[4], size[4];
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
58 uint16_t coord[3];
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
59 tFont *fontUsed;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
60 uint32_t callerID;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
61 uint8_t maintype;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
62 uint8_t subtype;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
63 } SInfoIdent;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
64
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
65 typedef enum
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
66 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
67 FIELD_BUTTON = 1,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
68 FIELD_SELECT,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
69 FIELD_SYMBOL,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
70 FIELD_TOGGLE,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
71 FIELD_ON_OFF,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
72 FIELD_END
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
73 } SInfoField;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
74
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
75 /* Private variables ---------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
76 GFX_DrawCfgScreen tIscreen;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
77 GFX_DrawCfgScreen tIcursor;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
78
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
79 uint8_t infoColor = CLUT_InfoSurface;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
80
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
81 int8_t TIid = 0;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
82 int8_t TIidLast = -1;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
83 SInfoIdent TIident[10];
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
84
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
85 int8_t TIevid = 0;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
86 int8_t TIevidLast = -1;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
87 SInfoEventHandler TIevent[10];
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
88
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
89 /* Private function prototypes -----------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
90 void tInfo_build_page(void);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
91 void tInfo_showlog(void);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
92
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
93 void tI_draw_tIdesign(void);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
94 void tI_set_cursor(uint8_t forThisIdentID);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
95 void tI_startInfoFieldSelect(void);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
96 void tInfo_write_content_of_actual_Id(void);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
97 void tI_clean_content_of_actual_Id(void);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
98 void tInfo_write_content_without_Id(void);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
99
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
100 void tI_clean_content(uint16_t XleftGimpStyle, uint16_t XrightGimpStyle, uint16_t YtopGimpStyle, const tFont *Font);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
101 void tInfo_write_content(uint16_t XleftGimpStyle, uint16_t XrightGimpStyle, uint16_t YtopGimpStyle, const tFont *Font, const char *text, uint8_t color);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
102
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
103 void tI_resetInfo(uint8_t color);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
104
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
105 void tI_tInfo_refresh_live_content(void);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
106 void tI_evaluateNewString (uint32_t editID, uint32_t *pNewValue1, uint32_t *pNewValue2, uint32_t *pNewValue3, uint32_t *pNewValue4);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
107
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
108 //void tI_tInfo_newInput (uint32_t editID, uint32_t int1, uint32_t int2, uint32_t int3, uint32_t int4);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
109 //void tI_tInfo_newButtonText (uint32_t editID, char *text);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
110
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
111 void tI_enterInfoField(void);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
112 void tI_nextInfoField(void);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
113
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
114 /* Announced function prototypes -----------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
115 //uint8_t OnAction_ILoglist (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
116 //uint8_t OnAction_ISimulator (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
117
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
118 /* Exported functions --------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
119
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
120 void tI_init(void)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
121 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
122 tIscreen.FBStartAdress = 0;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
123 tIscreen.ImageHeight = 480;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
124 tIscreen.ImageWidth = 800;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
125 tIscreen.LayerIndex = 1;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
126
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
127 tIcursor.FBStartAdress = getFrame(12);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
128 tIcursor.ImageHeight = 480;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
129 tIcursor.ImageWidth = 800;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
130 tIcursor.LayerIndex = 0;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
131
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
132 GFX_fill_buffer(tIcursor.FBStartAdress, 0xFF, CLUT_InfoCursor);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
133 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
134
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
135
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
136 void openInfo(uint32_t modeToStart)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
137 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
138 if((modeToStart != StILOGLIST) && (modeToStart != StIDEBUG))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
139 return;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
140
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
141 TIid = 0;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
142 TIidLast = -1;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
143 TIevid = 0;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
144 TIevidLast = -1;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
145
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
146 if(tIscreen.FBStartAdress)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
147 releaseFrame(14,tIscreen.FBStartAdress);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
148 tIscreen.FBStartAdress = getFrame(14);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
149
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
150 // GFX_SetFramesTopBottom(tIscreen.FBStartAdress, tIcursor.FBStartAdress,480);
166
255eedad4155 cleanup: get rid of some compile warnings
Jan Mulder <jlmulder@xs4all.nl>
parents: 130
diff changeset
151 GFX_SetFramesTopBottom(tIscreen.FBStartAdress, 0,480);
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
152 infoColor = CLUT_InfoSurface;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
153
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
154 if(modeToStart == StIDEBUG)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
155 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
156 tDebug_start();
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
157 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
158 else
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
159 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
160 openLog(0);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
161 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
162 // openInfoLogLastDive();
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
163 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
164
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
165 /*
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
166 void openInfo(void)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
167 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
168 if((stateUsed->mode == MODE_DIVE) && (!is_stateUsedSetToSim()))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
169 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
170 return;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
171 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
172
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
173 TIid = 0;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
174 TIidLast = -1;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
175 TIevid = 0;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
176 TIevidLast = -1;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
177
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
178 if(tIscreen.FBStartAdress)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
179 releaseFrame(14,tIscreen.FBStartAdress);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
180 tIscreen.FBStartAdress = getFrame(14);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
181
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
182 GFX_SetFramesTopBottom(tIscreen.FBStartAdress, tIcursor.FBStartAdress,480);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
183
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
184 if(stateUsed->mode == MODE_DIVE)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
185 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
186 infoColor = CLUT_InfoSurface;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
187 openInfo_Dive();
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
188 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
189 else
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
190 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
191 infoColor = CLUT_InfoDive;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
192 openInfo_Surface();
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
193 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
194 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
195 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
196
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
197 /*
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
198 uint8_t OnAction_ILoglist (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
199 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
200 return 255;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
201 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
202 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
203
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
204 void tInfo_refresh(void)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
205 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
206 if(!inDebugMode() && (get_globalState() != StICOMPASS))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
207 return;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
208
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
209 uint32_t oldIscreen;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
210
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
211 oldIscreen = tIscreen.FBStartAdress;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
212 tIscreen.FBStartAdress = getFrame(14);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
213 infoColor = CLUT_InfoCompass;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
214
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
215 if(inDebugMode())
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
216 tDebug_refresh();
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
217 else
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
218 refreshInfo_Compass();
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
219
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
220 if(inDebugMode() || (get_globalState() == StICOMPASS)) /* could be timeout and exitInfo */
166
255eedad4155 cleanup: get rid of some compile warnings
Jan Mulder <jlmulder@xs4all.nl>
parents: 130
diff changeset
221 GFX_SetFramesTopBottom(tIscreen.FBStartAdress, 0,480);
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
222
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
223 if(oldIscreen)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
224 releaseFrame(14,oldIscreen);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
225 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
226
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
227
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
228 void exitInfo(void)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
229 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
230 set_globalState_tHome();
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
231 releaseFrame(14,tIscreen.FBStartAdress);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
232 exitDebugMode();
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
233 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
234
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
235
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
236 void sendActionToInfo(uint8_t sendAction)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
237 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
238 if(inDebugMode())
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
239 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
240 tDebugControl(sendAction);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
241 return;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
242 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
243
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
244 if(get_globalState() == StICOMPASS)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
245 return;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
246
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
247 switch(sendAction)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
248 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
249 case ACTION_BUTTON_ENTER:
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
250 tI_enterInfoField();
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
251 break;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
252 case ACTION_BUTTON_NEXT:
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
253 tI_nextInfoField();
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
254 break;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
255 case ACTION_TIMEOUT:
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
256 case ACTION_MODE_CHANGE:
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
257 case ACTION_BUTTON_BACK:
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
258 exitInfo();
130
b7689d9e888a Minor changes to improved code quality and to eliminate warnings
Ideenmodellierer
parents: 38
diff changeset
259 break;
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
260 default:
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
261 break;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
262 case ACTION_IDLE_TICK:
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
263 case ACTION_IDLE_SECOND:
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
264 break;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
265 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
266
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
267 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
268
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
269 /* Private functions ---------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
270
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
271 void tInfo_build_page(void)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
272 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
273 tInfo_write_content_simple( 30, 340, 90, &FontT48, "Logbook", CLUT_Font020);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
274
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
275 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
276
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
277 void tInfo_write_content_simple(uint16_t XleftGimpStyle, uint16_t XrightGimpStyle, uint16_t YtopGimpStyle, const tFont *Font, const char *text, uint8_t color)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
278 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
279 GFX_DrawCfgWindow hgfx;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
280
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
281 if(XrightGimpStyle > 799)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
282 XrightGimpStyle = 799;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
283 if(XleftGimpStyle >= XrightGimpStyle)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
284 XleftGimpStyle = 0;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
285 if(YtopGimpStyle > 479)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
286 YtopGimpStyle = 479;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
287 hgfx.Image = &tIscreen;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
288 hgfx.WindowNumberOfTextLines = 1;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
289 hgfx.WindowLineSpacing = 0;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
290 hgfx.WindowTab = 400;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
291 hgfx.WindowX0 = XleftGimpStyle;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
292 hgfx.WindowX1 = XrightGimpStyle;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
293 hgfx.WindowY1 = 479 - YtopGimpStyle;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
294 if(hgfx.WindowY1 < Font->height)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
295 hgfx.WindowY0 = 0;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
296 else
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
297 hgfx.WindowY0 = hgfx.WindowY1 - Font->height;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
298
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
299 GFX_write_string_color(Font, &hgfx, text, 0, color);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
300 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
301
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
302 /* Exported functions --------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
303
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
304 void tI_startInfoFieldSelect(void)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
305 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
306 TIid = 0;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
307 tI_set_cursor(TIid);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
308 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
309
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
310
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
311 void tI_nextInfoField(void)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
312 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
313 if(TIid < TIidLast)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
314 TIid++;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
315 else
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
316 TIid = 0;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
317 tI_set_cursor(TIid);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
318 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
319
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
320
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
321 void tI_previousInfoField(void)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
322 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
323 if(TIid > 0)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
324 TIid--;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
325 else
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
326 TIid = TIidLast;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
327 tI_set_cursor(TIid);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
328 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
329
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
330
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
331 uint8_t tI_get_newContent_of_actual_id_block_and_subBlock(uint8_t action)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
332 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
333 uint8_t (*onActionFunc)(uint32_t, uint8_t, uint8_t, uint8_t, uint8_t);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
334 uint8_t content;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
335
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
336 if(TIevent[TIevid].callerID != TIident[TIid].callerID)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
337 return 0;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
338
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
339 onActionFunc = (uint8_t (*)(uint32_t, uint8_t, uint8_t, uint8_t, uint8_t))(TIevent[TIevid].pEventFunction);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
340
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
341 if(TIident[TIid].maintype == FIELD_ON_OFF)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
342 content = TIident[TIid].input;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
343 else
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
344 content = 0; /* just a default for protection */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
345
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
346 return onActionFunc(TIident[TIid].callerID, 0, 0, content, action);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
347 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
348
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
349
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
350 void tI_enterInfoField(void)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
351 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
352 uint8_t newContent;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
353
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
354 TIevid = 0;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
355 while((TIevid < TIevidLast) && (TIevent[TIevid].callerID != TIident[TIid].callerID))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
356 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
357 TIevid++;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
358 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
359
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
360 if(TIevent[TIevid].callerID != TIident[TIid].callerID)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
361 return;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
362
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
363 newContent = tI_get_newContent_of_actual_id_block_and_subBlock(ACTION_BUTTON_ENTER);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
364
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
365 if(newContent == 255)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
366 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
367 exitInfo();
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
368 return;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
369 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
370
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
371 switch(TIident[TIid].maintype)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
372 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
373 case FIELD_BUTTON:
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
374 break;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
375 case FIELD_ON_OFF:
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
376 break;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
377 case FIELD_SYMBOL:
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
378 TIident[TIid].input += 1;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
379 if(TIident[TIid].input >= TIident[TIid].symbolCounter)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
380 TIident[TIid].input = 0;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
381 TIident[TIid].newText[0] = TIident[TIid].orgText[TIident[TIid].input];
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
382 tInfo_write_content_of_actual_Id();
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
383 break;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
384 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
385 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
386
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
387
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
388 void tI_evaluateNewString(uint32_t editID, uint32_t *pNewValue1, uint32_t *pNewValue2, uint32_t *pNewValue3, uint32_t *pNewValue4)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
389 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
390 if(editID != TIident[TIid].callerID)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
391 return;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
392
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
393 uint8_t i, digitCount, digit;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
394 uint32_t sum[4], multiplier;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
395
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
396 for(i=0;i<4;i++)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
397 sum[i] = 0;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
398
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
399 i = 0;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
400 while( TIident[TIid].size[i] && (i < 4))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
401 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
402 multiplier = 1;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
403 for(digitCount = 1; digitCount < TIident[TIid].size[i]; digitCount++)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
404 multiplier *= 10;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
405
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
406 for(digitCount = 0; digitCount < TIident[TIid].size[i]; digitCount++)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
407 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
408 digit = TIident[TIid].newText[TIident[TIid].begin[i] + digitCount];
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
409
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
410 if(digit > '0')
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
411 digit -= '0';
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
412 else
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
413 digit = 0;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
414
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
415 if(digit > 9)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
416 digit = 9;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
417
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
418 sum[i] += digit * multiplier;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
419
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
420 if(multiplier >= 10)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
421 multiplier /= 10;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
422 else
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
423 multiplier = 0;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
424 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
425 i++;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
426 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
427
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
428 *pNewValue1 = sum[0];
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
429 *pNewValue2 = sum[1];
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
430 *pNewValue3 = sum[2];
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
431 *pNewValue4 = sum[3];
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
432 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
433
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
434
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
435 uint8_t tI_get_id_of(uint32_t editID)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
436 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
437 uint8_t temp_id;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
438
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
439 if(editID == TIident[TIid].callerID)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
440 return TIid;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
441 else
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
442 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
443 temp_id = 0;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
444 while((temp_id < 9) && (editID != TIident[temp_id].callerID))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
445 temp_id++;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
446 if(editID != TIident[temp_id].callerID)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
447 temp_id = 255;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
448 return temp_id;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
449 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
450 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
451
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
452
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
453 void tI_newButtonText(uint32_t editID, char *text)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
454 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
455 uint8_t backup_id, temp_id;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
456
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
457 temp_id = tI_get_id_of(editID);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
458 if(temp_id == 255)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
459 return;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
460
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
461 backup_id = TIid;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
462 TIid = temp_id;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
463
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
464 strncpy(TIident[TIid].newText, text, 32);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
465 TIident[TIid].newText[31] = 0;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
466
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
467 tI_clean_content_of_actual_Id();
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
468 tInfo_write_content_of_actual_Id();
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
469
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
470 TIid = backup_id;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
471 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
472
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
473
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
474 void tInfo_set_on_off(uint32_t editID, uint32_t int1)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
475 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
476 uint8_t backup_id, temp_id;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
477
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
478 temp_id = tI_get_id_of(editID);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
479 if(temp_id == 255)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
480 return;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
481
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
482 backup_id = TIid;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
483 TIid = temp_id;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
484
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
485 TIident[TIid].input = int1;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
486
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
487 if(int1)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
488 change_CLUT_entry((CLUT_InfoField0 + TIid), CLUT_InfoActive);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
489 else
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
490 change_CLUT_entry((CLUT_InfoField0 + TIid), CLUT_InfoInActive);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
491
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
492 tInfo_write_content_of_actual_Id();
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
493
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
494 TIid = backup_id;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
495 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
496
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
497
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
498 void tInfo_write_content_without_Id(void)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
499 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
500 tInfo_write_content( TIident[TIid].coord[0], TIident[TIid].coord[1], TIident[TIid].coord[2], TIident[TIid].fontUsed, TIident[TIid].newText, CLUT_InfoFieldRegular);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
501 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
502
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
503
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
504 void tInfo_write_content_of_actual_Id(void)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
505 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
506 tInfo_write_content( TIident[TIid].coord[0], TIident[TIid].coord[1], TIident[TIid].coord[2], TIident[TIid].fontUsed, TIident[TIid].newText, (CLUT_InfoField0 + TIid));
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
507 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
508
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
509
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
510 void tI_clean_content_of_actual_Id(void)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
511 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
512 tI_clean_content( TIident[TIid].coord[0], TIident[TIid].coord[1], TIident[TIid].coord[2], TIident[TIid].fontUsed);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
513 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
514
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
515
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
516 void tInfo_write_field_button(uint32_t editID, uint16_t XleftGimpStyle, uint16_t XrightGimpStyle, uint16_t YtopGimpStyle, const tFont *Font, const char *text)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
517 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
518 if(TIidLast >= 9)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
519 return;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
520
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
521 TIident[TIid].maintype = FIELD_BUTTON;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
522 TIident[TIid].subtype = FIELD_BUTTON;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
523
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
524 TIident[TIid].coord[0] = XleftGimpStyle;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
525 TIident[TIid].coord[1] = XrightGimpStyle;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
526 TIident[TIid].coord[2] = YtopGimpStyle;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
527 TIident[TIid].fontUsed = (tFont *)Font;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
528 TIident[TIid].callerID = editID;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
529
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
530 strncpy(TIident[TIid].orgText, text, 32);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
531 strncpy(TIident[TIid].newText, text, 32);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
532 TIident[TIid].orgText[31] = 0;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
533 TIident[TIid].newText[31] = 0;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
534
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
535 change_CLUT_entry((CLUT_InfoField0 + TIid), CLUT_InfoButtonColor1);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
536
166
255eedad4155 cleanup: get rid of some compile warnings
Jan Mulder <jlmulder@xs4all.nl>
parents: 130
diff changeset
537 if(editID == 0)
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
538 tInfo_write_content_without_Id();
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
539 else
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
540 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
541 tInfo_write_content_of_actual_Id();
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
542 TIidLast = TIid;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
543 TIid++;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
544 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
545 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
546
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
547
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
548 void tInfo_write_field_symbol(uint32_t editID, uint16_t XleftGimpStyle, uint16_t XrightGimpStyle, uint16_t YtopGimpStyle, const tFont *Font, const char *text, uint8_t int1)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
549 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
550 if(TIidLast >= 9)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
551 return;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
552
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
553 TIident[TIid].maintype = FIELD_SYMBOL;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
554 TIident[TIid].subtype = FIELD_SYMBOL;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
555
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
556 TIident[TIid].coord[0] = XleftGimpStyle;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
557 TIident[TIid].coord[1] = XrightGimpStyle;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
558 TIident[TIid].coord[2] = YtopGimpStyle;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
559 TIident[TIid].fontUsed = (tFont *)Font;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
560 TIident[TIid].callerID = editID;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
561
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
562 strncpy(TIident[TIid].orgText, text, 32);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
563 strncpy(TIident[TIid].newText, text, 32);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
564 TIident[TIid].orgText[31] = 0;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
565
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
566 TIident[TIid].newText[0] = text[0];
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
567 TIident[TIid].newText[1] = 0;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
568
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
569 TIident[TIid].input = int1;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
570 TIident[TIid].symbolCounter = strlen(TIident[TIid].orgText);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
571
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
572 change_CLUT_entry((CLUT_InfoField0 + TIid), CLUT_InfoButtonColor1);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
573
166
255eedad4155 cleanup: get rid of some compile warnings
Jan Mulder <jlmulder@xs4all.nl>
parents: 130
diff changeset
574 if(editID == 0)
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
575 tInfo_write_content_without_Id();
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
576 else
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
577 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
578 tInfo_write_content_of_actual_Id();
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
579 TIidLast = TIid;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
580 TIid++;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
581 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
582 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
583
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
584
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
585 void tInfo_write_field_on_off(uint32_t editID, uint16_t XleftGimpStyle, uint16_t XrightGimpStyle, uint16_t YtopGimpStyle, const tFont *Font, const char *text, uint8_t int1)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
586 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
587 if(TIidLast >= 9)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
588 return;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
589
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
590 TIident[TIid].maintype = FIELD_ON_OFF;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
591 TIident[TIid].subtype = FIELD_ON_OFF;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
592
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
593 TIident[TIid].coord[0] = XleftGimpStyle;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
594 TIident[TIid].coord[1] = XrightGimpStyle;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
595 TIident[TIid].coord[2] = YtopGimpStyle;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
596 TIident[TIid].fontUsed = (tFont *)Font;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
597 TIident[TIid].callerID = editID;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
598
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
599 strncpy(TIident[TIid].orgText, text, 32);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
600 strncpy(TIident[TIid].newText, text, 32);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
601 TIident[TIid].orgText[31] = 0;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
602 TIident[TIid].newText[31] = 0;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
603
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
604
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
605 if(int1)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
606 change_CLUT_entry((CLUT_InfoField0 + TIid), CLUT_InfoActive);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
607 else
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
608 change_CLUT_entry((CLUT_InfoField0 + TIid), CLUT_InfoInActive);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
609
166
255eedad4155 cleanup: get rid of some compile warnings
Jan Mulder <jlmulder@xs4all.nl>
parents: 130
diff changeset
610 if(editID == 0)
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
611 tInfo_write_content_without_Id();
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
612 else
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
613 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
614 tInfo_write_content_of_actual_Id();
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
615 TIidLast = TIid;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
616 TIid++;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
617 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
618 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
619
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
620
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
621 void tInfo_setEvent(uint32_t inputEventID, uint32_t inputFunctionCall)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
622 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
623 if(TIevidLast >= 9)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
624 return;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
625
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
626 /* set cursor to first field */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
627 if(TIevidLast < 0)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
628 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
629 tI_startInfoFieldSelect();
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
630 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
631
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
632 TIevent[TIevid].callerID = inputEventID;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
633 TIevent[TIevid].pEventFunction = inputFunctionCall;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
634
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
635 TIevidLast = TIevid;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
636 TIevid++;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
637 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
638
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
639
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
640 void tI_set_cursor(uint8_t forThisIdentID)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
641 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
642 int16_t x0, x1, y0, y1;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
643
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
644 uint32_t xtra_left_right = 10;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
645 uint32_t xtra_top_bottom = 10;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
646
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
647 /* y geht von 0 bis 799 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
648 /* x geht von 0 bis 479 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
649
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
650 x0 = (int16_t)TIident[forThisIdentID].coord[0];
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
651 x1 = (int16_t)TIident[forThisIdentID].coord[1];
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
652 y0 = (int16_t)TIident[forThisIdentID].coord[2];
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
653 y1 = y0 + (int16_t)TIident[forThisIdentID].fontUsed->height;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
654
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
655 if(((int16_t)TIident[forThisIdentID].fontUsed->height) > 70)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
656 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
657 xtra_left_right = 10;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
658 xtra_top_bottom = 10;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
659 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
660 else
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
661 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
662 xtra_left_right = 10;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
663 xtra_top_bottom = 0;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
664 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
665
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
666 x0 -= xtra_left_right;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
667 x1 += xtra_left_right;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
668 y0 -= xtra_top_bottom;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
669 y1 += xtra_top_bottom;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
670
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
671 GFX_SetWindowLayer0(tIcursor.FBStartAdress, x0, x1, y0, y1);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
672 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
673
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
674
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
675 void tInfo_write_label_var(uint16_t XleftGimpStyle, uint16_t XrightGimpStyle, uint16_t YtopGimpStyle, const tFont *Font, const char *text)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
676 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
677 GFX_DrawCfgWindow hgfx;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
678
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
679 if(XrightGimpStyle > 799)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
680 XrightGimpStyle = 799;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
681 if(XleftGimpStyle >= XrightGimpStyle)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
682 XleftGimpStyle = 0;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
683 if(YtopGimpStyle > 479)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
684 YtopGimpStyle = 479;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
685 hgfx.Image = &tIscreen;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
686 hgfx.WindowNumberOfTextLines = 1;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
687 hgfx.WindowLineSpacing = 0;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
688 hgfx.WindowTab = 0;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
689 hgfx.WindowX0 = XleftGimpStyle;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
690 hgfx.WindowX1 = XrightGimpStyle;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
691 hgfx.WindowY1 = 479 - YtopGimpStyle;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
692 if(hgfx.WindowY1 < Font->height)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
693 hgfx.WindowY0 = 0;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
694 else
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
695 hgfx.WindowY0 = hgfx.WindowY1 - Font->height;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
696
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
697 GFX_write_label(Font, &hgfx, text, infoColor);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
698 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
699
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
700
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
701 void tInfo_write_content(uint16_t XleftGimpStyle, uint16_t XrightGimpStyle, uint16_t YtopGimpStyle, const tFont *Font, const char *text, uint8_t color)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
702 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
703 GFX_DrawCfgWindow hgfx;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
704
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
705 if(XrightGimpStyle > 799)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
706 XrightGimpStyle = 799;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
707 if(XleftGimpStyle >= XrightGimpStyle)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
708 XleftGimpStyle = 0;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
709 if(YtopGimpStyle > 479)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
710 YtopGimpStyle = 479;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
711 hgfx.Image = &tIscreen;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
712 hgfx.WindowNumberOfTextLines = 1;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
713 hgfx.WindowLineSpacing = 0;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
714 hgfx.WindowTab = 0;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
715 hgfx.WindowX0 = XleftGimpStyle;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
716 hgfx.WindowX1 = XrightGimpStyle;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
717 hgfx.WindowY1 = 479 - YtopGimpStyle;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
718 if(hgfx.WindowY1 < Font->height)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
719 hgfx.WindowY0 = 0;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
720 else
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
721 hgfx.WindowY0 = hgfx.WindowY1 - Font->height;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
722
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
723 GFX_write_label(Font, &hgfx, text, color);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
724 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
725
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
726
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
727 void tInfo_write_label_fix(uint16_t XleftGimpStyle, uint16_t XrightGimpStyle, uint16_t YtopGimpStyle, const tFont *Font, const char textId)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
728 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
729 char text[2];
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
730
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
731 text[0] = textId;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
732 text[1] = 0;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
733
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
734 tInfo_write_label_var(XleftGimpStyle, XrightGimpStyle, YtopGimpStyle, Font, text);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
735 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
736
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
737
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
738 void tI_clean_content(uint16_t XleftGimpStyle, uint16_t XrightGimpStyle, uint16_t YtopGimpStyle, const tFont *Font)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
739 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
740 GFX_DrawCfgWindow hgfx;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
741
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
742 if(XrightGimpStyle > 799)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
743 XrightGimpStyle = 799;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
744 if(XleftGimpStyle >= XrightGimpStyle)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
745 XleftGimpStyle = 0;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
746 if(YtopGimpStyle > 479)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
747 YtopGimpStyle = 479;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
748 hgfx.Image = &tIscreen;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
749 hgfx.WindowX0 = XleftGimpStyle;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
750 hgfx.WindowX1 = XrightGimpStyle;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
751 hgfx.WindowY1 = 479 - YtopGimpStyle;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
752 if(hgfx.WindowY1 < Font->height)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
753 hgfx.WindowY0 = 0;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
754 else
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
755 hgfx.WindowY0 = hgfx.WindowY1 - Font->height;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
756
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
757 GFX_clear_window_immediately(&hgfx);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
758 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
759
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
760
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
761 void tInfo_write_buttonTextline(GFX_DrawCfgScreen *screenPtr, uint8_t left2ByteCode, char middle2ByteCode, char right2ByteCode)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
762 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
763 GFX_clean_area(&tIscreen, 0, 800, 480-24,480);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
764
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
765 char localtext[32];
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
766
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
767 if(left2ByteCode)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
768 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
769 localtext[0] = TXT_2BYTE;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
770 localtext[1] = left2ByteCode;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
771 localtext[2] = 0;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
772 write_content_simple(screenPtr, 0, 800, 480-24, &FontT24,localtext,CLUT_ButtonSurfaceScreen);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
773 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
774
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
775 if(middle2ByteCode)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
776 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
777 localtext[0] = '\001';
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
778 localtext[1] = TXT_2BYTE;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
779 localtext[2] = middle2ByteCode;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
780 localtext[3] = 0;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
781 write_content_simple(screenPtr, 0, 800, 480-24, &FontT24,localtext,CLUT_ButtonSurfaceScreen);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
782 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
783
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
784 if(right2ByteCode)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
785 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
786 localtext[0] = '\002';
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
787 localtext[1] = TXT_2BYTE;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
788 localtext[2] = right2ByteCode;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
789 localtext[3] = 0;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
790 write_content_simple(screenPtr, 0, 800, 480-24, &FontT24,localtext,CLUT_ButtonSurfaceScreen);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
791 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
792 }