Ticket #7985: scumm-zaurus-0.2.0.patch
File scumm-zaurus-0.2.0.patch, 7.2 KB (added by , 22 years ago) |
---|
-
Makefile
diff -u ../scummvm/Makefile ./Makefile
old new 1 1 # $Header: /cvsroot/scummvm/scummvm/Makefile,v 1.41 2002/04/27 16:58:28 ender Exp $ 2 2 3 CC = g++3 CC = arm-linux-g++ 4 4 CFLAGS = -g -O -Wall -Wstrict-prototypes -Wuninitialized -Wno-long-long -Wno-multichar 5 DEFINES = -DUNIX 5 DEFINES = -DUNIX -DCOMPRESSED_SOUND_FILE -DBYPASS_COPY_PROT -DQTOPIA 6 6 LDFLAGS := 7 INCLUDES:= ` sdl-config --cflags` -I./ -I./sound7 INCLUDES:= `/opt/Qtopia/sharp/bin/sdl-config --cflags` -I./ -I./sound 8 8 CPPFLAGS= $(DEFINES) $(INCLUDES) 9 9 10 10 # Add -lmad for -DCOMPRESSED_SOUND_FILE 11 LIBS = `sdl-config --libs` -lncurses 11 LIBS = `/opt/Qtopia/sharp/bin/sdl-config --libs` -lmad 12 #-lncurses 12 13 13 14 OBJS = sdl.o 14 15 -
config-file.cpp
diff -u ../scummvm/config-file.cpp ./config-file.cpp
old new 76 76 77 77 hashconfig::~hashconfig() 78 78 { 79 #ifndef QTOPIA 79 80 xfree(domain); 81 #endif 80 82 } 81 83 82 84 bool hashconfig::is_domain(const char *d) const … … 210 212 211 213 Config::~Config() 212 214 { 215 #ifndef QTOPIA 213 216 int i; 214 217 215 218 xfree(filename); … … 219 222 delete hash[i]; 220 223 } 221 224 xfree(hash); 225 #endif 222 226 } 223 227 224 228 const char *Config::get(const char *key, const char *d) const -
main.cpp
Common subdirectories: ../scummvm/dc and ./dc Common subdirectories: ../scummvm/debian and ./debian Common subdirectories: ../scummvm/mac and ./mac Common subdirectories: ../scummvm/macosclassic and ./macosclassic diff -u ../scummvm/main.cpp ./main.cpp
old new 28 28 #include "simon/simon.h" 29 29 #include "config-file.h" 30 30 31 31 32 GameDetector detector; 32 33 Gui gui; 33 34 … … 38 39 39 40 #if defined(MACOSX) && defined(UNIX) 40 41 #include <SDL.h> 41 #elif !defined(__MORPHOS__) 42 #elif !defined(QTOPIA) 43 //#elif !defined(QTOPIA) || !defined(__MORPHOS__) 44 // someone please explain to me why the above doesn't work 42 45 #undef main 43 46 #endif 44 47 48 45 49 #if defined(UNIX) || defined(UNIX_X11) 46 50 #include <sys/param.h> 47 51 #ifndef MAXPATHLEN … … 55 59 #if defined(UNIX) || defined(UNIX_X11) 56 60 #include <signal.h> 57 61 62 #ifdef QTOPIA 63 #include <SDL.h> 64 extern "C" int main(int argc, char *argv[]); 65 #endif 66 67 58 68 static void handle_errors(int sig_num) { 59 69 error("Your system does not support unaligned memory accesses. Please rebuild with SCUMM_NEED_ALIGNMENT "); 60 70 } … … 92 102 93 103 #endif 94 104 105 #ifdef main 106 #warning "main defined" 107 #endif 108 95 109 int main(int argc, char *argv[]) 96 110 { 97 /* 111 printf("entering scummvm main\n"); 112 /* 98 113 Disabled this for now. What good does it do, anyway, we now have real config 99 114 files, and a proper port to MacOS classic should offer a dialog or so for any 100 115 game settings! -
scummsys.h
Common subdirectories: ../scummvm/morphos and ./morphos diff -u ../scummvm/scummsys.h ./scummsys.h
old new 107 107 #endif 108 108 #endif 109 109 110 #ifdef QTOPIA 111 #define SCUMM_NEED_ALIGNMENT 112 #endif 113 110 114 #define FORCEINLINE inline 111 115 #define CDECL 112 116 -
sdl.cpp
diff -u ../scummvm/sdl.cpp ./sdl.cpp
old new 748 748 for(;;) { 749 749 if (!SDL_PollEvent(&ev)) 750 750 return false; 751 751 752 752 switch(ev.type) { 753 753 case SDL_KEYDOWN: { 754 754 byte b = 0; … … 767 767 quit(); 768 768 break; 769 769 } 770 771 770 if (b == (KBD_CTRL|KBD_ALT) && 772 771 (ev.key.keysym.sym>='1') && (ev.key.keysym.sym<='7')) { 773 772 Property prop; … … 775 774 property(PROP_SET_GFX_MODE, &prop); 776 775 break; 777 776 } 778 779 777 #ifdef QTOPIA 778 // quit on fn+backspace on zaurus 779 if (ev.key.keysym.sym==127) { 780 quit(); 781 break; 782 } 783 // map menu key (f11) to f5 (scumm menu) 784 if (ev.key.keysym.sym==292) { 785 event->event_code = EVENT_KEYDOWN; 786 event->kbd.keycode = 286; 787 event->kbd.ascii = mapKey(286, ev.key.keysym.mod); 788 } 789 // map center (space) to tab (default action ) 790 // i wanted to map the calendar button but the calendar comes up 791 // 792 else if (ev.key.keysym.sym==32) { 793 event->event_code = EVENT_KEYDOWN; 794 event->kbd.keycode = 9; 795 event->kbd.ascii = mapKey(9, ev.key.keysym.mod); 796 } 797 // since we stole space (pause) above we'll rebind it to the tab key on the keyboard 798 else if (ev.key.keysym.sym==9) { 799 event->event_code = EVENT_KEYDOWN; 800 event->kbd.keycode = 32; 801 event->kbd.ascii = mapKey(32, ev.key.keysym.mod); 802 } 803 else { 804 // let the events fall through if we didn't change them, this may not be the best way to 805 // set it up, but i'm not sure how sdl would like it if we let if fall through then redid it though. 806 // and yes i have an huge terminal size so i dont wrap soon enough. 807 event->event_code = EVENT_KEYDOWN; 808 event->kbd.keycode = ev.key.keysym.sym; 809 event->kbd.ascii = mapKey(ev.key.keysym.sym, ev.key.keysym.mod); 810 } 811 #endif 812 #ifndef QTOPIA 780 813 event->event_code = EVENT_KEYDOWN; 781 814 event->kbd.keycode = ev.key.keysym.sym; 782 815 event->kbd.ascii = mapKey(ev.key.keysym.sym, ev.key.keysym.mod); 816 #endif 783 817 return true; 784 818 } 785 819 … … 904 938 return 1; 905 939 906 940 case PROP_OPEN_CD: 941 #ifndef QTOPIA 907 942 if (SDL_InitSubSystem(SDL_INIT_CDROM) == -1) 908 943 cdrom = NULL; 944 909 945 else { 910 946 cdrom = SDL_CDOpen(value->cd_num); 911 947 /* Did if open? Check if cdrom is NULL */ … … 914 950 } 915 951 } 916 952 break; 917 953 #endif 954 #ifdef QTOPIA 955 cdrom = NULL; 956 break; 957 #endif 918 958 case PROP_SET_GFX_MODE: 919 959 if (value->gfx_mode >= 7) 920 960 return 0; … … 937 977 938 978 void OSystem_SDL::quit() { 939 979 if(cdrom) { 980 #ifndef QTOPIA 940 981 SDL_CDStop(cdrom); 941 982 SDL_CDClose(cdrom); 983 #endif 942 984 } 943 985 unload_gfx_mode(); 944 986 exit(1); … … 1066 1108 cd_num_loops = num_loops; 1067 1109 cd_start_frame = start_frame; 1068 1110 1111 #ifndef QTOPIA 1069 1112 SDL_CDStatus(cdrom); 1070 1113 SDL_CDPlayTracks(cdrom, track, start_frame, 0, end_frame); 1114 #endif 1071 1115 cd_end_frame = end_frame; 1072 1116 cd_stop_time = 0; 1073 1117 cd_end_time = SDL_GetTicks() + cdrom->track[track].length * 1000 / CD_FPS; … … 1077 1121 if (!cdrom) 1078 1122 return false; 1079 1123 1124 #ifdef QTOPIA 1125 return (cd_num_loops != 0 && (SDL_GetTicks() < cd_end_time != CD_STOPPED)); 1126 #endif 1080 1127 return (cd_num_loops != 0 && (SDL_GetTicks() < cd_end_time || SDL_CDStatus(cdrom) != CD_STOPPED)); 1081 1128 } 1082 1129 … … 1085 1132 return; 1086 1133 1087 1134 if (cd_stop_time != 0 && SDL_GetTicks() >= cd_stop_time) { 1135 #ifndef QTOPIA 1088 1136 SDL_CDStop(cdrom); 1137 #endif 1089 1138 cd_num_loops = 0; 1090 1139 cd_stop_time = 0; 1091 1140 return; … … 1094 1143 if (cd_num_loops == 0 || SDL_GetTicks() < cd_end_time) 1095 1144 return; 1096 1145 1146 #ifndef QTOPIA 1097 1147 if (cd_num_loops != 1 && SDL_CDStatus(cdrom) != CD_STOPPED) { 1098 1148 // Wait another second for it to be done 1099 1149 cd_end_time += 1000; 1100 1150 return; 1101 1151 } 1152 #endif 1102 1153 1103 1154 if (cd_num_loops > 0) 1104 1155 cd_num_loops--; 1105 1156 1106 1157 if (cd_num_loops != 0) { 1158 #ifndef QTOPIA 1107 1159 SDL_CDPlayTracks(cdrom, cd_track, cd_start_frame, 0, cd_end_frame); 1160 #endif 1108 1161 cd_end_time = SDL_GetTicks() + cdrom->track[cd_track].length * 1000 / CD_FPS; 1109 1162 } 1110 1163 }