aboutsummaryrefslogtreecommitdiff
path: root/backends/wince
diff options
context:
space:
mode:
authorNicolas Bacca2002-10-31 01:04:47 +0000
committerNicolas Bacca2002-10-31 01:04:47 +0000
commitf84b5d327dc13da7412553cc31e80fb7199eab36 (patch)
tree98770accb8066d2b9b07de31183163785c70eec5 /backends/wince
parent6614318d2f3c74ecd6b4054fe6fac74797441cd5 (diff)
downloadscummvm-rg350-f84b5d327dc13da7412553cc31e80fb7199eab36.tar.gz
scummvm-rg350-f84b5d327dc13da7412553cc31e80fb7199eab36.tar.bz2
scummvm-rg350-f84b5d327dc13da7412553cc31e80fb7199eab36.zip
Real HPC support (work in progress)
svn-id: r5357
Diffstat (limited to 'backends/wince')
-rw-r--r--backends/wince/findgame.cpp7
-rw-r--r--backends/wince/gapi_keys.cpp11
-rw-r--r--backends/wince/missing/missing.cpp87
-rw-r--r--backends/wince/pocketpc.cpp63
-rw-r--r--backends/wince/portdefs.h13
-rw-r--r--backends/wince/screen.cpp2
6 files changed, 172 insertions, 11 deletions
diff --git a/backends/wince/findgame.cpp b/backends/wince/findgame.cpp
index 6b822e8caa..e4aa7411f3 100644
--- a/backends/wince/findgame.cpp
+++ b/backends/wince/findgame.cpp
@@ -25,6 +25,13 @@
#include "stdafx.h"
#include <assert.h>
+
+#if _WIN32_WCE < 300
+
+#include <Wingdi.h>
+#include <Winbase.h>
+
+#endif
#include <Winuser.h>
#include <Winnls.h>
#include "resource.h"
diff --git a/backends/wince/gapi_keys.cpp b/backends/wince/gapi_keys.cpp
index c9999237bb..4468ea5c23 100644
--- a/backends/wince/gapi_keys.cpp
+++ b/backends/wince/gapi_keys.cpp
@@ -25,9 +25,18 @@
#include "stdafx.h"
#include <assert.h>
+
+#if _WIN32_WCE < 300
+
+#include <Wingdi.h>
+#include <Winbase.h>
+#include <Wtypes.h>
+
+#endif
+
#include <Winuser.h>
#include <sipapi.h>
-#include <Aygshell.h>
+//#include <Aygshell.h>
#include <gx.h>
#include "dynamic_imports.h"
diff --git a/backends/wince/missing/missing.cpp b/backends/wince/missing/missing.cpp
index 237014dfb2..742433f566 100644
--- a/backends/wince/missing/missing.cpp
+++ b/backends/wince/missing/missing.cpp
@@ -13,8 +13,17 @@
#include "dirent.h"
/* forward declaration */
+
+#if _WIN32_WCE < 300
+
+#include "portdefs.h"
+
+#else
+
char *strdup(const char *strSource);
+#endif
+
/* Limited dirent implementation. Used by UI.C and DEVICES.C */
static WIN32_FIND_DATA wfd;
@@ -198,6 +207,7 @@ void mkdir(char* dirname, int mode)
/* Used in DEVICES.C and UI.C for some purpose. Not critical in this port */
int system(const char* path) { return 0; }
+#if 0
char *tmpnam(char *string)
{
@@ -224,6 +234,8 @@ FILE *tmpfile()
return 0;
}
+#endif
+
void rewind(FILE *stream)
{
fseek(stream, 0, SEEK_SET);
@@ -376,3 +388,78 @@ void *bsearch(const void *key, const void *base, size_t nmemb,
return (void*)((size_t)base + size * i);
return NULL;
}
+
+#if _WIN32_WCE < 300
+
+void *calloc(size_t n, size_t s) {
+ void *result = malloc(n * s);
+ if (result)
+ memset(result, 0, n * s);
+
+ return result;
+}
+
+int isdigit(int c) {
+ return (c >='0' && c <= '9');
+}
+
+void assert (int expression) {
+ if (!expression)
+ abort();
+}
+
+void assert (void *expression) {
+ if (!expression)
+ abort();
+}
+
+int stricmp( const char *string1, const char *string2 ) {
+ char src[4096];
+ char dest[4096];
+ int i;
+
+ for (i=0; i<strlen(string1); i++)
+ if (string1[i] >= 'A' && string1[i] <= 'Z')
+ src[i] = string1[i] + 32;
+ else
+ src[i] = string1[i];
+ src[i] = 0;
+
+ for (i=0; i<strlen(string2); i++)
+ if (string2[i] >= 'A' && string2[i] <= 'Z')
+ dest[i] = string2[i] + 32;
+ else
+ dest[i] = string2[i];
+ dest[i] = 0;
+
+ return strcmp(src, dest);
+}
+
+int _stricmp( const char *string1, const char *string2 ) {
+ return stricmp(string1, string2);
+}
+
+char *strrchr(const char *s, int c) {
+ int i;
+
+ for (i = strlen(s) - 1; i > 0; i++)
+ if (s[i] == c)
+ return (char*)(s + i);
+
+ return NULL;
+}
+
+long int strtol(const char *nptr, char **endptr, int base) {
+ // not correct but that's all we are using
+
+ long int result;
+
+ sscanf(nptr, "%ld", &result);
+
+ return result;
+}
+
+
+#endif
+
+
diff --git a/backends/wince/pocketpc.cpp b/backends/wince/pocketpc.cpp
index 9326727ebc..c9bfd1d553 100644
--- a/backends/wince/pocketpc.cpp
+++ b/backends/wince/pocketpc.cpp
@@ -22,6 +22,60 @@
#include "stdafx.h"
#include <assert.h>
+//#include "commctrl.h"
+
+#if _WIN32_WCE < 300
+
+#include <Wingdi.h>
+#include <Winbase.h>
+#include <Wtypes.h>
+
+#endif
+
+#include <Winuser.h>
+#include <Winnls.h>
+#include <sipapi.h>
+
+#if _WIN32_WCE >= 300
+
+#include <Aygshell.h>
+
+#else
+
+// Put in include file
+
+typedef enum tagSIPSTATE
+{
+ SIP_UP = 0,
+ SIP_DOWN,
+ SIP_FORCEDOWN,
+ SIP_UNCHANGED,
+ SIP_INPUTDIALOG,
+} SIPSTATE;
+
+#define SHFS_SHOWTASKBAR 0x0001
+#define SHFS_HIDETASKBAR 0x0002
+#define SHFS_SHOWSIPBUTTON 0x0004
+#define SHFS_HIDESIPBUTTON 0x0008
+#define SHFS_SHOWSTARTICON 0x0010
+#define SHFS_HIDESTARTICON 0x0020
+
+typedef struct
+{
+ DWORD cbSize;
+ HWND hwndLastFocus;
+ UINT fSipUp :1;
+ UINT fSipOnDeactivation :1;
+ UINT fActive :1;
+ UINT fReserved :29;
+} SHACTIVATEINFO, *PSHACTIVATEINFO;
+
+
+#endif
+
+#include <gx.h>
+#include "resource.h"
+
#include "scumm.h"
#include "debug.h"
#include "screen.h"
@@ -33,15 +87,6 @@
#include "config-file.h"
-#include "commctrl.h"
-#include <Winuser.h>
-#include <Winnls.h>
-#include <sipapi.h>
-#include <Aygshell.h>
-#include <gx.h>
-#include <aygshell.h>
-#include "resource.h"
-
#include "SDL.h"
#include "SDL_audio.h"
#include "SDL_timer.h"
diff --git a/backends/wince/portdefs.h b/backends/wince/portdefs.h
new file mode 100644
index 0000000000..240880fc24
--- /dev/null
+++ b/backends/wince/portdefs.h
@@ -0,0 +1,13 @@
+#if _WIN32_WCE < 300
+
+void *calloc(size_t n, size_t s);
+int isdigit(int c);
+char *strrchr(const char *s, int c);
+char *strdup(const char *s);
+int _stricmp( const char *string1, const char *string2 );
+int stricmp( const char *string1, const char *string2 );
+void assert( void* expression );
+void assert( int expression );
+long int strtol(const char *nptr, char **endptr, int base);
+char *strdup( const char *s);
+#endif
diff --git a/backends/wince/screen.cpp b/backends/wince/screen.cpp
index ec59d46fac..14ad6e4c99 100644
--- a/backends/wince/screen.cpp
+++ b/backends/wince/screen.cpp
@@ -24,7 +24,7 @@
/* Original GFX code by Vasyl Tsvirkunov */
#include <windows.h>
-#include <Aygshell.h>
+//#include <Aygshell.h>
#include "gx.h"
#include "screen.h"
#include "resource.h"