-
Notifications
You must be signed in to change notification settings - Fork 0
/
WemReplace.1sc
79 lines (77 loc) · 3.31 KB
/
WemReplace.1sc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
//------------------------------------------------
//--- 010 Editor v9.0.2 Script File
//
// File:
// Authors: Silvris
// Version:
// Purpose:
// Category:
// History:
//------------------------------------------------
uint a;
double b;
double c;
double d;
double e;
int r = 0;
int i;
int j;
int k;
int l;
void WemReplace (uint a, double b, double c, double d, double e){
for (i = 1; i<2;i++){
if (MainBlock[i].Header.blockID == 1129466184){
for (j = 0;j<MainBlock[i].HIRCBlock.structCount;j++){
if (MainBlock[i].HIRCBlock.HIRCData[j].StructHeader.blockID == 11){
if (MainBlock[i].HIRCBlock.HIRCData[j].musictrack.objectID == a){
if (MainBlock[i].HIRCBlock.HIRCData[j].musictrack.unknCount == 1){
MainBlock[i].HIRCBlock.HIRCData[j].musictrack.startingPointNegative = b;
MainBlock[i].HIRCBlock.HIRCData[j].musictrack.startingPointPositive = c;
MainBlock[i].HIRCBlock.HIRCData[j].musictrack.remainderOfSong = d;
MainBlock[i].HIRCBlock.HIRCData[j].musictrack.songTotalLength = e;
};
};
};
};
};
};
};
void MusicTrackMultiVar (uint id, uint count, double values[]){
for (i = 1; i<2;i++){
if (MainBlock[i].Header.blockID == 1129466184){
for (j = 0;j<MainBlock[i].HIRCBlock.structCount;j++){
if (MainBlock[i].HIRCBlock.HIRCData[j].StructHeader.blockID == 11){
if (MainBlock[i].HIRCBlock.HIRCData[j].musictrack.objectID == id){
if (MainBlock[i].HIRCBlock.HIRCData[j].musictrack.unknCount == count){
for(k=0;k<count;k++){
MainBlock[i].HIRCBlock.HIRCData[j].musictrack.startingPointNegative[k] = values[0+(k*4)];
MainBlock[i].HIRCBlock.HIRCData[j].musictrack.startingPointPositive[k] = values[1+(k*4)];
MainBlock[i].HIRCBlock.HIRCData[j].musictrack.remainderOfSong[k] = values[2+(k*4)];
MainBlock[i].HIRCBlock.HIRCData[j].musictrack.songTotalLength[k] = values[3+(k*4)];
};
};
};
};
};
};
};
};
void MusicSegmentSpecificVar (uint id, double loop1, double loop2){
for (i = 1; i<2;i++){
if (MainBlock[i].Header.blockID == 1129466184){
for (j = 0;j<MainBlock[i].HIRCBlock.structCount;j++){
if (MainBlock[i].HIRCBlock.HIRCData[j].StructHeader.blockID == 10){
if (MainBlock[i].HIRCBlock.HIRCData[j].musicsegment.objectID == id){
MainBlock[i].HIRCBlock.HIRCData[j].musicsegment.loopTime1 = loop1;
MainBlock[i].HIRCBlock.HIRCData[j].musicsegment.loopTime2 = loop2;
};
};
};
};
};
};
//examples for all functions
//WemReplace (1066657510, 0.000, 0.000, -159724.75, 168963.792);
//double array[8] = { -17869.396,27469.396,-44858.521,97586.438,16989.125,17869.396,-70117.042,97586.438}
//MusicTrackMultiVar (359197825, 2, array);
//MusicSegmentSpecificVar (786435346, 9239.042, 9239.042);