mirror of
https://github.com/siemens-mobile-hacks/sieelf.git
synced 2026-11-25 22:27:29 +00:00
149 lines
4 KiB
C
149 lines
4 KiB
C
#include "..\inc\swilib.h"
|
|
#include <stdbool.h>
|
|
#include "..\inc\playsound.h"
|
|
|
|
#define NO_SOUND 0x80000000
|
|
#define NEED_BEEP 0;
|
|
|
|
#pragma swi_number=0x0C4
|
|
__swi __arm void *GetBuffer(int n);
|
|
|
|
#pragma swi_number=0x034
|
|
__swi __arm void PlaySoundLoop(int n, int flag, int vibra);
|
|
|
|
#pragma swi_number=0x0BF
|
|
__swi __arm void SpellTime(void);
|
|
|
|
int main(WSHDR **ptr) {//ptr[0]=descr, ptr[1]=place
|
|
char place[21];//扭抉抖快 "技快扼找抉" 技忘抗扼我技批技 20 扼我技志抉抖抉志
|
|
IPC_REQ *ipc_multisim;
|
|
|
|
ws_2str(ptr[1], place, sizeof(place)-1);
|
|
if (place[0]!='.')//快扼抖我 志 扶忘折忘抖快 扶快找 找抉折抗我...
|
|
return NO_SOUND;//...找抉 扶忘技 找忘抗抉快 扼抉忌抑找我快 扶快 扶批忪扶抉
|
|
|
|
GBS_SendMessage(MMI_CEPID, KEY_DOWN, RIGHT_SOFT);//尿技批抖攸扯我攸 扶忘忪忘找我攸 扭把忘志抉抄 扼抉扳找-抗扶抉扭抗我, 折找抉忌抑 扶快 志我扼快抖 忱我忘抖抉忍 我 扶快 忌抑抖抉 "孝扭批投. 扶忘扭抉技."
|
|
|
|
ipc_multisim=(IPC_REQ*)((char*)GetBuffer(0x4401)+4);//ipc_multisim -> 抉忌抖忘扼找抆 RAM 忱抖攸 扭快把快技快扶扶抑抒 扭忘找折忘, 志抑忱快抖快扶扶忘攸 妙妤
|
|
if ((int)ipc_multisim==4)//扭忘找折 志抑抗抖攻折快扶?
|
|
return NO_SOUND;//戒扶忘折我找, 忱快抖忘找抆 扶我折快忍抉 扶快 扶忘忱抉
|
|
|
|
bool needShutdown=false, needTime=false, needExec=false;
|
|
unsigned profile=0, sim=0xFF, vibra=0, alert=0xFF, tmp, a;
|
|
char *p=place+1;
|
|
|
|
while (*p) {
|
|
switch ((*p)|0x20) {
|
|
case 'a':
|
|
if (!(*(++p)))//扼找把抉抗忘 戒忘抗抉扶折我抖忘扼抆?..
|
|
goto l_perform_actions;//...扭忘把忘技快找把抉志 扶快找
|
|
tmp=*p;
|
|
if (tmp>'9')
|
|
tmp=(tmp&0xDF)-7;
|
|
tmp-='0';
|
|
if (!(*(++p)))//扼找把抉抗忘 戒忘抗抉扶折我抖忘扼抆?..
|
|
goto l_perform_actions;//...扭忘把忘技快找把抉志 扶快找
|
|
if (tmp<=15)
|
|
a=tmp<<4;
|
|
else
|
|
continue;
|
|
tmp=*p;
|
|
if (tmp>'9')
|
|
tmp=(tmp&0xDF)-7;
|
|
tmp-='0';
|
|
if (tmp<=15)
|
|
alert=a|tmp;
|
|
break;
|
|
case 'z':
|
|
needShutdown=true;
|
|
break;
|
|
case 't':
|
|
needTime=true;
|
|
break;
|
|
case 'v':
|
|
if (!(*(++p)))//扼找把抉抗忘 戒忘抗抉扶折我抖忘扼抆?..
|
|
goto l_perform_actions;//...扭忘把忘技快找把抉志 扶快找
|
|
tmp=*p;
|
|
if (tmp>'9')
|
|
tmp=(tmp&0xDF)-7;
|
|
tmp-='0';
|
|
if (tmp<=15)//抉忍把忘扶我折快扶我快 扶忘 抗抉抖-志抉 志我忌把 (15 - 1 扭抉抖批忌忘抄找)
|
|
vibra=tmp;
|
|
break;
|
|
case 'p':
|
|
if (!(*(++p)))//扼找把抉抗忘 戒忘抗抉扶折我抖忘扼抆?..
|
|
goto l_perform_actions;//...扭忘把忘技快找把抉志 扶快找
|
|
tmp=*p-'0';
|
|
if (tmp>0 && tmp<=8)
|
|
profile=tmp;
|
|
break;
|
|
case 's':
|
|
if (!(*(++p)))//扼找把抉抗忘 戒忘抗抉扶折我抖忘扼抆?..
|
|
goto l_perform_actions;//...扭忘把忘技快找把抉志 扶快找
|
|
tmp=*p;
|
|
if (tmp>'9')
|
|
tmp=(tmp&0xDF)-7;
|
|
tmp-='0';
|
|
if (tmp<=10)//抉忍把忘扶我折快扶我快 扶忘 抗抉抖-志抉 扼我技抉抗
|
|
sim=tmp;
|
|
break;
|
|
case 'x':
|
|
needExec=true; p++;
|
|
goto l_perform_actions;//抉扼找忘抖抆扶忘攸 折忘扼找抆 扼找把抉抗我 - 我技攸 扳忘抄抖忘
|
|
}
|
|
p++;
|
|
}
|
|
|
|
l_perform_actions:
|
|
|
|
if (profile!=0)
|
|
SetProfile(profile-1);
|
|
|
|
unsigned ret;
|
|
if (IsCalling()) {
|
|
ret=NEED_BEEP;//扭我抗扶快技 志抉 志把快技攸 戒志抉扶抗忘
|
|
}
|
|
else {//志抉 志把快技攸 戒志抉扶抗忘 扶快抖抆戒攸 志抉扼扭把. 戒志批抗我!
|
|
ret=NO_SOUND;
|
|
|
|
SetIllumination(0, 1, 0, 50);//志抑把批忌忘快技 扭抉忱扼志快找抗批 忱我扼扭抖快攸
|
|
SetIllumination(1, 1, 0, 50);//志抑把批忌忘快技 扭抉忱扼志快找抗批 抗扶抉扭抉抗
|
|
|
|
if (alert<0xFF)
|
|
PlaySound(VOLUME_ORGANISER, MMI_CEPID, 0, alert, 0);
|
|
|
|
if (vibra>0)
|
|
PlaySoundLoop(0x2F, 1, vibra);
|
|
|
|
if (needTime)
|
|
SpellTime();
|
|
}
|
|
|
|
if (sim!=0xFF) {
|
|
ipc_multisim->name_to="MultiSim";
|
|
ipc_multisim->name_from="AppEx";
|
|
ipc_multisim->data=(void*)sim;
|
|
GBS_SendMessage(MMI_CEPID, MSG_IPC, 1, ipc_multisim);
|
|
}
|
|
|
|
if (needExec) {
|
|
if (*p!='*') {//x0:\... - 我技攸 扳忘抄抖忘 我戒 "技快扼找忘"
|
|
if (*p) {
|
|
int len=strlen(p)+1;
|
|
WSHDR *ws=AllocWS(len<<1);
|
|
str_2ws(ws, p, len);
|
|
ExecuteFile(ws, NULL, NULL);
|
|
FreeWS(ws);
|
|
}
|
|
}
|
|
else {//x* - 我技攸 扳忘抄抖忘 我戒 "抉扭我扼忘扶我攸"
|
|
ExecuteFile(ptr[0], NULL, NULL);
|
|
}
|
|
}
|
|
|
|
if (needShutdown)
|
|
SwitchPhoneOff();
|
|
|
|
return ret;
|
|
}
|
|
|