Skip to content

Commit 0d60ed2

Browse files
committed
Tried re-enabling paint for apple2, didn't work, so disabling again. Ok, now onto 1.0.
1 parent 378c3bf commit 0d60ed2

File tree

3 files changed

+21
-9
lines changed

3 files changed

+21
-9
lines changed

src/apple2/touch.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
#include <stdint.h>
1111

1212
/* Scaling tables for touch to convert 320x192 to 512x512 */
13-
uint16_t scaletx[]={
13+
14+
/* uint16_t scaletx[]={
1415
0,2,4,5,7,8,10,12,
1516
13,15,16,18,20,21,23,24,
1617
26,28,29,31,32,34,36,37,
@@ -50,9 +51,9 @@ uint16_t scaletx[]={
5051
461,463,464,466,468,469,471,472,
5152
474,476,477,479,480,482,484,485,
5253
487,488,490,492,493,495,496,498,
53-
500,501,503,504,506,508,509,};
54+
500,501,503,504,506,508,509,}; */
5455

55-
uint16_t scalety[]={
56+
/* uint16_t scalety[]={
5657
510,507,504,502,499,496,494,491,
5758
488,486,483,480,478,475,472,470,
5859
467,464,462,459,456,454,451,448,
@@ -77,4 +78,4 @@ uint16_t scalety[]={
7778
62,59,56,54,51,48,46,43,
7879
40,38,35,32,30,27,24,22,
7980
19,16,14,11,8,6,3,0,
80-
};
81+
}; */

src/screen_base.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -271,10 +271,10 @@ void screen_background(padRGB* theColor)
271271
*/
272272
void _screen_paint(unsigned short x, unsigned short y)
273273
{
274-
// Currently we run out of memory on apple2, so this is temporarily disabled.
275274
#ifndef __APPLE2__
276-
static unsigned short xStack[64];
277-
static unsigned char yStack[64];
275+
// Currently we run out of memory on apple2, so this is temporarily disabled.
276+
static unsigned short xStack[256];
277+
static unsigned char yStack[192];
278278
unsigned char stackentry = 1;
279279
unsigned char spanAbove, spanBelow;
280280

@@ -327,7 +327,7 @@ void _screen_paint(unsigned short x, unsigned short y)
327327
x = xStack[stackentry];
328328
y = yStack[stackentry];
329329
}
330-
while (stackentry);
330+
while (stackentry);
331331
#endif
332332
}
333333

src/touch_base.c

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ extern uint16_t scalety[];
3535
*/
3636
void touch_init(void)
3737
{
38+
#ifndef __APPLE2__
3839
if (strcmp(config.driver_mou,"NONE")==0)
3940
return;
4041

@@ -47,15 +48,18 @@ void touch_init(void)
4748
POKE(0xD001,0);
4849
/* POKE(0xD002,0); */
4950
POKE(0xD003,0);
50-
#endif
51+
#endif /* __ATARI__ */
5152
}
53+
#endif /* __APPLE2__ */
54+
5255
}
5356

5457
/**
5558
* touch_allow - Set whether touchpanel is active or not.
5659
*/
5760
void touch_allow(padBool allow)
5861
{
62+
#ifndef __APPLE2__
5963
/* // If mouse is off screen (due to previously being moved off screen, move onscreen to make visible. */
6064
/* if (allow) */
6165
/* { */
@@ -71,13 +75,15 @@ void touch_allow(padBool allow)
7175
/* } */
7276
/* } */
7377
TouchActive=allow;
78+
#endif
7479
}
7580

7681
/**
7782
* touch_main - Process mouse events and turn into scaled touch events
7883
*/
7984
void touch_main(void)
8085
{
86+
#ifndef __APPLE2__
8187
uint8_t lastbuttons;
8288
padPt coord;
8389

@@ -95,21 +101,26 @@ void touch_main(void)
95101
Touch(&coord);
96102
}
97103
lastbuttons = mouse_data.buttons;
104+
#endif
98105
}
99106

100107
/**
101108
* touch_hide() - hide the mouse cursor
102109
*/
103110
void touch_hide(void)
104111
{
112+
#ifndef __APPLE2__
105113
mouse_move(screen_w,screen_h);
114+
#endif
106115
}
107116

108117
/**
109118
* touch_done() - Stop the mouse driver
110119
*/
111120
void touch_done(void)
112121
{
122+
#ifndef __APPLE2__
113123
if (mouse_present==true)
114124
mouse_uninstall();
125+
#endif
115126
}

0 commit comments

Comments
 (0)