| 155 | |
| 156 | |
| 157 | static jstring JNICALL java_nextTextPart(JNIEnv* env, jobject o, jstring total, jintArray state) { |
| 158 | char buffer[NATIVE_STR_LEN]; |
| 159 | // TODO should it really be raw? |
| 160 | cc_string text = Java_DecodeRaw(env, total, buffer); |
| 161 | |
| 162 | jint* state_ = (*env)->GetIntArrayElements(env, state, NULL); |
| 163 | text.buffer += state_[0]; |
| 164 | text.length -= state_[0]; |
| 165 | |
| 166 | cc_string left = text, part; |
| 167 | char colorCode = 'f'; |
| 168 | |
| 169 | Drawer2D_UNSAFE_NextPart(&text, &part, &colorCode); |
| 170 | BitmapCol color = Drawer2D_GetColor(colorCode); |
| 171 | |
| 172 | state_[0] += left.length - text.length; |
| 173 | state_[1] = ToAndroidColor(color); |
| 174 | |
| 175 | (*env)->ReleaseIntArrayElements(env, state, state_, 0); |
| 176 | return Java_AllocString(env, &part); |
| 177 | } |
| 178 | |
| 179 | |
| 180 | /*########################################################################################################################* |
nothing calls this directly
no test coverage detected