equal
deleted
inserted
replaced
1270 } else { |
1270 } else { |
1271 FileEntry *newfe = GetSound(sound); |
1271 FileEntry *newfe = GetSound(sound); |
1272 FileEntry *oldfe = GetSound(orig_sound); |
1272 FileEntry *oldfe = GetSound(orig_sound); |
1273 |
1273 |
1274 /* Literally copy the data of the new sound over the original */ |
1274 /* Literally copy the data of the new sound over the original */ |
1275 memcpy(oldfe, newfe, sizeof(*oldfe)); |
1275 *oldfe = *newfe; |
1276 } |
1276 } |
1277 } |
1277 } |
1278 break; |
1278 break; |
1279 |
1279 |
1280 default: |
1280 default: |
2937 return; |
2937 return; |
2938 } |
2938 } |
2939 |
2939 |
2940 grfmsg(GMS_NOTICE, "ImportGRFSound: Copying sound %d (%d) from file %X", sound, file->sound_offset + sound, grfid); |
2940 grfmsg(GMS_NOTICE, "ImportGRFSound: Copying sound %d (%d) from file %X", sound, file->sound_offset + sound, grfid); |
2941 |
2941 |
2942 memcpy(se, GetSound(file->sound_offset + sound), sizeof(*se)); |
2942 *se = *GetSound(file->sound_offset + sound); |
2943 |
2943 |
2944 /* Reset volume and priority, which TTDPatch doesn't copy */ |
2944 /* Reset volume and priority, which TTDPatch doesn't copy */ |
2945 se->volume = 128; |
2945 se->volume = 128; |
2946 se->priority = 0; |
2946 se->priority = 0; |
2947 } |
2947 } |