[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Initial animation support in backend
From: |
Pavel Machek |
Subject: |
Initial animation support in backend |
Date: |
Mon, 3 Jun 2002 22:32:03 +0200 |
User-agent: |
Mutt/1.3.28i |
Hi!
This adds initial EMS animation support to libgnokii. There's no
frontend support, yet, but it looks good to me. Commited.
Pavel
Index: common/gsm-bitmaps.c
===================================================================
RCS file: /cvsroot/gnokii/gnokii/common/gsm-bitmaps.c,v
retrieving revision 1.27
diff -u -u -r1.27 gsm-bitmaps.c
--- common/gsm-bitmaps.c 2 Jun 2002 21:51:30 -0000 1.27
+++ common/gsm-bitmaps.c 3 Jun 2002 20:02:01 -0000
@@ -263,6 +270,17 @@
message[current++] = bitmap->width/8; /* Horizontal size / 8 */
message[current++] = bitmap->height;
break;
+ case GSM_EMSAnimation:
+ dprintf("EMS animation\n");
+ if (bitmap->width != 16) {
+ fprintf(stderr, "EMS animation needs bitmap 16x16 ...
\n");
+ return GE_NOTSUPPORTED;
+ }
+ message[current++] = bitmap->width/8*bitmap->height+3;
+ message[current++] = 0x0e; /* Animation code */
+ message[current++] = bitmap->width/8*bitmap->height+1; /*
Picture size */;
+ break;
+ case GSM_EMSAnimation2:
default: /* error */
dprintf("gulp?\n");
break;
@@ -270,6 +288,8 @@
switch (bitmap->type) {
case GSM_EMSPicture:
+ case GSM_EMSAnimation:
+ case GSM_EMSAnimation2:
break;
default: /* Add common nokia headers */
/* Info field */
Index: common/gsm-sms.c
===================================================================
RCS file: /cvsroot/gnokii/gnokii/common/gsm-sms.c,v
retrieving revision 1.86
diff -u -u -r1.86 gsm-sms.c
--- common/gsm-sms.c 3 Jun 2002 19:26:39 -0000 1.86
+++ common/gsm-sms.c 3 Jun 2002 20:02:10 -0000
@@ -1096,10 +1096,20 @@
case GSM_EMSAnimation: break; /* We'll construct
headers in EncodeSMSBitmap */
}
if (error != GE_NONE) return error;
-
size =
GSM_EncodeSMSBitmap(&(sms->UserData[i].u.Bitmap), rawsms->UserData +
rawsms->UserDataLength);
rawsms->Length += size;
rawsms->UserDataLength += size;
+ rawsms->DCS = 0xf5;
+ rawsms->UDHIndicator = 1;
+ break;
+
+ case SMS_AnimationData:
+ error = GE_NONE;
+ for (i=0; i<4; i++) {
+ size =
GSM_EncodeSMSBitmap(&(sms->UserData[i].u.Animation[i]), rawsms->UserData +
rawsms->UserDataLength);
+ rawsms->Length += size;
+ rawsms->UserDataLength += size;
+ }
rawsms->DCS = 0xf5;
rawsms->UDHIndicator = 1;
break;
Index: gnokii/gnokii.c
===================================================================
RCS file: /cvsroot/gnokii/gnokii/gnokii/gnokii.c,v
retrieving revision 1.246
diff -u -u -r1.246 gnokii.c
--- gnokii/gnokii.c 2 Jun 2002 21:36:44 -0000 1.246
+++ gnokii/gnokii.c 3 Jun 2002 20:02:43 -0000
@@ -1462,7 +1473,6 @@
sms.UserData[1].Type = SMS_NokiaText;
readtext(&sms.UserData[1], 120);
sms.UserData[2].Type = SMS_NoData;
- // strcpy(sms.UserData[1].u.Text, "Ahoj, tohle je
mala zprava na testovani telefonu");
}
/* Send the message. */
Index: include/gsm-bitmaps.h
===================================================================
RCS file: /cvsroot/gnokii/gnokii/include/gsm-bitmaps.h,v
retrieving revision 1.15
diff -u -u -r1.15 gsm-bitmaps.h
--- include/gsm-bitmaps.h 23 May 2002 09:33:12 -0000 1.15
+++ include/gsm-bitmaps.h 3 Jun 2002 20:02:45 -0000
@@ -45,7 +45,8 @@
GSM_DealerNoteText,
GSM_NewOperatorLogo,
GSM_EMSPicture,
- GSM_EMSAnimation,
+ GSM_EMSAnimation, /* First bitmap in animation should
have this type */
+ GSM_EMSAnimation2, /* ...second, third and fourth should
have this type */
} GSM_Bitmap_Types;
#define GSM_MAX_BITMAP_SIZE 864
Index: include/gsm-sms.h
===================================================================
RCS file: /cvsroot/gnokii/gnokii/include/gsm-sms.h,v
retrieving revision 1.41
diff -u -u -r1.41 gsm-sms.h
--- include/gsm-sms.h 2 Jun 2002 21:36:45 -0000 1.41
+++ include/gsm-sms.h 3 Jun 2002 20:02:50 -0000
@@ -306,7 +306,8 @@
SMS_iMelodyText = 0x04,
SMS_MultiData = 0x05,
SMS_NokiaText = 0x06,
- SMS_OtherData = 0x07
+ SMS_AnimationData= 0x07,
+ SMS_OtherData = 0x08
} SMS_DataType;
/*** FOLDER INFO ***/
@@ -347,6 +348,7 @@
GSM_Multi Multi;
GSM_Bitmap Bitmap;
GSM_Ringtone Ringtone;
+ GSM_Bitmap Animation[4];
} u;
} SMS_UserData;
--
(about SSSCA) "I don't say this lightly. However, I really think that the U.S.
no longer is classifiable as a democracy, but rather as a plutocracy." --hpa
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Initial animation support in backend,
Pavel Machek <=