summaryrefslogtreecommitdiff
path: root/apps/plugins/sdl/progs/duke3d/Game/src/console.c
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2020-04-04 20:24:33 -0400
committerSolomon Peachy <pizza@shaftnet.org>2020-04-11 19:29:47 +0200
commite28d1fe91671f64ce30d6e439787a48d71de5616 (patch)
treef787aaac6e894abf7e3f4144cd1b827e65db673d /apps/plugins/sdl/progs/duke3d/Game/src/console.c
parent2ad6c3438e53ddaa80c0aa43e995376495ce1a77 (diff)
downloadrockbox-e28d1fe91671f64ce30d6e439787a48d71de5616.tar.gz
rockbox-e28d1fe91671f64ce30d6e439787a48d71de5616.zip
SDL: Silence a large number of compile warnings (WIP)
There are some real bugs in here, but we're drowning in warnings. Change-Id: I7c2c0eafc8426327521bdd8a3ac2d3742ac16864
Diffstat (limited to 'apps/plugins/sdl/progs/duke3d/Game/src/console.c')
-rw-r--r--apps/plugins/sdl/progs/duke3d/Game/src/console.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/apps/plugins/sdl/progs/duke3d/Game/src/console.c b/apps/plugins/sdl/progs/duke3d/Game/src/console.c
index 229bb3b564..c4a465eda3 100644
--- a/apps/plugins/sdl/progs/duke3d/Game/src/console.c
+++ b/apps/plugins/sdl/progs/duke3d/Game/src/console.c
@@ -23,8 +23,8 @@ typedef struct console_element
23 23
24// Private member functions 24// Private member functions
25void CONSOLE_InsertUsedCommand(const char * szUsedCommand); 25void CONSOLE_InsertUsedCommand(const char * szUsedCommand);
26void CONSOLE_ClearUsedCommandList(); 26void CONSOLE_ClearUsedCommandList(void);
27void CONSOLE_RecalculateDirtyBuffer(); 27void CONSOLE_RecalculateDirtyBuffer(void);
28 28
29// console argument tracker 29// console argument tracker
30int argc; 30int argc;
@@ -50,7 +50,7 @@ int nConsole_Active = 0;
50 50
51void CVAR_RegisterDefaultCvarBindings(void); 51void CVAR_RegisterDefaultCvarBindings(void);
52// Initialize the console 52// Initialize the console
53void CONSOLE_Init() 53void CONSOLE_Init(void)
54{ 54{
55 CONSOLE_Reset(); 55 CONSOLE_Reset();
56 56
@@ -63,7 +63,7 @@ void CONSOLE_Init()
63 CONSOLE_Printf("Type \'HELP\' for help with console Commands."); 63 CONSOLE_Printf("Type \'HELP\' for help with console Commands.");
64} 64}
65 65
66void CONSOLE_Reset() 66void CONSOLE_Reset(void)
67{ 67{
68 CONSOLEELEMENT *pElement; 68 CONSOLEELEMENT *pElement;
69 CONSOLEELEMENT *pDelElement; 69 CONSOLEELEMENT *pDelElement;
@@ -144,7 +144,7 @@ void CONSOLE_HandleInput()
144 { 144 {
145 ud.pause_on = 0; 145 ud.pause_on = 0;
146 } 146 }
147 } 147 }
148 } 148 }
149 else 149 else
150 // Bug fix: make sure the frag bar displays after console 150 // Bug fix: make sure the frag bar displays after console
@@ -153,7 +153,7 @@ void CONSOLE_HandleInput()
153 { 153 {
154 if ( ud.multimode > 1 && ud.coop != 1 ) 154 if ( ud.multimode > 1 && ud.coop != 1 )
155 { 155 {
156 displayfragbar(); 156 displayfragbar();
157 } 157 }
158 if(numplayers<2) 158 if(numplayers<2)
159 ud.pause_on = 0; 159 ud.pause_on = 0;
@@ -169,7 +169,7 @@ void CONSOLE_HandleInput()
169 return; 169 return;
170 } 170 }
171 171
172 switch(KB_GetLastScanCode()) 172 switch(KB_GetLastScanCode())
173 { 173 {
174 case sc_Space: 174 case sc_Space:
175 { 175 {
@@ -221,7 +221,7 @@ void CONSOLE_HandleInput()
221 case sc_kpad_Enter: 221 case sc_kpad_Enter:
222 case sc_Enter: 222 case sc_Enter:
223 { 223 {
224 //If console_buffer[0] strlen() != 0 224 //If console_buffer[0] strlen() != 0
225 //1. Push the dirty_buffer unto the console_buffer 225 //1. Push the dirty_buffer unto the console_buffer
226 //2. parse the text 226 //2. parse the text
227 rb->kbd_input(dirty_buffer, sizeof(dirty_buffer)); 227 rb->kbd_input(dirty_buffer, sizeof(dirty_buffer));
@@ -278,7 +278,7 @@ void CONSOLE_HandleInput()
278 if(p_console_current_view->next != NULL) 278 if(p_console_current_view->next != NULL)
279 { 279 {
280 p_console_current_view = p_console_current_view->next; 280 p_console_current_view = p_console_current_view->next;
281 } 281 }
282 else 282 else
283 { 283 {
284 break; 284 break;
@@ -351,10 +351,10 @@ void CONSOLE_HandleInput()
351 } 351 }
352 352
353 353
354 KB_ClearLastScanCode(); 354 KB_ClearLastScanCode();
355} 355}
356 356
357void CONSOLE_Render() 357void CONSOLE_Render(void)
358{ 358{
359 if(g_CV_classic) 359 if(g_CV_classic)
360 { 360 {
@@ -371,7 +371,7 @@ void CONSOLE_Render()
371 int iYOffset = 3; //offset for the console text 371 int iYOffset = 3; //offset for the console text
372 CONSOLEELEMENT *pElement; 372 CONSOLEELEMENT *pElement;
373 373
374 y1 = 0; 374 y1 = 0;
375 y2 = (ydim / 2) - ((ydim / 2)/12); 375 y2 = (ydim / 2) - ((ydim / 2)/12);
376 376
377 // Draw console background 377 // Draw console background
@@ -418,9 +418,9 @@ void CONSOLE_Render()
418 minitext(283, iCurHeight, BUILD_NUMBER, 17,10+16); 418 minitext(283, iCurHeight, BUILD_NUMBER, 17,10+16);
419 419
420 // Draw the cursor //Change the color every second 420 // Draw the cursor //Change the color every second
421 minitext(iCurWidth, iCurHeight,"_",(time(NULL)%2)+1,10+16); 421 minitext(iCurWidth, iCurHeight,"_",(time(NULL)%2)+1,10+16);
422 } 422 }
423 else 423 else
424 if(g_CV_num_console_lines > 0) 424 if(g_CV_num_console_lines > 0)
425 { 425 {
426 int i, iYOffset = 3; //offset for the console text 426 int i, iYOffset = 3; //offset for the console text
@@ -517,7 +517,7 @@ void CONSOLE_InsertUsedCommand(const char * szUsedCommand)
517 } 517 }
518} 518}
519 519
520void CONSOLE_ClearUsedCommandList() 520void CONSOLE_ClearUsedCommandList(void)
521{ 521{
522 CONSOLEELEMENT *pElement; 522 CONSOLEELEMENT *pElement;
523 CONSOLEELEMENT *pDelElement; 523 CONSOLEELEMENT *pDelElement;
@@ -537,7 +537,7 @@ void CONSOLE_ClearUsedCommandList()
537} 537}
538 538
539 539
540void CONSOLE_RecalculateDirtyBuffer() 540void CONSOLE_RecalculateDirtyBuffer(void)
541{ 541{
542 int len; 542 int len;
543 int l; 543 int l;
@@ -605,7 +605,7 @@ void CONSOLE_Printf(const char *newmsg, ...)
605} 605}
606 606
607// Get the current number of args for this keyword 607// Get the current number of args for this keyword
608int CONSOLE_GetArgc() 608int CONSOLE_GetArgc(void)
609{ 609{
610 return argc; 610 return argc;
611} 611}
@@ -617,9 +617,9 @@ char * CONSOLE_GetArgv(unsigned int var)
617} 617}
618 618
619// Is our console showing? 619// Is our console showing?
620int CONSOLE_IsActive() 620int CONSOLE_IsActive(void)
621{ 621{
622 622
623 return nConsole_Active; 623 return nConsole_Active;
624} 624}
625 625
@@ -627,4 +627,4 @@ int CONSOLE_IsActive()
627void CONSOLE_SetActive(int i) 627void CONSOLE_SetActive(int i)
628{ 628{
629 nConsole_Active = (i == 0) ? 0 : 1; 629 nConsole_Active = (i == 0) ? 0 : 1;
630} \ No newline at end of file 630}