Changeset 688 for Daodan/src/Daodan_BSL.c
- Timestamp:
- Mar 4, 2013, 3:21:23 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Daodan/src/Daodan_BSL.c
r681 r688 19 19 uint16_t ONICALL bsl_int32mul(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], int* dontuse1, int* dontuse2, sl_arg* ret) 20 20 { 21 ret->val ue_int32 = args[0].value_int32 * args[1].value_int32;21 ret->val.value_int32 = args[0].val.value_int32 * args[1].val.value_int32; 22 22 ret->type = sl_int32; 23 23 return 0; … … 30 30 31 31 if (args[0].type == sl_int32) 32 val1 = args[0].val ue_int32;32 val1 = args[0].val.value_int32; 33 33 else 34 val1 = args[0].val ue_float;34 val1 = args[0].val.value_float; 35 35 36 36 if (args[1].type == sl_int32) 37 val2 = args[1].val ue_int32;37 val2 = args[1].val.value_int32; 38 38 else 39 val2 = args[1].val ue_float;40 41 ret->val ue_float = (float)(val1 * val2);39 val2 = args[1].val.value_float; 40 41 ret->val.value_float = (float)(val1 * val2); 42 42 ret->type = sl_float; 43 43 return 0; … … 46 46 uint16_t ONICALL bsl_int32div(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], int* dontuse1, int* dontuse2, sl_arg* ret) 47 47 { 48 ret->val ue_int32 = args[0].value_int32 / args[1].value_int32;48 ret->val.value_int32 = args[0].val.value_int32 / args[1].val.value_int32; 49 49 ret->type = sl_int32; 50 50 return 0; … … 56 56 57 57 if (args[0].type == sl_int32) 58 val1 = args[0].val ue_int32;58 val1 = args[0].val.value_int32; 59 59 else 60 val1 = args[0].val ue_float;60 val1 = args[0].val.value_float; 61 61 62 62 if (args[1].type == sl_int32) 63 val2 = args[1].val ue_int32;63 val2 = args[1].val.value_int32; 64 64 else 65 val2 = args[1].val ue_float;66 67 ret->val ue_float = (float)(val1 / val2);65 val2 = args[1].val.value_float; 66 67 ret->val.value_float = (float)(val1 / val2); 68 68 ret->type = sl_float; 69 69 return 0; … … 75 75 int32_t end = 0; 76 76 77 if (args[0].val ue_int32 == args[1].value_int32)77 if (args[0].val.value_int32 == args[1].val.value_int32) 78 78 return 1; 79 else if (args[0].val ue_int32 > args[1].value_int32)80 { 81 start = args[1].val ue_int32;82 end = args[0].val ue_int32;79 else if (args[0].val.value_int32 > args[1].val.value_int32) 80 { 81 start = args[1].val.value_int32; 82 end = args[0].val.value_int32; 83 83 } 84 84 else 85 85 { 86 start = args[0].val ue_int32;87 end = args[1].val ue_int32;88 } 89 90 ret->val ue_int32 = start + (rand() % (uint32_t)(end - start + 1));86 start = args[0].val.value_int32; 87 end = args[1].val.value_int32; 88 } 89 90 ret->val.value_int32 = start + (rand() % (uint32_t)(end - start + 1)); 91 91 ret->type = sl_int32; 92 92 return 0; … … 97 97 int index; 98 98 if (numargs == 0) index = 0; 99 else if (args[0].type == sl_str32) index = DDrGetCharacterIndexFromName(args[0].val ue_str32);100 else index = args[0].val ue_int32;99 else if (args[0].type == sl_str32) index = DDrGetCharacterIndexFromName(args[0].val.value_str32); 100 else index = args[0].val.value_int32; 101 101 //killcount = ONgGameState->CharacterStorage[index].Kills; 102 102 //ONgGameState + index * 0x16A0 + 0x1260 + 0x1670; 103 ret->val ue_int32 = ONgGameState->CharacterStorage[index].Kills;103 ret->val.value_int32 = ONgGameState->CharacterStorage[index].Kills; 104 104 ret->type = sl_int32; 105 105 return 0; … … 110 110 int index; 111 111 if (numargs == 0) index = 0; 112 else if (args[0].type == sl_str32) index = DDrGetCharacterIndexFromName(args[0].val ue_str32);113 else index = args[0].val ue_int32;114 ret->val ue_int32 = ONgGameState->CharacterStorage[index].Damage;112 else if (args[0].type == sl_str32) index = DDrGetCharacterIndexFromName(args[0].val.value_str32); 113 else index = args[0].val.value_int32; 114 ret->val.value_int32 = ONgGameState->CharacterStorage[index].Damage; 115 115 ret->type = sl_int32; 116 116 return 0; … … 127 127 128 128 if (numargs < 2 || args[1].type != sl_str32) return 1; 129 else if (args[0].type == sl_str32) index = DDrGetCharacterIndexFromName(args[0].val ue_str32);130 else index = args[0].val ue_int32;131 132 133 134 if(!strcmp(args[1].val ue_str32,"ammo"))129 else if (args[0].type == sl_str32) index = DDrGetCharacterIndexFromName(args[0].val.value_str32); 130 else index = args[0].val.value_int32; 131 132 133 134 if(!strcmp(args[1].val.value_str32,"ammo")) 135 135 { 136 136 returnval = &(Chr[index].Inventory.AmmoUsed); 137 137 } 138 else if(!strcmp(args[1].val ue_str32,"hypo"))138 else if(!strcmp(args[1].val.value_str32,"hypo")) 139 139 { 140 140 returnval = &(Chr[index].Inventory.HypoUsed); 141 141 } 142 else if(!strcmp(args[1].val ue_str32,"cells"))142 else if(!strcmp(args[1].val.value_str32,"cells")) 143 143 { 144 144 returnval = &(Chr[index].Inventory.CellsUsed); 145 145 } 146 else if(!strcmp(args[1].val ue_str32,"invis"))146 else if(!strcmp(args[1].val.value_str32,"invis")) 147 147 { 148 148 returnval = &(Chr[index].Inventory.CloakUsed); 149 149 } 150 else if(!strcmp(args[1].val ue_str32,"shield"))150 else if(!strcmp(args[1].val.value_str32,"shield")) 151 151 { 152 152 returnval = &(Chr[index].Inventory.ShieldUsed); 153 153 } 154 else if(!strcmp(args[1].val ue_str32,"lsi"))154 else if(!strcmp(args[1].val.value_str32,"lsi")) 155 155 { 156 156 returnval = &(Chr[index].Inventory.hasLSI); … … 170 170 //todo, add setting 171 171 172 if(is_lsi) ret->val ue_int32 = (int)*(bool*)returnval;173 else ret->val ue_int32 = *(int*)returnval;172 if(is_lsi) ret->val.value_int32 = (int)*(bool*)returnval; 173 else ret->val.value_int32 = *(int*)returnval; 174 174 ret->type = sl_int32; 175 175 176 176 if (numargs >= 3) 177 177 { 178 if(is_lsi) *(bool*)returnval = args[2].val ue_int32;179 else *(int*)returnval = args[2].val ue_int32;178 if(is_lsi) *(bool*)returnval = args[2].val.value_int32; 179 else *(int*)returnval = args[2].val.value_int32; 180 180 } 181 181 … … 190 190 int* health; 191 191 if (numargs == 0) index = 0; 192 else if (args[0].type == sl_str32) index = DDrGetCharacterIndexFromName(args[0].val ue_str32);193 else index = args[0].val ue_int32;192 else if (args[0].type == sl_str32) index = DDrGetCharacterIndexFromName(args[0].val.value_str32); 193 else index = args[0].val.value_int32; 194 194 Chr = ONgGameState->CharacterStorage; 195 195 health = &Chr[index].Health; 196 196 197 ret->val ue_int32 = *health;198 ret->type = sl_int32; 199 200 if (args[1].val ue_int32) {201 *health = args[1].val ue_int32;202 } 203 ret->val ue_int32 = *health;197 ret->val.value_int32 = *health; 198 ret->type = sl_int32; 199 200 if (args[1].val.value_int32) { 201 *health = args[1].val.value_int32; 202 } 203 ret->val.value_int32 = *health; 204 204 ret->type = sl_int32; 205 205 return 0; … … 211 211 Character* Chr; 212 212 if (numargs == 0) index = 0; 213 else if (args[0].type == sl_str32) index = DDrGetCharacterIndexFromName(args[0].val ue_str32);214 else index = args[0].val ue_int32;213 else if (args[0].type == sl_str32) index = DDrGetCharacterIndexFromName(args[0].val.value_str32); 214 else index = args[0].val.value_int32; 215 215 Chr = ONgGameState->CharacterStorage ; 216 216 … … 227 227 DDrConsole_PrintF("NoPath %s", Chr[index].ScriptNoPath); 228 228 */ 229 ret->val ue_int32 = Chr[index].RegenHax;229 ret->val.value_int32 = Chr[index].RegenHax; 230 230 ret->type = sl_int32; 231 231 232 232 if (numargs >= 2) { 233 Chr[index].RegenHax = args[1].val ue_int32;233 Chr[index].RegenHax = args[1].val.value_int32; 234 234 } 235 235 return 0; … … 246 246 if (numargs < 2) return 1; 247 247 248 if (args[0].type == sl_str32) index = DDrGetCharacterIndexFromName(args[0].val ue_str32);249 else index = args[0].val ue_int32;250 if (index == -1) index = args[0].val ue_int32;251 252 if (args[1].type == sl_str32) index2 = DDrGetCharacterIndexFromName(args[1].val ue_str32);253 else index2 = args[1].val ue_int32;254 if (index2 == -1) index2 = args[1].val ue_int32;248 if (args[0].type == sl_str32) index = DDrGetCharacterIndexFromName(args[0].val.value_str32); 249 else index = args[0].val.value_int32; 250 if (index == -1) index = args[0].val.value_int32; 251 252 if (args[1].type == sl_str32) index2 = DDrGetCharacterIndexFromName(args[1].val.value_str32); 253 else index2 = args[1].val.value_int32; 254 if (index2 == -1) index2 = args[1].val.value_int32; 255 255 Char1 = &Chr[index]; 256 256 Char2 = &Chr[index2]; 257 257 258 258 259 ret->val ue_float = sqrt( pow((Char1->Location.X - Char2->Location.X), 2) + pow((Char1->Location.Y - Char2->Location.Y), 2) + pow((Char1->Location.Z - Char2->Location.Z),2));259 ret->val.value_float = sqrt( pow((Char1->Location.X - Char2->Location.X), 2) + pow((Char1->Location.Y - Char2->Location.Y), 2) + pow((Char1->Location.Z - Char2->Location.Z),2)); 260 260 ret->type = sl_float; 261 261 return 0; … … 273 273 274 274 if (numargs < 2) return 1; 275 if (args[0].type == sl_str32) index = DDrGetCharacterIndexFromName(args[0].val ue_str32);276 else index = args[0].val ue_int32;277 if (index == -1) index = args[0].val ue_int32;275 if (args[0].type == sl_str32) index = DDrGetCharacterIndexFromName(args[0].val.value_str32); 276 else index = args[0].val.value_int32; 277 if (index == -1) index = args[0].val.value_int32; 278 278 Chr = ONgGameState->CharacterStorage; 279 279 if(numargs == 3) 280 280 { 281 if (!strcmp(args[1].val ue_str32,"X") || !strcmp(args[1].value_str32,"x"))281 if (!strcmp(args[1].val.value_str32,"X") || !strcmp(args[1].val.value_str32,"x")) 282 282 loc = &(Chr[index].Position.X); 283 else if (!strcmp(args[1].val ue_str32,"Y") || !strcmp(args[1].value_str32,"y"))283 else if (!strcmp(args[1].val.value_str32,"Y") || !strcmp(args[1].val.value_str32,"y")) 284 284 loc = &(Chr[index].Position.Y); 285 else if (!strcmp(args[1].val ue_str32,"Z") || !strcmp(args[1].value_str32,"z"))285 else if (!strcmp(args[1].val.value_str32,"Z") || !strcmp(args[1].val.value_str32,"z")) 286 286 loc = &(Chr[index].Position.Z); 287 287 } 288 288 else if (numargs == 4) { 289 289 ActiveCharacter* Active = (ActiveCharacter*)ONrGetActiveCharacter(&Chr[index]); 290 Chr[index].Location.X = args[1].val ue_float;291 Chr[index].Location.Y = args[2].val ue_float;292 Chr[index].Location.Z = args[3].val ue_float;290 Chr[index].Location.X = args[1].val.value_float; 291 Chr[index].Location.Y = args[2].val.value_float; 292 Chr[index].Location.Z = args[3].val.value_float; 293 293 if(Active) 294 294 { 295 295 Active->PhyContext->Position = Chr[index].Location; 296 296 } 297 ret->val ue_float = 1;297 ret->val.value_float = 1; 298 298 ret->type = sl_float; 299 299 return 0; … … 301 301 else return 1; 302 302 303 ret->val ue_float = *loc;303 ret->val.value_float = *loc; 304 304 ret->type = sl_float; 305 305 306 306 if(numargs == 3) { 307 307 //currently broken, does nothing. 308 *loc = args[2].val ue_float;308 *loc = args[2].val.value_float; 309 309 } 310 310 return 0; … … 315 315 int index; 316 316 if (numargs == 0) index = 0; 317 else if (args[0].type == sl_str32) index = DDrGetCharacterIndexFromName(args[0].val ue_str32);318 else index = args[0].val ue_int32;317 else if (args[0].type == sl_str32) index = DDrGetCharacterIndexFromName(args[0].val.value_str32); 318 else index = args[0].val.value_int32; 319 319 if(1) { 320 320 Character* Chr = ONgGameState->CharacterStorage ; … … 323 323 int oldhealth = Chr->Health; 324 324 if (numargs >= 2) { 325 *maxhealth = args[1].val ue_int32;326 } 327 if (numargs >= 3 && args[2].val ue_bool) {328 Chr->Health = (int)(((float)args[1].val ue_int32 / (float)oldmaxhealth) * (float)oldhealth);329 } 330 ret->val ue_int32 = oldmaxhealth;325 *maxhealth = args[1].val.value_int32; 326 } 327 if (numargs >= 3 && args[2].val.value_bool) { 328 Chr->Health = (int)(((float)args[1].val.value_int32 / (float)oldmaxhealth) * (float)oldhealth); 329 } 330 ret->val.value_int32 = oldmaxhealth; 331 331 ret->type = sl_int32; 332 332 return 0; … … 340 340 int index; 341 341 if (numargs == 0) index = 0; 342 else if (args[0].type == sl_str32) index = DDrGetCharacterIndexFromName(args[0].val ue_str32);343 else index = args[0].val ue_int32;342 else if (args[0].type == sl_str32) index = DDrGetCharacterIndexFromName(args[0].val.value_str32); 343 else index = args[0].val.value_int32; 344 344 if(1) { 345 345 Character* Chr = ONgGameState->CharacterStorage; 346 346 ActiveCharacter* Active = (ActiveCharacter*)ONrGetActiveCharacter(&Chr[index]); 347 347 if (!Active) return 1; 348 // ret->val ue_int32 = Active->LastDamageSourceCharacter;348 // ret->val.value_int32 = Active->LastDamageSourceCharacter; 349 349 ret->type = sl_int32; 350 350 return 0; … … 360 360 361 361 if (numargs == 0) index = 0; 362 else if (args[0].type == sl_str32) index = DDrGetCharacterIndexFromName(args[0].val ue_str32);363 else index = args[0].val ue_int32;362 else if (args[0].type == sl_str32) index = DDrGetCharacterIndexFromName(args[0].val.value_str32); 363 else index = args[0].val.value_int32; 364 364 if (index == -1) { 365 365 ret->type = sl_str32; 366 ret->val ue_str32 = "NULL";366 ret->val.value_str32 = "NULL"; 367 367 return 0; 368 368 } 369 369 name = &ONgGameState->CharacterStorage[index].Name; 370 370 if (numargs == 2) { 371 strncpy(name, (char*)args[1].val ue_str32, 31);371 strncpy(name, (char*)args[1].val.value_str32, 31); 372 372 } 373 373 374 374 ret->type = sl_str32; 375 ret->val ue_str32 = name;375 ret->val.value_str32 = name; 376 376 377 377 return 0; … … 383 383 //testing numargs... 384 384 ret->type = sl_int32; 385 ret->val ue_int32 = numargs;385 ret->val.value_int32 = numargs; 386 386 return 0; 387 387 } … … 399 399 } 400 400 if(numargs == 0) return 0; 401 if(numargs > 1 ) color.R = (char)args[1].val ue_int32;401 if(numargs > 1 ) color.R = (char)args[1].val.value_int32; 402 402 else color.R = 255; 403 if(numargs > 2 ) color.G = (char)args[2].val ue_int32;403 if(numargs > 2 ) color.G = (char)args[2].val.value_int32; 404 404 else color.G = 255; 405 if(numargs > 3 ) color.B = (char)args[3].val ue_int32;405 if(numargs > 3 ) color.B = (char)args[3].val.value_int32; 406 406 else color.B = 255; 407 407 color.A = 0; 408 if(numargs > 5 ) shade.R = (char)args[5].val ue_int32;408 if(numargs > 5 ) shade.R = (char)args[5].val.value_int32; 409 409 else shade.R = 0x3F; 410 if(numargs > 6 ) shade.G = (char)args[6].val ue_int32;410 if(numargs > 6 ) shade.G = (char)args[6].val.value_int32; 411 411 else shade.G = 0x3F; 412 if(numargs > 7 ) shade.B = (char)args[7].val ue_int32;412 if(numargs > 7 ) shade.B = (char)args[7].val.value_int32; 413 413 else shade.B = 0x3F; 414 414 shade.A = 0; 415 415 416 DDrConsole_PrintColored(args[0].val ue_str32, 1, color, shade);416 DDrConsole_PrintColored(args[0].val.value_str32, 1, color, shade); 417 417 return 0; 418 418 } … … 423 423 424 424 ret->type = sl_int32; 425 ret->val ue_int32 = DDrGetCharacterIndexFromName(args[0].value_str32);425 ret->val.value_int32 = DDrGetCharacterIndexFromName(args[0].val.value_str32); 426 426 427 427 return 0; … … 488 488 Character* Chr; 489 489 ActiveCharacter* Active; 490 if (args[0].type == sl_str32) index = DDrGetCharacterIndexFromName(args[0].val ue_str32);491 else index = args[0].val ue_int32;490 if (args[0].type == sl_str32) index = DDrGetCharacterIndexFromName(args[0].val.value_str32); 491 else index = args[0].val.value_int32; 492 492 493 493 Chr = &(ONgGameState->CharacterStorage[index]); … … 497 497 for(i = 1; i < numargs - 1; i++) { 498 498 for(j = 0; j < 32; j++) { 499 if(!strcmp(args[i].val ue_str32, Actions1[j].Name)) {499 if(!strcmp(args[i].val.value_str32, Actions1[j].Name)) { 500 500 Input1 = Input1 | Actions1[j].Bit; 501 501 } 502 502 } 503 503 for(j = 0; j < 9; j++) { 504 if(!strcmp(args[i].val ue_str32, Actions2[j].Name)) {504 if(!strcmp(args[i].val.value_str32, Actions2[j].Name)) { 505 505 Input2 = Input2 | Actions2[j].Bit; 506 506 } … … 513 513 return 0; 514 514 } 515 if ( args[numargs - 1].val ue_int32 <= 0) {515 if ( args[numargs - 1].val.value_int32 <= 0) { 516 516 return 0; 517 517 } 518 518 else { 519 args[numargs - 1].val ue_int32 -= 1;519 args[numargs - 1].val.value_int32 -= 1; 520 520 *dontuse2 = 1; 521 521 *dontuse1 = 1; … … 528 528 // int index; 529 529 // if (numargs < 4) index = 0; 530 // else if (args[0].type == sl_str32) index = DDrGetCharacterIndexFromName(args[0].val ue_str32);531 // else index = args[0].val ue_int32;530 // else if (args[0].type == sl_str32) index = DDrGetCharacterIndexFromName(args[0].val.value_str32); 531 // else index = args[0].val.value_int32; 532 532 533 533 // Character* Chr = ONgGameState->CharacterStorage; … … 540 540 for(i = 0; i < numargs; i++) { 541 541 for(j = 0; j < 32; j++) { 542 //DDrConsole_PrintF("Testing %s against %s 0x%x", args[i].val ue_str32, Actions1[j].Name, Actions1[j].Bit);543 if(!strcmp(args[i].val ue_str32, Actions1[j].Name)) {542 //DDrConsole_PrintF("Testing %s against %s 0x%x", args[i].val.value_str32, Actions1[j].Name, Actions1[j].Bit); 543 if(!strcmp(args[i].val.value_str32, Actions1[j].Name)) { 544 544 Input1 = Input1 | Actions1[j].Bit; 545 545 //DDrConsole_PrintF("Success!"); … … 548 548 } 549 549 for(j = 0; j < 9; j++) { 550 if(!strcmp(args[i].val ue_str32, Actions2[j].Name)) Input2 = Input2 | Actions2[j].Bit;550 if(!strcmp(args[i].val.value_str32, Actions2[j].Name)) Input2 = Input2 | Actions2[j].Bit; 551 551 552 552 } 553 553 } 554 554 //DDrConsole_PrintF("Testing: 0x%x Input: 0x%x",Input1, *(int*)(ONgGameState + 0xB8 + 0x10)); 555 ret->val ue_int32 = 0;556 ret->type = sl_int32; 557 if ( (ONgGameState->Input.Current.Actions1 == Input1) && (ONgGameState->Input.Current.Actions2 == Input2)) ret->val ue_int32 = 1;555 ret->val.value_int32 = 0; 556 ret->type = sl_int32; 557 if ( (ONgGameState->Input.Current.Actions1 == Input1) && (ONgGameState->Input.Current.Actions2 == Input2)) ret->val.value_int32 = 1; 558 558 return 0; 559 559 } … … 563 563 // int index; 564 564 // if (numargs < 4) index = 0; 565 // else if (args[0].type == sl_str32) index = DDrGetCharacterIndexFromName(args[0].val ue_str32);566 // else index = args[0].val ue_int32;565 // else if (args[0].type == sl_str32) index = DDrGetCharacterIndexFromName(args[0].val.value_str32); 566 // else index = args[0].val.value_int32; 567 567 568 568 // Character* Chr = ONgGameState->CharacterStorage; … … 582 582 583 583 } 584 if(numargs < 1 || args[0].val ue == 0) return;584 if(numargs < 1 || args[0].val.value == 0) return; 585 585 //for(i = 0; i < numargs; i++) { 586 586 */ 587 587 i = 0; 588 588 for(j = 0; j < 32; j++) { 589 //DDrConsole_PrintF("Testing %s against %s 0x%x", args[i].val ue_str32, Actions1[j].Name, Actions1[j].Bit);590 if(!strcmp(args[i].val ue_str32, Actions1[j].Name)) {589 //DDrConsole_PrintF("Testing %s against %s 0x%x", args[i].val.value_str32, Actions1[j].Name, Actions1[j].Bit); 590 if(!strcmp(args[i].val.value_str32, Actions1[j].Name)) { 591 591 Input1 = Input1 | Actions1[j].Bit; 592 592 //DDrConsole_PrintF("Success!"); … … 595 595 } 596 596 for(j = 0; j < 9; j++) { 597 if(!strcmp(args[i].val ue_str32, Actions2[j].Name)) Input2 = Input2 | Actions2[j].Bit;597 if(!strcmp(args[i].val.value_str32, Actions2[j].Name)) Input2 = Input2 | Actions2[j].Bit; 598 598 599 599 } … … 622 622 int i; 623 623 char* placeinoutput = output; 624 char* placeininput = args[0].val ue_str32;624 char* placeininput = args[0].val.value_str32; 625 625 int formatnum = 0; 626 626 //fix the broken bsl numargs... … … 670 670 //sprintf(output, output, args[i].value_str32); 671 671 memcpy(buffer, output, 1024); 672 if(args[i].val ue == 0) break;672 if(args[i].val.value == 0) break; 673 673 switch(args[i].type) 674 674 { 675 675 case sl_bool: 676 676 case sl_int32: 677 sprintf(output, buffer, args[i].val ue_int32);677 sprintf(output, buffer, args[i].val.value_int32); 678 678 break; 679 679 case sl_float: 680 680 //crashes oni, why? 681 // sprintf(output, output, args[i].val ue_float);681 // sprintf(output, output, args[i].val.value_float); 682 682 break; 683 683 case sl_str32: 684 sprintf(output, buffer, args[i].val ue_str32);684 sprintf(output, buffer, args[i].val.value_str32); 685 685 break; 686 686 case sl_void: … … 690 690 } 691 691 //output[32] = 0; 692 ret->val ue_str32 = output;692 ret->val.value_str32 = output; 693 693 ret->type = sl_str32; 694 694 return 0; … … 766 766 uint16_t ONICALL cinematic_start_patch(sl_callinfo* callinfo, unsigned int numargs, sl_arg args[], int* dontuse1, int* dontuse2, sl_arg* ret) 767 767 { 768 args[1].val ue_int32 = (double)args[1].value_int32 / (double)(gl_eng->DisplayMode.Width) * (4.0 / 3.0 * (double)(gl_eng->DisplayMode.Height));768 args[1].val.value_int32 = (double)args[1].val.value_int32 / (double)(gl_eng->DisplayMode.Width) * (4.0 / 3.0 * (double)(gl_eng->DisplayMode.Height)); 769 769 return ((sl_func)(OniExe + 0x000f3830))(callinfo, numargs, args, dontuse1, dontuse2, ret); 770 770 }
Note:
See TracChangeset
for help on using the changeset viewer.