This doesn't seem exactly how HI would have written this, but it OKs TODO: Try to clean this up?
| 54 | // This doesn't seem exactly how HI would have written this, but it OKs |
| 55 | // TODO: Try to clean this up? |
| 56 | S32 xSTPreLoadScene(U32 sid, void* userdata, S32 flg_hiphop) |
| 57 | { |
| 58 | S32 result; |
| 59 | S32 i = 0; |
| 60 | st_STRAN_SCENE* sdata; |
| 61 | char* path; |
| 62 | if ((flg_hiphop & 3) == 2) |
| 63 | { |
| 64 | sdata = XST_lock_next(); |
| 65 | sdata->scnid = sid; |
| 66 | sdata->userdata = userdata; |
| 67 | sdata->isHOP = 1; |
| 68 | |
| 69 | path = XST_translate_sid_path(sid, ".HOP"); |
| 70 | if (path != NULL) |
| 71 | { |
| 72 | strcpy(sdata->fnam, path); |
| 73 | i = XST_PreLoadScene(sdata, path); |
| 74 | } |
| 75 | if (i == 0) |
| 76 | { |
| 77 | path = XST_translate_sid(sid, ".HOP"); |
| 78 | if (path != NULL) |
| 79 | { |
| 80 | strcpy(sdata->fnam, path); |
| 81 | i = XST_PreLoadScene(sdata, path); |
| 82 | } |
| 83 | } |
| 84 | if (i == 0) |
| 85 | { |
| 86 | XST_unlock(sdata); |
| 87 | result = 0; |
| 88 | } |
| 89 | else |
| 90 | { |
| 91 | result = i; |
| 92 | } |
| 93 | } |
| 94 | else |
| 95 | { |
| 96 | do |
| 97 | { |
| 98 | sdata = XST_lock_next(); |
| 99 | sdata->scnid = sid; |
| 100 | sdata->userdata = userdata; |
| 101 | sdata->isHOP = 0; |
| 102 | |
| 103 | if (sid != 0x424f4f54 && sid != 0x464f4e54) |
| 104 | { |
| 105 | path = XST_translate_sid_path(sid, ".HIP"); |
| 106 | if (path != NULL) |
| 107 | { |
| 108 | strcpy(sdata->fnam, path); |
| 109 | i = XST_PreLoadScene(sdata, path); |
| 110 | } |
| 111 | } |
| 112 | if (i == 0) |
| 113 | { |
no test coverage detected