├── .gitignore ├── OB DNAS.exe ├── README.md ├── clib ├── F1Addr.h ├── F2Addr.h ├── build.bat ├── build │ └── include │ │ ├── lauxlib.h │ │ ├── lua.h │ │ └── luaconf.h ├── main.c ├── main64.c └── structs.h ├── love2d ├── changes.txt ├── game.ico ├── icon.ico ├── license.txt ├── love.ico ├── love2d-license.txt └── readme.txt ├── lua ├── DoorCard.lua ├── EnemyCard.lua ├── ItemCard.lua ├── ItemIcon.lua ├── Label.lua ├── LobbyCard.lua ├── PlayerCard.lua ├── SPlayerCard.lua ├── assets.lua ├── assets │ ├── ItemCountFont.png │ ├── StartingItem.png │ ├── TimeFont.png │ ├── VirusFont.png │ ├── arialbd.ttf │ ├── arialnb.ttf │ ├── icon.png │ ├── icons.png │ └── ui.png ├── conf.lua ├── helpers.lua ├── icondata.lua ├── icondata2.lua ├── main.lua ├── roomnames.lua └── uidata.lua ├── run.bat └── run2.bat /.gitignore: -------------------------------------------------------------------------------- 1 | desktop.ini -------------------------------------------------------------------------------- /OB DNAS.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phoe-nix/OutbreakTracker/aef7b8e728f68304474fbcd2091cd64406cc7db6/OB DNAS.exe -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | How to use: 2 | 3 | download love2d 11.2 4 | 5 | https://bitbucket.org/rude/love/downloads/ 6 | 7 | extract update.zip, then put all files into "love2d 11.2" folder. 8 | 9 | Run OutbreakTracker.exe 10 | 11 | if can't see anything in program, you need update video card driver. 12 | 13 | How to build 14 | # OutbreakTracker 15 | Since I am not working on this tracker anymore, I decided to share the source code at least. 16 | btw the code itself is a mess. 17 | 18 | In order to use that "run.bat" file, you will need to install MinGW, and add it's bin folder into your system's PATH enviroment variable. 19 | that's all... i guess? 20 | -------------------------------------------------------------------------------- /clib/F1Addr.h: -------------------------------------------------------------------------------- 1 | // I'm way too lazy to f&@! with defines lol. 2 | 3 | const int F1_P1Start = 0x476DD0; // 0x204772E0 Not the actual start, but used as anchor point. 4 | const int F1_P2Start = 0x477EB0; 5 | const int F1_P3Start = 0x478F90; 6 | const int F1_P4Start = 0x47A070; 7 | const int F1_PickupSpaceStart = 0x39680C; // 1 item - 60 bytes 8 | const int F1_DeadInventoryStart = 0x48BDE2; 9 | const int F1_VirusMaxStart = 0x6E6C70; 10 | const int F1_ScenarioIDAddr = 0x3065AA; 11 | const int F1_FrameCounter = 0x48BF78; 12 | 13 | const int F1_PositionX = 0x38; 14 | const int F1_PositionY = 0x40; 15 | const int F1_RoomIDOffset = 0x1E2; 16 | const int F1_CharacterEnabled = 0; 17 | const int F1_CharacterInGame = 1; 18 | const int F1_HPOffset = 0x544; 19 | const int F1_MaxHPOffset = 0x546; 20 | const int F1_CharacterTypeOffset = 0xB98; 21 | const int F1_CharacterStatusOffset = 0xBA0; 22 | const int F1_VirusOffset = 0xBAC; 23 | const int F1_CritBonusOffset = 0xBB0; 24 | 25 | const int F1_SizeOffset = 0xB4; 26 | const int F1_SpeedOffset = 0xBC0; 27 | const int F1_PowerOffset = 0xBC4; 28 | 29 | const int F1_NameTypeOffset = 0xBB4; 30 | const int F1_InventoryOffset = 0xC84; 31 | const int F1_EquippedItemOffset = 0xC7C; 32 | const int F1_BleedTimeOffset = 0xC5A; 33 | const int F1_AntiVirusTimeOffset = 0xBB6;//anti-virus time 34 | const int F1_AntiVirusGTimeOffset = 0xBB8;//anti-virus g time 35 | const int F1_HerbTimeOffset = 0xBBA;//herb time 36 | 37 | const int F1_PickupStructSize = 60; 38 | const int F1_ItemRoomIDOffset = 1; 39 | const int F1_PickupCountOffset = 36; 40 | const int F1_PickupOffset = 40; 41 | const int F1_PresentOffset = 32; 42 | const int F1_MixOffset = 27; 43 | const int F1_IDOffset = 6; 44 | const int F1_NumberOffset = 4; 45 | 46 | int F1_GetCharAddress(int characterID) // clunckiest thing ever 47 | { 48 | switch (characterID) 49 | { 50 | case 0: 51 | return F1_P1Start; 52 | case 1: 53 | return F1_P2Start; 54 | case 2: 55 | return F1_P3Start; 56 | case 3: 57 | return F1_P4Start; 58 | default: 59 | return -1; 60 | } 61 | } 62 | const int F1_RoomItem = 0x23BD90;//room item pointer 0x24AF48 63 | const int F1_Pointer = 0x386B94;//enemy HP 64 | const int F1_EHPOffset = 0x544; 65 | 66 | const int F1_EMaxHPOffset = 0x546; 67 | const int F1_E1Start = 0x420000; 68 | const int F1_E2Start = 0x420D90; 69 | const int F1_E3Start = 0x421B20; 70 | const int F1_E4Start = 0x4228B0; 71 | const int F1_E5Start = 0x423640; 72 | const int F1_E6Start = 0x4243D0; 73 | const int F1_E7Start = 0x425160; 74 | const int F1_E8Start = 0x425EF0; 75 | const int F1_E9Start = 0x426C80; 76 | const int F1_E10Start = 0x427A10; 77 | const int F1_E11Start = 0x4287A0; 78 | const int F1_E12Start = 0x429530; 79 | const int F1_EnemyEnabled = 0; 80 | const int F1_EnemyInGame = 1; 81 | const int F1_EnemyNameIDOffset = 3; 82 | const int F1_EnemyTypeOffset = 0xBBA; 83 | const int F1_EnemyStatusOffset = 0x32; 84 | const int F1_EnemyListOffset = 0x71A030; 85 | 86 | int F1_GetEnemyAddress(int enemyID) 87 | { 88 | switch (enemyID) 89 | { 90 | case 0: 91 | return F1_E12Start; 92 | case 1: 93 | return F1_E11Start; 94 | case 2: 95 | return F1_E10Start; 96 | case 3: 97 | return F1_E9Start; 98 | case 4: 99 | return F1_E8Start; 100 | case 5: 101 | return F1_E7Start; 102 | case 6: 103 | return F1_E6Start; 104 | case 7: 105 | return F1_E5Start; 106 | case 8: 107 | return F1_E4Start; 108 | case 9: 109 | return F1_E3Start; 110 | case 10: 111 | return F1_E2Start; 112 | case 11: 113 | return F1_E1Start; 114 | default: 115 | return -1; 116 | } 117 | } 118 | 119 | int F1_GetEnemy2Address(int enemyID) 120 | { 121 | switch (enemyID) 122 | { 123 | case 0: 124 | return F1_E1Start; 125 | case 1: 126 | return F1_E2Start; 127 | case 2: 128 | return F1_E3Start; 129 | case 3: 130 | return F1_E4Start; 131 | case 4: 132 | return F1_E5Start; 133 | case 5: 134 | return F1_E6Start; 135 | default: 136 | return -1; 137 | } 138 | } 139 | 140 | const int F1_Door1HP = 0x472FC0;//472FC0/472FF0 141 | const int F1_Door2HP = 0x473086;//473086 142 | const int F1_Door3HP = 0x4731C0;//4731C0/473220 143 | const int F1_Door4HP = 0x473340;//473232/473260/473340 144 | const int F1_Door5HP = 0x473162;//零下左墙箱子 145 | const int F1_Door6HP = 0x473160;//零下右墙箱子 146 | const int F1_Door7HP = 0x473504;//1楼楼梯反锁的门473504/4735F0 147 | const int F1_Door8HP = 0x473652;//room 102 148 | const int F1_Door9HP = 0x473712;//room 201 149 | const int F1_Door10HP = 0x4737D2;//room 202 150 | const int F1_Door11HP = 0x473E9A;//473E9A/473F86 entrance hall 151 | const int F1_Door12HP = 0x4739B6;//4739B6/473A70 dd t-shaped 152 | const int F1_Door13HP = 0x473A40;//473A40/473A72 store room 153 | const int F1_Door14HP = 0x473F84;//473F84/473FB0 1楼走廊暴君隐藏房间 154 | const int F1_Door15HP = 0x473D32;//决议柜子 155 | 156 | int F1_GetDoorHP(int doorID) 157 | { 158 | switch (doorID) 159 | { 160 | case 0:return F1_Door1HP; 161 | case 1:return F1_Door2HP; 162 | case 2:return F1_Door3HP; 163 | case 3:return F1_Door4HP; 164 | case 4:return F1_Door5HP; 165 | case 5:return F1_Door6HP; 166 | case 6:return F1_Door7HP; 167 | case 7:return F1_Door8HP; 168 | case 8:return F1_Door9HP; 169 | case 9:return F1_Door10HP; 170 | case 10:return F1_Door11HP; 171 | case 11:return F1_Door12HP; 172 | case 12:return F1_Door13HP; 173 | case 13:return F1_Door14HP; 174 | case 14:return F1_Door15HP; 175 | default:return -1; 176 | } 177 | } 178 | 179 | const int F1_Door1Flag = 0x48AFBC;//48AFBC 180 | const int F1_Door2Flag = 0x48AFEC;//48AFEC 181 | const int F1_Door3Flag = 0x48AD90;// 182 | const int F1_Door4Flag = 0x48B058;//48B058 183 | const int F1_Door5Flag = 0x473162; 184 | const int F1_Door6Flag = 0x473160; 185 | const int F1_Door7Flag = 0x48B10C;//48B10C/48B148 186 | const int F1_Door8Flag = 0x48B160;//room 102 187 | const int F1_Door9Flag = 0x48B190;//room 201 188 | const int F1_Door10Flag = 0x48B1C0;//room 202 189 | const int F1_Door11Flag = 0x473E9A;//473E9A/473F86 entrance hall 190 | const int F1_Door12Flag = 0x48B238;//48B238/48B268 dd t-shaped 191 | const int F1_Door13Flag = 0x48B25C;//48B25C/48B268 store room 192 | const int F1_Door14Flag = 0x48B3B8;//48B3B8/48B3AC 1楼走廊暴君隐藏房间 193 | const int F1_Door15Flag = 0x473D32; 194 | 195 | 196 | int F1_GetDoorFlag(int doorID) 197 | { 198 | switch (doorID) 199 | { 200 | case 0:return F1_Door1Flag; 201 | case 1:return F1_Door2Flag; 202 | case 2:return F1_Door3Flag; 203 | case 3:return F1_Door4Flag; 204 | case 4:return F1_Door5Flag; 205 | case 5:return F1_Door6Flag; 206 | case 6:return F1_Door7Flag; 207 | case 7:return F1_Door8Flag; 208 | case 8:return F1_Door9Flag; 209 | case 9:return F1_Door10Flag; 210 | case 10:return F1_Door11Flag; 211 | case 11:return F1_Door12Flag; 212 | case 12:return F1_Door13Flag; 213 | case 13:return F1_Door14Flag; 214 | case 14:return F1_Door15Flag; 215 | default:return -1; 216 | } 217 | } 218 | 219 | const int F1_DoorHP = 0x472F90; 220 | const int F1_DoorFlag = 0x48ADBC;//lock flag 221 | const int F1_PlayerNum = 0x23BE14;//23C004 222 | const int F1_HostStatus = 0x62E230; 223 | const int F1_HostPlayer = 0x6547AA;//number of players 629602 62E682 6547AA 68AF31 224 | const int F1_HostMaxPlayer = 0x5FFFDA;//number of players 629604 225 | const int F1_HostScenarioID = 0x62E236;//62E750 226 | const int F1_HostTime = 0x62EB80;// 227 | const int F1_HostDifficulty = 0x60292A; 228 | 229 | const int F1_LobP1Start = 0x630D40; 230 | const int F1_LobP2Start = 0x6310E8; 231 | const int F1_LobP3Start = 0x631490; 232 | const int F1_LobP4Start = 0x631838; 233 | 234 | const int F1_SlotPlayer = 0x2; 235 | const int F1_SlotMaxPlayer = 0x4; 236 | const int F1_SlotStatus = 0xE; 237 | const int F1_SlotPass = 0xF; 238 | const int F1_SlotScenarioID = 0x14; 239 | const int F1_SlotVersion = 0x16;//0x11=dvd, 0x12=hdd 240 | const int F1_SlotTitle = 0x18; 241 | const int F1_Slot1 = 0x629600; 242 | const int F1_Slot2 = 0x62975C; 243 | const int F1_Slot3 = 0x6298B8; 244 | const int F1_Slot4 = 0x629A14; 245 | const int F1_Slot5 = 0x629B70; 246 | const int F1_Slot6 = 0x629CCC; 247 | const int F1_Slot7 = 0x629E28; 248 | const int F1_Slot8 = 0x629F84; 249 | const int F1_Slot9 = 0x62A0E0; 250 | const int F1_Slot10 = 0x62A23C; 251 | const int F1_Slot11 = 0x62A398; 252 | const int F1_Slot12 = 0x62A4F4; 253 | const int F1_Slot13 = 0x62A650; 254 | const int F1_Slot14 = 0x62A7AC; 255 | const int F1_Slot15 = 0x62A908; 256 | const int F1_Slot16 = 0x62AA64; 257 | const int F1_Slot17 = 0x62ABC0; 258 | const int F1_Slot18 = 0x62AD1C; 259 | const int F1_Slot19 = 0x62AE78; 260 | const int F1_Slot20 = 0x62AFD4; 261 | 262 | int F1_GetLobbyAddress(int slotNum) 263 | { 264 | switch (slotNum) 265 | { 266 | case 0: 267 | return F1_Slot1; 268 | case 1: 269 | return F1_Slot2; 270 | case 2: 271 | return F1_Slot3; 272 | case 3: 273 | return F1_Slot4; 274 | case 4: 275 | return F1_Slot5; 276 | case 5: 277 | return F1_Slot6; 278 | case 6: 279 | return F1_Slot7; 280 | case 7: 281 | return F1_Slot8; 282 | case 8: 283 | return F1_Slot9; 284 | case 9: 285 | return F1_Slot10; 286 | case 10: 287 | return F1_Slot11; 288 | case 11: 289 | return F1_Slot12; 290 | case 12: 291 | return F1_Slot13; 292 | case 13: 293 | return F1_Slot14; 294 | case 14: 295 | return F1_Slot15; 296 | case 15: 297 | return F1_Slot16; 298 | case 16: 299 | return F1_Slot17; 300 | case 17: 301 | return F1_Slot18; 302 | case 18: 303 | return F1_Slot19; 304 | case 19: 305 | return F1_Slot20; 306 | default: 307 | return -1; 308 | } 309 | } 310 | 311 | const int F1_Pass1 = 0x48AC13; 312 | const int F1_Pass2 = 0x48AC17; 313 | const int F1_Pass3 = 0x48AC14; 314 | const int F1_Pass4 = 0x48AC1A;//48AC1A 48ADCE 315 | const int F1_Pass5 = 0x48AC1B;//48ADCF on=48ADF3 316 | const int F1_Pass6 = 0x48AC15;//4927=7500 4032=7480 40 4284=0200 317 | const int F1_Difficulty = 0x48C01A; 318 | const int F1_ItemRandom = 0x23BB20;//23BB28 23C055 23BD20 426AA9 23BBA0 23BD24 319 | const int F1_ItemRandom2 = 0x23BBA1; 320 | const int F1_PuzzleRandom = 0x23BBA0;// puzzle set 321 | const int F1_Cleared = 0x48BF60;// 322 | /*pass 6D6570 323 | ʼþÁãÏÂ48BF60 324 | b7f 48AD93:0x00=off 0x01=on 325 | b5f 48AD91:0x40=off 0x50=on 326 | b4f 48AD92:0x00=off 0x40=on 327 | ÁãÏÂpass 48AC17 A375=0x20 J126=0x40 C582=0x80 328 | 48AC13 0634 0-1f 80-9f 4509 20-3f a0 bf 9741 40-7f c0-ff 329 | ÓüÑ×ÃÕÌâ 1=0x20 2=0x40 3=0x80 4=0x100 330 | 48AC1B 02 331 | 48ADCE 332 | :0 44 110 333 | 1234: 334 | 12 : C 335 | 1 4: 24 60 336 | 4: 20 64 337 | 3 : 10 54 338 | 2 : 8 4C 339 | 1 : 4 40 8C C8 114 150 340 | */ 341 | const int F1_SlotP1Start = 0x630E54;//+3A8 62FCF0 342 | const int F1_SlotP2Start = 0x6311FC;//630F38 6312E0 343 | const int F1_SlotP3Start = 0x6315A4; 344 | const int F1_SlotP4Start = 0x63194C; 345 | 346 | int F1_GetSlotCharAddress(int characterID) 347 | { 348 | switch (characterID) 349 | { 350 | case 0: 351 | return F1_SlotP1Start; 352 | case 1: 353 | return F1_SlotP2Start; 354 | case 2: 355 | return F1_SlotP3Start; 356 | case 3: 357 | return F1_SlotP4Start; 358 | default: 359 | return -1; 360 | } 361 | } 362 | -------------------------------------------------------------------------------- /clib/F2Addr.h: -------------------------------------------------------------------------------- 1 | // I'm way too lazy to f&@! with defines lol. 2 | 3 | const int F2_P1Start = 0x47BD30; // 0x2047C23C Not the actual start, but used as anchor point. 4 | const int F2_P2Start = 0x47CE30; 5 | const int F2_P3Start = 0x47DF30; 6 | const int F2_P4Start = 0x47F030; 7 | const int F2_PickupSpaceStart = 0x397B7C; // 1 item - 60 bytes // settings byte on offset ITEM_PTR+37? 8 | const int F2_DeadInventoryStart = 0x491146; 9 | const int F2_VirusMaxStart = 0x728500; 10 | const int F2_ScenarioIDAddr = 0x3137BA; 11 | const int F2_FrameCounter = 0x4912B8; 12 | 13 | const int F2_PositionX = 0x38; 14 | const int F2_PositionY = 0x40; 15 | const int F2_RoomIDOffset = 0x1E2; 16 | const int F2_CharacterEnabled = 0; 17 | const int F2_CharacterInGame = 1; 18 | const int F2_HPOffset = 0x540; 19 | const int F2_MaxHPOffset = 0x542; 20 | const int F2_CharacterTypeOffset = 0xBB0; 21 | const int F2_CharacterStatusOffset = 0xBB8; 22 | const int F2_VirusOffset = 0xBC4; 23 | const int F2_NameTypeOffset = 0xBC8; 24 | const int F2_CritBonusOffset = 0xBD4; 25 | 26 | const int F2_SizeOffset = 0xB4; 27 | const int F2_SpeedOffset = 0xBD8; 28 | const int F2_PowerOffset = 0xBDC; 29 | 30 | const int F2_InventoryOffset = 0xC94; 31 | const int F2_EquippedItemOffset = 0xC8C; 32 | const int F2_BleedTimeOffset = 0xC6A; 33 | const int F2_AntiVirusTimeOffset = 0xBCA;//anti-virus time 34 | const int F2_HerbTimeOffset = 0xBCE;//herb time 35 | 36 | const int F2_PickupStructSize = 60; 37 | const int F2_ItemRoomIDOffset = 1; 38 | const int F2_PickupCountOffset = 36; 39 | const int F2_PickupOffset = 40; 40 | const int F2_PresentOffset = 32;//28 38 41 | const int F2_MixOffset = 27; 42 | const int F2_IDOffset = 6; 43 | const int F2_NumberOffset = 4; 44 | 45 | int F2_GetCharAddress(int characterID) 46 | { 47 | switch (characterID) 48 | { 49 | case 0: 50 | return F2_P1Start; 51 | case 1: 52 | return F2_P2Start; 53 | case 2: 54 | return F2_P3Start; 55 | case 3: 56 | return F2_P4Start; 57 | default: 58 | return -1; 59 | } 60 | } 61 | 62 | const int F2_RoomItem = 0x24AF48;//room item pointer 0x24AF48 387CB0 63 | int F2_GetItemAddress(int characterID) 64 | { 65 | switch (characterID) 66 | { 67 | case 0: 68 | return 0x3BA200; 69 | case 1: 70 | return 0x3B9B40; 71 | case 2: 72 | return 0x3B9B40; 73 | case 3: 74 | return 0x3B9B40; 75 | default: 76 | return -1; 77 | } 78 | } 79 | 80 | const int F2_Pointer = 0x388314;//enemy HP 81 | const int F2_EHPOffset = 0x540; 82 | const int F2_EMaxHPOffset = 0x542; 83 | const int F2_E1Start = 0x4245D0; 84 | const int F2_E2Start = 0x425380; 85 | const int F2_E3Start = 0x426130; 86 | const int F2_E4Start = 0x426EE0; 87 | const int F2_E5Start = 0x427C90; 88 | const int F2_E6Start = 0x428A40; 89 | const int F2_E7Start = 0x4297F0; 90 | const int F2_E8Start = 0x42A5A0; 91 | const int F2_E9Start = 0x42B350; 92 | const int F2_E10Start = 0x42C100; 93 | const int F2_E11Start = 0x42CEB0; 94 | const int F2_E12Start = 0x42DC60; 95 | const int F2_EnemyEnabled = 0; 96 | const int F2_EnemyInGame = 1; 97 | const int F2_EnemyNameIDOffset = 3; 98 | const int F2_EnemyTypeOffset = 0xBD2; 99 | const int F2_EnemyStatusOffset = 0x32;//8,32,cb0,1F3 100 | const int F2_EnemyListOffset = 0x760630;//760712; 101 | 102 | int F2_GetEnemyAddress(int enemyID) 103 | { 104 | switch (enemyID) 105 | { 106 | case 0: 107 | return F2_E12Start; 108 | case 1: 109 | return F2_E11Start; 110 | case 2: 111 | return F2_E10Start; 112 | case 3: 113 | return F2_E9Start; 114 | case 4: 115 | return F2_E8Start; 116 | case 5: 117 | return F2_E7Start; 118 | case 6: 119 | return F2_E6Start; 120 | case 7: 121 | return F2_E5Start; 122 | case 8: 123 | return F2_E4Start; 124 | case 9: 125 | return F2_E3Start; 126 | case 10: 127 | return F2_E2Start; 128 | case 11: 129 | return F2_E1Start; 130 | default: 131 | return -1; 132 | } 133 | } 134 | 135 | int F2_GetEnemy2Address(int enemyID) 136 | { 137 | switch (enemyID) 138 | { 139 | case 0: 140 | return F2_E1Start; 141 | case 1: 142 | return F2_E2Start; 143 | case 2: 144 | return F2_E3Start; 145 | case 3: 146 | return F2_E4Start; 147 | case 4: 148 | return F2_E5Start; 149 | case 5: 150 | return F2_E6Start; 151 | default: 152 | return -1; 153 | } 154 | } 155 | 156 | const int F2_Coin = 0x491188;//wild things 157 | const int F2_KilledZombie = 0x491268;//47ca64,49010c,491268,desperate times 158 | //const int F2_MaxZombie = 0x2179464a; 159 | const int F2_DTStart = 0x490f6c; 160 | const int F2_PlayerNum = 0x24AFCC; 161 | const int F2_HostStatus = 0x62DDF0; 162 | const int F2_HostPlayer = 0x6411E6;//number of players 163 | const int F2_HostMaxPlayer = 0x5FF77A;//number of players 164 | const int F2_HostScenarioID = 0x62DDF6; 165 | const int F2_HostTime = 0x62E768; 166 | const int F2_HostDifficulty = 0x6020CA; 167 | const int F2_DoorHP = 0x477722;//4776E0 168 | const int F2_DoorFlag = 0x49021C;//lock flag 169 | 170 | const int F2_Door1HP = 0x477762;//4777A2 后巷门 171 | const int F2_Door2HP = 0x477720;//477760 餐厅后门 172 | const int F2_Door3HP = 0x477724;//餐厅厨房S 173 | const int F2_Door4HP = 0x477726;//餐厅厨房W 174 | const int F2_Door5HP = 0x4777E4;//477820 园内南>东门 175 | const int F2_Door6HP = 0x4777E0;//477864 园内南>北门 176 | const int F2_Door7HP = 0x477824;//477860 园内东>北门 177 | const int F2_Door8HP = 0x4779E2;//477A66 大象舞台 178 | const int F2_Door9HP = 0x4778AE;//477B64 异界 东侧 179 | const int F2_Door10HP = 0x4777A4;//4778A0 异界 西侧 180 | const int F2_Door11HP = 0x4778AC;//4779A0 休息室右 181 | const int F2_Door12HP = 0x4778AA;//4779A2 休息室左 182 | const int F2_Door13HP = 0x477B26;//477BE0 记忆203房 183 | const int F2_Door14HP = 0x477724;//4777E0 大厅>1楼大堂 184 | const int F2_Door15HP = 0x477824;//477920 办公室>1楼东侧 185 | const int F2_Door16HP = 0x4777E4;//477BE0 1楼大堂>U走廊 186 | const int F2_Door17HP = 0x4779A0;//4779E0 停尸房 187 | const int F2_Door18HP = 0x477A62;//477AA0 狗屋 188 | const int F2_Door19HP = 0x477B00;//eotr hole hp 189 | 190 | int F2_GetDoorHP(int doorID) 191 | { 192 | switch (doorID) 193 | { 194 | case 0:return F2_Door1HP; 195 | case 1:return F2_Door2HP; 196 | case 2:return F2_Door3HP; 197 | case 3:return F2_Door4HP; 198 | case 4:return F2_Door5HP; 199 | case 5:return F2_Door6HP; 200 | case 6:return F2_Door7HP; 201 | case 7:return F2_Door8HP; 202 | case 8:return F2_Door9HP; 203 | case 9:return F2_Door10HP; 204 | case 10:return F2_Door11HP; 205 | case 11:return F2_Door12HP; 206 | case 12:return F2_Door13HP; 207 | case 13:return F2_Door14HP; 208 | case 14:return F2_Door15HP; 209 | case 15:return F2_Door16HP; 210 | case 16:return F2_Door17HP; 211 | case 17:return F2_Door18HP; 212 | case 18:return F2_Door19HP; 213 | default:return -1; 214 | } 215 | } 216 | const int F2_Door1Flag = 0x490234;//490228/490234 后巷门 217 | const int F2_Door2Flag = 0x490228;//49021C/490228 餐厅后门 218 | const int F2_Door3Flag = 0x49021C;//餐厅厨房S 219 | const int F2_Door4Flag = 0x49021C;//餐厅厨房W 220 | const int F2_Door5Flag = 0x490240;//490240/49024C 园内南>东门 221 | const int F2_Door6Flag = 0x490240;//490240/490258 园内南>北门 222 | const int F2_Door7Flag = 0x490258;//49024C/490258 园内东>北门 223 | const int F2_Door8Flag = 0x4902B8;//4902A0/4902B8 大象舞台 224 | const int F2_Door9Flag = 0x4902E8;//490264/4902E8 异界 东侧 225 | const int F2_Door10Flag = 0x490234;//490234/490264 异界 西侧 226 | const int F2_Door11Flag = 0x490294;//490264/490294 休息室右 227 | const int F2_Door12Flag = 0x490294;//490264/490294 休息室左 228 | const int F2_Door13Flag = 0x490300;//490300 4902DC 记忆203房 229 | const int F2_Door14Flag = 0x49021C;//49021C/490240 大厅>1楼大堂 230 | const int F2_Door15Flag = 0x49027C;//49024C/49027C 办公室>1楼东侧 231 | const int F2_Door16Flag = 0x490300;//490240/490300 1楼大堂>U走廊 232 | const int F2_Door17Flag = 0x490294;//490294/4902A0 停尸房 233 | const int F2_Door18Flag = 0x4902C4;//4902B8/4902C4 狗屋 234 | const int F2_Door19Flag = 0x477B00;//48FFF4/490034/490F70 eotr hole need more test 235 | 236 | int F2_GetDoorFlag(int doorID) 237 | { 238 | switch (doorID) 239 | { 240 | case 0:return F2_Door1Flag; 241 | case 1:return F2_Door2Flag; 242 | case 2:return F2_Door3Flag; 243 | case 3:return F2_Door4Flag; 244 | case 4:return F2_Door5Flag; 245 | case 5:return F2_Door6Flag; 246 | case 6:return F2_Door7Flag; 247 | case 7:return F2_Door8Flag; 248 | case 8:return F2_Door9Flag; 249 | case 9:return F2_Door10Flag; 250 | case 10:return F2_Door11Flag; 251 | case 11:return F2_Door12Flag; 252 | case 12:return F2_Door13Flag; 253 | case 13:return F2_Door14Flag; 254 | case 14:return F2_Door15Flag; 255 | case 15:return F2_Door16Flag; 256 | case 16:return F2_Door17Flag; 257 | case 17:return F2_Door18Flag; 258 | case 18:return F2_Door19Flag; 259 | default:return -1; 260 | } 261 | } 262 | 263 | /* 264 | 咆哮 8个门 265 | 异界 4个门 266 | 记忆 1个门 267 | 死守 5个门 268 | 突破 1个洞 269 | wt door 0x477762 0x4777A2 flag 490234 first locked door 3BC2C0 270 | 49021C 餐厅S FLAG>=4 and flag<8 lock;unlock: >=8 and <= 0x0C 271 | 49021C 餐厅W FLAG>=8 lock unlock: <8 and 272 | 490234 后巷门FLAG 02=lock 00=unlock 273 | 490228 餐厅后门FLAG 03=lock 02=unlock 274 | 490240 园区东门I lock:>=04 and <8 unlock:<4 275 | 490240 园区南门P lock:%2=0 unlock:%2=1 276 | 49024C 园区北门I 07=lock 03=unlock 277 | 4902A0 大象舞台P 03=lock 01=unlock 278 | 279 | 突破 280 | 477B00 hole hp 281 | 48FFF5 (490035) flag 20=broke, 00= block 282 | //dt unlock door 3BC0E4 door flag 49021C 283 | //p1power +BDC 47c90c 284 | //num of player in game 24AFCC 49135f 285 | //slot character 630D40 6310E8 631490 631838 286 | //slot npc 630D42 1 287 | //slot Scenario 62DDF6 62E324 288 | //slot num 63C56A 63C56C 289 | //slot1 628da0 +2players +4maxplayers slot2+15C 290 | //slot1 628DAE 00=Busy 01=Vacant 02=Busy(设定中) 03=Join in 04=Full 05=playing 06=opening 291 | //slot2 628EFC 292 | //62B672 num of players in door 293 | //63C56A num of players in chat room 294 | //63C56C num of players in lobbies 295 | */ 296 | const int F2_SlotP1Start = 0x630D40; 297 | const int F2_SlotP2Start = 0x6310E8; 298 | const int F2_SlotP3Start = 0x631490; 299 | const int F2_SlotP4Start = 0x631838; 300 | 301 | int F2_GetSlotCharAddress(int characterID) 302 | { 303 | switch (characterID) 304 | { 305 | case 0: 306 | return F2_SlotP1Start; 307 | case 1: 308 | return F2_SlotP2Start; 309 | case 2: 310 | return F2_SlotP3Start; 311 | case 3: 312 | return F2_SlotP4Start; 313 | default: 314 | return -1; 315 | } 316 | } 317 | const int F2_SlotPlayer = 0x2; 318 | const int F2_SlotMaxPlayer = 0x4; 319 | const int F2_SlotStatus = 0xE; 320 | const int F2_SlotPass = 0xF; 321 | const int F2_SlotScenarioID = 0x14; 322 | const int F2_SlotVersion = 0x16;//0x11=dvd, 0x12=hdd 323 | const int F2_SlotTitle = 0x18; 324 | const int F2_Slot1 = 0x628DA0; 325 | const int F2_Slot2 = 0x628EFC; 326 | const int F2_Slot3 = 0x629058; 327 | const int F2_Slot4 = 0x6291B4; 328 | const int F2_Slot5 = 0x629310; 329 | const int F2_Slot6 = 0x62946C; 330 | const int F2_Slot7 = 0x6295C8; 331 | const int F2_Slot8 = 0x629724; 332 | const int F2_Slot9 = 0x629880; 333 | const int F2_Slot10 = 0x6299DC; 334 | const int F2_Slot11 = 0x629B38; 335 | const int F2_Slot12 = 0x629C94; 336 | const int F2_Slot13 = 0x629DF0; 337 | const int F2_Slot14 = 0x629F4C; 338 | const int F2_Slot15 = 0x62A0A8; 339 | const int F2_Slot16 = 0x62A204; 340 | const int F2_Slot17 = 0x62A360; 341 | const int F2_Slot18 = 0x62A4BC; 342 | const int F2_Slot19 = 0x62A618; 343 | const int F2_Slot20 = 0x62A774; 344 | 345 | int F2_GetLobbyAddress(int slotNum) 346 | { 347 | switch (slotNum) 348 | { 349 | case 0: 350 | return F2_Slot1; 351 | case 1: 352 | return F2_Slot2; 353 | case 2: 354 | return F2_Slot3; 355 | case 3: 356 | return F2_Slot4; 357 | case 4: 358 | return F2_Slot5; 359 | case 5: 360 | return F2_Slot6; 361 | case 6: 362 | return F2_Slot7; 363 | case 7: 364 | return F2_Slot8; 365 | case 8: 366 | return F2_Slot9; 367 | case 9: 368 | return F2_Slot10; 369 | case 10: 370 | return F2_Slot11; 371 | case 11: 372 | return F2_Slot12; 373 | case 12: 374 | return F2_Slot13; 375 | case 13: 376 | return F2_Slot14; 377 | case 14: 378 | return F2_Slot15; 379 | case 15: 380 | return F2_Slot16; 381 | case 16: 382 | return F2_Slot17; 383 | case 17: 384 | return F2_Slot18; 385 | case 18: 386 | return F2_Slot19; 387 | case 19: 388 | return F2_Slot20; 389 | default: 390 | return -1; 391 | } 392 | } 393 | 394 | const int F2_WTTime = 0x491248;//咆哮 395 | const int F2_PassWT = 0x48FE7B;//咆哮 396 | const int F2_PassDT1 = 0x490070;//死守 397 | const int F2_PassDT2 = 0x490072;//死守 398 | const int F2_PassDT3 = 0x48FE70;//死守 adlib 48FE70 399 | const int F2_PassUB1 = 0x490073;//异界 400 | const int F2_PassUB2 = 0x490075;//异界 401 | const int F2_PassUB3 = 0x48FE76;//异界 adlib 48FE76 402 | const int F2_EscapeTime = 0x491256;//异界 403 | const int F2_FBTime = 0x491254;//记忆 404 | const int F2_Pass4 = 0x491268;//突破 405 | const int F2_Difficulty = 0x49135A; 406 | const int F2_DTGasRandom = 0x24ADB0;//24ADB0(offline) 491338(online) 407 | const int F2_DTGasFlag = 0x48FFFC; 408 | const int F2_DTGasTime = 0x491278; 409 | const int F2_DTFightTime = 0x49126C; 410 | const int F2_DTFightTime2 = 0x49124E; 411 | const int F2_DTGarageTime = 0x491270;//48FE71 switch 412 | const int F2_ItemRandom = 0x24AD30;// 413 | const int F2_ItemRandom2 = 0x24ADB1;//DE C2 414 | const int F2_PuzzleRandom = 0x24ADB0;// puzzle set 415 | const int F2_Cleared = 0x4912A0;//4912A0 4912C9 416 | /*clear 4912A0 417 | 24AD31 item set in next game 418 | 112334 419 | 112334 420 | 112344 421 | 122344 422 | 122344 423 | 123344 424 | 112334 425 | 112344 426 | 122344 427 | 122344 428 | 12334 429 | 430 | [0x40] 431 | 112334 432 | 112344 433 | 434 | [0x80] 435 | 112334 436 | 122344 437 | 438 | 00 1 random B0 00 439 | 01 1 random 00 B0 440 | 02 2 random AD 60 441 | 03 3 random 5A 11 442 | 04 3 random 5A C1 443 | 05 4 random 07 72 444 | 06 1 random B4 22 445 | 07 1 random B4 D2 446 | 08 2 random 61 83 447 | 09 3 random 0E 34 448 | 0A 3 random 0E E4 449 | 0B 4 random BB 94 450 | 0C 1 random 68 45 451 | 0D 1 random 68 F5 452 | 0E 2 random 15 A6 453 | 0F 3 random C2 56 454 | 10 4 random 6F 07 455 | 11 4 random 6F B7 456 | 12 1 random 1C 68 457 | 13 2 random C9 18 458 | 14 2 random C9 C8 459 | 15 3 random 76 79 460 | 16 4 random 23 2A 461 | 17 4 random 23 DA 462 | 18 1 random D0 8A 463 | 19 2 random 7D 3B 464 | 1A 2 random 7D EB 465 | 1B 3 random 2A 9C 466 | 1C 4 random D7 4C 467 | 1D 4 random D7 FC 468 | 1E 1 random 84 AD 469 | 1F 2 random 31 5E 470 | 20 3 random DE 0E 471 | 21 3 random DE BE 472 | 22 4 random 8B 6F 473 | 23 1 random 38 20 474 | 24 1 random 38 D0 475 | 25 2 random E5 80 476 | 26 3 random 92 31 477 | 27 3 random 92 E1 478 | 28 4 random 3F 92 479 | 29 1 random EC 42 480 | 2A 1 random EC F2 481 | 2B 2 random 99 A3 482 | 2C 3 random 46 54 483 | 2D 4 random F3 04 484 | 2E 4 random F3 B4 485 | 2F 1 random A0 65 486 | 30 2 random 4D 16 487 | 31 2 random 4D C6 488 | 32 3 489 | 33 4 490 | 34 4 491 | 35 1 492 | 36 2 493 | 37 2 494 | 38 3 495 | 39 4 496 | 3A 4 497 | 3B 1 498 | 3C 2 499 | 3D 3 500 | 3E 3 501 | 3F 4 502 | 40 1 503 | 41 1 504 | 42 2 505 | 43 3 506 | 44 3 507 | 45 4 508 | 46 1 509 | 47 1 510 | 48 2 511 | 49 3 512 | 4A 4 513 | 4B 4 514 | 4C 1 515 | 4D 2 516 | 4E 2 517 | 4F 3 518 | 50 4 519 | 51 4 520 | 52 1 521 | 53 2 522 | 54 2 523 | 55 3 524 | 56 4 525 | 57 4 526 | 58 1 527 | 59 2 528 | 5A 3 529 | 5B 3 530 | 5C 4 531 | 5D 1 532 | 5E 1 533 | 5F 2 534 | 60 3 535 | 61 3 536 | 62 4 537 | 63 1 538 | 64 1 539 | 65 2 540 | 66 3 541 | 67 3 542 | 68 4 543 | 69 1 544 | 6A 2 545 | 6B 2 546 | 6C 3 547 | 6D 4 548 | 6E 4 549 | 6F 1 550 | 70 2 551 | 71 2 552 | 72 3 553 | 73 4 554 | 74 4 555 | 75 1 556 | 76 2 557 | 77 3 558 | 78 3 559 | 79 4 560 | 7A 1 561 | 7B 1 562 | 7C 2 563 | 7D 3 564 | 7E 3 565 | 7F 4 566 | 80 1 567 | 81 1 568 | 82 2 569 | 83 3 570 | 84 3 571 | 85 4 572 | 86 1 573 | 87 2 574 | 88 2 575 | 89 3 576 | 8A 4 577 | 8B 4 578 | 8C 1 579 | 8D 2 580 | 8E 2 581 | 8F 3 582 | 90 4 583 | 91 4 584 | 92 1 585 | 93 2 586 | 94 3 587 | 95 3 588 | 96 4 589 | 97 1 590 | 98 1 591 | 99 2 592 | 9A 3 593 | 9B 3 594 | 9C 4 595 | 9D 1 596 | 9E 1 597 | 9F 2 598 | A0 3 599 | A1 3 600 | A2 4 601 | A3 1 602 | A4 2 603 | A5 2 604 | A6 3 605 | A7 4 606 | A8 4 607 | A9 1 608 | AA 2 609 | AB 2 610 | AC 3 611 | AD 4 612 | AE 4 613 | AF 1 614 | B0 2 615 | B1 3 616 | B2 3 617 | B3 4 618 | B4 1 619 | B5 1 620 | B6 2 621 | B7 3 622 | B8 3 623 | B9 4 624 | BA 1 625 | BB 1 626 | BC 2 627 | BD 3 628 | BE 3 629 | BF 4 630 | C0 1 631 | C1 2 632 | C2 2 633 | C3 3 634 | C4 4 635 | C5 4 636 | C6 1 637 | C7 2 638 | C8 2 639 | C9 3 640 | CA 4 641 | CB 4 642 | CC 1 643 | CD 2 644 | CE 2 645 | CF 3 646 | D0 4 647 | D1 1 18 D1 648 | D2 1 649 | D3 2 650 | D4 3 651 | D5 3 652 | D6 4 653 | D7 1 654 | D8 1 655 | D9 2 656 | DA 3 657 | DB 3 658 | DC 4 659 | DD 1 660 | DE 2 661 | DF 2 662 | E0 3 663 | E1 4 664 | E2 4 665 | E3 1 666 | E4 2 667 | E5 2 668 | E6 3 669 | E7 4 670 | E8 4 671 | E9 1 672 | EA 2 673 | EB 2 674 | EC 3 675 | ED 4 676 | EE 1 677 | EF 1 678 | F0 2 679 | F1 3 680 | F2 3 681 | F3 4 682 | F4 1 683 | F5 1 684 | F6 2 685 | F7 3 686 | F8 3 687 | F9 4 688 | FA 1 689 | FB 2 690 | FC 2 691 | FD 3 692 | FE 4 693 | FF 4 694 | 695 | //random set? 24AD30 397B80 397B82 491338 491353 49135E 696 | //gas address 697 | 24ADB0 3F 98(89 95) 1 2F East Hall 698 | 98 F1(AE 88) 699 | 00 700 | //48FE74 02 = set2 701 | //48FE78 80 = set2 702 | //48FE79 04 = set2 703 | //48FE7A 01 = set2 704 | //48FE7C 80 = set2 705 | //48FF38 80 gas random 706 | //48FF3C 80 707 | //490266 04? 708 | //490356 02 709 | //4912CB 01 710 | //491338 711 | online 8D=vh set1 online 8e= vh set2 712 | offline 93=easy 8b=normal 7c= hard 73=vh 713 | //491353 01 714 | //(item?) 49135E 2a =set 1 2b= set2 715 | //49136F 01 716 | //493982 02 717 | //490071 39DJ LV4U EXP2 E67C 6SR2 Q898 44V7 K3G6 SW4D FM54 5TF3 4NZH B37B LYNX 9AAA YTY7 718 | //490070 74EE70 2236 1587 2994 3048 4425 5170 6703 7312 8669 9851 0764 3516 5835 6249 7177 9408 719 | //490073 750BB0 2916 3719 0154 6443 7688 1812 5551 6010 0652 6234 0533 9439 1421 1127 7840 6910 720 | //490070 DESK MISS FREE JUNK NEWS CARD DIET POEM BEER LOCK TEST SOFA WINE TAPE GOLF PLAN 721 | 722 | 24AD7C 723 | 24AE2C 724 | 24AE43 725 | 24AE48 726 | 24AE57 727 | 24AE74 728 | 24AE84 729 | 24AE88 730 | 24AE94 731 | 24AEF8 732 | 24B320 733 | 24B480 734 | 24B4C8 735 | 24B54C 736 | 24D156 737 | 24E164 738 | 739 | */ 740 | -------------------------------------------------------------------------------- /clib/build.bat: -------------------------------------------------------------------------------- 1 | cd build 2 | gcc -m32 -shared -L./lib -I./include -llua51 ../main.c -o ./luaoutbreaktracker.dll 3 | cd .. -------------------------------------------------------------------------------- /clib/build/include/lauxlib.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lauxlib.h,v 1.88.1.1 2007/12/27 13:02:25 roberto Exp $ 3 | ** Auxiliary functions for building Lua libraries 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | 8 | #ifndef lauxlib_h 9 | #define lauxlib_h 10 | 11 | 12 | #include 13 | #include 14 | 15 | #include "lua.h" 16 | 17 | 18 | #if defined(LUA_COMPAT_GETN) 19 | LUALIB_API int (luaL_getn) (lua_State *L, int t); 20 | LUALIB_API void (luaL_setn) (lua_State *L, int t, int n); 21 | #else 22 | #define luaL_getn(L,i) ((int)lua_objlen(L, i)) 23 | #define luaL_setn(L,i,j) ((void)0) /* no op! */ 24 | #endif 25 | 26 | #if defined(LUA_COMPAT_OPENLIB) 27 | #define luaI_openlib luaL_openlib 28 | #endif 29 | 30 | 31 | /* extra error code for `luaL_load' */ 32 | #define LUA_ERRFILE (LUA_ERRERR+1) 33 | 34 | 35 | typedef struct luaL_Reg { 36 | const char *name; 37 | lua_CFunction func; 38 | } luaL_Reg; 39 | 40 | 41 | 42 | LUALIB_API void (luaI_openlib) (lua_State *L, const char *libname, 43 | const luaL_Reg *l, int nup); 44 | LUALIB_API void (luaL_register) (lua_State *L, const char *libname, 45 | const luaL_Reg *l); 46 | LUALIB_API int (luaL_getmetafield) (lua_State *L, int obj, const char *e); 47 | LUALIB_API int (luaL_callmeta) (lua_State *L, int obj, const char *e); 48 | LUALIB_API int (luaL_typerror) (lua_State *L, int narg, const char *tname); 49 | LUALIB_API int (luaL_argerror) (lua_State *L, int numarg, const char *extramsg); 50 | LUALIB_API const char *(luaL_checklstring) (lua_State *L, int numArg, 51 | size_t *l); 52 | LUALIB_API const char *(luaL_optlstring) (lua_State *L, int numArg, 53 | const char *def, size_t *l); 54 | LUALIB_API lua_Number (luaL_checknumber) (lua_State *L, int numArg); 55 | LUALIB_API lua_Number (luaL_optnumber) (lua_State *L, int nArg, lua_Number def); 56 | 57 | LUALIB_API lua_Integer (luaL_checkinteger) (lua_State *L, int numArg); 58 | LUALIB_API lua_Integer (luaL_optinteger) (lua_State *L, int nArg, 59 | lua_Integer def); 60 | 61 | LUALIB_API void (luaL_checkstack) (lua_State *L, int sz, const char *msg); 62 | LUALIB_API void (luaL_checktype) (lua_State *L, int narg, int t); 63 | LUALIB_API void (luaL_checkany) (lua_State *L, int narg); 64 | 65 | LUALIB_API int (luaL_newmetatable) (lua_State *L, const char *tname); 66 | LUALIB_API void *(luaL_checkudata) (lua_State *L, int ud, const char *tname); 67 | 68 | LUALIB_API void (luaL_where) (lua_State *L, int lvl); 69 | LUALIB_API int (luaL_error) (lua_State *L, const char *fmt, ...); 70 | 71 | LUALIB_API int (luaL_checkoption) (lua_State *L, int narg, const char *def, 72 | const char *const lst[]); 73 | 74 | LUALIB_API int (luaL_ref) (lua_State *L, int t); 75 | LUALIB_API void (luaL_unref) (lua_State *L, int t, int ref); 76 | 77 | LUALIB_API int (luaL_loadfile) (lua_State *L, const char *filename); 78 | LUALIB_API int (luaL_loadbuffer) (lua_State *L, const char *buff, size_t sz, 79 | const char *name); 80 | LUALIB_API int (luaL_loadstring) (lua_State *L, const char *s); 81 | 82 | LUALIB_API lua_State *(luaL_newstate) (void); 83 | 84 | 85 | LUALIB_API const char *(luaL_gsub) (lua_State *L, const char *s, const char *p, 86 | const char *r); 87 | 88 | LUALIB_API const char *(luaL_findtable) (lua_State *L, int idx, 89 | const char *fname, int szhint); 90 | 91 | 92 | 93 | 94 | /* 95 | ** =============================================================== 96 | ** some useful macros 97 | ** =============================================================== 98 | */ 99 | 100 | #define luaL_argcheck(L, cond,numarg,extramsg) \ 101 | ((void)((cond) || luaL_argerror(L, (numarg), (extramsg)))) 102 | #define luaL_checkstring(L,n) (luaL_checklstring(L, (n), NULL)) 103 | #define luaL_optstring(L,n,d) (luaL_optlstring(L, (n), (d), NULL)) 104 | #define luaL_checkint(L,n) ((int)luaL_checkinteger(L, (n))) 105 | #define luaL_optint(L,n,d) ((int)luaL_optinteger(L, (n), (d))) 106 | #define luaL_checklong(L,n) ((long)luaL_checkinteger(L, (n))) 107 | #define luaL_optlong(L,n,d) ((long)luaL_optinteger(L, (n), (d))) 108 | 109 | #define luaL_typename(L,i) lua_typename(L, lua_type(L,(i))) 110 | 111 | #define luaL_dofile(L, fn) \ 112 | (luaL_loadfile(L, fn) || lua_pcall(L, 0, LUA_MULTRET, 0)) 113 | 114 | #define luaL_dostring(L, s) \ 115 | (luaL_loadstring(L, s) || lua_pcall(L, 0, LUA_MULTRET, 0)) 116 | 117 | #define luaL_getmetatable(L,n) (lua_getfield(L, LUA_REGISTRYINDEX, (n))) 118 | 119 | #define luaL_opt(L,f,n,d) (lua_isnoneornil(L,(n)) ? (d) : f(L,(n))) 120 | 121 | /* 122 | ** {====================================================== 123 | ** Generic Buffer manipulation 124 | ** ======================================================= 125 | */ 126 | 127 | 128 | 129 | typedef struct luaL_Buffer { 130 | char *p; /* current position in buffer */ 131 | int lvl; /* number of strings in the stack (level) */ 132 | lua_State *L; 133 | char buffer[LUAL_BUFFERSIZE]; 134 | } luaL_Buffer; 135 | 136 | #define luaL_addchar(B,c) \ 137 | ((void)((B)->p < ((B)->buffer+LUAL_BUFFERSIZE) || luaL_prepbuffer(B)), \ 138 | (*(B)->p++ = (char)(c))) 139 | 140 | /* compatibility only */ 141 | #define luaL_putchar(B,c) luaL_addchar(B,c) 142 | 143 | #define luaL_addsize(B,n) ((B)->p += (n)) 144 | 145 | LUALIB_API void (luaL_buffinit) (lua_State *L, luaL_Buffer *B); 146 | LUALIB_API char *(luaL_prepbuffer) (luaL_Buffer *B); 147 | LUALIB_API void (luaL_addlstring) (luaL_Buffer *B, const char *s, size_t l); 148 | LUALIB_API void (luaL_addstring) (luaL_Buffer *B, const char *s); 149 | LUALIB_API void (luaL_addvalue) (luaL_Buffer *B); 150 | LUALIB_API void (luaL_pushresult) (luaL_Buffer *B); 151 | 152 | 153 | /* }====================================================== */ 154 | 155 | 156 | /* compatibility with ref system */ 157 | 158 | /* pre-defined references */ 159 | #define LUA_NOREF (-2) 160 | #define LUA_REFNIL (-1) 161 | 162 | #define lua_ref(L,lock) ((lock) ? luaL_ref(L, LUA_REGISTRYINDEX) : \ 163 | (lua_pushstring(L, "unlocked references are obsolete"), lua_error(L), 0)) 164 | 165 | #define lua_unref(L,ref) luaL_unref(L, LUA_REGISTRYINDEX, (ref)) 166 | 167 | #define lua_getref(L,ref) lua_rawgeti(L, LUA_REGISTRYINDEX, (ref)) 168 | 169 | 170 | #define luaL_reg luaL_Reg 171 | 172 | #endif 173 | 174 | 175 | -------------------------------------------------------------------------------- /clib/build/include/lua.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lua.h,v 1.218.1.5 2008/08/06 13:30:12 roberto Exp $ 3 | ** Lua - An Extensible Extension Language 4 | ** Lua.org, PUC-Rio, Brazil (http://www.lua.org) 5 | ** See Copyright Notice at the end of this file 6 | */ 7 | 8 | 9 | #ifndef lua_h 10 | #define lua_h 11 | 12 | #include 13 | #include 14 | 15 | 16 | #include "luaconf.h" 17 | 18 | 19 | #define LUA_VERSION "Lua 5.1" 20 | #define LUA_RELEASE "Lua 5.1.4" 21 | #define LUA_VERSION_NUM 501 22 | #define LUA_COPYRIGHT "Copyright (C) 1994-2008 Lua.org, PUC-Rio" 23 | #define LUA_AUTHORS "R. Ierusalimschy, L. H. de Figueiredo & W. Celes" 24 | 25 | 26 | /* mark for precompiled code (`Lua') */ 27 | #define LUA_SIGNATURE "\033Lua" 28 | 29 | /* option for multiple returns in `lua_pcall' and `lua_call' */ 30 | #define LUA_MULTRET (-1) 31 | 32 | 33 | /* 34 | ** pseudo-indices 35 | */ 36 | #define LUA_REGISTRYINDEX (-10000) 37 | #define LUA_ENVIRONINDEX (-10001) 38 | #define LUA_GLOBALSINDEX (-10002) 39 | #define lua_upvalueindex(i) (LUA_GLOBALSINDEX-(i)) 40 | 41 | 42 | /* thread status; 0 is OK */ 43 | #define LUA_YIELD 1 44 | #define LUA_ERRRUN 2 45 | #define LUA_ERRSYNTAX 3 46 | #define LUA_ERRMEM 4 47 | #define LUA_ERRERR 5 48 | 49 | 50 | typedef struct lua_State lua_State; 51 | 52 | typedef int (*lua_CFunction) (lua_State *L); 53 | 54 | 55 | /* 56 | ** functions that read/write blocks when loading/dumping Lua chunks 57 | */ 58 | typedef const char * (*lua_Reader) (lua_State *L, void *ud, size_t *sz); 59 | 60 | typedef int (*lua_Writer) (lua_State *L, const void* p, size_t sz, void* ud); 61 | 62 | 63 | /* 64 | ** prototype for memory-allocation functions 65 | */ 66 | typedef void * (*lua_Alloc) (void *ud, void *ptr, size_t osize, size_t nsize); 67 | 68 | 69 | /* 70 | ** basic types 71 | */ 72 | #define LUA_TNONE (-1) 73 | 74 | #define LUA_TNIL 0 75 | #define LUA_TBOOLEAN 1 76 | #define LUA_TLIGHTUSERDATA 2 77 | #define LUA_TNUMBER 3 78 | #define LUA_TSTRING 4 79 | #define LUA_TTABLE 5 80 | #define LUA_TFUNCTION 6 81 | #define LUA_TUSERDATA 7 82 | #define LUA_TTHREAD 8 83 | 84 | 85 | 86 | /* minimum Lua stack available to a C function */ 87 | #define LUA_MINSTACK 20 88 | 89 | 90 | /* 91 | ** generic extra include file 92 | */ 93 | #if defined(LUA_USER_H) 94 | #include LUA_USER_H 95 | #endif 96 | 97 | 98 | /* type of numbers in Lua */ 99 | typedef LUA_NUMBER lua_Number; 100 | 101 | 102 | /* type for integer functions */ 103 | typedef LUA_INTEGER lua_Integer; 104 | 105 | 106 | 107 | /* 108 | ** state manipulation 109 | */ 110 | LUA_API lua_State *(lua_newstate) (lua_Alloc f, void *ud); 111 | LUA_API void (lua_close) (lua_State *L); 112 | LUA_API lua_State *(lua_newthread) (lua_State *L); 113 | 114 | LUA_API lua_CFunction (lua_atpanic) (lua_State *L, lua_CFunction panicf); 115 | 116 | 117 | /* 118 | ** basic stack manipulation 119 | */ 120 | LUA_API int (lua_gettop) (lua_State *L); 121 | LUA_API void (lua_settop) (lua_State *L, int idx); 122 | LUA_API void (lua_pushvalue) (lua_State *L, int idx); 123 | LUA_API void (lua_remove) (lua_State *L, int idx); 124 | LUA_API void (lua_insert) (lua_State *L, int idx); 125 | LUA_API void (lua_replace) (lua_State *L, int idx); 126 | LUA_API int (lua_checkstack) (lua_State *L, int sz); 127 | 128 | LUA_API void (lua_xmove) (lua_State *from, lua_State *to, int n); 129 | 130 | 131 | /* 132 | ** access functions (stack -> C) 133 | */ 134 | 135 | LUA_API int (lua_isnumber) (lua_State *L, int idx); 136 | LUA_API int (lua_isstring) (lua_State *L, int idx); 137 | LUA_API int (lua_iscfunction) (lua_State *L, int idx); 138 | LUA_API int (lua_isuserdata) (lua_State *L, int idx); 139 | LUA_API int (lua_type) (lua_State *L, int idx); 140 | LUA_API const char *(lua_typename) (lua_State *L, int tp); 141 | 142 | LUA_API int (lua_equal) (lua_State *L, int idx1, int idx2); 143 | LUA_API int (lua_rawequal) (lua_State *L, int idx1, int idx2); 144 | LUA_API int (lua_lessthan) (lua_State *L, int idx1, int idx2); 145 | 146 | LUA_API lua_Number (lua_tonumber) (lua_State *L, int idx); 147 | LUA_API lua_Integer (lua_tointeger) (lua_State *L, int idx); 148 | LUA_API int (lua_toboolean) (lua_State *L, int idx); 149 | LUA_API const char *(lua_tolstring) (lua_State *L, int idx, size_t *len); 150 | LUA_API size_t (lua_objlen) (lua_State *L, int idx); 151 | LUA_API lua_CFunction (lua_tocfunction) (lua_State *L, int idx); 152 | LUA_API void *(lua_touserdata) (lua_State *L, int idx); 153 | LUA_API lua_State *(lua_tothread) (lua_State *L, int idx); 154 | LUA_API const void *(lua_topointer) (lua_State *L, int idx); 155 | 156 | 157 | /* 158 | ** push functions (C -> stack) 159 | */ 160 | LUA_API void (lua_pushnil) (lua_State *L); 161 | LUA_API void (lua_pushnumber) (lua_State *L, lua_Number n); 162 | LUA_API void (lua_pushinteger) (lua_State *L, lua_Integer n); 163 | LUA_API void (lua_pushlstring) (lua_State *L, const char *s, size_t l); 164 | LUA_API void (lua_pushstring) (lua_State *L, const char *s); 165 | LUA_API const char *(lua_pushvfstring) (lua_State *L, const char *fmt, 166 | va_list argp); 167 | LUA_API const char *(lua_pushfstring) (lua_State *L, const char *fmt, ...); 168 | LUA_API void (lua_pushcclosure) (lua_State *L, lua_CFunction fn, int n); 169 | LUA_API void (lua_pushboolean) (lua_State *L, int b); 170 | LUA_API void (lua_pushlightuserdata) (lua_State *L, void *p); 171 | LUA_API int (lua_pushthread) (lua_State *L); 172 | 173 | 174 | /* 175 | ** get functions (Lua -> stack) 176 | */ 177 | LUA_API void (lua_gettable) (lua_State *L, int idx); 178 | LUA_API void (lua_getfield) (lua_State *L, int idx, const char *k); 179 | LUA_API void (lua_rawget) (lua_State *L, int idx); 180 | LUA_API void (lua_rawgeti) (lua_State *L, int idx, int n); 181 | LUA_API void (lua_createtable) (lua_State *L, int narr, int nrec); 182 | LUA_API void *(lua_newuserdata) (lua_State *L, size_t sz); 183 | LUA_API int (lua_getmetatable) (lua_State *L, int objindex); 184 | LUA_API void (lua_getfenv) (lua_State *L, int idx); 185 | 186 | 187 | /* 188 | ** set functions (stack -> Lua) 189 | */ 190 | LUA_API void (lua_settable) (lua_State *L, int idx); 191 | LUA_API void (lua_setfield) (lua_State *L, int idx, const char *k); 192 | LUA_API void (lua_rawset) (lua_State *L, int idx); 193 | LUA_API void (lua_rawseti) (lua_State *L, int idx, int n); 194 | LUA_API int (lua_setmetatable) (lua_State *L, int objindex); 195 | LUA_API int (lua_setfenv) (lua_State *L, int idx); 196 | 197 | 198 | /* 199 | ** `load' and `call' functions (load and run Lua code) 200 | */ 201 | LUA_API void (lua_call) (lua_State *L, int nargs, int nresults); 202 | LUA_API int (lua_pcall) (lua_State *L, int nargs, int nresults, int errfunc); 203 | LUA_API int (lua_cpcall) (lua_State *L, lua_CFunction func, void *ud); 204 | LUA_API int (lua_load) (lua_State *L, lua_Reader reader, void *dt, 205 | const char *chunkname); 206 | 207 | LUA_API int (lua_dump) (lua_State *L, lua_Writer writer, void *data); 208 | 209 | 210 | /* 211 | ** coroutine functions 212 | */ 213 | LUA_API int (lua_yield) (lua_State *L, int nresults); 214 | LUA_API int (lua_resume) (lua_State *L, int narg); 215 | LUA_API int (lua_status) (lua_State *L); 216 | 217 | /* 218 | ** garbage-collection function and options 219 | */ 220 | 221 | #define LUA_GCSTOP 0 222 | #define LUA_GCRESTART 1 223 | #define LUA_GCCOLLECT 2 224 | #define LUA_GCCOUNT 3 225 | #define LUA_GCCOUNTB 4 226 | #define LUA_GCSTEP 5 227 | #define LUA_GCSETPAUSE 6 228 | #define LUA_GCSETSTEPMUL 7 229 | 230 | LUA_API int (lua_gc) (lua_State *L, int what, int data); 231 | 232 | 233 | /* 234 | ** miscellaneous functions 235 | */ 236 | 237 | LUA_API int (lua_error) (lua_State *L); 238 | 239 | LUA_API int (lua_next) (lua_State *L, int idx); 240 | 241 | LUA_API void (lua_concat) (lua_State *L, int n); 242 | 243 | LUA_API lua_Alloc (lua_getallocf) (lua_State *L, void **ud); 244 | LUA_API void lua_setallocf (lua_State *L, lua_Alloc f, void *ud); 245 | 246 | 247 | 248 | /* 249 | ** =============================================================== 250 | ** some useful macros 251 | ** =============================================================== 252 | */ 253 | 254 | #define lua_pop(L,n) lua_settop(L, -(n)-1) 255 | 256 | #define lua_newtable(L) lua_createtable(L, 0, 0) 257 | 258 | #define lua_register(L,n,f) (lua_pushcfunction(L, (f)), lua_setglobal(L, (n))) 259 | 260 | #define lua_pushcfunction(L,f) lua_pushcclosure(L, (f), 0) 261 | 262 | #define lua_strlen(L,i) lua_objlen(L, (i)) 263 | 264 | #define lua_isfunction(L,n) (lua_type(L, (n)) == LUA_TFUNCTION) 265 | #define lua_istable(L,n) (lua_type(L, (n)) == LUA_TTABLE) 266 | #define lua_islightuserdata(L,n) (lua_type(L, (n)) == LUA_TLIGHTUSERDATA) 267 | #define lua_isnil(L,n) (lua_type(L, (n)) == LUA_TNIL) 268 | #define lua_isboolean(L,n) (lua_type(L, (n)) == LUA_TBOOLEAN) 269 | #define lua_isthread(L,n) (lua_type(L, (n)) == LUA_TTHREAD) 270 | #define lua_isnone(L,n) (lua_type(L, (n)) == LUA_TNONE) 271 | #define lua_isnoneornil(L, n) (lua_type(L, (n)) <= 0) 272 | 273 | #define lua_pushliteral(L, s) \ 274 | lua_pushlstring(L, "" s, (sizeof(s)/sizeof(char))-1) 275 | 276 | #define lua_setglobal(L,s) lua_setfield(L, LUA_GLOBALSINDEX, (s)) 277 | #define lua_getglobal(L,s) lua_getfield(L, LUA_GLOBALSINDEX, (s)) 278 | 279 | #define lua_tostring(L,i) lua_tolstring(L, (i), NULL) 280 | 281 | 282 | 283 | /* 284 | ** compatibility macros and functions 285 | */ 286 | 287 | #define lua_open() luaL_newstate() 288 | 289 | #define lua_getregistry(L) lua_pushvalue(L, LUA_REGISTRYINDEX) 290 | 291 | #define lua_getgccount(L) lua_gc(L, LUA_GCCOUNT, 0) 292 | 293 | #define lua_Chunkreader lua_Reader 294 | #define lua_Chunkwriter lua_Writer 295 | 296 | 297 | /* hack */ 298 | LUA_API void lua_setlevel (lua_State *from, lua_State *to); 299 | 300 | 301 | /* 302 | ** {====================================================================== 303 | ** Debug API 304 | ** ======================================================================= 305 | */ 306 | 307 | 308 | /* 309 | ** Event codes 310 | */ 311 | #define LUA_HOOKCALL 0 312 | #define LUA_HOOKRET 1 313 | #define LUA_HOOKLINE 2 314 | #define LUA_HOOKCOUNT 3 315 | #define LUA_HOOKTAILRET 4 316 | 317 | 318 | /* 319 | ** Event masks 320 | */ 321 | #define LUA_MASKCALL (1 << LUA_HOOKCALL) 322 | #define LUA_MASKRET (1 << LUA_HOOKRET) 323 | #define LUA_MASKLINE (1 << LUA_HOOKLINE) 324 | #define LUA_MASKCOUNT (1 << LUA_HOOKCOUNT) 325 | 326 | typedef struct lua_Debug lua_Debug; /* activation record */ 327 | 328 | 329 | /* Functions to be called by the debuger in specific events */ 330 | typedef void (*lua_Hook) (lua_State *L, lua_Debug *ar); 331 | 332 | 333 | LUA_API int lua_getstack (lua_State *L, int level, lua_Debug *ar); 334 | LUA_API int lua_getinfo (lua_State *L, const char *what, lua_Debug *ar); 335 | LUA_API const char *lua_getlocal (lua_State *L, const lua_Debug *ar, int n); 336 | LUA_API const char *lua_setlocal (lua_State *L, const lua_Debug *ar, int n); 337 | LUA_API const char *lua_getupvalue (lua_State *L, int funcindex, int n); 338 | LUA_API const char *lua_setupvalue (lua_State *L, int funcindex, int n); 339 | 340 | LUA_API int lua_sethook (lua_State *L, lua_Hook func, int mask, int count); 341 | LUA_API lua_Hook lua_gethook (lua_State *L); 342 | LUA_API int lua_gethookmask (lua_State *L); 343 | LUA_API int lua_gethookcount (lua_State *L); 344 | 345 | 346 | struct lua_Debug { 347 | int event; 348 | const char *name; /* (n) */ 349 | const char *namewhat; /* (n) `global', `local', `field', `method' */ 350 | const char *what; /* (S) `Lua', `C', `main', `tail' */ 351 | const char *source; /* (S) */ 352 | int currentline; /* (l) */ 353 | int nups; /* (u) number of upvalues */ 354 | int linedefined; /* (S) */ 355 | int lastlinedefined; /* (S) */ 356 | char short_src[LUA_IDSIZE]; /* (S) */ 357 | /* private part */ 358 | int i_ci; /* active function */ 359 | }; 360 | 361 | /* }====================================================================== */ 362 | 363 | 364 | /****************************************************************************** 365 | * Copyright (C) 1994-2008 Lua.org, PUC-Rio. All rights reserved. 366 | * 367 | * Permission is hereby granted, free of charge, to any person obtaining 368 | * a copy of this software and associated documentation files (the 369 | * "Software"), to deal in the Software without restriction, including 370 | * without limitation the rights to use, copy, modify, merge, publish, 371 | * distribute, sublicense, and/or sell copies of the Software, and to 372 | * permit persons to whom the Software is furnished to do so, subject to 373 | * the following conditions: 374 | * 375 | * The above copyright notice and this permission notice shall be 376 | * included in all copies or substantial portions of the Software. 377 | * 378 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 379 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 380 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 381 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 382 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 383 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 384 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 385 | ******************************************************************************/ 386 | 387 | 388 | #endif 389 | -------------------------------------------------------------------------------- /clib/build/include/luaconf.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: luaconf.h,v 1.82.1.7 2008/02/11 16:25:08 roberto Exp $ 3 | ** Configuration file for Lua 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | 8 | #ifndef lconfig_h 9 | #define lconfig_h 10 | 11 | #include 12 | #include 13 | 14 | 15 | /* 16 | ** ================================================================== 17 | ** Search for "@@" to find all configurable definitions. 18 | ** =================================================================== 19 | */ 20 | 21 | 22 | /* 23 | @@ LUA_ANSI controls the use of non-ansi features. 24 | ** CHANGE it (define it) if you want Lua to avoid the use of any 25 | ** non-ansi feature or library. 26 | */ 27 | #if defined(__STRICT_ANSI__) 28 | #define LUA_ANSI 29 | #endif 30 | 31 | 32 | #if !defined(LUA_ANSI) && defined(_WIN32) 33 | #define LUA_WIN 34 | #endif 35 | 36 | #if defined(LUA_USE_LINUX) 37 | #define LUA_USE_POSIX 38 | #define LUA_USE_DLOPEN /* needs an extra library: -ldl */ 39 | #define LUA_USE_READLINE /* needs some extra libraries */ 40 | #endif 41 | 42 | #if defined(LUA_USE_MACOSX) 43 | #define LUA_USE_POSIX 44 | #define LUA_DL_DYLD /* does not need extra library */ 45 | #endif 46 | 47 | 48 | 49 | /* 50 | @@ LUA_USE_POSIX includes all functionallity listed as X/Open System 51 | @* Interfaces Extension (XSI). 52 | ** CHANGE it (define it) if your system is XSI compatible. 53 | */ 54 | #if defined(LUA_USE_POSIX) 55 | #define LUA_USE_MKSTEMP 56 | #define LUA_USE_ISATTY 57 | #define LUA_USE_POPEN 58 | #define LUA_USE_ULONGJMP 59 | #endif 60 | 61 | 62 | /* 63 | @@ LUA_PATH and LUA_CPATH are the names of the environment variables that 64 | @* Lua check to set its paths. 65 | @@ LUA_INIT is the name of the environment variable that Lua 66 | @* checks for initialization code. 67 | ** CHANGE them if you want different names. 68 | */ 69 | #define LUA_PATH "LUA_PATH" 70 | #define LUA_CPATH "LUA_CPATH" 71 | #define LUA_INIT "LUA_INIT" 72 | 73 | 74 | /* 75 | @@ LUA_PATH_DEFAULT is the default path that Lua uses to look for 76 | @* Lua libraries. 77 | @@ LUA_CPATH_DEFAULT is the default path that Lua uses to look for 78 | @* C libraries. 79 | ** CHANGE them if your machine has a non-conventional directory 80 | ** hierarchy or if you want to install your libraries in 81 | ** non-conventional directories. 82 | */ 83 | #if defined(_WIN32) 84 | /* 85 | ** In Windows, any exclamation mark ('!') in the path is replaced by the 86 | ** path of the directory of the executable file of the current process. 87 | */ 88 | #define LUA_LDIR "!\\lua\\" 89 | #define LUA_CDIR "!\\" 90 | #define LUA_PATH_DEFAULT \ 91 | ".\\?.lua;" LUA_LDIR"?.lua;" LUA_LDIR"?\\init.lua;" \ 92 | LUA_CDIR"?.lua;" LUA_CDIR"?\\init.lua" 93 | #define LUA_CPATH_DEFAULT \ 94 | ".\\?.dll;" ".\\?51.dll;" LUA_CDIR"?.dll;" LUA_CDIR"?51.dll;" LUA_CDIR"clibs\\?.dll;" LUA_CDIR"clibs\\?51.dll;" LUA_CDIR"loadall.dll;" LUA_CDIR"clibs\\loadall.dll" 95 | 96 | #else 97 | #define LUA_ROOT "/usr/local/" 98 | #define LUA_LDIR LUA_ROOT "share/lua/5.1/" 99 | #define LUA_CDIR LUA_ROOT "lib/lua/5.1/" 100 | #define LUA_PATH_DEFAULT \ 101 | "./?.lua;" LUA_LDIR"?.lua;" LUA_LDIR"?/init.lua;" \ 102 | LUA_CDIR"?.lua;" LUA_CDIR"?/init.lua" 103 | #define LUA_CPATH_DEFAULT \ 104 | "./?.so;" "./lib?51.so;" LUA_CDIR"?.so;" LUA_CDIR"lib?51.so;" LUA_CDIR"loadall.so" 105 | #endif 106 | 107 | 108 | /* 109 | @@ LUA_DIRSEP is the directory separator (for submodules). 110 | ** CHANGE it if your machine does not use "/" as the directory separator 111 | ** and is not Windows. (On Windows Lua automatically uses "\".) 112 | */ 113 | #if defined(_WIN32) 114 | #define LUA_DIRSEP "\\" 115 | #else 116 | #define LUA_DIRSEP "/" 117 | #endif 118 | 119 | 120 | /* 121 | @@ LUA_PATHSEP is the character that separates templates in a path. 122 | @@ LUA_PATH_MARK is the string that marks the substitution points in a 123 | @* template. 124 | @@ LUA_EXECDIR in a Windows path is replaced by the executable's 125 | @* directory. 126 | @@ LUA_IGMARK is a mark to ignore all before it when bulding the 127 | @* luaopen_ function name. 128 | ** CHANGE them if for some reason your system cannot use those 129 | ** characters. (E.g., if one of those characters is a common character 130 | ** in file/directory names.) Probably you do not need to change them. 131 | */ 132 | #define LUA_PATHSEP ";" 133 | #define LUA_PATH_MARK "?" 134 | #define LUA_EXECDIR "!" 135 | #define LUA_IGMARK "-" 136 | 137 | 138 | /* 139 | @@ LUA_INTEGER is the integral type used by lua_pushinteger/lua_tointeger. 140 | ** CHANGE that if ptrdiff_t is not adequate on your machine. (On most 141 | ** machines, ptrdiff_t gives a good choice between int or long.) 142 | */ 143 | #define LUA_INTEGER ptrdiff_t 144 | 145 | 146 | /* 147 | @@ LUA_API is a mark for all core API functions. 148 | @@ LUALIB_API is a mark for all standard library functions. 149 | ** CHANGE them if you need to define those functions in some special way. 150 | ** For instance, if you want to create one Windows DLL with the core and 151 | ** the libraries, you may want to use the following definition (define 152 | ** LUA_BUILD_AS_DLL to get it). 153 | */ 154 | #if defined(LUA_BUILD_AS_DLL) 155 | 156 | #if defined(LUA_CORE) || defined(LUA_LIB) 157 | #define LUA_API __declspec(dllexport) 158 | #else 159 | #define LUA_API __declspec(dllimport) 160 | #endif 161 | 162 | #else 163 | 164 | #define LUA_API extern 165 | 166 | #endif 167 | 168 | /* more often than not the libs go together with the core */ 169 | #define LUALIB_API LUA_API 170 | 171 | 172 | /* 173 | @@ LUAI_FUNC is a mark for all extern functions that are not to be 174 | @* exported to outside modules. 175 | @@ LUAI_DATA is a mark for all extern (const) variables that are not to 176 | @* be exported to outside modules. 177 | ** CHANGE them if you need to mark them in some special way. Elf/gcc 178 | ** (versions 3.2 and later) mark them as "hidden" to optimize access 179 | ** when Lua is compiled as a shared library. 180 | */ 181 | #if defined(luaall_c) 182 | #define LUAI_FUNC static 183 | #define LUAI_DATA /* empty */ 184 | 185 | #elif defined(__GNUC__) && ((__GNUC__*100 + __GNUC_MINOR__) >= 302) && \ 186 | defined(__ELF__) 187 | #define LUAI_FUNC __attribute__((visibility("hidden"))) extern 188 | #define LUAI_DATA LUAI_FUNC 189 | 190 | #else 191 | #define LUAI_FUNC extern 192 | #define LUAI_DATA extern 193 | #endif 194 | 195 | 196 | 197 | /* 198 | @@ LUA_QL describes how error messages quote program elements. 199 | ** CHANGE it if you want a different appearance. 200 | */ 201 | #define LUA_QL(x) "'" x "'" 202 | #define LUA_QS LUA_QL("%s") 203 | 204 | 205 | /* 206 | @@ LUA_IDSIZE gives the maximum size for the description of the source 207 | @* of a function in debug information. 208 | ** CHANGE it if you want a different size. 209 | */ 210 | #define LUA_IDSIZE 60 211 | 212 | 213 | /* 214 | ** {================================================================== 215 | ** Stand-alone configuration 216 | ** =================================================================== 217 | */ 218 | 219 | #if defined(lua_c) || defined(luaall_c) 220 | 221 | /* 222 | @@ lua_stdin_is_tty detects whether the standard input is a 'tty' (that 223 | @* is, whether we're running lua interactively). 224 | ** CHANGE it if you have a better definition for non-POSIX/non-Windows 225 | ** systems. 226 | */ 227 | #if defined(LUA_USE_ISATTY) 228 | #include 229 | #define lua_stdin_is_tty() isatty(0) 230 | #elif defined(LUA_WIN) 231 | #include 232 | #include 233 | #define lua_stdin_is_tty() _isatty(_fileno(stdin)) 234 | #else 235 | #define lua_stdin_is_tty() 1 /* assume stdin is a tty */ 236 | #endif 237 | 238 | 239 | /* 240 | @@ LUA_PROMPT is the default prompt used by stand-alone Lua. 241 | @@ LUA_PROMPT2 is the default continuation prompt used by stand-alone Lua. 242 | ** CHANGE them if you want different prompts. (You can also change the 243 | ** prompts dynamically, assigning to globals _PROMPT/_PROMPT2.) 244 | */ 245 | #define LUA_PROMPT "> " 246 | #define LUA_PROMPT2 ">> " 247 | 248 | 249 | /* 250 | @@ LUA_PROGNAME is the default name for the stand-alone Lua program. 251 | ** CHANGE it if your stand-alone interpreter has a different name and 252 | ** your system is not able to detect that name automatically. 253 | */ 254 | #define LUA_PROGNAME "lua" 255 | 256 | 257 | /* 258 | @@ LUA_MAXINPUT is the maximum length for an input line in the 259 | @* stand-alone interpreter. 260 | ** CHANGE it if you need longer lines. 261 | */ 262 | #define LUA_MAXINPUT 512 263 | 264 | 265 | /* 266 | @@ lua_readline defines how to show a prompt and then read a line from 267 | @* the standard input. 268 | @@ lua_saveline defines how to "save" a read line in a "history". 269 | @@ lua_freeline defines how to free a line read by lua_readline. 270 | ** CHANGE them if you want to improve this functionality (e.g., by using 271 | ** GNU readline and history facilities). 272 | */ 273 | #if defined(LUA_USE_READLINE) 274 | #include 275 | #include 276 | #include 277 | #define lua_readline(L,b,p) ((void)L, ((b)=readline(p)) != NULL) 278 | #define lua_saveline(L,idx) \ 279 | if (lua_strlen(L,idx) > 0) /* non-empty line? */ \ 280 | add_history(lua_tostring(L, idx)); /* add it to history */ 281 | #define lua_freeline(L,b) ((void)L, free(b)) 282 | #else 283 | #define lua_readline(L,b,p) \ 284 | ((void)L, fputs(p, stdout), fflush(stdout), /* show prompt */ \ 285 | fgets(b, LUA_MAXINPUT, stdin) != NULL) /* get line */ 286 | #define lua_saveline(L,idx) { (void)L; (void)idx; } 287 | #define lua_freeline(L,b) { (void)L; (void)b; } 288 | #endif 289 | 290 | #endif 291 | 292 | /* }================================================================== */ 293 | 294 | 295 | /* 296 | @@ LUAI_GCPAUSE defines the default pause between garbage-collector cycles 297 | @* as a percentage. 298 | ** CHANGE it if you want the GC to run faster or slower (higher values 299 | ** mean larger pauses which mean slower collection.) You can also change 300 | ** this value dynamically. 301 | */ 302 | #define LUAI_GCPAUSE 200 /* 200% (wait memory to double before next GC) */ 303 | 304 | 305 | /* 306 | @@ LUAI_GCMUL defines the default speed of garbage collection relative to 307 | @* memory allocation as a percentage. 308 | ** CHANGE it if you want to change the granularity of the garbage 309 | ** collection. (Higher values mean coarser collections. 0 represents 310 | ** infinity, where each step performs a full collection.) You can also 311 | ** change this value dynamically. 312 | */ 313 | #define LUAI_GCMUL 200 /* GC runs 'twice the speed' of memory allocation */ 314 | 315 | 316 | 317 | /* 318 | @@ LUA_COMPAT_GETN controls compatibility with old getn behavior. 319 | ** CHANGE it (define it) if you want exact compatibility with the 320 | ** behavior of setn/getn in Lua 5.0. 321 | */ 322 | #undef LUA_COMPAT_GETN 323 | 324 | /* 325 | @@ LUA_COMPAT_LOADLIB controls compatibility about global loadlib. 326 | ** CHANGE it to undefined as soon as you do not need a global 'loadlib' 327 | ** function (the function is still available as 'package.loadlib'). 328 | */ 329 | #undef LUA_COMPAT_LOADLIB 330 | 331 | /* 332 | @@ LUA_COMPAT_VARARG controls compatibility with old vararg feature. 333 | ** CHANGE it to undefined as soon as your programs use only '...' to 334 | ** access vararg parameters (instead of the old 'arg' table). 335 | */ 336 | #define LUA_COMPAT_VARARG 337 | 338 | /* 339 | @@ LUA_COMPAT_MOD controls compatibility with old math.mod function. 340 | ** CHANGE it to undefined as soon as your programs use 'math.fmod' or 341 | ** the new '%' operator instead of 'math.mod'. 342 | */ 343 | #define LUA_COMPAT_MOD 344 | 345 | /* 346 | @@ LUA_COMPAT_LSTR controls compatibility with old long string nesting 347 | @* facility. 348 | ** CHANGE it to 2 if you want the old behaviour, or undefine it to turn 349 | ** off the advisory error when nesting [[...]]. 350 | */ 351 | #define LUA_COMPAT_LSTR 1 352 | 353 | /* 354 | @@ LUA_COMPAT_GFIND controls compatibility with old 'string.gfind' name. 355 | ** CHANGE it to undefined as soon as you rename 'string.gfind' to 356 | ** 'string.gmatch'. 357 | */ 358 | #define LUA_COMPAT_GFIND 359 | 360 | /* 361 | @@ LUA_COMPAT_OPENLIB controls compatibility with old 'luaL_openlib' 362 | @* behavior. 363 | ** CHANGE it to undefined as soon as you replace to 'luaL_register' 364 | ** your uses of 'luaL_openlib' 365 | */ 366 | #define LUA_COMPAT_OPENLIB 367 | 368 | 369 | 370 | /* 371 | @@ luai_apicheck is the assert macro used by the Lua-C API. 372 | ** CHANGE luai_apicheck if you want Lua to perform some checks in the 373 | ** parameters it gets from API calls. This may slow down the interpreter 374 | ** a bit, but may be quite useful when debugging C code that interfaces 375 | ** with Lua. A useful redefinition is to use assert.h. 376 | */ 377 | #if defined(LUA_USE_APICHECK) 378 | #include 379 | #define luai_apicheck(L,o) { (void)L; assert(o); } 380 | #else 381 | #define luai_apicheck(L,o) { (void)L; } 382 | #endif 383 | 384 | 385 | /* 386 | @@ LUAI_BITSINT defines the number of bits in an int. 387 | ** CHANGE here if Lua cannot automatically detect the number of bits of 388 | ** your machine. Probably you do not need to change this. 389 | */ 390 | /* avoid overflows in comparison */ 391 | #if INT_MAX-20 < 32760 392 | #define LUAI_BITSINT 16 393 | #elif INT_MAX > 2147483640L 394 | /* int has at least 32 bits */ 395 | #define LUAI_BITSINT 32 396 | #else 397 | #error "you must define LUA_BITSINT with number of bits in an integer" 398 | #endif 399 | 400 | 401 | /* 402 | @@ LUAI_UINT32 is an unsigned integer with at least 32 bits. 403 | @@ LUAI_INT32 is an signed integer with at least 32 bits. 404 | @@ LUAI_UMEM is an unsigned integer big enough to count the total 405 | @* memory used by Lua. 406 | @@ LUAI_MEM is a signed integer big enough to count the total memory 407 | @* used by Lua. 408 | ** CHANGE here if for some weird reason the default definitions are not 409 | ** good enough for your machine. (The definitions in the 'else' 410 | ** part always works, but may waste space on machines with 64-bit 411 | ** longs.) Probably you do not need to change this. 412 | */ 413 | #if LUAI_BITSINT >= 32 414 | #define LUAI_UINT32 unsigned int 415 | #define LUAI_INT32 int 416 | #define LUAI_MAXINT32 INT_MAX 417 | #define LUAI_UMEM size_t 418 | #define LUAI_MEM ptrdiff_t 419 | #else 420 | /* 16-bit ints */ 421 | #define LUAI_UINT32 unsigned long 422 | #define LUAI_INT32 long 423 | #define LUAI_MAXINT32 LONG_MAX 424 | #define LUAI_UMEM unsigned long 425 | #define LUAI_MEM long 426 | #endif 427 | 428 | 429 | /* 430 | @@ LUAI_MAXCALLS limits the number of nested calls. 431 | ** CHANGE it if you need really deep recursive calls. This limit is 432 | ** arbitrary; its only purpose is to stop infinite recursion before 433 | ** exhausting memory. 434 | */ 435 | #define LUAI_MAXCALLS 20000 436 | 437 | 438 | /* 439 | @@ LUAI_MAXCSTACK limits the number of Lua stack slots that a C function 440 | @* can use. 441 | ** CHANGE it if you need lots of (Lua) stack space for your C 442 | ** functions. This limit is arbitrary; its only purpose is to stop C 443 | ** functions to consume unlimited stack space. (must be smaller than 444 | ** -LUA_REGISTRYINDEX) 445 | */ 446 | #define LUAI_MAXCSTACK 8000 447 | 448 | 449 | 450 | /* 451 | ** {================================================================== 452 | ** CHANGE (to smaller values) the following definitions if your system 453 | ** has a small C stack. (Or you may want to change them to larger 454 | ** values if your system has a large C stack and these limits are 455 | ** too rigid for you.) Some of these constants control the size of 456 | ** stack-allocated arrays used by the compiler or the interpreter, while 457 | ** others limit the maximum number of recursive calls that the compiler 458 | ** or the interpreter can perform. Values too large may cause a C stack 459 | ** overflow for some forms of deep constructs. 460 | ** =================================================================== 461 | */ 462 | 463 | 464 | /* 465 | @@ LUAI_MAXCCALLS is the maximum depth for nested C calls (short) and 466 | @* syntactical nested non-terminals in a program. 467 | */ 468 | #define LUAI_MAXCCALLS 200 469 | 470 | 471 | /* 472 | @@ LUAI_MAXVARS is the maximum number of local variables per function 473 | @* (must be smaller than 250). 474 | */ 475 | #define LUAI_MAXVARS 200 476 | 477 | 478 | /* 479 | @@ LUAI_MAXUPVALUES is the maximum number of upvalues per function 480 | @* (must be smaller than 250). 481 | */ 482 | #define LUAI_MAXUPVALUES 60 483 | 484 | 485 | /* 486 | @@ LUAL_BUFFERSIZE is the buffer size used by the lauxlib buffer system. 487 | */ 488 | #define LUAL_BUFFERSIZE BUFSIZ 489 | 490 | /* }================================================================== */ 491 | 492 | 493 | 494 | 495 | /* 496 | ** {================================================================== 497 | @@ LUA_NUMBER is the type of numbers in Lua. 498 | ** CHANGE the following definitions only if you want to build Lua 499 | ** with a number type different from double. You may also need to 500 | ** change lua_number2int & lua_number2integer. 501 | ** =================================================================== 502 | */ 503 | 504 | #define LUA_NUMBER_DOUBLE 505 | #define LUA_NUMBER double 506 | 507 | /* 508 | @@ LUAI_UACNUMBER is the result of an 'usual argument conversion' 509 | @* over a number. 510 | */ 511 | #define LUAI_UACNUMBER double 512 | 513 | 514 | /* 515 | @@ LUA_NUMBER_SCAN is the format for reading numbers. 516 | @@ LUA_NUMBER_FMT is the format for writing numbers. 517 | @@ lua_number2str converts a number to a string. 518 | @@ LUAI_MAXNUMBER2STR is maximum size of previous conversion. 519 | @@ lua_str2number converts a string to a number. 520 | */ 521 | #define LUA_NUMBER_SCAN "%lf" 522 | #define LUA_NUMBER_FMT "%.14g" 523 | #define lua_number2str(s,n) sprintf((s), LUA_NUMBER_FMT, (n)) 524 | #define LUAI_MAXNUMBER2STR 32 /* 16 digits, sign, point, and \0 */ 525 | #define lua_str2number(s,p) strtod((s), (p)) 526 | 527 | 528 | /* 529 | @@ The luai_num* macros define the primitive operations over numbers. 530 | */ 531 | #if defined(LUA_CORE) 532 | #include 533 | #define luai_numadd(a,b) ((a)+(b)) 534 | #define luai_numsub(a,b) ((a)-(b)) 535 | #define luai_nummul(a,b) ((a)*(b)) 536 | #define luai_numdiv(a,b) ((a)/(b)) 537 | #define luai_nummod(a,b) ((a) - floor((a)/(b))*(b)) 538 | #define luai_numpow(a,b) (pow(a,b)) 539 | #define luai_numunm(a) (-(a)) 540 | #define luai_numeq(a,b) ((a)==(b)) 541 | #define luai_numlt(a,b) ((a)<(b)) 542 | #define luai_numle(a,b) ((a)<=(b)) 543 | #define luai_numisnan(a) (!luai_numeq((a), (a))) 544 | #endif 545 | 546 | 547 | /* 548 | @@ lua_number2int is a macro to convert lua_Number to int. 549 | @@ lua_number2integer is a macro to convert lua_Number to lua_Integer. 550 | ** CHANGE them if you know a faster way to convert a lua_Number to 551 | ** int (with any rounding method and without throwing errors) in your 552 | ** system. In Pentium machines, a naive typecast from double to int 553 | ** in C is extremely slow, so any alternative is worth trying. 554 | */ 555 | 556 | /* On a Pentium, resort to a trick */ 557 | #if defined(LUA_NUMBER_DOUBLE) && !defined(LUA_ANSI) && !defined(__SSE2__) && \ 558 | (defined(__i386) || defined (_M_IX86) || defined(__i386__)) 559 | 560 | /* On a Microsoft compiler, use assembler */ 561 | #if defined(_MSC_VER) 562 | 563 | #define lua_number2int(i,d) __asm fld d __asm fistp i 564 | #define lua_number2integer(i,n) lua_number2int(i, n) 565 | 566 | /* the next trick should work on any Pentium, but sometimes clashes 567 | with a DirectX idiosyncrasy */ 568 | #else 569 | 570 | union luai_Cast { double l_d; long l_l; }; 571 | #define lua_number2int(i,d) \ 572 | { volatile union luai_Cast u; u.l_d = (d) + 6755399441055744.0; (i) = u.l_l; } 573 | #define lua_number2integer(i,n) lua_number2int(i, n) 574 | 575 | #endif 576 | 577 | 578 | /* this option always works, but may be slow */ 579 | #else 580 | #define lua_number2int(i,d) ((i)=(int)(d)) 581 | #define lua_number2integer(i,d) ((i)=(lua_Integer)(d)) 582 | 583 | #endif 584 | 585 | /* }================================================================== */ 586 | 587 | 588 | /* 589 | @@ LUAI_USER_ALIGNMENT_T is a type that requires maximum alignment. 590 | ** CHANGE it if your system requires alignments larger than double. (For 591 | ** instance, if your system supports long doubles and they must be 592 | ** aligned in 16-byte boundaries, then you should add long double in the 593 | ** union.) Probably you do not need to change this. 594 | */ 595 | #define LUAI_USER_ALIGNMENT_T union { double u; void *s; long l; } 596 | 597 | 598 | /* 599 | @@ LUAI_THROW/LUAI_TRY define how Lua does exception handling. 600 | ** CHANGE them if you prefer to use longjmp/setjmp even with C++ 601 | ** or if want/don't to use _longjmp/_setjmp instead of regular 602 | ** longjmp/setjmp. By default, Lua handles errors with exceptions when 603 | ** compiling as C++ code, with _longjmp/_setjmp when asked to use them, 604 | ** and with longjmp/setjmp otherwise. 605 | */ 606 | #if defined(__cplusplus) 607 | /* C++ exceptions */ 608 | #define LUAI_THROW(L,c) throw(c) 609 | #define LUAI_TRY(L,c,a) try { a } catch(...) \ 610 | { if ((c)->status == 0) (c)->status = -1; } 611 | #define luai_jmpbuf int /* dummy variable */ 612 | 613 | #elif defined(LUA_USE_ULONGJMP) 614 | /* in Unix, try _longjmp/_setjmp (more efficient) */ 615 | #define LUAI_THROW(L,c) _longjmp((c)->b, 1) 616 | #define LUAI_TRY(L,c,a) if (_setjmp((c)->b) == 0) { a } 617 | #define luai_jmpbuf jmp_buf 618 | 619 | #else 620 | /* default handling with long jumps */ 621 | #define LUAI_THROW(L,c) longjmp((c)->b, 1) 622 | #define LUAI_TRY(L,c,a) if (setjmp((c)->b) == 0) { a } 623 | #define luai_jmpbuf jmp_buf 624 | 625 | #endif 626 | 627 | 628 | /* 629 | @@ LUA_MAXCAPTURES is the maximum number of captures that a pattern 630 | @* can do during pattern-matching. 631 | ** CHANGE it if you need more captures. This limit is arbitrary. 632 | */ 633 | #define LUA_MAXCAPTURES 32 634 | 635 | 636 | /* 637 | @@ lua_tmpnam is the function that the OS library uses to create a 638 | @* temporary name. 639 | @@ LUA_TMPNAMBUFSIZE is the maximum size of a name created by lua_tmpnam. 640 | ** CHANGE them if you have an alternative to tmpnam (which is considered 641 | ** insecure) or if you want the original tmpnam anyway. By default, Lua 642 | ** uses tmpnam except when POSIX is available, where it uses mkstemp. 643 | */ 644 | #if defined(loslib_c) || defined(luaall_c) 645 | 646 | #if defined(LUA_USE_MKSTEMP) 647 | #include 648 | #define LUA_TMPNAMBUFSIZE 32 649 | #define lua_tmpnam(b,e) { \ 650 | strcpy(b, "/tmp/lua_XXXXXX"); \ 651 | e = mkstemp(b); \ 652 | if (e != -1) close(e); \ 653 | e = (e == -1); } 654 | 655 | #else 656 | #define LUA_TMPNAMBUFSIZE L_tmpnam 657 | #define lua_tmpnam(b,e) { e = (tmpnam(b) == NULL); } 658 | #endif 659 | 660 | #endif 661 | 662 | 663 | /* 664 | @@ lua_popen spawns a new process connected to the current one through 665 | @* the file streams. 666 | ** CHANGE it if you have a way to implement it in your system. 667 | */ 668 | #if defined(LUA_USE_POPEN) 669 | 670 | #define lua_popen(L,c,m) ((void)L, fflush(NULL), popen(c,m)) 671 | #define lua_pclose(L,file) ((void)L, (pclose(file) != -1)) 672 | 673 | #elif defined(LUA_WIN) 674 | 675 | #define lua_popen(L,c,m) ((void)L, _popen(c,m)) 676 | #define lua_pclose(L,file) ((void)L, (_pclose(file) != -1)) 677 | 678 | #else 679 | 680 | #define lua_popen(L,c,m) ((void)((void)c, m), \ 681 | luaL_error(L, LUA_QL("popen") " not supported"), (FILE*)0) 682 | #define lua_pclose(L,file) ((void)((void)L, file), 0) 683 | 684 | #endif 685 | 686 | /* 687 | @@ LUA_DL_* define which dynamic-library system Lua should use. 688 | ** CHANGE here if Lua has problems choosing the appropriate 689 | ** dynamic-library system for your platform (either Windows' DLL, Mac's 690 | ** dyld, or Unix's dlopen). If your system is some kind of Unix, there 691 | ** is a good chance that it has dlopen, so LUA_DL_DLOPEN will work for 692 | ** it. To use dlopen you also need to adapt the src/Makefile (probably 693 | ** adding -ldl to the linker options), so Lua does not select it 694 | ** automatically. (When you change the makefile to add -ldl, you must 695 | ** also add -DLUA_USE_DLOPEN.) 696 | ** If you do not want any kind of dynamic library, undefine all these 697 | ** options. 698 | ** By default, _WIN32 gets LUA_DL_DLL and MAC OS X gets LUA_DL_DYLD. 699 | */ 700 | #if defined(LUA_USE_DLOPEN) 701 | #define LUA_DL_DLOPEN 702 | #endif 703 | 704 | #if defined(LUA_WIN) 705 | #define LUA_DL_DLL 706 | #endif 707 | 708 | 709 | /* 710 | @@ LUAI_EXTRASPACE allows you to add user-specific data in a lua_State 711 | @* (the data goes just *before* the lua_State pointer). 712 | ** CHANGE (define) this if you really need that. This value must be 713 | ** a multiple of the maximum alignment required for your machine. 714 | */ 715 | #define LUAI_EXTRASPACE 0 716 | 717 | 718 | /* 719 | @@ luai_userstate* allow user-specific actions on threads. 720 | ** CHANGE them if you defined LUAI_EXTRASPACE and need to do something 721 | ** extra when a thread is created/deleted/resumed/yielded. 722 | */ 723 | #define luai_userstateopen(L) ((void)L) 724 | #define luai_userstateclose(L) ((void)L) 725 | #define luai_userstatethread(L,L1) ((void)L) 726 | #define luai_userstatefree(L) ((void)L) 727 | #define luai_userstateresume(L,n) ((void)L) 728 | #define luai_userstateyield(L,n) ((void)L) 729 | 730 | 731 | /* 732 | @@ LUA_INTFRMLEN is the length modifier for integer conversions 733 | @* in 'string.format'. 734 | @@ LUA_INTFRM_T is the integer type correspoding to the previous length 735 | @* modifier. 736 | ** CHANGE them if your system supports long long or does not support long. 737 | */ 738 | 739 | #if defined(LUA_USELONGLONG) 740 | 741 | #define LUA_INTFRMLEN "ll" 742 | #define LUA_INTFRM_T long long 743 | 744 | #else 745 | 746 | #define LUA_INTFRMLEN "l" 747 | #define LUA_INTFRM_T long 748 | 749 | #endif 750 | 751 | 752 | 753 | /* =================================================================== */ 754 | 755 | /* 756 | ** Local configuration. You can use this space to add your redefinitions 757 | ** without modifying the main part of the file. 758 | */ 759 | 760 | 761 | 762 | #endif 763 | 764 | -------------------------------------------------------------------------------- /love2d/game.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phoe-nix/OutbreakTracker/aef7b8e728f68304474fbcd2091cd64406cc7db6/love2d/game.ico -------------------------------------------------------------------------------- /love2d/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phoe-nix/OutbreakTracker/aef7b8e728f68304474fbcd2091cd64406cc7db6/love2d/icon.ico -------------------------------------------------------------------------------- /love2d/love.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phoe-nix/OutbreakTracker/aef7b8e728f68304474fbcd2091cd64406cc7db6/love2d/love.ico -------------------------------------------------------------------------------- /love2d/readme.txt: -------------------------------------------------------------------------------- 1 | LÖVE is an *awesome* framework you can use to make 2D games in Lua. It's free, open-source, and works on Windows, Mac OS X, Linux, Android, and iOS. 2 | 3 | [![Build Status: Windows](https://ci.appveyor.com/api/projects/status/u1a69u5o5ej1pus4?svg=true)](https://ci.appveyor.com/project/AlexSzpakowski/love) 4 | 5 | Documentation 6 | ------------- 7 | 8 | We use our [wiki][wiki] for documentation. 9 | If you need further help, feel free to ask on our [forums][forums], and last but not least there's the irc channel [#love on OFTC][irc]. 10 | 11 | Compilation 12 | ----------- 13 | 14 | ###Windows 15 | Follow the instructions at the [megasource][megasource] repository page. 16 | 17 | ###*nix 18 | Run `platform/unix/automagic` from the repository root, then run ./configure and make. 19 | 20 | $ platform/unix/automagic 21 | $ ./configure 22 | $ make 23 | 24 | When using a source release, automagic has already been run, and the first step can be skipped. 25 | 26 | ###Mac OS X 27 | Download the required frameworks from [here][dependencies] and place them in `/Library/Frameworks/`. 28 | 29 | Then use the Xcode project found at `platform/xcode/love.xcodeproj` to build the `love-macosx` target. 30 | 31 | ###iOS 32 | Download the required libraries from [here][dependencies-ios] and place the `include` and `libraries` folders 33 | into the `platform/xcode/ios` folder. 34 | 35 | Then use the Xcode project found at `platform/xcode/love.xcodeproj` to build the `love-ios` target. 36 | 37 | See `readme-iOS.rtf` for more information. 38 | 39 | ###Android 40 | Visit the [Android build repository][android-repository] for build instructions. 41 | 42 | Repository information 43 | ---------------------- 44 | 45 | We use the 'default' branch for development, and therefore it should not be considered stable. 46 | Also used is the 'minor' branch, which is used for features in the next minor version and it is 47 | not our development target (which would be the next revision - version numbers are formatted major.minor.revision.) 48 | 49 | We tag all our releases (since we started using mercurial), and have binary downloads available for them. 50 | 51 | Experimental changes are developed in the separate [love-experiments][love-experiments] repository. 52 | 53 | Contributing 54 | ------------ 55 | 56 | The best places to contribute are through the Bitbucket issue tracker and the official IRC channel. 57 | For code contributions, pull requests and patches are welcome. Be sure to read the [source code style guide][codestyle]. 58 | 59 | Builds 60 | ------ 61 | 62 | Releases are found in the 'downloads' section on bitbucket, are linked on [the site][site], 63 | and there's a ppa for ubuntu, [ppa:bartbes/love-stable][stableppa]. 64 | 65 | There are also unstable/nightly builds: 66 | 67 | - Most can be found [here][builds]. 68 | - For ubuntu linux they are in [ppa:bartbes/love-unstable][unstableppa] 69 | - For arch linux there's [love-hg][aur] in the AUR. 70 | 71 | Dependencies 72 | ------------ 73 | 74 | - SDL2 75 | - OpenGL 2.1+ / OpenGL ES 2+ 76 | - OpenAL 77 | - Lua / LuaJIT / LLVM-lua 78 | - FreeType 79 | - PhysicsFS 80 | - ModPlug 81 | - mpg123 82 | - Vorbisfile 83 | - Theora 84 | 85 | [site]: http://love2d.org 86 | [wiki]: http://love2d.org/wiki 87 | [forums]: http://love2d.org/forums 88 | [irc]: irc://irc.oftc.net/love 89 | [dependencies]: http://love2d.org/sdk 90 | [dependencies-ios]: https://bitbucket.org/rude/love/downloads/love-0.10.0-ios-libraries.zip 91 | [megasource]: https://bitbucket.org/rude/megasource 92 | [builds]: http://love2d.org/builds 93 | [stableppa]: https://launchpad.net/~bartbes/+archive/love-stable 94 | [unstableppa]: https://launchpad.net/~bartbes/+archive/love-unstable 95 | [aur]: http://aur.archlinux.org/packages/love-hg 96 | [love-experiments]: https://bitbucket.org/bartbes/love-experiments 97 | [codestyle]: https://love2d.org/wiki/Code_Style 98 | [android-repository]: https://bitbucket.org/MartinFelis/love-android-sdl2 99 | -------------------------------------------------------------------------------- /lua/DoorCard.lua: -------------------------------------------------------------------------------- 1 | DoorCard = {} 2 | DoorCard.__index = DoorCard 3 | 4 | function DoorCard:new(id) 5 | local o = {} 6 | o.id = id or 1 7 | --o.nameLabel = Label:new(80, 0, "placeholder", VerySmallFont, "left", "up", 150, 10, {1, 1, 1, 1}) 8 | --o.nameLabelShadow = Label:new(81, 1, "placeholder", VerySmallFont, "left", "up", 150, 10, {0, 0, 0, 1}) 9 | o.hpLabel = Label:new(0, 1, "placeholder", VerySmallFont, "center", "up", 36, 10, {1, 1, 1, 1}) 10 | o.hpLabelShadow= Label:new(1, 2, "placeholder", VerySmallFont, "center", "up", 36, 10, {0, 0, 0, 1}) 11 | 12 | return setmetatable(o, self) 13 | end 14 | 15 | function DoorCard:draw(x, y) 16 | love.graphics.push() 17 | love.graphics.translate(x, y) 18 | 19 | local door = Doors[self.id] 20 | if (Doors[self.id].HP== 500 21 | or Doors[self.id].HP== 0 22 | or Doors[self.id].flag==0 23 | or Doors[self.id].flag==0x0A 24 | or Doors[self.id].flag==0x0C 25 | or Doors[self.id].flag==0x2C 26 | or Doors[self.id].flag==0x82) then 27 | if (Doors[self.id].HP> 9999) then 28 | love.graphics.setColor( 1, 1, 1, 1 ) 29 | love.graphics.rectangle('line',1,3,34,11,0,0,0) 30 | love.graphics.setColor(0,0,1,0.3) 31 | love.graphics.rectangle('fill',0,2,36,13,0,0,0) 32 | else 33 | love.graphics.setColor( 1, 1, 1, 1 ) 34 | love.graphics.rectangle('line',5,3,27,11,0,0,0) 35 | love.graphics.setColor(0,0,1,0.3) 36 | love.graphics.rectangle('fill',4,2,29,13,0,0,0) 37 | end 38 | else 39 | if (Doors[self.id].HP> 9999) then 40 | love.graphics.setColor( 1, 1, 1, 0.1 ) 41 | love.graphics.rectangle('line',1,3,34,11,0,0,0) 42 | love.graphics.setColor( 1, 0, 0, 0.35 ) 43 | love.graphics.rectangle('fill',0,2,36,13,0,0,0) 44 | else 45 | love.graphics.setColor( 1, 1, 1, 0.1 ) 46 | love.graphics.rectangle('line',5,3,27,11,0,0,0) 47 | love.graphics.setColor( 1, 0, 0, 0.35 ) 48 | love.graphics.rectangle('fill',4,2,29,13,0,0,0) 49 | end 50 | end 51 | --self.nameLabel.color=(GetConditionColor2(GetConditionName2(Doors[self.id].HP, Doors[self.id].maxHP))) 52 | 53 | self.hpLabel.text = Doors[self.id].HP 54 | self.hpLabelShadow.text = Doors[self.id].HP 55 | self.hpLabelShadow:draw() 56 | self.hpLabel:draw() 57 | 58 | love.graphics.pop() 59 | love.graphics.setColor( 1, 1, 1, 1 ) 60 | end 61 | -------------------------------------------------------------------------------- /lua/EnemyCard.lua: -------------------------------------------------------------------------------- 1 | EnemyCard = {} 2 | EnemyCard.__index = EnemyCard 3 | 4 | function EnemyCard:new(id) 5 | local o = {} 6 | o.id = id or 1 7 | o.nameLabel = Label:new(80, 0, "placeholder", VerySmallFont, "left", "up", 150, 10, {1, 1, 1, 1}) 8 | o.nameLabelShadow = Label:new(81, 1, "placeholder", VerySmallFont, "left", "up", 150, 10, {0, 0, 0, 1}) 9 | o.healthLabel = Label:new(2, 0, "placeholder", VerySmallFont, "center", "up", 75, 10, {1, 1, 1, 1}) 10 | o.healthLabelShadow= Label:new(3, 1, "placeholder", VerySmallFont, "center", "up", 75, 10, {0, 0, 0, 1}) 11 | 12 | return setmetatable(o, self) 13 | end 14 | 15 | function EnemyCard:draw(x, y) 16 | love.graphics.push() 17 | love.graphics.translate(x, y) 18 | 19 | local enemy = Enemies[self.id] 20 | 21 | love.graphics.setColor( 109/255, 131/255, 227/255, 1 ) 22 | love.graphics.rectangle('line',2,2,76,11,1,1,1) 23 | if Enemies[self.id].HP>= 0x8000 24 | or Enemies[self.id].HP == 0x0 25 | or Enemies[self.id].nameID == 11 26 | or Enemies[self.id].nameID == 12 27 | or Enemies[self.id].nameID == 14 28 | or Enemies[self.id].nameID == 26 29 | or Enemies[self.id].nameID == 34 30 | or Enemies[self.id].nameID == 56 then 31 | love.graphics.setColor(1,0,0,0.3) 32 | love.graphics.rectangle('fill',4,4,72,7,0,0,1) 33 | --love.graphics.rectangle('fill',4,4,(GetHealthbar(Enemies[self.id].HP, Enemies[self.id].maxHP))*72,7,0,0,1) 34 | else 35 | love.graphics.setColor(GetConditionColor2(GetConditionName2(Enemies[self.id].HP, Enemies[self.id].maxHP))) 36 | love.graphics.rectangle('fill',4,4,(Enemies[self.id].HP / Enemies[self.id].maxHP)*72,7,0,0,1) 37 | end 38 | 39 | --self.nameLabel.color=(GetConditionColor2(GetConditionName2(Enemies[self.id].HP, Enemies[self.id].maxHP))) 40 | 41 | self.nameLabel.text = Enemies[self.id].name 42 | self.nameLabelShadow.text = Enemies[self.id].name 43 | self.nameLabelShadow:draw() 44 | self.nameLabel:draw() 45 | self.nameLabel.color = GetEnemyColor(self.id) 46 | 47 | self.healthLabel.text = GetEnemyHealthString(self.id) 48 | self.healthLabelShadow.text = GetEnemyHealthString(self.id) 49 | self.healthLabelShadow:draw() 50 | self.healthLabel:draw() 51 | 52 | love.graphics.pop() 53 | love.graphics.setColor( 1, 1, 1, 1 ) 54 | end 55 | EnemyCard2 = {} 56 | EnemyCard2.__index = EnemyCard2 57 | 58 | function EnemyCard2:new(id) 59 | local o = {} 60 | o.id = id or 1 61 | o.nameLabel = Label:new(80, 5, "placeholder", VerySmallFont, "left", "down", 110, 10, {0, 0, 0, 1}) 62 | o.nameLabelShadow = Label:new(81, 6, "placeholder", VerySmallFont, "left", "down", 110, 10, {0, 0, 0, 1}) 63 | 64 | return setmetatable(o, self) 65 | end 66 | 67 | function EnemyCard2:draw(x, y) 68 | love.graphics.push() 69 | love.graphics.translate(x, y) 70 | 71 | local enemy = Enemies[self.id] 72 | 73 | love.graphics.setColor( 109/255, 131/255, 227/255, 1 ) 74 | love.graphics.rectangle('line',2,2,76,11,1,1,1) 75 | if Enemies[self.id].HP>= 0x8000 76 | or Enemies[self.id].HP == 0x0 77 | or Enemies[self.id].nameID == 11 78 | or Enemies[self.id].nameID == 12 79 | or Enemies[self.id].nameID == 14 80 | or Enemies[self.id].nameID == 26 81 | or Enemies[self.id].nameID == 34 82 | or Enemies[self.id].nameID == 56 then 83 | love.graphics.setColor(1,0,0,0.3) 84 | love.graphics.rectangle('fill',4,4,72,7,0,0,1) 85 | --love.graphics.rectangle('fill',4,4,(GetHealthbar(Enemies[self.id].HP, Enemies[self.id].maxHP))*72,7,0,0,1) 86 | else 87 | love.graphics.setColor(GetConditionColor2(GetConditionName2(Enemies[self.id].HP, Enemies[self.id].maxHP))) 88 | love.graphics.rectangle('fill',4,4,(Enemies[self.id].HP / Enemies[self.id].maxHP)*72,7,0,0,1) 89 | end 90 | 91 | self.nameLabel.text = Enemies[self.id].name 92 | self.nameLabelShadow.text = Enemies[self.id].name 93 | self.nameLabelShadow:draw() 94 | self.nameLabel:draw() 95 | self.nameLabel.color = GetEnemyColor(self.id) 96 | 97 | love.graphics.pop() 98 | love.graphics.setColor( 1, 1, 1, 1 ) 99 | end 100 | EnemyCard3 = {} 101 | EnemyCard3.__index = EnemyCard3 102 | 103 | function EnemyCard3:new(id) 104 | local o = {} 105 | o.id = id or 1 106 | o.nameLabel = Label:new(3, 0, "placeholder", VerySmallFont, "left", "top", 300, 20, {0, 0, 0, 1}) 107 | o.nameLabelShadow = Label:new(4, 1, "placeholder", VerySmallFont, "left", "top", 300, 20, {0, 0, 0, 1}) 108 | o.healthLabel = Label:new(0, 18, "placeholder", SmallFont, "center", "center", 300, 20, {1, 1, 1, 1}) 109 | o.healthLabelShadow= Label:new(1, 19, "placeholder", SmallFont, "center", "center", 300, 20, {0, 0, 0, 1}) 110 | 111 | return setmetatable(o, self) 112 | end 113 | 114 | function EnemyCard3:draw(x, y) 115 | love.graphics.push() 116 | love.graphics.translate(x, y) 117 | 118 | local sb = love.graphics.newSpriteBatch(UIAtlas.tex) 119 | local enemy = Enemies[self.id] 120 | 121 | love.graphics.setColor( 109/255, 131/255, 227/255, 1 ) 122 | love.graphics.rectangle('line',4, 17,292,20,1,1,1) 123 | if Enemies[self.id].HP>= 0x8000 124 | or Enemies[self.id].HP == 0x0 125 | or Enemies[self.id].nameID == 11 126 | or Enemies[self.id].nameID == 12 127 | or Enemies[self.id].nameID == 14 128 | or Enemies[self.id].nameID == 26 129 | or Enemies[self.id].nameID == 34 130 | or Enemies[self.id].nameID == 56 then 131 | love.graphics.setColor(1,0,0,0.3) 132 | love.graphics.rectangle('fill',6, 19,288,16,0,0,1) 133 | --love.graphics.rectangle('fill',6, 19,(GetHealthbar(Enemies[self.id].HP, Enemies[self.id].maxHP))*290,14,0,0,1) 134 | else 135 | love.graphics.setColor(GetConditionColor2(GetConditionName2(Enemies[self.id].HP, Enemies[self.id].maxHP))) 136 | love.graphics.rectangle('fill',6, 19,(Enemies[self.id].HP / Enemies[self.id].maxHP)*288,16,0,0,1) 137 | end 138 | --self.nameLabel.color=(GetConditionColor2(GetConditionName2(Enemies[self.id].HP, Enemies[self.id].maxHP))) 139 | 140 | self.nameLabel.text = Enemies[self.id].name 141 | self.nameLabelShadow.text = Enemies[self.id].name 142 | self.nameLabelShadow:draw() 143 | self.nameLabel:draw() 144 | self.nameLabel.color = GetEnemyColor(self.id) 145 | 146 | self.healthLabel.text = GetEnemyHealthString(self.id) 147 | self.healthLabelShadow.text = GetEnemyHealthString(self.id) 148 | self.healthLabelShadow:draw() 149 | self.healthLabel:draw() 150 | 151 | love.graphics.pop() 152 | love.graphics.setColor( 1, 1, 1, 1 ) 153 | end 154 | EnemyCard4 = {} 155 | EnemyCard4.__index = EnemyCard4 156 | 157 | function EnemyCard4:new(id) 158 | local o = {} 159 | o.id = id or 1 160 | o.nameLabel = Label:new(4, 0, "placeholder", MiniFont, "left", "up", 300, 10, {1, 1, 1, 1}) 161 | o.nameLabelShadow = Label:new(5, 1, "placeholder", MiniFont, "left", "up", 300, 10, {0, 0, 0, 1}) 162 | o.roomLabel = Label:new(14, 0, "placeholder", MiniFont, "center", "up", 300, 10, {1, 1, 1, 1}) 163 | o.roomLabelShadow = Label:new(15, 1, "placeholder", MiniFont, "center", "up", 300, 10, {0, 0, 0, 1}) 164 | o.healthLabel = Label:new(0, 1, "placeholder", MiniFont, "right", "up", 296, 10, {1, 1, 1, 1}) 165 | o.healthLabelShadow= Label:new(1, 2, "placeholder", MiniFont, "right", "up", 296, 10, {0, 0, 0, 1}) 166 | 167 | return setmetatable(o, self) 168 | end 169 | 170 | function EnemyCard4:draw(x, y) 171 | love.graphics.push() 172 | love.graphics.translate(x, y) 173 | 174 | local enemy = Enemies[self.id] 175 | 176 | love.graphics.setColor( 109/255, 131/255, 227/255, 1 ) 177 | --love.graphics.rectangle('line',2,2,76,11,1,1,1) 178 | --if Enemies2[self.id].HP>= 0x8000 179 | --or Enemies2[self.id].HP == 0x0 180 | --or Enemies2[self.id].nameID == 11 181 | --or Enemies2[self.id].nameID == 12 182 | --or Enemies2[self.id].nameID == 14 183 | --or Enemies2[self.id].nameID == 26 184 | --or Enemies2[self.id].nameID == 34 185 | --or Enemies2[self.id].nameID == 56 then 186 | -- love.graphics.setColor(1,0,0,0.3) 187 | -- love.graphics.rectangle('fill',4,15,294,1,0,0,1) 188 | --love.graphics.rectangle('fill',4,4,(GetHealthbar(Enemies2[self.id].HP, Enemies2[self.id].maxHP))*72,7,0,0,1) 189 | --else 190 | love.graphics.setColor(GetConditionColor3(GetConditionName2(Enemies2[self.id].HP, Enemies2[self.id].maxHP))) 191 | love.graphics.rectangle('fill',4,13,(Enemies2[self.id].HP / Enemies2[self.id].maxHP)*292,1,0,0,0) 192 | --end 193 | 194 | self.nameLabel.text = Enemies2[self.id].name 195 | --self.nameLabelShadow.text = Enemies2[self.id].name 196 | --self.nameLabelShadow:draw() 197 | self.nameLabel:draw() 198 | self.nameLabel.color = GetEnemyColor2(self.id) 199 | 200 | self.healthLabel.text = GetEnemiesHealthString2(self.id) 201 | --self.healthLabelShadow.text = GetEnemiesHealthString2(self.id) 202 | --self.healthLabelShadow:draw() 203 | self.healthLabel:draw() 204 | 205 | self.roomLabel.text = GetRoomName(GameInfo.scenario, Enemies2[self.id].roomID) 206 | --self.roomLabelShadow.text = GetRoomName(GameInfo.scenario, Enemies2[self.id].roomID) 207 | --self.roomLabelShadow:draw() 208 | self.roomLabel:draw() 209 | 210 | love.graphics.pop() 211 | love.graphics.setColor( 1, 1, 1, 1 ) 212 | end 213 | BossCard = {} 214 | BossCard.__index = BossCard 215 | 216 | function BossCard:new(id) 217 | local o = {} 218 | o.id = id or 1 219 | o.nameLabel = Label:new(4, 0, "placeholder", VerySmallFont, "left", "up", 300, 10, {1, 1, 1, 1}) 220 | o.nameLabelShadow = Label:new(5, 1, "placeholder", VerySmallFont, "left", "up", 300, 10, {0, 0, 0, 1}) 221 | o.roomLabel = Label:new(14, 0, "placeholder", VerySmallFont, "center", "up", 300, 10, {1, 1, 1, 1}) 222 | o.roomLabelShadow = Label:new(15, 1, "placeholder", VerySmallFont, "center", "up", 300, 10, {0, 0, 0, 1}) 223 | o.healthLabel = Label:new(0, 1, "placeholder", VerySmallFont, "right", "up", 296, 10, {1, 1, 1, 1}) 224 | o.healthLabelShadow= Label:new(1, 2, "placeholder", VerySmallFont, "right", "up", 296, 10, {0, 0, 0, 1}) 225 | 226 | return setmetatable(o, self) 227 | end 228 | 229 | function BossCard:draw(x, y) 230 | love.graphics.push() 231 | love.graphics.translate(x, y) 232 | 233 | local boss = Boss[self.id] 234 | 235 | love.graphics.setColor( 109/255, 131/255, 227/255, 1 ) 236 | --love.graphics.rectangle('line',2,2,76,11,1,1,1) 237 | --if Bosses[self.id].HP>= 0x8000 238 | --or Bosses[self.id].HP == 0x0 239 | --or Bosses[self.id].nameID == 11 240 | --or Bosses[self.id].nameID == 12 241 | --or Bosses[self.id].nameID == 14 242 | --or Bosses[self.id].nameID == 26 243 | --or Bosses[self.id].nameID == 34 244 | --or Bosses[self.id].nameID == 56 then 245 | -- love.graphics.setColor(1,0,0,0.3) 246 | -- love.graphics.rectangle('fill',4,15,294,1,0,0,1) 247 | --love.graphics.rectangle('fill',4,4,(GetHealthbar(Bosses[self.id].HP, Bosses[self.id].maxHP))*72,7,0,0,1) 248 | --else 249 | love.graphics.setColor(GetConditionColor3(GetConditionName2(Boss[self.id].HP, Boss[self.id].maxHP))) 250 | love.graphics.rectangle('fill',4,16,(Boss[self.id].HP / Boss[self.id].maxHP)*292,1,0,0,0) 251 | --end 252 | 253 | self.nameLabel.text = Boss[self.id].name 254 | self.nameLabelShadow.text = Boss[self.id].name 255 | self.nameLabelShadow:draw() 256 | self.nameLabel:draw() 257 | self.nameLabel.color = GetBossColor(self.id) 258 | 259 | self.healthLabel.text = GetBossHealthString(self.id) 260 | self.healthLabelShadow.text = GetBossHealthString(self.id) 261 | self.healthLabelShadow:draw() 262 | self.healthLabel:draw() 263 | 264 | self.roomLabel.text = GetRoomName(GameInfo.scenario, Boss[self.id].roomID) 265 | self.roomLabelShadow.text = GetRoomName(GameInfo.scenario, Boss[self.id].roomID) 266 | self.roomLabelShadow:draw() 267 | self.roomLabel:draw() 268 | 269 | love.graphics.pop() 270 | love.graphics.setColor( 1, 1, 1, 1 ) 271 | end 272 | -------------------------------------------------------------------------------- /lua/ItemCard.lua: -------------------------------------------------------------------------------- 1 | ItemCard = {} 2 | ItemCard.__index = ItemCard 3 | local x, y = 46, 48 4 | local IconPositions = { 5 | --[[ x | y ]]-- 6 | {0*x, 1*y-y},--1 7 | {1*x, 1*y-y},--2 8 | {2*x, 1*y-y},--3 9 | {3*x, 1*y-y},--4 10 | {4*x, 1*y-y},--5 11 | {5*x, 1*y-y},--6 12 | {6*x, 1*y-y},--7 13 | {7*x, 1*y-y},--8 14 | {0*x, 2*y-y},--9 15 | {1*x, 2*y-y},--10 16 | {2*x, 2*y-y},--11 17 | {3*x, 2*y-y},--12 18 | {4*x, 2*y-y},--13 19 | {5*x, 2*y-y},--14 20 | {6*x, 2*y-y},--15 21 | {7*x, 2*y-y},--16 22 | {0*x, 1*y-y},--1 23 | {1*x, 1*y-y},--2 24 | {2*x, 1*y-y},--3 25 | {3*x, 1*y-y},--4 26 | {4*x, 1*y-y},--5 27 | {5*x, 1*y-y},--6 28 | {6*x, 1*y-y},--7 29 | {7*x, 1*y-y},--8 30 | {0*x, 2*y-y},--9 31 | {1*x, 2*y-y},--10 32 | {2*x, 2*y-y},--11 33 | {3*x, 2*y-y},--12 34 | {4*x, 2*y-y},--13 35 | {5*x, 2*y-y},--14 36 | {6*x, 2*y-y},--15 37 | {7*x, 2*y-y},--16 38 | } 39 | 40 | function ItemCard:new(id) 41 | local o = {} 42 | o.id = id or 1 43 | o.icons = {} 44 | for i=1, 32 do 45 | o.icons[i] = ItemIcon:new(unpack(IconPositions[i])) 46 | end 47 | 48 | return setmetatable(o, self) 49 | end 50 | 51 | function ItemCard:draw(x, y) 52 | love.graphics.push() 53 | love.graphics.scale(0.6, 0.6) 54 | love.graphics.translate(x, y) 55 | 56 | local item = Items[self.id] 57 | local p = GameInfo.playernum 58 | 59 | if p == 1 then 60 | for i=1, 32 do 61 | --if(Items[self.id].roomitem[i].pick < 5) and (Items[self.id].roomitem[i].type > 0) and(Items[self.id].roomitem[i].count > 0) then 62 | if not(Items[self.id].roomitem[i].id == -1) then 63 | if not(Items[self.id].roomitem[i].mix == 0x20 64 | or (Items[self.id].roomitem[i].pick > 0) and (Items[self.id].roomitem[i].present == 0)) then 65 | self.icons[i].type = Items[self.id].roomitem[i].type 66 | self.icons[i].count = Items[self.id].roomitem[i].count 67 | love.graphics.setColor( 1, 1, 1, 1 ) 68 | self.icons[i]:draw() 69 | end 70 | end 71 | end 72 | else 73 | for i=1, 32 do 74 | --if(Items[self.id].roomitem[i].pick < 5) and (Items[self.id].roomitem[i].type > 0) and(Items[self.id].roomitem[i].count > 0) then 75 | if not(Items[self.id].roomitem[i].id == -1) then 76 | if (Items[self.id].roomitem[i].mix == 0x20 77 | or (Items[self.id].roomitem[i].pick > 0) and (Items[self.id].roomitem[i].present == 0)) then 78 | self.icons[i].type = Items[self.id].roomitem[i].type 79 | self.icons[i].count = Items[self.id].roomitem[i].count 80 | self.icons[i].pick = Items[self.id].roomitem[i].pick 81 | love.graphics.setColor( 1, 1, 1, 0.25 ) 82 | self.icons[i]:draw() 83 | else 84 | self.icons[i].type = Items[self.id].roomitem[i].type 85 | self.icons[i].count = Items[self.id].roomitem[i].count 86 | self.icons[i].pick = Items[self.id].roomitem[i].pick 87 | love.graphics.setColor( 1, 1, 1, 1 ) 88 | self.icons[i]:draw() 89 | end 90 | end 91 | end 92 | end 93 | 94 | love.graphics.pop() 95 | end 96 | ItemCard2 = {} 97 | ItemCard2.__index = ItemCard2 98 | local x, y = 60, 48 99 | 100 | function ItemCard2:new(id) 101 | local o = {} 102 | o.id = id or 1 103 | o.icons = {} 104 | for i=1, 1 do 105 | o.icons[i] = ItemIcon:new(i) 106 | end 107 | 108 | return setmetatable(o, self) 109 | end 110 | 111 | function ItemCard2:draw(x, y) 112 | love.graphics.push() 113 | love.graphics.scale(0.65, 0.65) 114 | love.graphics.translate(x, y) 115 | 116 | local item = Items2[self.id] 117 | 118 | for i=1, 1 do 119 | --if(Items2[self.id].pick < 5) and (Items2[self.id].type > 0) and(Items2[self.id].count > 0) then 120 | if (Items2[self.id].number > 0) then 121 | if (Items2[self.id].id == -1 122 | or Items2[self.id].count == 0xffff 123 | or Items2[self.id].mix == 0x20 124 | or (Items2[self.id].pick > 0) and (Items2[self.id].present == 0)) then 125 | self.icons[i].type = Items2[self.id].type 126 | self.icons[i].count = Items2[self.id].count 127 | self.icons[i].pick = Items2[self.id].pick 128 | love.graphics.setColor( 1, 1, 1, 0.25 ) 129 | self.icons[i]:draw() 130 | else 131 | self.icons[i].type = Items2[self.id].type 132 | self.icons[i].count = Items2[self.id].count 133 | self.icons[i]:draw() 134 | love.graphics.setColor( 1, 1, 1, 1 ) 135 | end 136 | end 137 | end 138 | 139 | love.graphics.pop() 140 | end 141 | 142 | ItemCard3 = {} 143 | ItemCard3.__index = ItemCard3 144 | local x, y = 60, 48 145 | 146 | function ItemCard3:new(id) 147 | local o = {} 148 | o.id = id or 1 149 | o.icons = {} 150 | for i=1, 1 do 151 | o.icons[i] = ItemIcon2:new(i) 152 | end 153 | 154 | return setmetatable(o, self) 155 | end 156 | 157 | function ItemCard3:draw(x, y) 158 | love.graphics.push() 159 | love.graphics.scale(0.65, 0.65) 160 | love.graphics.translate(x, y) 161 | 162 | local item = Items2[self.id] 163 | 164 | for i=1, 1 do 165 | --if(Items2[self.id].pick < 5) and (Items2[self.id].type > 0) and(Items2[self.id].count > 0) then 166 | if (Items2[self.id].number > 0) then 167 | if (Items2[self.id].id == -1 168 | or Items2[self.id].count == 0xffff 169 | or Items2[self.id].mix == 0x20 170 | or (Items2[self.id].pick > 0) and (Items2[self.id].present == 0)) then 171 | self.icons[i].type = Items2[self.id].type 172 | self.icons[i].roomid = Items2[self.id].roomid 173 | --self.icons[i].pick = Items2[self.id].pick 174 | love.graphics.setColor( 1, 1, 1, 0.25 ) 175 | self.icons[i]:draw() 176 | else 177 | self.icons[i].type = Items2[self.id].type 178 | self.icons[i].roomid = Items2[self.id].roomid 179 | self.icons[i]:draw() 180 | love.graphics.setColor( 1, 1, 1, 1 ) 181 | end 182 | end 183 | end 184 | 185 | love.graphics.pop() 186 | end 187 | -------------------------------------------------------------------------------- /lua/ItemIcon.lua: -------------------------------------------------------------------------------- 1 | ItemIcon = {} 2 | ItemIcon.__index = ItemIcon 3 | 4 | function ItemIcon:new(x, y) 5 | local o = {} 6 | o.count = 0 7 | o.type = 0 8 | o.pick = 0 9 | o.equipped = false 10 | o.w = 48 11 | o.h = 48 12 | o.x = x or 1 13 | o.y = y or 1 14 | return setmetatable(o, self) 15 | end 16 | 17 | function ItemIcon:draw(drawCount) 18 | local dc = (drawCount == nil) or (drawCount == true) 19 | oldfont = love.graphics.getFont() 20 | love.graphics.setFont(ItemCountFont) 21 | local name = tostring(GameInfo.currentFile) .. "/" .. tostring(self.type) 22 | ItemIcons:draw(name, self.x, self.y) 23 | if dc then 24 | if self.type==15 then 25 | love.graphics.setColor( 20/255, 200/255, 255/255, 1 ) 26 | love.graphics.printf(tostring(self.count), self.x, self.y+30, 46, "right") 27 | elseif self.type==16 then 28 | love.graphics.setColor( 255/255, 0/255, 0/255, 1 ) 29 | love.graphics.printf(tostring(self.count), self.x, self.y+30, 46, "right") 30 | elseif self.type==17 then 31 | love.graphics.setColor( 0/255, 255/255, 0/255, 1 ) 32 | love.graphics.printf(tostring(self.count), self.x, self.y+30, 46, "right") 33 | elseif self.type==18 then 34 | love.graphics.setColor( 255/255, 255/255, 255/255, 1 ) 35 | love.graphics.printf(tostring(self.count), self.x, self.y+30, 46, "right") 36 | else 37 | love.graphics.setColor( 253/255, 253/255, 168/255, 1 ) 38 | love.graphics.printf(tostring(self.count), self.x, self.y+30, 46, "right") 39 | end 40 | if self.pick>0 then 41 | love.graphics.setFont(DefaultFont) 42 | love.graphics.setColor( 1, 1, 0, 1 ) 43 | love.graphics.printf(tostring"P"..(self.pick), self.x, self.y+0, 46, "right") 44 | end 45 | end 46 | if self.equipped then 47 | love.graphics.setColor( 1, 1, 1, 1 ) 48 | UIAtlas:draw("equip", self.x + 5, self.y + 2) 49 | end 50 | love.graphics.setColor( 1, 1, 1, 1 ) 51 | love.graphics.setFont(oldfont) 52 | end 53 | 54 | ItemIcon2 = {} 55 | ItemIcon2.__index = ItemIcon2 56 | 57 | function ItemIcon2:new(x, y) 58 | local o = {} 59 | o.roomid = 0 60 | o.count = 0 61 | o.type = 0 62 | o.equipped = false 63 | o.w = 48 64 | o.h = 48 65 | o.x = x or 1 66 | o.y = y or 1 67 | return setmetatable(o, self) 68 | end 69 | 70 | function ItemIcon2:draw(drawRoomID) 71 | local dc = (drawRoomID == nil) or (drawRoomID == true) 72 | oldfont = love.graphics.getFont() 73 | love.graphics.setFont(ItemCountFont) 74 | local name = tostring(GameInfo.currentFile) .. "/" .. tostring(self.type) 75 | ItemIcons:draw(name, self.x, self.y) 76 | if dc then 77 | if self.roomid>0 then 78 | --love.graphics.printf(tostring(self.count), self.x, self.y+30, 46, "right") 79 | love.graphics.setFont(DefaultFont) 80 | love.graphics.setColor( 1, 1, 1, 1 ) 81 | love.graphics.printf(tostring(self.roomid), self.x, self.y+28, 46, "right") 82 | end 83 | end 84 | if self.equipped then 85 | UIAtlas:draw("equip", self.x + 5, self.y + 2) 86 | end 87 | love.graphics.setColor( 1, 1, 1, 1 ) 88 | love.graphics.setFont(oldfont) 89 | end 90 | ItemIcon3 = {} 91 | ItemIcon3.__index = ItemIcon3 92 | 93 | function ItemIcon3:new(x, y) 94 | local o = {} 95 | o.count = 0 96 | o.type = 0 97 | o.pick = 0 98 | o.equipped = false 99 | o.w = 48 100 | o.h = 48 101 | o.x = x or 1 102 | o.y = y or 1 103 | return setmetatable(o, self) 104 | end 105 | -------------------------------------------------------------------------------- /lua/Label.lua: -------------------------------------------------------------------------------- 1 | Label = {} 2 | Label.__index = Label 3 | 4 | function Label:new(x, y, text, font, horizontalAlign, verticalAlign, width, height, color) 5 | local o = {} 6 | o.x = x or 0 7 | o.y = y or 0 8 | o.text = text or "" 9 | o.font = font or DefaultFont 10 | o.hAlign = horizontalAlign or "left" 11 | o.vAlign = verticalAlign or "up" 12 | o.width = width 13 | o.height = height 14 | o.color = color or {1, 1, 1, 1} 15 | o.autosize = width == nil or height == nil or horizontalAlign == nil or verticalAlign == nil 16 | return setmetatable(o, self) 17 | end 18 | 19 | function Label:draw() 20 | local oldFont = love.graphics.getFont() 21 | local oldR, oldG, oldB, oldA = love.graphics.getColor() 22 | love.graphics.setColor(self.color) 23 | love.graphics.setFont(self.font) 24 | if not self.autosize then 25 | local x = self.x 26 | local y = 0 27 | local wrapWidth, wrapText = self.font:getWrap(self.text, self.width) 28 | local lineHeight = self.font:getHeight() 29 | if self.vAlign == "up" then 30 | y = self.y 31 | elseif self.vAlign == "down" then 32 | y = (self.y + self.height) - (lineHeight * #wrapText) 33 | elseif self.vAlign == "center" then 34 | y = (self.y + (self.height / 2)) - (lineHeight * #wrapText)/2 35 | end 36 | love.graphics.printf(self.text, math.floor(x), math.floor(y), self.width, self.hAlign) 37 | else 38 | love.graphics.print(self.text, self.x, self.y) 39 | end 40 | love.graphics.setFont(oldFont) 41 | love.graphics.setColor(oldR, oldG, oldB, oldA) 42 | end -------------------------------------------------------------------------------- /lua/LobbyCard.lua: -------------------------------------------------------------------------------- 1 | LobbyCard = {} 2 | LobbyCard.__index = LobbyCard 3 | 4 | function LobbyCard:new(id) 5 | local o = {} 6 | o.id = id or 1 7 | 8 | o.slotLabel = Label:new(10,31, "placeholder", VerySmallFont, "right", "up", 20, 20) 9 | o.scenarioLabel = Label:new(40,31, "placeholder", VerySmallFont, "left", "up", 150, 20) 10 | o.versionLabel = Label:new(170,31, "placeholder", VerySmallFont, "left", "up", 150, 12, {120/255, 180/255, 240/255, 1}) 11 | o.playerLabel = Label:new(250,31, "placeholder", VerySmallFont, "left", "up", 50, 24) 12 | 13 | return setmetatable(o, self) 14 | end 15 | 16 | function LobbyCard:draw(x, y) 17 | love.graphics.push() 18 | love.graphics.translate(x, y) 19 | 20 | local slot = Slots[self.id] 21 | 22 | UIAtlas:draw("slot bar", 0, 30, 0, 1) 23 | 24 | if Slots[self.id].pass ==1 then 25 | UIAtlas:draw("key", 8, 44, 0, 0.75) 26 | end 27 | self.slotLabel.text = GetSlotString(self.id) 28 | self.slotLabel:draw() 29 | 30 | self.versionLabel.text = GetVersionString(self.id) 31 | self.versionLabel:draw() 32 | self.scenarioLabel.text = GetScenarioIDString(self.id) 33 | self.scenarioLabel:draw() 34 | 35 | self.playerLabel.color = GetSlotsColor(self.id) 36 | self.playerLabel.text = GetPlayerString(self.id) 37 | self.playerLabel:draw() 38 | 39 | love.graphics.pop() 40 | end 41 | -------------------------------------------------------------------------------- /lua/PlayerCard.lua: -------------------------------------------------------------------------------- 1 | PlayerCard = {} 2 | PlayerCard.__index = PlayerCard 3 | 4 | local IconPositions = { 5 | --[[ x | y ]]-- 6 | {8, 42}, 7 | {56, 42}, 8 | {8, 92}, 9 | {56, 92}, 10 | {117, 92}, 11 | {105, 42}, 12 | {154, 42}, 13 | {105, 92}, 14 | {154, 92}, 15 | } 16 | 17 | function PlayerCard:new(id) 18 | local o = {} 19 | o.id = id or 1 20 | o.icons = {} 21 | for i=1, 9 do 22 | o.icons[i] = ItemIcon:new(unpack(IconPositions[i])) 23 | end 24 | 25 | o.nameLabel = Label:new(10 , 4, "placeholder", SmallFont) 26 | o.nameLabelShadow = Label:new(12 , 5, "placeholder", SmallFont, nil, nil, nil, nil, {0, 0, 0, 1}) 27 | o.roomLabel = Label:new(110, 0, "placeholder", SmallFont, "center", "center", 190, 40) 28 | o.roomLabelShadow = Label:new(111, 1, "placeholder", SmallFont, "center", "center", 190, 40, {0, 0, 0, 1}) 29 | --o.roomLabel_j = Label:new(280, 2, "placeholder", SmallFont, "center", "up", 15, 145) 30 | --o.roomLabelShadow_j = Label:new(281, 3, "placeholder", SmallFont, "center", "up", 15, 145, {0, 0, 0, 1}) 31 | o.healthLabel = Label:new(8 ,20, "placeholder", VerySmallFont, "center", "up", 70, 10) 32 | 33 | 34 | return setmetatable(o, self) 35 | end 36 | 37 | function PlayerCard:draw(x, y) 38 | love.graphics.push() 39 | love.graphics.translate(x, y) 40 | 41 | local player = Players[self.id] 42 | local sb = love.graphics.newSpriteBatch(UIAtlas.tex) 43 | local bustname = "bust" .. Players[self.id].type 44 | local bx, by, bw, bh = UIAtlas.quads[bustname]:getViewport() 45 | local scale = 140 / bh; 46 | 47 | if Players[self.id].inGame == false then 48 | sb:setColor(1, 1, 1, 0.5) 49 | else 50 | sb:setColor(1, 1, 1, 1) 51 | end 52 | UIAtlas:addSB(sb, bustname, 300 - bw * scale, 145 - bh * scale, 0, scale, scale) 53 | sb:setColor(1, 1, 1, 1) 54 | if not(Players[self.id].status == "Dead" or Players[self.id].status == "Down" or Players[self.id].status == "Zombie") then 55 | sb:setColor(unpack(GetConditionColor(GetConditionName(Players[self.id].HP, Players[self.id].maxHP)))) 56 | else 57 | sb:setColor(unpack(GetConditionColor(GetConditionName(0, 2)))) 58 | end 59 | UIAtlas:addSB(sb, "healthmask", 8, 5); 60 | sb:setColor(1, 1, 1, 1) 61 | UIAtlas:addSB(sb, "statusbar", 0, 2); 62 | UIAtlas:addSB(sb, GetVirusState(Players[self.id].virus), 86, 18) 63 | if not(Players[self.id].type == "Yoko" or Players[self.id].type == "David" or Players[self.id].type == "Cindy") 64 | and not(Players[self.id].status == "Dead" or Players[self.id].status == "Zombie") then 65 | sb:setColor(20/255, 48/255, 85/255, 0.8) 66 | UIAtlas:addSB(sb, "inventorymask", 8, 42); 67 | UIAtlas:addSB(sb, "ispecialmask", 118, 92); 68 | sb:setColor(1, 1, 1, 1) 69 | UIAtlas:addSB(sb, "invSingle", 0, 37); 70 | UIAtlas:addSB(sb, "invSpecial", 110, 89); 71 | else 72 | sb:setColor(20/255, 48/255, 85/255, 0.8) 73 | UIAtlas:addSB(sb, "inventorymask", 8, 42); 74 | if not(Players[self.id].status == "Dead" or Players[self.id].status == "Zombie") then 75 | sb:setColor(50/255, 120/255, 70/255, 0.8) 76 | end 77 | UIAtlas:addSB(sb, "inventorymask", 106, 42); 78 | sb:setColor(1, 1, 1, 1) 79 | UIAtlas:addSB(sb, "invDouble", 0, 37); 80 | end 81 | if Players[self.id].type == "Alyssa" and not (Players[self.id].status == "Dead") then 82 | love.graphics.setFont(VerySmallFont) 83 | love.graphics.printf("I",118, 92,12, "center") 84 | love.graphics.printf("S",130, 92,12, "center") 85 | love.graphics.printf("W",118, 104,12, "center") 86 | love.graphics.printf("P",130, 104,12, "center") 87 | end 88 | 89 | love.graphics.draw(sb) 90 | 91 | for i=1, 4 do 92 | if not(Players[self.id].inventory[i].id == -1) then 93 | self.icons[i].type = Players[self.id].inventory[i].type 94 | self.icons[i].count = Players[self.id].inventory[i].count 95 | local equip = Players[self.id].equipped 96 | if equip == 0 then 97 | self.icons[i].equipped = false 98 | else 99 | self.icons[i].equipped = (equip == Players[self.id].inventory[i].id) 100 | end 101 | self.icons[i]:draw() 102 | end 103 | end 104 | if not(Players[self.id].type == "Yoko" or Players[self.id].type == "David" or Players[self.id].type == "Cindy") and not(Players[self.id].specialItem.id == -1) 105 | and not(Players[self.id].status == "Dead" or Players[self.id].status == "Zombie") then 106 | self.icons[5].type = Players[self.id].specialItem.type 107 | self.icons[5].count = Players[self.id].specialItem.count 108 | local equip = Players[self.id].equipped 109 | if equip <= 0 then 110 | self.icons[5].equipped = false 111 | else 112 | self.icons[5].equipped = (equip == Players[self.id].specialItem.id) 113 | end 114 | if Players[self.id].specialItem.type == 403 then 115 | self.icons[5]:draw(false) 116 | else 117 | self.icons[5]:draw(true) 118 | end 119 | else 120 | for i=6, 9 do 121 | if not(Players[self.id].specialInventory[i-5].id == -1) then 122 | self.icons[i].type = Players[self.id].specialInventory[i-5].type 123 | self.icons[i].count = Players[self.id].specialInventory[i-5].count 124 | local equip = Players[self.id].equipped 125 | if equip <= 0 then 126 | self.icons[i].equipped = false 127 | else 128 | self.icons[i].equipped = (equip == Players[self.id].specialInventory[i-5].id) 129 | end 130 | self.icons[i]:draw() 131 | end 132 | end 133 | end 134 | 135 | love.graphics.setFont(VerySmallFont) 136 | love.graphics.setColor( 0, 1, 0, 1 ) 137 | if Players[self.id].type == "Alyssa" and not (Players[self.id].status == "Dead") then 138 | if (GameInfo.scenario == "outbreak") then 139 | if Players[self.id].roomID == 1 then 140 | if(math.floor(Players[self.id].positionX*100+0.5) > 922211-25000 141 | and math.floor(Players[self.id].positionX*100+0.5) < 922211+25000 142 | and math.floor(Players[self.id].positionY*100+0.5) > 1261926-25000 143 | and math.floor(Players[self.id].positionY*100+0.5) < 1261926+25000) then 144 | if(GameInfo.difficulty == "very hard") then 145 | love.graphics.printf("S",130, 92,12, "center")--J's Bar 146 | elseif GameInfo.difficulty == "hard" then 147 | love.graphics.printf("P",130, 104,12, "center") 148 | else 149 | love.graphics.printf("I",118, 92,12, "center") 150 | end 151 | end 152 | end 153 | if Players[self.id].roomID == 5 then 154 | if(math.floor(Players[self.id].positionX*100+0.5) > 867210-25000 155 | and math.floor(Players[self.id].positionX*100+0.5) < 867210+25000 156 | and math.floor(Players[self.id].positionY*100+0.5) > 1301926-25000 157 | and math.floor(Players[self.id].positionY*100+0.5) < 1301926+25000) then 158 | if(GameInfo.difficulty == "very hard") then 159 | love.graphics.printf("S",130, 92,12, "center")--Staff Room 160 | else 161 | love.graphics.printf("P",130, 104,12, "center") 162 | end 163 | end 164 | end 165 | if Players[self.id].roomID == 7 then 166 | if(math.floor(Players[self.id].positionX*100+0.5) > 915857-25000 167 | and math.floor(Players[self.id].positionX*100+0.5) < 915857+25000 168 | and math.floor(Players[self.id].positionY*100+0.5) > 1245250-25000 169 | and math.floor(Players[self.id].positionY*100+0.5) < 1245250+25000) then 170 | if(GameInfo.difficulty == "hard" or GameInfo.difficulty == "very hard") then 171 | love.graphics.printf("W",118, 104,12, "center")--Drawing Room (Cabinet) 172 | else 173 | love.graphics.printf("S",130, 92,12, "center") 174 | end 175 | end 176 | end 177 | if Players[self.id].roomID == 14 then 178 | if(math.floor(Players[self.id].positionX*100+0.5) > 787211-25000 179 | and math.floor(Players[self.id].positionX*100+0.5) < 787211+25000 180 | and math.floor(Players[self.id].positionY*100+0.5) > 1301926-25000 181 | and math.floor(Players[self.id].positionY*100+0.5) < 1301926+25000) then 182 | if(GameInfo.difficulty == "very hard") then 183 | love.graphics.printf("P",130, 104,12, "center")--Rooftop 184 | elseif(GameInfo.difficulty == "hard") then 185 | love.graphics.printf("S",130, 92,12, "center") 186 | else 187 | love.graphics.printf("I",118, 92,12, "center") 188 | end 189 | end 190 | end 191 | elseif (GameInfo.scenario == "below freezing point") then 192 | if Players[self.id].roomID == 15 then 193 | if(math.floor(Players[self.id].positionX*100+0.5) > 560641-25000 194 | and math.floor(Players[self.id].positionX*100+0.5) < 560641+25000 195 | and math.floor(Players[self.id].positionY*100+0.5) > 425127-25000 196 | and math.floor(Players[self.id].positionY*100+0.5) < 425127+25000) then 197 | if(GameInfo.difficulty == "hard") then 198 | love.graphics.printf("I",118, 92,12, "center")--Break Room (Locker) 199 | else 200 | love.graphics.printf("S",130, 92,12, "center") 201 | end 202 | end 203 | end 204 | elseif (GameInfo.scenario == "the hive") then 205 | if Players[self.id].roomID == 14 then 206 | if(math.floor(Players[self.id].positionX*100+0.5) > 645873-25000 207 | and math.floor(Players[self.id].positionX*100+0.5) < 645873+25000 208 | and math.floor(Players[self.id].positionY*100+0.5) > 322941-25000 209 | and math.floor(Players[self.id].positionY*100+0.5) < 322941+25000) then 210 | if(GameInfo.difficulty == "very hard") then 211 | love.graphics.printf("S",130, 92,12, "center")--Locker Room (Locker) 212 | else 213 | love.graphics.printf("P",130, 104,12, "center") 214 | end 215 | end 216 | end 217 | if Players[self.id].roomID == 5 then 218 | if(math.floor(Players[self.id].positionX*100+0.5) > 661941-25000 219 | and math.floor(Players[self.id].positionX*100+0.5) < 661941+25000 220 | and math.floor(Players[self.id].positionY*100+0.5) > 193027-25000 221 | and math.floor(Players[self.id].positionY*100+0.5) < 193027+25000) then 222 | if(GameInfo.difficulty == "hard" or GameInfo.difficulty == "very hard") then 223 | love.graphics.printf("I",118, 92,12, "center")--Office (Drawer) 224 | else 225 | love.graphics.printf("W",118, 104,12, "center") 226 | end 227 | end 228 | end 229 | elseif (GameInfo.scenario == "hellfire") then 230 | if Players[self.id].roomID == 29 or Players[self.id].roomID == 34 then 231 | if(math.floor(Players[self.id].positionX*100+0.5) > 967660-25000 232 | and math.floor(Players[self.id].positionX*100+0.5) < 967660+25000 233 | and math.floor(Players[self.id].positionY*100+0.5) > 977602-25000 234 | and math.floor(Players[self.id].positionY*100+0.5) < 977602+25000) then 235 | if(GameInfo.difficulty == "very hard") then 236 | love.graphics.printf("W",118, 104,12, "center")--1F Corridor→ Lounge Stairs 237 | elseif(GameInfo.difficulty == "hard") then 238 | love.graphics.printf("P",130, 104,12, "center") 239 | else 240 | love.graphics.printf("I",118, 92,12, "center") 241 | end 242 | end 243 | end 244 | if Players[self.id].roomID == 36 then 245 | if(math.floor(Players[self.id].positionX*100+0.5) > 1014602-25000 246 | and math.floor(Players[self.id].positionX*100+0.5) < 1014602+25000 247 | and math.floor(Players[self.id].positionY*100+0.5) > 1042339-25000 248 | and math.floor(Players[self.id].positionY*100+0.5) < 1042339+25000) then 249 | if(GameInfo.difficulty == "very hard") then 250 | love.graphics.printf("W",118, 104,12, "center")--Room 102 251 | elseif(GameInfo.difficulty == "hard") then 252 | love.graphics.printf("P",130, 104,12, "center") 253 | else 254 | love.graphics.printf("I",118, 92,12, "center") 255 | end 256 | end 257 | end 258 | if Players[self.id].roomID == 40 then 259 | if(math.floor(Players[self.id].positionX*100+0.5) > 769602-25000 260 | and math.floor(Players[self.id].positionX*100+0.5) < 769602+25000 261 | and math.floor(Players[self.id].positionY*100+0.5) > 1022339-25000 262 | and math.floor(Players[self.id].positionY*100+0.5) < 1022339+25000) then 263 | if(GameInfo.difficulty == "very hard") then 264 | love.graphics.printf("W",118, 104,12, "center")--Room 201 265 | elseif(GameInfo.difficulty == "easy" or GameInfo.difficulty == "normal") then 266 | love.graphics.printf("S",130, 92,12, "center") 267 | end 268 | end 269 | end 270 | if Players[self.id].roomID == 44 then 271 | if(math.floor(Players[self.id].positionX*100+0.5) > 1014602-25000 272 | and math.floor(Players[self.id].positionX*100+0.5) < 1014602+25000 273 | and math.floor(Players[self.id].positionY*100+0.5) > 1042339-25000 274 | and math.floor(Players[self.id].positionY*100+0.5) < 1042339+25000) then 275 | if(GameInfo.difficulty == "hard" or GameInfo.difficulty == "very hard") then 276 | love.graphics.printf("I",118, 92,12, "center")--Room 202 277 | else 278 | love.graphics.printf("W",118, 104,12, "center") 279 | end 280 | end 281 | end 282 | if Players[self.id].roomID == 42 then 283 | if(math.floor(Players[self.id].positionX*100+0.5) > 861258-25000 284 | and math.floor(Players[self.id].positionX*100+0.5) < 861258+25000 285 | and math.floor(Players[self.id].positionY*100+0.5) > 970073-25000 286 | and math.floor(Players[self.id].positionY*100+0.5) < 970073+25000) then 287 | if(GameInfo.difficulty == "hard") then 288 | love.graphics.printf("W",118, 104,12, "center")--Store Room (Locker) 289 | elseif(GameInfo.difficulty == "easy" or GameInfo.difficulty == "normal") then 290 | love.graphics.printf("S",130, 92,12, "center") 291 | end 292 | end 293 | end 294 | elseif (GameInfo.scenario == "decisions,decisions") then 295 | if Players[self.id].roomID == 78 then 296 | if(math.floor(Players[self.id].positionX*100+0.5) > 340476-25000 297 | and math.floor(Players[self.id].positionX*100+0.5) < 340476+25000 298 | and math.floor(Players[self.id].positionY*100+0.5) > 828902-25000 299 | and math.floor(Players[self.id].positionY*100+0.5) < 828902+25000) then 300 | if(GameInfo.difficulty == "hard" or GameInfo.difficulty == "very hard") then 301 | love.graphics.printf("W",118, 104,12, "center")--1F Elevator Passway (Locker) 302 | else 303 | love.graphics.printf("S",130, 92,12, "center") 304 | end 305 | end 306 | end 307 | if Players[self.id].roomID == 55 then 308 | if(math.floor(Players[self.id].positionX*100+0.5) > 302041-25000 309 | and math.floor(Players[self.id].positionX*100+0.5) < 302041+25000 310 | and math.floor(Players[self.id].positionY*100+0.5) > 424727-25000 311 | and math.floor(Players[self.id].positionY*100+0.5) < 424727+25000) then 312 | if(GameInfo.difficulty == "very hard") then 313 | love.graphics.printf("S",130, 92,12, "center")--B4F Control Room (Locker) 314 | else 315 | love.graphics.printf("P",130, 104,12, "center") 316 | end 317 | end 318 | end 319 | if Players[self.id].roomID == 54 then 320 | if(math.floor(Players[self.id].positionX*100+0.5) > 337211-25000 321 | and math.floor(Players[self.id].positionX*100+0.5) < 337211+25000 322 | and math.floor(Players[self.id].positionY*100+0.5) > 386927-25000 323 | and math.floor(Players[self.id].positionY*100+0.5) < 386927+25000) then 324 | if(GameInfo.difficulty == "very hard") then 325 | love.graphics.printf("W",118, 104,12, "center")--T-shaped Corridor 326 | elseif(GameInfo.difficulty == "hard") then 327 | love.graphics.printf("S",130, 92,12, "center") 328 | else 329 | love.graphics.printf("P",130, 104,12, "center") 330 | end 331 | end 332 | end 333 | if Players[self.id].roomID == 58 then 334 | if(math.floor(Players[self.id].positionX*100+0.5) > 272927-25000 335 | and math.floor(Players[self.id].positionX*100+0.5) < 272927+25000 336 | and math.floor(Players[self.id].positionY*100+0.5) > 352789-25000 337 | and math.floor(Players[self.id].positionY*100+0.5) < 352789+25000) then 338 | if(GameInfo.difficulty == "very hard") then 339 | love.graphics.printf("W",118, 104,12, "center")--Store Room 340 | elseif(GameInfo.difficulty == "hard") then 341 | love.graphics.printf("S",130, 92,12, "center") 342 | else 343 | love.graphics.printf("I",118, 92,12, "center") 344 | end 345 | end 346 | end 347 | elseif (GameInfo.scenario == "wild things") then 348 | if(math.floor(Players[self.id].positionX*100+0.5) > 1303073-25000 349 | and math.floor(Players[self.id].positionX*100+0.5) < 1303073+25000 350 | and math.floor(Players[self.id].positionY*100+0.5) > 1337211-25000 351 | and math.floor(Players[self.id].positionY*100+0.5) < 1337211+25000) then 352 | if(GameInfo.difficulty == "very hard") then 353 | love.graphics.printf("W",118, 104,12, "center") 354 | elseif GameInfo.difficulty == "hard" then 355 | love.graphics.printf("S",130, 92,12, "center") 356 | else 357 | love.graphics.printf("P",130, 104,12, "center") 358 | end 359 | elseif(math.floor(Players[self.id].positionX*100+0.5) > 1473000-25000 360 | and math.floor(Players[self.id].positionX*100+0.5) < 1473000+25000 361 | and math.floor(Players[self.id].positionY*100+0.5) > 1431471-25000 362 | and math.floor(Players[self.id].positionY*100+0.5) < 1431471+25000) then 363 | if(GameInfo.difficulty == "very hard") then 364 | love.graphics.printf("P",130, 104,12, "center") 365 | elseif GameInfo.difficulty == "hard" then 366 | love.graphics.printf("I",118, 92,12, "center") 367 | else 368 | love.graphics.printf("W",118, 104,12, "center") 369 | end 370 | elseif(math.floor(Players[self.id].positionX*100+0.5) > 1442788-25000 371 | and math.floor(Players[self.id].positionX*100+0.5) < 1442788+25000 372 | and math.floor(Players[self.id].positionY*100+0.5) > 1454573-25000 373 | and math.floor(Players[self.id].positionY*100+0.5) < 1454573+25000) then 374 | if(GameInfo.difficulty == "very hard") then 375 | love.graphics.printf("S",130, 92,12, "center") 376 | elseif GameInfo.difficulty == "hard" then 377 | love.graphics.printf("P",130, 104,12, "center") 378 | else 379 | love.graphics.printf("I",118, 92,12, "center") 380 | end 381 | elseif(math.floor(Players[self.id].positionX*100+0.5) > 1418758-25000 382 | and math.floor(Players[self.id].positionX*100+0.5) < 1418758+25000 383 | and math.floor(Players[self.id].positionY*100+0.5) > 1528529-25000 384 | and math.floor(Players[self.id].positionY*100+0.5) < 1528529+25000) then 385 | if(GameInfo.difficulty == "hard" or GameInfo.difficulty == "very hard") then 386 | love.graphics.printf("W",118, 104,12, "center") 387 | else 388 | love.graphics.printf("S",130, 92,12, "center") 389 | end 390 | elseif(math.floor(Players[self.id].positionX*100+0.5) > 1067211-25000 391 | and math.floor(Players[self.id].positionX*100+0.5) < 1067211+25000 392 | and math.floor(Players[self.id].positionY*100+0.5) > 896926-25000 393 | and math.floor(Players[self.id].positionY*100+0.5) < 896926+25000) then 394 | if(GameInfo.difficulty == "very hard") then 395 | love.graphics.printf("I",118, 92,12, "center") 396 | end 397 | elseif(math.floor(Players[self.id].positionX*100+0.5) > 986926-25000 398 | and math.floor(Players[self.id].positionX*100+0.5) < 986926+25000 399 | and math.floor(Players[self.id].positionY*100+0.5) > 677789-25000 400 | and math.floor(Players[self.id].positionY*100+0.5) < 677789+25000) then 401 | if(GameInfo.difficulty == "very hard") then 402 | love.graphics.printf("I",118, 92,12, "center") 403 | elseif GameInfo.difficulty == "hard" then 404 | love.graphics.printf("W",118, 104,12, "center") 405 | end 406 | elseif(math.floor(Players[self.id].positionX*100+0.5) > 632211-25000 407 | and math.floor(Players[self.id].positionX*100+0.5) < 632211+25000 408 | and math.floor(Players[self.id].positionY*100+0.5) > 876926-25000 409 | and math.floor(Players[self.id].positionY*100+0.5) < 876926+25000) then 410 | if(GameInfo.difficulty == "very hard") then 411 | love.graphics.printf("P",130, 104,12, "center") 412 | end 413 | elseif(math.floor(Players[self.id].positionX*100+0.5) > 714458-25000 414 | and math.floor(Players[self.id].positionX*100+0.5) < 714458+25000 415 | and math.floor(Players[self.id].positionY*100+0.5) > 781273-25000 416 | and math.floor(Players[self.id].positionY*100+0.5) < 781273+25000) then 417 | if(GameInfo.difficulty == "very hard") then 418 | love.graphics.printf("S",130, 92,12, "center") 419 | else 420 | love.graphics.printf("P",130, 104,12, "center") 421 | end 422 | elseif(math.floor(Players[self.id].positionX*100+0.5) > 986926-25000 423 | and math.floor(Players[self.id].positionX*100+0.5) < 986926+25000 424 | and math.floor(Players[self.id].positionY*100+0.5) > 462789-25000 425 | and math.floor(Players[self.id].positionY*100+0.5) < 462789+25000) then 426 | if(GameInfo.difficulty == "normal" or GameInfo.difficulty == "very hard") then 427 | love.graphics.printf("P",130, 104,12, "center") 428 | elseif GameInfo.difficulty == "hard" then 429 | love.graphics.printf("S",130, 92,12, "center") 430 | else 431 | love.graphics.printf("I",118, 92,12, "center") 432 | end 433 | end 434 | elseif GameInfo.scenario == "underbelly" then 435 | if Players[self.id].roomID == 18 or Players[self.id].roomID == 7 then 436 | if(math.floor(Players[self.id].positionX*100+0.5) > 812397-25000 437 | and math.floor(Players[self.id].positionX*100+0.5) < 812397+25000 438 | and math.floor(Players[self.id].positionY*100+0.5) > 292661-25000 439 | and math.floor(Players[self.id].positionY*100+0.5) < 292661+25000) then 440 | if GameInfo.difficulty == "very hard" then 441 | love.graphics.printf("P",130, 104,12, "center")--East Concourse 442 | elseif GameInfo.difficulty == "hard" then 443 | love.graphics.printf("I",118, 92,12, "center")--East Concourse 444 | end 445 | end 446 | end 447 | if Players[self.id].roomID == 3 or Players[self.id].roomID == 7 then 448 | if(math.floor(Players[self.id].positionX*100+0.5) > 467602-25000 449 | and math.floor(Players[self.id].positionX*100+0.5) < 467602+25000 450 | and math.floor(Players[self.id].positionY*100+0.5) > 287339-25000 451 | and math.floor(Players[self.id].positionY*100+0.5) < 287339+25000) then 452 | if(GameInfo.difficulty == "hard" or GameInfo.difficulty == "very hard") then 453 | love.graphics.printf("W",118, 104,12, "center")--West Concourse 454 | end 455 | end 456 | end 457 | if Players[self.id].roomID == 7 or Players[self.id].roomID == 11 then 458 | if(math.floor(Players[self.id].positionX*100+0.5) > 692339-25000 459 | and math.floor(Players[self.id].positionX*100+0.5) < 692339+25000 460 | and math.floor(Players[self.id].positionY*100+0.5) > 287398-25000 461 | and math.floor(Players[self.id].positionY*100+0.5) < 287398+25000) then 462 | if GameInfo.difficulty == "very hard" then 463 | love.graphics.printf("I",118, 92,12, "center")--Break Room (Front) 464 | elseif GameInfo.difficulty == "hard" then 465 | love.graphics.printf("W",118, 104,12, "center")--Break Room (Front) 466 | end 467 | end 468 | if (math.floor(Players[self.id].positionX*100+0.5) > 697660-25000 469 | and math.floor(Players[self.id].positionX*100+0.5) < 697660+25000 470 | and math.floor(Players[self.id].positionY*100+0.5) > 162602-25000 471 | and math.floor(Players[self.id].positionY*100+0.5) < 162602+25000) then 472 | if(GameInfo.difficulty == "hard" or GameInfo.difficulty == "very hard") then 473 | love.graphics.printf("I",118, 92,12, "center")--Break Room (Back) 474 | end 475 | end 476 | end 477 | if Players[self.id].roomID == 9 then 478 | if(math.floor(Players[self.id].positionX*100+0.5) > 573127-25000 479 | and math.floor(Players[self.id].positionX*100+0.5) < 573127+25000 480 | and math.floor(Players[self.id].positionY*100+0.5) > 242559-25000 481 | and math.floor(Players[self.id].positionY*100+0.5) < 242559+25000) then 482 | if GameInfo.difficulty == "very hard" then 483 | love.graphics.printf("S",130, 92,12, "center")--Control room (Drawer) 484 | else 485 | love.graphics.printf("P",130, 104,12, "center")--Control room (Drawer) 486 | end 487 | end 488 | end 489 | elseif GameInfo.scenario == "desperate times" then 490 | if Players[self.id].roomID == 1 or Players[self.id].roomID == 4 then 491 | if(math.floor(Players[self.id].positionX*100+0.5) > 431927-25000 492 | and math.floor(Players[self.id].positionX*100+0.5) < 431927+25000 493 | and math.floor(Players[self.id].positionY*100+0.5) > 947788-25000 494 | and math.floor(Players[self.id].positionY*100+0.5) < 947788+25000) then 495 | if GameInfo.difficulty == "very hard" then 496 | love.graphics.printf("S",130, 92,12, "center")--1F Lobby→ Main Hall 497 | elseif GameInfo.difficulty == "hard" then 498 | love.graphics.printf("P",130, 104,12, "center") 499 | else 500 | love.graphics.printf("I",118, 92,12, "center") 501 | end 502 | end 503 | end 504 | if Players[self.id].roomID == 4 or Players[self.id].roomID == 20 then 505 | if(math.floor(Players[self.id].positionX*100+0.5) > 564839-25000 506 | and math.floor(Players[self.id].positionX*100+0.5) < 564839+25000 507 | and math.floor(Players[self.id].positionY*100+0.5) > 847397-25000 508 | and math.floor(Players[self.id].positionY*100+0.5) < 847397+25000) then 509 | if GameInfo.difficulty == "very hard" then 510 | love.graphics.printf("S",130, 92,12, "center")--1F Lobby→ Hallway 511 | elseif GameInfo.difficulty == "hard" then 512 | love.graphics.printf("P",130, 104,12, "center") 513 | else 514 | love.graphics.printf("I",118, 92,12, "center") 515 | end 516 | end 517 | end 518 | if Players[self.id].roomID == 2 then 519 | if(math.floor(Players[self.id].positionX*100+0.5) > 211841-25000 520 | and math.floor(Players[self.id].positionX*100+0.5) < 211841+25000 521 | and math.floor(Players[self.id].positionY*100+0.5) > 890226-25000 522 | and math.floor(Players[self.id].positionY*100+0.5) < 890226+25000) then 523 | if GameInfo.difficulty == "very hard" then 524 | love.graphics.printf("S",130, 92,12, "center")--Reception Desk (Drawer) 525 | elseif GameInfo.difficulty == "hard" then 526 | love.graphics.printf("P",130, 104,12, "center") 527 | else 528 | love.graphics.printf("I",118, 92,12, "center") 529 | end 530 | end 531 | end 532 | if Players[self.id].roomID == 9 then 533 | if(math.floor(Players[self.id].positionX*100+0.5) > 585841-25000 534 | and math.floor(Players[self.id].positionX*100+0.5) < 585841+25000 535 | and math.floor(Players[self.id].positionY*100+0.5) > 723327-25000 536 | and math.floor(Players[self.id].positionY*100+0.5) < 723327+25000) then 537 | if GameInfo.difficulty == "very hard" then 538 | love.graphics.printf("S",130, 92,12, "center")--1F East Passage (Cabinet) 539 | elseif GameInfo.difficulty == "hard" then 540 | love.graphics.printf("P",130, 104,12, "center") 541 | else 542 | love.graphics.printf("I",118, 92,12, "center") 543 | end 544 | end 545 | end 546 | if Players[self.id].roomID == 11 or Players[self.id].roomID == 12 then 547 | if(math.floor(Players[self.id].positionX*100+0.5) > 567660-25000 548 | and math.floor(Players[self.id].positionX*100+0.5) < 567660+25000 549 | and math.floor(Players[self.id].positionY*100+0.5) > 842602-25000 550 | and math.floor(Players[self.id].positionY*100+0.5) < 842602+25000) then 551 | if GameInfo.difficulty == "very hard" then 552 | love.graphics.printf("S",130, 92,12, "center")--B1F East Hall 553 | elseif GameInfo.difficulty == "hard" then 554 | love.graphics.printf("P",130, 104,12, "center") 555 | else 556 | love.graphics.printf("I",118, 92,12, "center") 557 | end 558 | end 559 | end 560 | if Players[self.id].roomID == 14 or Players[self.id].roomID == 15 then 561 | if(math.floor(Players[self.id].positionX*100+0.5) > 137339-25000 562 | and math.floor(Players[self.id].positionX*100+0.5) < 137339+25000 563 | and math.floor(Players[self.id].positionY*100+0.5) > 862397-25000 564 | and math.floor(Players[self.id].positionY*100+0.5) < 862397+25000) then 565 | if GameInfo.difficulty == "very hard" then 566 | love.graphics.printf("S",130, 92,12, "center") 567 | elseif GameInfo.difficulty == "hard" then 568 | love.graphics.printf("P",130, 104,12, "center") 569 | else 570 | love.graphics.printf("I",118, 92,12, "center") 571 | end 572 | end 573 | end 574 | if Players[self.id].roomID == 9 or Players[self.id].roomID == 5 then 575 | if(math.floor(Players[self.id].positionX*100+0.5) > 592660-25000 576 | and math.floor(Players[self.id].positionX*100+0.5) < 592660+25000 577 | and math.floor(Players[self.id].positionY*100+0.5) > 852602-25000 578 | and math.floor(Players[self.id].positionY*100+0.5) < 852602+25000) then 579 | if GameInfo.difficulty == "very hard" then 580 | love.graphics.printf("S",130, 92,12, "center") 581 | elseif GameInfo.difficulty == "hard" then 582 | love.graphics.printf("P",130, 104,12, "center") 583 | else 584 | love.graphics.printf("I",118, 92,12, "center") 585 | end 586 | end 587 | end 588 | elseif GameInfo.scenario == "flashback" then 589 | if(math.floor(Players[self.id].positionX*100+0.5) > 854792-25000 590 | and math.floor(Players[self.id].positionX*100+0.5) < 854792+25000 591 | and math.floor(Players[self.id].positionY*100+0.5) > 667988-25000 592 | and math.floor(Players[self.id].positionY*100+0.5) < 667988+25000) then 593 | if GameInfo.difficulty == "very hard" then 594 | love.graphics.printf("S",130, 92,12, "center") 595 | elseif GameInfo.difficulty == "hard" then 596 | love.graphics.printf("P",130, 104,12, "center") 597 | else 598 | love.graphics.printf("I",118, 92,12, "center") 599 | end 600 | elseif(math.floor(Players[self.id].positionX*100+0.5) > 1067339-25000 601 | and math.floor(Players[self.id].positionX*100+0.5) < 1067339+25000 602 | and math.floor(Players[self.id].positionY*100+0.5) > 637398-25000 603 | and math.floor(Players[self.id].positionY*100+0.5) < 637398+25000) then 604 | if GameInfo.difficulty == "very hard" then 605 | love.graphics.printf("S",130, 92,12, "center") 606 | elseif GameInfo.difficulty == "hard" then 607 | love.graphics.printf("P",130, 104,12, "center") 608 | end 609 | end 610 | elseif GameInfo.scenario == "end of the road" then 611 | if(math.floor(Players[self.id].positionX*100+0.5) > 481741-25000 612 | and math.floor(Players[self.id].positionX*100+0.5) < 481741+25000 613 | and math.floor(Players[self.id].positionY*100+0.5) > 332327-25000 614 | and math.floor(Players[self.id].positionY*100+0.5) < 332327+25000) then 615 | if(GameInfo.difficulty == "hard" or GameInfo.difficulty == "very hard") then 616 | love.graphics.printf("I",118, 92,12, "center") 617 | else 618 | love.graphics.printf("S",130, 92,12, "center") 619 | end 620 | end 621 | end 622 | end 623 | 624 | love.graphics.setColor( 1, 1, 1, 1 ) 625 | 626 | self.nameLabel.text = Players[self.id].name:upper() 627 | self.nameLabelShadow.text = Players[self.id].name:upper() 628 | self.nameLabelShadow:draw() 629 | self.nameLabel:draw() 630 | 631 | self.healthLabel.color = GetStatusColor(self.id) 632 | self.healthLabel.text = GetPlayerHealthString(self.id) 633 | self.healthLabel:draw() 634 | 635 | self.roomLabel.text = GetRoomName(GameInfo.scenario, Players[self.id].roomID) 636 | self.roomLabelShadow.text = GetRoomName(GameInfo.scenario, Players[self.id].roomID) 637 | self.roomLabelShadow:draw() 638 | self.roomLabel:draw() 639 | 640 | local a = Players[self.id].antivirustime 641 | local b = Players[self.id].antivirusgtime 642 | local c = Players[self.id].herbtime 643 | local d = Players[self.id].bleedtime 644 | local e = Players[self.id].status 645 | 646 | if GameInfo.currentFile == 1 then 647 | if b > 0 then 648 | ItemIcons:draw("1/317", 250, 64,0,0.65) 649 | love.graphics.printf({{0, 0, 0, 1},Time2string5(b)},241,73,60,"right") 650 | love.graphics.printf({{1, 1, 1, 1},Time2string5(b)},240,72,60,"right") 651 | end 652 | end 653 | if a > c then 654 | if a > 0 then 655 | ItemIcons:draw("1/316", 250, 82,0,0.65) 656 | love.graphics.printf({{0, 0, 0, 1},Time2string5(a)},241,91,60,"right") 657 | love.graphics.printf({{1, 1, 1, 1},Time2string5(a)},240,90,60,"right") 658 | end 659 | else 660 | if c > 0 then 661 | ItemIcons:draw("1/316", 250, 82,0,0.65) 662 | love.graphics.printf({{0, 0, 0, 1},Time2string5(c)},241,91,60,"right") 663 | love.graphics.printf({{1, 1, 1, 1},Time2string5(c)},240,90,60,"right") 664 | end 665 | end 666 | 667 | if d > 0 and (e =="Bleed" or e =="Poison+Bleed" or e =="Gas+Bleed") then 668 | if b > 0 and GameInfo.currentFile == 1 then 669 | ItemIcons:draw("1/311", 250, 46,0,0.65) 670 | love.graphics.printf({{0, 0, 0, 1},Time2string4(d)},241,55,60,"right") 671 | love.graphics.printf({{1, 0, 0, 1},Time2string4(d)},240,54,60,"right") 672 | end 673 | if a > 0 or c >0 then 674 | ItemIcons:draw("1/311", 250, 64,0,0.65) 675 | love.graphics.printf({{0, 0, 0, 1},Time2string4(d)},241,73,60,"right") 676 | love.graphics.printf({{1, 0, 0, 1},Time2string4(d)},240,72,60,"right") 677 | else 678 | ItemIcons:draw("1/311", 250, 82,0,0.65) 679 | love.graphics.printf({{0, 0, 0, 1},Time2string4(d)},241,91,60,"right") 680 | love.graphics.printf({{1, 0, 0, 1},Time2string4(d)},240,90,60,"right") 681 | end 682 | end 683 | 684 | --self.roomLabel_j.text = GetRoomName_j(GameInfo.scenario, Players[self.id].roomID) 685 | --self.roomLabelShadow_j.text = GetRoomName_j(GameInfo.scenario, Players[self.id].roomID) 686 | --self.roomLabelShadow_j:draw() 687 | --self.roomLabel_j:draw() 688 | 689 | love.graphics.setFont(VirusFont) 690 | if Players[self.id].specialItem.type == 403 then 691 | love.graphics.printf({{25/255, 255/255, 25/255, 1},tostring(Players[self.id].critBonus) .. "%"}, 118, 125, 46, "right") 692 | end 693 | -- Here goes some weird magic 150, 120 694 | local tx, ty = 192, 125 695 | local val1 = math.floor(Players[self.id].virus) 696 | local val2 = math.floor(math.floor(Players[self.id].virus*100+0.5) - val1 * 100) 697 | love.graphics.printf(tostring(val1), tx, ty, 60, "right", 0, 1.25, 1.25) 698 | love.graphics.printf("." .. string.format("%02d", val2) .. "%", tx+73, ty+3.5, 60, "left", 0, 1.0, 1.0) 699 | -- weird magic ends here 700 | 701 | --local siz = math.floor(math.floor((Players[self.id].size)*100)) 702 | --love.graphics.printf(string.format("%d", siz) .. "%", tx+46, ty+3.5-60, 60, "right", 0, 1.0, 1.0) 703 | 704 | local pow = math.floor(math.floor(Players[self.id].power*100+0.5)) 705 | love.graphics.printf({{25/255, 255/255, 255/255, 1},string.format("%d", pow) .. "%"}, tx+46, ty+3.5-20, 60, "right", 0, 1.0, 1.0) 706 | 707 | --local spd = math.floor(math.floor(Players[self.id].speed*100+0.5)) 708 | --love.graphics.printf(string.format("%d", spd) .. "%", tx+46, ty+3.5-40, 60, "right", 0, 1.0, 1.0) 709 | 710 | --local px = math.floor(math.floor(Players[self.id].positionX*100+0.5)) 711 | --local py = math.floor(math.floor(Players[self.id].positionY*100+0.5)) 712 | --love.graphics.setFont(VerySmallFont) 713 | --love.graphics.printf({{25/255, 255/255, 255/255, 1},string.format("%d", px)}, tx+46, ty+3.5-60, 60, "right", 0, 1.0, 1.0) 714 | --love.graphics.printf({{25/255, 255/255, 255/255, 1},string.format("%d", py)}, tx+46, ty+3.5-40, 60, "right", 0, 1.0, 1.0) 715 | love.graphics.pop() 716 | --love.graphics.printf("I",118, 92,12, "center") 717 | --love.graphics.printf("S",130, 92,12, "center") 718 | --love.graphics.printf("W",118, 104,12, "center") 719 | --love.graphics.printf("P",130, 104,12, "center") 720 | end 721 | -------------------------------------------------------------------------------- /lua/SPlayerCard.lua: -------------------------------------------------------------------------------- 1 | SPlayerCard = {} 2 | SPlayerCard.__index = SPlayerCard 3 | 4 | function SPlayerCard:new(id) 5 | local o = {} 6 | o.id = id or 1 7 | 8 | o.nameLabel = Label:new(10, 4, "placeholder", SmallFont) 9 | o.nameLabelShadow = Label:new(12, 5, "placeholder", SmallFont, nil, nil, nil, nil, {0, 0, 0, 1}) 10 | --o.roomLabel = Label:new(110, 0, "placeholder", SmallFont, "center", "center", 190, 40) 11 | --o.roomLabelShadow = Label:new(111, 1, "placeholder", SmallFont, "center", "center", 190, 40, {0, 0, 0, 1}) 12 | --o.roomLabel_j = Label:new(280, 2, "placeholder", SmallFont, "center", "up", 15, 145) 13 | --o.roomLabelShadow_j = Label:new(281, 3, "placeholder", SmallFont, "center", "up", 15, 145, {0, 0, 0, 1}) 14 | o.healthLabel = Label:new(8, 21, "placeholder", VerySmallFont, "center", "up", 70, 10) 15 | o.powerLabel = Label:new(172, 126, "placeholder", VirusFont, "right", "up", 48, 15,{25/255, 255/255, 255/255, 1}) 16 | o.powertextLabel = Label:new(136, 125, "placeholder", SmallFont, "right", "up", 48, 15,{255/255, 255/255, 255/255, 1}) 17 | o.powertextShadow = Label:new(138, 127, "placeholder", SmallFont, "right", "up", 48, 15,{0, 0, 0, 1}) 18 | 19 | 20 | return setmetatable(o, self) 21 | end 22 | 23 | function SPlayerCard:draw(x, y) 24 | love.graphics.push() 25 | love.graphics.translate(x, y) 26 | 27 | local splayer = SPlayers[self.id] 28 | 29 | local sb = love.graphics.newSpriteBatch(UIAtlas.tex) 30 | local bustname = "bust" .. SPlayers[self.id].name 31 | local bx, by, bw, bh = UIAtlas.quads[bustname]:getViewport() 32 | local scale = 140 / bh; 33 | local sb2 = love.graphics.newSpriteBatch(ItemIcons2.tex) 34 | local startitem = SPlayers[self.id].name 35 | local hp = SPlayers[self.id].hp 36 | local power = SPlayers[self.id].power 37 | 38 | ItemIcons2:addSB(sb2, startitem, 8, 42, 0, 1, 1) 39 | 40 | if (SPlayers[self.id].name =="Mr.RED" 41 | or SPlayers[self.id].name =="BOB" 42 | or SPlayers[self.id].name =="TONY" 43 | or SPlayers[self.id].name =="ANDY" 44 | or SPlayers[self.id].name =="DEREK" 45 | or SPlayers[self.id].name =="KURT:B" 46 | or SPlayers[self.id].name =="FRANK" 47 | or SPlayers[self.id].name =="GARY:B" 48 | or SPlayers[self.id].name =="HARSH" 49 | or SPlayers[self.id].name =="Mr.BLACK" 50 | or SPlayers[self.id].name =="Ms.PEACH" 51 | or SPlayers[self.id].name =="REGAN:B") then 52 | sb:setColor(253/255, 25/255, 25/255, 0.5) 53 | else 54 | sb:setColor(20/255, 134/255, 10/255, 0.5) 55 | end 56 | UIAtlas:addSB(sb, "healthmask", 9, 5); 57 | sb:setColor(1, 1, 1, 1) 58 | UIAtlas:addSB(sb, "statusbar", 1, 2); 59 | 60 | UIAtlas:addSB(sb, bustname, 220 - bw * scale, 145 - bh * scale, 0, scale, scale) 61 | 62 | sb:setColor(20/255, 48/255, 85/255, 0.8) 63 | UIAtlas:addSB(sb, "inventorymask", 8, 42); 64 | UIAtlas:addSB(sb, "ispecialmask", 9, 42); 65 | 66 | sb:setColor(1, 1, 1, 1) 67 | UIAtlas:addSB(sb, "invSingle", 0, 37); 68 | UIAtlas:addSB(sb, "invSpecial", 1, 39); 69 | 70 | love.graphics.draw(sb) 71 | 72 | love.graphics.draw(sb2) 73 | 74 | self.nameLabel.text = SPlayers[self.id].name:upper() 75 | self.nameLabelShadow.text = SPlayers[self.id].name:upper() 76 | self.nameLabelShadow:draw() 77 | self.nameLabel:draw() 78 | 79 | self.healthLabel.text = hp 80 | self.healthLabel:draw() 81 | 82 | self.powerLabel.text = power 83 | self.powerLabel:draw() 84 | 85 | self.powertextLabel.text = "Power" 86 | self.powertextShadow.text = "Power" 87 | self.powertextShadow:draw() 88 | self.powertextLabel:draw() 89 | 90 | love.graphics.pop() 91 | end 92 | -------------------------------------------------------------------------------- /lua/assets.lua: -------------------------------------------------------------------------------- 1 | local IconLinks = require "icondata" 2 | local IconLinks2 = require "icondata2" 3 | local UIAtlasInfo = require "uidata" 4 | RoomNames = require "roomnames" 5 | 6 | function LoadAssets() 7 | ItemCountFont = love.graphics.newImageFont("assets/ItemCountFont.png", "0123456789") 8 | TimeFont = love.graphics.newImageFont("assets/TimeFont.png", "0123456789:./") 9 | VirusFont = love.graphics.newImageFont("assets/VirusFont.png", "0123456789.%") 10 | VirusFont:setFilter("nearest", "linear") 11 | UIAtlas = LoadTextureAtlas("assets/ui.png", UIAtlasInfo) 12 | ItemIcons = LoadTextureAtlas("assets/icons.png", IconLinks) 13 | ItemIcons2 = LoadTextureAtlas("assets/StartingItem.png", IconLinks2) 14 | DefaultFont = love.graphics.newFont("assets/arialbd.ttf",18) 15 | SmallFont = love.graphics.newFont("assets/arialbd.ttf",15) 16 | VerySmallFont = love.graphics.newFont("assets/arialbd.ttf",13) 17 | MiniFont = love.graphics.newFont("assets/arialnb.ttf",11) 18 | --MiniFont = love.graphics.newFont(9) 19 | end 20 | 21 | function LoadTextureAtlas(texture, links) -- Really dirty stuff here 22 | local o = {} 23 | o.tex = love.graphics.newImage(texture) 24 | o.quads = {} 25 | o.draw = function (self, name, x, y, r, sx, sy, ox, oy, kx, ky) 26 | if (self.quads[name] == nil) then 27 | love.graphics.setFont() 28 | love.graphics.print(name, x, y) 29 | else 30 | love.graphics.draw(self.tex, self.quads[name], x, y, r, sx, sy, ox, oy, kx, ky) 31 | end 32 | end 33 | o.addSB = function (self, sb, name, x, y, r, sx, sy, ox, oy, kx, ky) 34 | sb:add( self.quads[name], x, y, r or 0, sx, sy, ox, oy, kx, ky) 35 | end 36 | for k, v in pairs(links.frameIndex) do 37 | o.quads[k] = love.graphics.newQuad(links.sheet.frames[v].x, links.sheet.frames[v].y, 38 | links.sheet.frames[v].width, links.sheet.frames[v].height, 39 | links.sheet.sheetContentWidth, links.sheet.sheetContentHeight) 40 | end 41 | return o 42 | end -------------------------------------------------------------------------------- /lua/assets/ItemCountFont.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phoe-nix/OutbreakTracker/aef7b8e728f68304474fbcd2091cd64406cc7db6/lua/assets/ItemCountFont.png -------------------------------------------------------------------------------- /lua/assets/StartingItem.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phoe-nix/OutbreakTracker/aef7b8e728f68304474fbcd2091cd64406cc7db6/lua/assets/StartingItem.png -------------------------------------------------------------------------------- /lua/assets/TimeFont.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phoe-nix/OutbreakTracker/aef7b8e728f68304474fbcd2091cd64406cc7db6/lua/assets/TimeFont.png -------------------------------------------------------------------------------- /lua/assets/VirusFont.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phoe-nix/OutbreakTracker/aef7b8e728f68304474fbcd2091cd64406cc7db6/lua/assets/VirusFont.png -------------------------------------------------------------------------------- /lua/assets/arialbd.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phoe-nix/OutbreakTracker/aef7b8e728f68304474fbcd2091cd64406cc7db6/lua/assets/arialbd.ttf -------------------------------------------------------------------------------- /lua/assets/arialnb.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phoe-nix/OutbreakTracker/aef7b8e728f68304474fbcd2091cd64406cc7db6/lua/assets/arialnb.ttf -------------------------------------------------------------------------------- /lua/assets/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phoe-nix/OutbreakTracker/aef7b8e728f68304474fbcd2091cd64406cc7db6/lua/assets/icon.png -------------------------------------------------------------------------------- /lua/assets/icons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phoe-nix/OutbreakTracker/aef7b8e728f68304474fbcd2091cd64406cc7db6/lua/assets/icons.png -------------------------------------------------------------------------------- /lua/assets/ui.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phoe-nix/OutbreakTracker/aef7b8e728f68304474fbcd2091cd64406cc7db6/lua/assets/ui.png -------------------------------------------------------------------------------- /lua/conf.lua: -------------------------------------------------------------------------------- 1 | function love.conf(t) 2 | t.identity = nil -- The name of the save directory (string) 3 | t.appendidentity = false -- Search files in source directory before save directory (boolean) 4 | t.version = "11.0" -- The LÖVE version this game was made for (string) 5 | t.console = false -- Attach a console (boolean, Windows only) 6 | t.accelerometerjoystick = true -- Enable the accelerometer on iOS and Android by exposing it as a Joystick (boolean) 7 | t.externalstorage = false -- True to save files (and read from the save directory) in external storage on Android (boolean) 8 | t.gammacorrect = false -- Enable gamma-correct rendering, when supported by the system (boolean) 9 | 10 | t.audio.mixwithsystem = true -- Keep background music playing when opening LOVE (boolean, iOS and Android only) 11 | 12 | t.window.title = "Outbreak Status Tracker" -- The window title (string) 13 | t.window.icon = "assets/icon.png" -- Filepath to an image to use as the window's icon (string) 14 | t.window.width = 300 -- The window width (number) 15 | t.window.height = 740 -- The window height (number) 16 | t.window.borderless = false -- Remove all border visuals from the window (boolean) 17 | t.window.resizable = true -- Let the window be user-resizable (boolean) 18 | t.window.minwidth = 1 -- Minimum window width if the window is resizable (number) 19 | t.window.minheight = 1 -- Minimum window height if the window is resizable (number) 20 | t.window.fullscreen = false -- Enable fullscreen (boolean) 21 | t.window.fullscreentype = "desktop" -- Choose between "desktop" fullscreen or "exclusive" fullscreen mode (string) 22 | t.window.vsync = 3 -- Vertical sync mode (number) 23 | t.window.msaa = 0 -- The number of samples to use with multi-sampled antialiasing (number) 24 | t.window.display = 1 -- Index of the monitor to show the window in (number) 25 | t.window.highdpi = false -- Enable high-dpi mode for the window on a Retina display (boolean) 26 | t.window.x = nil -- The x-coordinate of the window's position in the specified display (number) 27 | t.window.y = nil -- The y-coordinate of the window's position in the specified display (number) 28 | 29 | t.modules.audio = true -- Enable the audio module (boolean) 30 | t.modules.data = true -- Enable the data module (boolean) 31 | t.modules.event = true -- Enable the event module (boolean) 32 | t.modules.font = true -- Enable the font module (boolean) 33 | t.modules.graphics = true -- Enable the graphics module (boolean) 34 | t.modules.image = true -- Enable the image module (boolean) 35 | t.modules.joystick = true -- Enable the joystick module (boolean) 36 | t.modules.keyboard = true -- Enable the keyboard module (boolean) 37 | t.modules.math = true -- Enable the math module (boolean) 38 | t.modules.mouse = true -- Enable the mouse module (boolean) 39 | t.modules.physics = true -- Enable the physics module (boolean) 40 | t.modules.sound = true -- Enable the sound module (boolean) 41 | t.modules.system = true -- Enable the system module (boolean) 42 | t.modules.thread = true -- Enable the thread module (boolean) 43 | t.modules.timer = true -- Enable the timer module (boolean), Disabling it will result 0 delta time in love.update 44 | t.modules.touch = true -- Enable the touch module (boolean) 45 | t.modules.video = true -- Enable the video module (boolean) 46 | t.modules.window = true -- Enable the window module (boolean) 47 | end -------------------------------------------------------------------------------- /lua/helpers.lua: -------------------------------------------------------------------------------- 1 | function GetHealthbar(hp, hpmax) 2 | local percent = hp / hpmax 3 | if (percent > 1) then 4 | return 0 5 | end 6 | if (percent == 1) then 7 | return 1 8 | end 9 | if (percent >= 0.95) then 10 | return 0.95 11 | end 12 | if (percent >= 0.90) then 13 | return 0.90 14 | end 15 | if (percent >= 0.85) then 16 | return 0.85 17 | end 18 | if (percent >= 0.80) then 19 | return 0.80 20 | end 21 | if (percent >= 0.75) then 22 | return 0.75 23 | end 24 | if (percent >= 0.70) then 25 | return 0.70 26 | end 27 | if (percent >= 0.65) then 28 | return 0.65 29 | end 30 | if (percent >= 0.60) then 31 | return 0.65 32 | end 33 | if (percent >= 0.55) then 34 | return 0.55 35 | end 36 | if (percent >= 0.50) then 37 | return 0.50 38 | end 39 | if (percent >= 0.45) then 40 | return 0.45 41 | end 42 | if (percent >= 0.40) then 43 | return 0.40 44 | end 45 | if (percent >= 0.35) then 46 | return 0.35 47 | end 48 | if (percent >= 0.30) then 49 | return 0.30 50 | end 51 | if (percent >= 0.25) then 52 | return 0.25 53 | end 54 | if (percent >= 0.20) then 55 | return 0.20 56 | end 57 | if (percent >= 0.15) then 58 | return 0.15 59 | end 60 | if (percent >= 0.10) then 61 | return 0.10 62 | end 63 | if (percent >= 0.05) then 64 | return 0.05 65 | end 66 | if (percent > 0) then 67 | return 0.05 68 | end 69 | if (percent == 0) then 70 | return 0 71 | end 72 | return 0 73 | end 74 | 75 | function GetConditionName(hp, hpmax) 76 | local percent = hp / hpmax 77 | if (percent >= 0.75) then 78 | return "fine" 79 | end 80 | if (percent >= 0.50) then 81 | return "caution" 82 | end 83 | if (percent >= 0.25) then 84 | return "caution2" 85 | end 86 | if (percent > 0) then 87 | return "danger" 88 | end 89 | if (percent == 0) then 90 | return "down" 91 | end 92 | return "down" 93 | end 94 | 95 | function GetConditionName2(hp, hpmax) 96 | local percent = hp / hpmax 97 | if (percent > 1) then 98 | return "dead" 99 | end 100 | if (percent >= 0.75) then 101 | return "fine" 102 | end 103 | if (percent >= 0.50) then 104 | return "caution" 105 | end 106 | if (percent >= 0.25) then 107 | return "caution2" 108 | end 109 | if (percent > 0) then 110 | return "danger" 111 | end 112 | if (percent == 0) then 113 | return "dead" 114 | end 115 | return "dead" 116 | end 117 | 118 | function GetConditionColor(r, stat) 119 | if (r == "fine") then 120 | return {68/255, 134/255, 10/255, 0.5} 121 | elseif (r == "caution") then 122 | return {247/255, 223/255, 27/255, 0.5} 123 | elseif (r == "caution2") then 124 | return {253/255, 166/255, 25/255, 0.5} 125 | elseif (r == "danger") then 126 | return {253/255, 25/255, 25/255, 0.5} 127 | elseif (r == "down") then 128 | return {150/255, 15/255, 15/255, 0.5} 129 | end 130 | end 131 | 132 | function GetConditionColor2(r, stat) 133 | if (r == "fine") then 134 | return {68/255, 134/255, 10/255, 0.5} 135 | elseif (r == "caution") then 136 | return {247/255, 223/255, 27/255, 0.5} 137 | elseif (r == "caution2") then 138 | return {253/255, 166/255, 25/255, 0.5} 139 | elseif (r == "danger") then 140 | return {253/255, 25/255, 25/255, 0.5} 141 | elseif (r == "dead") then 142 | return {0/255, 0/255, 0/255, 0.5} 143 | elseif (r == "Invincible") then 144 | return {0/255, 0/255, 0/255, 0.5} 145 | end 146 | end 147 | 148 | function GetConditionColor3(r, stat) 149 | if (r == "fine") then 150 | return {109/255, 131/255, 227/255, 1} 151 | elseif (r == "caution") then 152 | return {247/255, 223/255, 27/255, 0.75} 153 | elseif (r == "caution2") then 154 | return {253/255, 166/255, 25/255, 0.75} 155 | elseif (r == "danger") then 156 | return {253/255, 25/255, 25/255, 0.75} 157 | elseif (r == "dead") then 158 | return {0/255, 0/255, 0/255, 0.5} 159 | elseif (r == "Invincible") then 160 | return {0/255, 0/255, 0/255, 0.5} 161 | end 162 | end 163 | 164 | function GetRoomName(scenario, roomID) 165 | if not (RoomNames[scenario] == nil) then 166 | if RoomNames[scenario][roomID] == nil then 167 | return "Room ID: " .. tostring(roomID) 168 | else 169 | return RoomNames[scenario][roomID] 170 | end 171 | else 172 | return "ERROR: Unknown scenario" 173 | end 174 | end 175 | 176 | function GetRoomName_j(scenario, roomID) 177 | if not (RoomNames_j[scenario] == nil) then 178 | if RoomNames_j[scenario][roomID] == nil then 179 | return "Room ID: " .. tostring(roomID) 180 | else 181 | return RoomNames_j[scenario][roomID] 182 | end 183 | else 184 | return "ERROR: Unknown scenario" 185 | end 186 | end 187 | 188 | function GetScenarioIDString(id) 189 | local scenariostring = "\n"..tostring(Slots[id].slotscenario) 190 | if Slots[id].status ==3 or Slots[id].status ==4 then 191 | return scenariostring 192 | elseif Slots[id].status ==1 or Slots[id].status ==2 then 193 | return "(free)\n" 194 | else 195 | return "" 196 | end 197 | end 198 | 199 | function GetVersionString(id) 200 | local vesionstring = tostring(Slots[id].version) 201 | if Slots[id].version ==0x11 then 202 | return "DVD-ROM" 203 | elseif Slots[id].version ==0x12 then 204 | return "HDD-ROM" 205 | else 206 | return "" 207 | end 208 | end 209 | 210 | function GetSlotString(id) 211 | local slotstring = tostring(Slots[id].num) 212 | return slotstring 213 | end 214 | 215 | function GetPlayerString(id) 216 | local playerstring = tostring(Slots[id].player) .. "/" .. tostring(Slots[id].maxplayer) 217 | if Slots[id].status ==0 then 218 | return "-/-P\nBusy"--red color 219 | elseif Slots[id].status ==1 then 220 | return "-/-P\nVacant" 221 | elseif Slots[id].status ==2 then 222 | return "-/-P\nBusy"--yellow color 223 | elseif Slots[id].status ==3 then 224 | return tostring(Slots[id].player) .. "/" .. tostring(Slots[id].maxplayer).."\nJoin in"--white color 225 | elseif Slots[id].status ==4 then 226 | return tostring(Slots[id].player) .. "/" .. tostring(Slots[id].maxplayer).."\nFull"--pink color 227 | else 228 | return playerstring 229 | end 230 | end 231 | 232 | function GetPlayerHealthString(id) 233 | local healthstring = tostring(Players[id].HP) .. "/" .. tostring(Players[id].maxHP) 234 | if Players[id].status == "Dead" or Players[id].status == "Down" or Players[id].status == "Zombie" then 235 | return Players[id].status 236 | elseif Players[id].status == "Gas" then 237 | return Players[id].HP .. " " .. Time2string3(GameInfo.gastime) 238 | elseif Players[id].status == "Down+Gas" then 239 | return "Down" 240 | elseif Players[id].status == "Cleared" then 241 | return "Cleared" 242 | --elseif Players[id].vgstoptime >0 then 243 | -- return Players[id].HP .. " " .. Time2string3(Players[id].vgstoptime) 244 | else 245 | return healthstring 246 | end 247 | end 248 | 249 | function GetEnemiesHealthString2(id) 250 | local healthstring = tostring(Enemies2[id].HP) 251 | if Enemies2[id].HP == 0x7fff 252 | or Enemies2[id].nameID == 11 253 | or Enemies2[id].nameID == 12 254 | or Enemies2[id].nameID == 14 255 | or Enemies2[id].nameID == 26 256 | or Enemies2[id].nameID == 34 257 | or Enemies2[id].nameID == 56 then 258 | return "Inv." 259 | elseif (Enemies2[id].HP == 0x0 260 | or Enemies2[id].HP == 0xffff 261 | or Enemies2[id].HP >= 0x8000) 262 | and not (Enemies2[id].nameID == 54 263 | or Enemies2[id].nameID == 58) then 264 | return "Dead" 265 | elseif (Enemies2[id].HP == 0xffff 266 | and Enemies2[id].maxHP == 0x1 267 | and Enemies2[id].nameID == 54) then 268 | return "Destroyed" 269 | elseif (Enemies2[id].HP == 0x0 270 | and Enemies2[id].nameID == 58) then 271 | return "Exploded" 272 | else 273 | return healthstring 274 | end 275 | end 276 | 277 | function GetBossHealthString(id) 278 | local healthstring = tostring(Boss[id].HP) 279 | if Boss[id].HP == 0x7fff 280 | or Boss[id].nameID == 11 281 | or Boss[id].nameID == 12 282 | or Boss[id].nameID == 14 283 | or Boss[id].nameID == 26 284 | or Boss[id].nameID == 34 285 | or Boss[id].nameID == 56 then 286 | return "Inv." 287 | elseif (Boss[id].HP == 0x0 288 | or Boss[id].HP == 0xffff 289 | or Boss[id].HP >= 0x8000) 290 | and not (Boss[id].nameID == 54 291 | or Boss[id].nameID == 58) then 292 | return "Dead" 293 | elseif (Boss[id].HP == 0xffff 294 | and Boss[id].maxHP == 0x1 295 | and Boss[id].nameID == 54) then 296 | return "Destroyed" 297 | elseif (Boss[id].HP == 0x0 298 | and Boss[id].nameID == 58) then 299 | return "Exploded" 300 | else 301 | return healthstring 302 | end 303 | end 304 | 305 | function GetEnemyHealthString(id) 306 | local healthstring = tostring(Enemies[id].HP) .. "/" .. tostring(Enemies[id].maxHP) 307 | if Enemies[id].HP == 0x7fff 308 | or Enemies[id].nameID == 11 309 | or Enemies[id].nameID == 12 310 | or Enemies[id].nameID == 14 311 | or Enemies[id].nameID == 26 312 | or Enemies[id].nameID == 34 313 | or Enemies[id].nameID == 56 then 314 | return "Invincible" 315 | elseif (Enemies[id].HP == 0x0 316 | or Enemies[id].HP == 0xffff 317 | or Enemies[id].HP >= 0x8000) 318 | and not (Enemies[id].nameID == 54 319 | or Enemies[id].nameID == 58) then 320 | return "Dead" 321 | elseif (Enemies[id].HP == 0xffff 322 | and Enemies[id].maxHP == 0x1 323 | and Enemies[id].nameID == 54) then 324 | return "Destroyed" 325 | elseif (Enemies[id].HP == 0x0 326 | and Enemies[id].nameID == 58) then 327 | return "Exploded" 328 | else 329 | return healthstring 330 | end 331 | end 332 | 333 | function GetBossColor(id) 334 | if Boss[id].nameID == 54 335 | or Boss[id].nameID == 58 336 | or Boss[id].nameID == 60 then 337 | return {255/255, 80/255, 40/255, 1} 338 | elseif Boss[id].nameID == 4 339 | or Boss[id].nameID == 46 340 | or Boss[id].nameID == 61 then 341 | return {0, 1, 0, 1}--non enemy 342 | else 343 | return {1, 1, 1, 1} 344 | end 345 | end 346 | 347 | function GetEnemyColor(id) 348 | if Enemies[id].nameID == 54 349 | or Enemies[id].nameID == 58 350 | or Enemies[id].nameID == 60 then 351 | return {255/255, 80/255, 40/255, 1} 352 | elseif Enemies[id].nameID == 4 353 | or Enemies[id].nameID == 46 354 | or Enemies[id].nameID == 61 then 355 | return {0, 1, 0, 1}--non enemy 356 | else 357 | return {1, 1, 1, 1} 358 | end 359 | end 360 | 361 | function GetEnemyColor2(id) 362 | if Enemies2[id].nameID == 54 363 | or Enemies2[id].nameID == 58 364 | or Enemies2[id].nameID == 60 then 365 | return {255/255, 80/255, 40/255, 1} 366 | elseif Enemies2[id].nameID == 4 367 | or Enemies2[id].nameID == 46 368 | or Enemies2[id].nameID == 61 then 369 | return {0, 1, 0, 1}--non enemy 370 | else 371 | return {1, 1, 1, 1} 372 | end 373 | end 374 | 375 | function GetStatusColor(id) 376 | if Players[id].status == "Poison" then 377 | return {1, 0, 1, 1} 378 | elseif Players[id].status == "Bleed" then 379 | return {1, 0, 0, 1} 380 | elseif Players[id].status == "Poison+Bleed" then 381 | return {0, 1, 1, 1} 382 | elseif Players[id].status == "Gas" then 383 | return {1, 1, 0, 1} 384 | elseif Players[id].status == "Down+Gas" then 385 | return {1, 1, 0, 1} 386 | elseif Players[id].status == "Gas+Bleed" then 387 | return {1, 0.5, 0, 1} 388 | elseif Players[id].status == "Cleared" then 389 | return {0, 1, 0, 1} 390 | else 391 | return {1, 1, 1, 1} 392 | end 393 | end 394 | 395 | function GetSlotsColor(id) 396 | if Slots[id].status ==0 then 397 | return {1, 0, 0, 1} 398 | elseif Slots[id].status ==2 then 399 | return {1, 1, 0, 1} 400 | elseif Slots[id].status ==4 then 401 | return {1, 100/255, 240/255, 1} 402 | else 403 | return {1, 1, 1, 1} 404 | end 405 | end 406 | 407 | function GetVirusState(virus) 408 | if virus >= 90 then 409 | return "virus90" 410 | elseif virus >= 80 then 411 | return "virus80" 412 | elseif virus >= 50 then 413 | return "virus50" 414 | else 415 | return "virusOK" 416 | end 417 | end 418 | 419 | function RealTime(x) 420 | local h = math.floor(x / 3600) 421 | local m = math.floor((x / 60) % 60) 422 | local s = math.floor(x % 60) 423 | local mi = math.floor((x * 10)%10 / 1) 424 | return string.format("%02d", h) .. ":" .. string.format("%02d", m) .. ":" .. string.format("%02d", s) .. "." .. string.format("%.1d", mi) 425 | end 426 | 427 | function Time2string(x) 428 | local h = math.floor(((x / (3600000)) % 24)) 429 | local m = math.floor((x / (60000)) % 60) 430 | local s = math.floor((x / 1000) % 60) 431 | local mi = math.floor(x % 1000 / 100) 432 | return string.format("%02d", h) .. ":" .. string.format("%02d", m) .. ":" .. string.format("%02d", s) .. "." .. string.format("%.1d", mi) 433 | end 434 | 435 | function Time2string2(x) 436 | local m = math.floor((x / (60)) % 60) 437 | local s = math.floor((x-60) % 60) 438 | return string.format("%02d", m) .. ":" .. string.format("%02d", s) 439 | end 440 | 441 | function Time2string3(x) 442 | local m = math.floor((x / (1800)) % 60) 443 | local s = math.floor((x / 30) % 60) 444 | return string.format("%02d", m) .. ":" .. string.format("%02d", s) 445 | end 446 | 447 | function Time2string4(x)--bleeding time 448 | local m = math.floor((x / (1800)) % 60) 449 | local s = math.floor((x / 30) % 60) 450 | return string.format("%0d", m) .. ":" .. string.format("%02d", s) 451 | end 452 | 453 | function Time2string5(x)--stopping virus time 454 | local m = math.floor((x / (3600)) % 60) 455 | local s = math.floor((x / 60) % 60) 456 | return string.format("%0d", m) .. ":" .. string.format("%02d", s) 457 | end 458 | 459 | function IsOuNumber(num) 460 | local num1= num%2 461 | return string.format(num1) 462 | end -------------------------------------------------------------------------------- /lua/icondata2.lua: -------------------------------------------------------------------------------- 1 | local SheetInfo = {} 2 | 3 | SheetInfo.sheet = 4 | { 5 | frames = { 6 | 7 | { 8 | --1 .45 magazine 9 | x=0, 10 | y=0, 11 | width=48, 12 | height=48, 13 | 14 | }, 15 | { 16 | --2 hg magazine 17 | x=48, 18 | y=0, 19 | width=48, 20 | height=48, 21 | 22 | }, 23 | { 24 | --3 lucky coin 25 | x=96, 26 | y=0, 27 | width=48, 28 | height=48, 29 | 30 | }, 31 | { 32 | --4 shooter 33 | x=144, 34 | y=0, 35 | width=48, 36 | height=48, 37 | 38 | }, 39 | { 40 | --5 lighter 41 | x=192, 42 | y=0, 43 | width=48, 44 | height=48, 45 | 46 | }, 47 | { 48 | --6 stun gun 49 | x=240, 50 | y=0, 51 | width=48, 52 | height=48, 53 | 54 | }, 55 | { 56 | --7 charm 57 | x=288, 58 | y=0, 59 | width=48, 60 | height=48, 61 | 62 | }, 63 | { 64 | --8 bandage 65 | x=336, 66 | y=0, 67 | width=48, 68 | height=48, 69 | 70 | }, 71 | { 72 | --9 green herb 73 | x=384, 74 | y=0, 75 | width=48, 76 | height=48, 77 | 78 | }, 79 | { 80 | --10 blue herb 81 | x=432, 82 | y=0, 83 | width=48, 84 | height=48, 85 | 86 | }, 87 | { 88 | --11 red herb 89 | x=480, 90 | y=0, 91 | width=48, 92 | height=48, 93 | 94 | }, 95 | { 96 | --12 mixed herb (G+G) 97 | x=528, 98 | y=0, 99 | width=48, 100 | height=48, 101 | 102 | }, 103 | { 104 | --13 Mixed Herb (G+G+G) 105 | x=576, 106 | y=0, 107 | width=48, 108 | height=48, 109 | 110 | }, 111 | { 112 | --14 Mixed Herb (G+R) 113 | x=624, 114 | y=0, 115 | width=48, 116 | height=48, 117 | 118 | }, 119 | { 120 | --15 Mixed Herb (G+B) 121 | x=672, 122 | y=0, 123 | width=48, 124 | height=48, 125 | 126 | }, 127 | { 128 | --16 Mixed Herb (G+R+B) 129 | x=720, 130 | y=0, 131 | width=48, 132 | height=48, 133 | 134 | }, 135 | { 136 | --17 First Aid Spray 137 | x=768, 138 | y=0, 139 | width=48, 140 | height=48, 141 | 142 | }, 143 | { 144 | --18 Recovery Pill (1) 145 | x=816, 146 | y=0, 147 | width=48, 148 | height=48, 149 | 150 | }, 151 | { 152 | --19 Recovery Pill (3) 153 | x=864, 154 | y=0, 155 | width=48, 156 | height=48, 157 | 158 | }, 159 | { 160 | --20 Hemostat (1) 161 | x=912, 162 | y=0, 163 | width=48, 164 | height=48, 165 | 166 | }, 167 | { 168 | --21 Antidote (1) 169 | x=960, 170 | y=0, 171 | width=48, 172 | height=48, 173 | 174 | }, 175 | { 176 | --22 Anti-virus (1) 177 | x=1008, 178 | y=0, 179 | width=48, 180 | height=48, 181 | 182 | }, 183 | { 184 | --23 Anti-virus (3) 185 | x=1056, 186 | y=0, 187 | width=48, 188 | height=48, 189 | 190 | }, 191 | { 192 | --24 Iron Pipe 193 | x=1104, 194 | y=0, 195 | width=48, 196 | height=48, 197 | 198 | }, 199 | { 200 | --25 Handgun Rounds (10) 201 | x=1152, 202 | y=0, 203 | width=48, 204 | height=48, 205 | 206 | }, 207 | { 208 | --26 Handgun Rounds (15) 209 | x=1200, 210 | y=0, 211 | width=48, 212 | height=48, 213 | 214 | }, 215 | { 216 | --27 Handgun Rounds (20) 217 | x=1248, 218 | y=0, 219 | width=48, 220 | height=48, 221 | 222 | }, 223 | { 224 | --28 Handgun Rounds (30) 225 | x=1296, 226 | y=0, 227 | width=48, 228 | height=48, 229 | 230 | }, 231 | { 232 | --29 empty 233 | x=1344, 234 | y=0, 235 | width=48, 236 | height=48, 237 | 238 | }, 239 | }, 240 | 241 | sheetContentWidth = 1392, 242 | sheetContentHeight = 48 243 | } 244 | 245 | --9 Green Herb 246 | --10 Blue Herb 247 | --11 Red Herb 248 | --12 Mixed Herb (G+G) 249 | --13 Mixed Herb (G+G+G) 250 | --14 Mixed Herb (G+R) 251 | --15 Mixed Herb (G+B) 252 | --16 Mixed Herb (G+R+B) 253 | --17 First Aid Spray 254 | --18 Recovery Pill (1) 255 | --19 Recovery Pill (3) 256 | --20 Hemostat (1) 257 | --21 Antidote (1) 258 | --22 Anti-virus (1) 259 | --23 Anti-virus (3) 260 | --24 Iron Pipe 261 | --25 Handgun Rounds (10) 262 | --26 Handgun Rounds (15) 263 | --27 Handgun Rounds (20) 264 | --28 Handgun Rounds (30) 265 | --29 empty 266 | 267 | SheetInfo.frameIndex = 268 | { 269 | -- 270 | ["Kevin "] = 29, 271 | ["Mark "] = 29, 272 | ["Jim "] = 29, 273 | ["George "] = 29, 274 | ["David "] = 29, 275 | ["Alyssa "] = 29, 276 | ["Yoko "] = 29, 277 | ["Cindy "] = 29, 278 | ["Kevin"] = 1, 279 | ["Mark"] = 2, 280 | ["Jim"] = 3, 281 | ["George"] = 4, 282 | ["David"] = 5, 283 | ["Alyssa"] = 6, 284 | ["Yoko"] = 7, 285 | ["Cindy"] = 8, 286 | ["Unknown"] = 29, 287 | ["MACDOWELL"] = 20, --20 Hemostat (1) 288 | ["RODRIGUEZ"] = 9, --9 Green Herb 289 | ["CONRAD"] = 21, --21 Antidote (1) 290 | ["HUNK:B"] = 28, --28 Handgun Rounds (30) 291 | ["HUNK"] = 17, --17 First Aid Spray 292 | ["MIGUEL"] = 27, --27 Handgun Rounds (20) 293 | ["LUKE"] = 17, --17 First Aid Spray 294 | ["ARNOLD"] = 24, --24 Iron Pipe 295 | ["MATT"] = 24, --24 Iron Pipe 296 | ["BILLY"] = 18, --18 Recovery Pill (1) 297 | ["HARSH"] = 20, --20 Hemostat (1) 298 | ["PETER"] = 22, --22 Anti-virus (1) 299 | ["MARVIN"] = 20, --20 Hemostat (1) 300 | ["FRED"] = 15, --15 Mixed Herb (G+B) 301 | ["ANDY"] = 24, --24 Iron Pipe 302 | ["JEAN"] = 10, --10 Blue Herb 303 | ["TONY"] = 24, --24 Iron Pipe 304 | ["PATRICK"] = 14, --14 Mixed Herb (G+R) 305 | ["LLOYD"] = 15, --15 Mixed Herb (G+B) 306 | ["AUSTIN"] = 24, --24 Iron Pipe 307 | ["CLINT"] = 17, --17 First Aid Spray 308 | ["BONE"] = 16, --16 Mixed Herb (G+R+B) 309 | ["BOB"] = 25, --25 Handgun Rounds (10) 310 | ["NATHAN"] = 13, --13 Mixed Herb (G+G+G) 311 | ["SAMUEL"] = 24, --24 Iron Pipe 312 | ["WILL"] = 18, --18 Recovery Pill (1) 313 | ["ROGER"] = 12, --12 Mixed Herb (G+G) 314 | ["CARTER"] = 22, --22 Anti-virus (1) 315 | ["GREG"] = 23, --23 Anti-virus (3) 316 | ["FROST"] = 10, --10 Blue Herb 317 | ["FROST:B"] = 14, --14 Mixed Herb (G+R) 318 | ["JAKE"] = 16, --16 Mixed Herb (G+R+B) 319 | ["GARY"] = 17, --17 First Aid Spray 320 | ["RICHARD"] = 14, --14 Mixed Herb (G+R) 321 | ["MICKEY"] = 20, --20 Hemostat (1) 322 | ["AL"] = 18, --18 Recovery Pill (1) 323 | ["AXEMAN"] = 24, --24 Iron Pipe 324 | ["AXEMAN "] = 24, --24 Iron Pipe 325 | ["AL:B"] = 13, --13 Mixed Herb (G+G+G) 326 | ["BEN"] = 9, --9 Green Herb 327 | ["REGAN"] = 21, --21 Antidote (1) 328 | ["REGAN:B"] = 20, --20 Hemostat (1) 329 | ["MONICA"] = 16, --16 Mixed Herb (G+R+B) 330 | ["LINDA"] = 19, --19 Recovery Pill (3) 331 | ["RITA"] = 26, --26 Handgun Rounds (15) 332 | ["MARY"] = 18, --18 Recovery Pill (1) 333 | ["KATE"] = 12, --12 Mixed Herb (G+G) 334 | ["DANNY"] = 24, --24 Iron Pipe 335 | ["DANNY:B"] = 17, --17 First Aid Spray 336 | ["GILL"] = 15, --15 Mixed Herb (G+B) 337 | ["GILL:B"] = 14, --14 Mixed Herb (G+R) 338 | ["KEITH"] = 19, --19 Recovery Pill (3) 339 | ["KURT"] = 24, --24 Iron Pipe 340 | ["KURT:B"] = 20, --20 Hemostat (1) 341 | ["GARY:B"] = 24, --24 Iron Pipe 342 | ["AL:C"] = 13, --13 Mixed Herb (G+G+G) 343 | ["DOROTHY"] = 10, --10 Blue Herb 344 | ["YOKO:Z"] = 23, --23 Anti-virus (3) 345 | ["RAYMOND"] = 28, --28 Handgun Rounds (30) 346 | ["ARTHUR"] = 9, --9 Green Herb 347 | ["AARON"] = 26, --26 Handgun Rounds (15) 348 | ["DORIAN"] = 11, --11 Red Herb 349 | ["ELLIOTT"] = 24, --24 Iron Pipe 350 | ["ERIC"] = 27, --27 Handgun Rounds (20) 351 | ["HARRY"] = 15, --15 Mixed Herb (G+B) 352 | ["Mr.RED"] = 29, --29 None 353 | ["Mr.BLUE"] = 29, --29 None 354 | ["Mr.GREEN"] = 29, --29 None 355 | ["Mr.GOLD"] = 29, --29 None 356 | ["Mr.BLACK"] = 29, --29 None 357 | ["KARL"] = 17, --17 First Aid Spray 358 | ["DUSTIN"] = 26, --26 Handgun Rounds (15) 359 | ["DEREK"] = 24, --24 Iron Pipe 360 | ["Ms.WHITE"] = 29, --29 None 361 | ["Ms.PEACH"] = 29, --29 None 362 | ["Ms.WATER"] = 29, --29 None 363 | ["LEN"] = 19, --19 Recovery Pill (3) 364 | ["NICOLAS"] = 14, --14 Mixed Herb (G+R) 365 | ["SEAN"] = 24, --24 Iron Pipe 366 | ["PHILIP"] = 18, --18 Recovery Pill (1) 367 | ["DON"] = 25, --25 Handgun Rounds (10) 368 | ["MATTHEW"] = 24, --24 Iron Pipe 369 | ["ROBERT"] = 15, --15 Mixed Herb (G+B) 370 | ["CHUCK"] = 14, --14 Mixed Herb (G+R) 371 | ["GINGER"] = 12, --12 Mixed Herb (G+G) 372 | ["LAURA"] = 17, --17 First Aid Spray 373 | ["AMELIA"] = 11, --11 Red Herb 374 | ["ETHAN"] = 17, --17 First Aid Spray 375 | ["HOWARD"] = 21, --21 Antidote (1) 376 | ["ISAAC"] = 20, --20 Hemostat (1) 377 | ["KATHY"] = 16, --16 Mixed Herb (G+R+B) 378 | ["ELENA"] = 18, --18 Recovery Pill (1) 379 | ["FRANK"] = 23, --23 Anti-virus (3) 380 | ["RODNEY"] = 11, --11 Red Herb 381 | } 382 | 383 | function SheetInfo:getSheet() 384 | return self.sheet; 385 | end 386 | 387 | function SheetInfo:getFrameIndex(name) 388 | return self.frameIndex[name]; 389 | end 390 | 391 | return SheetInfo 392 | -------------------------------------------------------------------------------- /lua/roomnames.lua: -------------------------------------------------------------------------------- 1 | return 2 | { 3 | [""] = { 4 | [1]="in menus", 5 | }, 6 | ["outbreak"] = { 7 | [0]="Spawning/Scenario Cleared", 8 | [1]="J's Bar", 9 | [2]="Stairs Between 1F and 2F", 10 | [3]="Women's Bathroom", 11 | [4]="Men's Bathroom", 12 | [5]="Staff Room", 13 | [6]="Locker Room", 14 | [7]="Drawings Room", 15 | [8]="Owner's Room", 16 | [10]="Break Room", 17 | [11]="Liqour Room", 18 | [12]="Wine Room", 19 | [13]="Stairs Between 3F and Rooftop", 20 | [14]="Rooftop", 21 | [15]="Storage Room", 22 | [16]="Top Floor of The Apartment", 23 | [17]="1F of The Apartment", 24 | [18]="Infront of J's Bar", 25 | [19]="Behind The Apartment", 26 | [20]="Slope Along The Canal", 27 | [21]="Tunnel", 28 | [22]="Infront of Apple Inn", 29 | [23]="Behind The Residential Area", 30 | [24]="Footbridge", 31 | [25]="Main Street", 32 | }, 33 | ["below freezing point"] = { 34 | [0]="Spawning/Scenario Cleared", 35 | [1]="Underground Tunnel", 36 | [2]="Platform", 37 | [3]="B7F Experiments Room", 38 | [4]="B7F South Passway", 39 | [5]="B7F Chemical Disposal Room", 40 | [6]="B7F East Passway", 41 | [8]="B7F Chemical Storage", 42 | [9]="B6F Security Office", 43 | [10]="B6F South Passway", 44 | [13]="B6F East Passway", 45 | [15]="B6F Break Room", 46 | [17]="Lift", 47 | [18]="Turntable Car", 48 | [19]="B5F Passway of Area B", 49 | [20]="B5F Computer Room", 50 | [21]="B5F Emergency Passage", 51 | [22]="B5F Passway of Area C", 52 | [23]="B4F Turn Table", 53 | [24]="Main Shaft", 54 | [25]="B4F Passway of West Area", 55 | [26]="Duct", 56 | [27]="B4F Passway of East Area", 57 | [28]="B4F Low Temperature Experimental Room", 58 | [30]="B4F Culture Room", 59 | [32]="Marshaling yard", 60 | }, 61 | ["the hive"] = { 62 | [0]="Spawning/Scenario Cleared", 63 | [2]="1F Passway", 64 | [3]="Night Reception", 65 | [4]="Hall", 66 | [5]="Office", 67 | [6]="Doctor Station", 68 | [7]="Central Waiting Room", 69 | [8]="Room 301", 70 | [9]="3F Passway", 71 | [10]="Room 302", 72 | [11]="Nurse Center", 73 | [12]="Examination Room", 74 | [13]="Treatment Room", 75 | [14]="Locker Room", 76 | [16]="2F Nurse Station", 77 | [22]="2F Passway", 78 | [24]="Room 202", 79 | [25]="B1F Passway", 80 | [26]="EV. Control Room", 81 | [27]="B1F Reposing Room", 82 | [28]="B1F South Passway", 83 | [29]="Waste Liquid Disposal Room", 84 | [30]="B2F Passway", 85 | [31]="Experiment Room", 86 | [32]="Fixed Temperature Experiment Room", 87 | [33]="Underpass Entrance", 88 | [34]="Rooftop", 89 | }, 90 | ["hellfire"] = { 91 | [0]="Spawning/Scenario Cleared", 92 | [27]="Apple Inn Square", 93 | [28]="Boiler Room", 94 | [29]="Corridor", 95 | [30]="Room 101", 96 | [31]="North West Passage 1", 97 | [32]="Owner's Room", 98 | [33]="Power Supply Room", 99 | [34]="Lounge Stairs", 100 | [35]="Apple Inn Front Lobby", 101 | [36]="Room 102", 102 | [37]="Room 103", 103 | [38]="Room 104", 104 | [40]="Room 201", 105 | [41]="North West Passage 2", 106 | [42]="Store Room", 107 | [43]="Security Office", 108 | [44]="Room 202", 109 | [45]="Room 204", 110 | [46]="Boiler Management Office", 111 | [47]="North West Passage 3", 112 | [48]="Room 301", 113 | [49]="Linen Room", 114 | [50]="Room 30*", 115 | [51]="Room 306", 116 | }, 117 | ["decisions,decisions"] = { 118 | [0]="Spawning/Scenario Cleared", 119 | [1]="West Waterway", 120 | [2]="East Waterway", 121 | [3]="Access Way A", 122 | [4]="Shed", 123 | [5]="Waterwork Administration Office", 124 | [6]="Water Tank", 125 | [7]="Access Way B", 126 | [8]="Underground Tunnel", 127 | [9]="Restroom", 128 | [10]="Water Purifying Facility", 129 | [11]="Quality Assurance Testing Room", 130 | [36]="B4F Corridor", 131 | [37]="Access Waterway", 132 | [38]="Old Subway Rail Siding", 133 | [50]="Old Subway Tunnel", 134 | [51]="South Car", 135 | [52]="North Car", 136 | [54]="T-Shaped Passway", 137 | [55]="Control Room", 138 | [56]="Underground Management Office", 139 | [57]="Spare Power Supply Room", 140 | [58]="Store Room", 141 | [59]="Air Exhaust Tower Inside Wall", 142 | [60]="Air Exhaust Tower Access Way", 143 | [61]="Air Exhaust Tower Lower Part", 144 | [62]="Air Exhaust Tower Elevator", 145 | [63]="Air Exhaust Tower B1 Level", 146 | [65]="Air Exhaust Tower Station", 147 | [70]="Back Square", 148 | [71]="Pier", 149 | [72]="Unloading Passage", 150 | [73]="Canal", 151 | [74]="Front Square", 152 | [76]="B2F Passage Elevator", 153 | [77]="Study Room", 154 | [78]="1F Elevator Passway", 155 | [80]="Entrance Hall", 156 | [81]="Students Affairs Office", 157 | [82]="General Manager's Room", 158 | [83]="Waiting Room", 159 | [84]="1F Passage A", 160 | [85]="1F Passage B", 161 | [86]="Testing Passage A", 162 | [87]="President Room", 163 | [88]="Drawings Room", 164 | [89]="2F Passage", 165 | [91]="Art Safe Room", 166 | [93]="Testing Passage B", 167 | [94]="3F Passage Elavator", 168 | [95]="Experiments Preparation Room", 169 | [96]="Experiment Room", 170 | [97]="Machine Storage Room", 171 | [98]="Second Hall", 172 | }, 173 | ["training ground"] = { 174 | [0]="Spawning/Scenario Cleared", 175 | [1]="J's BAR", 176 | [2]="Stairs between 1F and 2F", 177 | [5]="Staff room", 178 | [11]="Liquor room", 179 | [13]="Stairs between 3F and the rooftop", 180 | [14]="Rooftop", 181 | }, 182 | ["wild things"] = { 183 | [0]="Spawning/Scenario Cleared", 184 | [1]="Elephant Restaurant", 185 | [2]="Back alley", 186 | [3]="In front of Elephant Restaurant", 187 | [4]="South Concourse", 188 | [5]="East Concourse", 189 | [6]="North Concourse", 190 | [7]="Office", 191 | [8]="Inner office", 192 | [12]="Elephant Stage", 193 | [14]="Connecting passage", 194 | [15]="Supply room", 195 | [16]="Terrarium Dome", 196 | [17]="Show animals' boarding house", 197 | [18]="Lakeside area", 198 | [19]="Path in front of Observation Deck", 199 | [21]="Observation deck", 200 | [23]="Service road", 201 | [24]="Show animals' boarding house", 202 | [25]="Stage", 203 | [26]="Front Gate Plaza", 204 | [27]="Front gate", 205 | }, 206 | ["underbelly"] = { 207 | [0]="Spawning/Scenario Cleared", 208 | [1]="West entrance", 209 | [2]="West ticket gate", 210 | [3]="West concourse", 211 | [4]="Storage room #2", 212 | [5]="Men's restroom (west)", 213 | [6]="Women's restroom (west)", 214 | [7]="Employee passage", 215 | [8]="Storage room", 216 | [9]="Control room", 217 | [10]="Breaker room", 218 | [11]="Break room", 219 | [12]="Women's staff restroom", 220 | [13]="Men's staff restroom", 221 | [15]="Stairwell", 222 | [16]="East entrance", 223 | [17]="East ticket gate", 224 | [18]="East concourse", 225 | [20]="Men's restroom (east)", 226 | [21]="Women's restroom (east)", 227 | [22]="B2F passage", 228 | [23]="Refuse dump", 229 | [24]="Pump room", 230 | [25]="Emergency power room", 231 | [29]="Underground emergency passage", 232 | [30]="Subway car", 233 | [31]="Platform", 234 | [32]="East tunnel", 235 | [33]="Ventilation tower", 236 | }, 237 | ["flashback"] = { 238 | [0]="Spawning/Scenario Cleared", 239 | [1]="In front of cabin", 240 | [2]="Cabin", 241 | [3]="Mountain path", 242 | [4]="Suspension bridge", 243 | [5]="Hospital back gate", 244 | [6]="Main building 1F hall", 245 | [7]="Reception office", 246 | [8]="Examination room", 247 | [9]="Auxilliary building 1F hall", 248 | [10]="Locker room", 249 | [11]="Auxilliary building North hall", 250 | [12]="Storage room", 251 | [14]="Pharmacy", 252 | [15]="Auxilliary building B1F hall", 253 | [16]="Intensive care unit", 254 | [17]="Main building 2F hall", 255 | [18]="Room 201", 256 | [19]="Room 202", 257 | [20]="Room 203", 258 | [21]="Administrator's office", 259 | [22]="Auxilliary building 2F hall", 260 | [23]="Auxilliary building 3F", 261 | [24]="Maintenance access route", 262 | [25]="Main building rooftop", 263 | [26]="Auxilliary building 5F", 264 | [27]="Auxilliary building rooftop", 265 | [29]="Big suspension bridge", 266 | [30]="River bank", 267 | }, 268 | ["desperate times"] = { 269 | [0]="Spawning/Scenario Cleared", 270 | [1]="Main Hall", 271 | [2]="Reception desk", 272 | [3]="Front Gate", 273 | [4]="1F lobby", 274 | [5]="East office", 275 | [6]="Stairwell", 276 | [7]="2F East hall", 277 | [8]="Rooftop", 278 | [9]="1F East hall", 279 | [10]="Night-duty room", 280 | [11]="B1F East hall", 281 | [12]="Autopsy room", 282 | [13]="Parking garage", 283 | [14]="B1F West hall", 284 | [15]="Kennel", 285 | [16]="Substation room", 286 | [18]="Holding cells", 287 | [20]="Hallway", 288 | [21]="Interrogation room", 289 | [23]="Parking garage ramp", 290 | [27]="Waiting room", 291 | }, 292 | ["end of the road"] = { 293 | [0]="Spawning/Scenario Cleared", 294 | [1]="Waiting room", 295 | [2]="Central Passage 1", 296 | [3]="Central Passage 2", 297 | [4]="West Passage", 298 | [5]="Central Passage 3", 299 | [6]="Laser Emission Room", 300 | [7]="Examination Room", 301 | [8]="Experimentation Chamber", 302 | [9]="Observation Mezzanine", 303 | [10]="Stairwell", 304 | [11]="Reference Room", 305 | [12]="East Passage 1", 306 | [13]="Mainframe", 307 | [14]="Central Passage 4", 308 | [15]="Special Research Room", 309 | [16]="East Passage 2", 310 | [17]="East Passage 3", 311 | [18]="Nursery", 312 | [19]="East Exit", 313 | [20]="Passage Infront of Elevator", 314 | [28]="Maintenance Passage 1", 315 | [29]="Floodgate Control Room", 316 | [30]="Underground Waterworks", 317 | [31]="Maintenance Room", 318 | [32]="Drainage Area", 319 | [37]="Maintenance Passage 2", 320 | [38]="Break Room", 321 | [39]="North Waterway", 322 | [45]="Emergency Materials Storage", 323 | [46]="Maintenance Passage 3", 324 | [48]="Old Waterway", 325 | [52]="Tunnel", 326 | [53]="Infront of Apple Inn", 327 | [54]="Behind The Residential Area", 328 | [55]="Footbridge", 329 | [56]="Main Street North", 330 | [57]="Main Street South", 331 | [58]="Construction Site", 332 | [59]="Under The Highway Overpass", 333 | [60]="Office Building Warehouse", 334 | [61]="Office Building 1F", 335 | [62]="Office Building Stairwell", 336 | [63]="Rooftop - Elevated Highway", 337 | [65]="Inside The Helicopter", 338 | [66]="Apple Inn Front Lobby", 339 | }, 340 | ["elimination 1"] = { 341 | [0]="Spawning/Scenario Cleared", 342 | [1]="University Entrance Hall", 343 | [2]="Room 30*", 344 | [3]="Office Building Warehouse", 345 | [4]="Zoo's Connecting Passage", 346 | [5]="Doctor Station", 347 | [6]="B7F South Passway", 348 | [7]="(Subway) Break Room", 349 | [8]="Lion Stage", 350 | [9]="RPD Rooftop", 351 | [10]="1F RPD East Hall", 352 | [11]="J's Bar Staff Rom", 353 | [12]="1F Abandoned Hospital", 354 | [13]="B6F Security Office", 355 | [14]="Pump Room", 356 | [15]="Experimentation Chamber", 357 | [16]="T-Shaped Passway", 358 | [17]="Security Office", 359 | [18]="Cabin", 360 | }, 361 | ["elimination 2"] = { 362 | [0]="Spawning/Scenario Cleared", 363 | [1]="In front of Elephant Restaurant", 364 | [2]="Suspension Bridge", 365 | [3]="Main Street South", 366 | [4]="B7F Experiments Room", 367 | [5]="Raccoon Hospital 1F Passage ", 368 | [6]="J's Bar Rooftop", 369 | [7]="Hospital Back Gate", 370 | [8]="University's Access Way A", 371 | [9]="(Subway) East Concourse", 372 | [10]="J's Bar Stairwell", 373 | [11]="Apple Inn's North West Passage 3", 374 | [12]="Lakeside Area", 375 | [13]="B5F Passway of Area B", 376 | [14]="RPD's Front Gate", 377 | [15]="Owner's Room", 378 | }, 379 | ["elimination 3"] = { 380 | [0]="Spawning/Scenario Cleared", 381 | [1]="J's Bar", 382 | [2]="Abandoned Hospital's Reception Office", 383 | [3]="Path Infront of Observation Deck", 384 | [4]="Apple Inn Square", 385 | [5]="North Car", 386 | [6]="B2F Stairwell", 387 | [7]="Show Animals' Boarding House", 388 | [8]="RPD's East Office", 389 | [9]="B6F East Passway", 390 | [10]="Stairwell to Observation Mezzanine", 391 | [11]="Underground Tunnel", 392 | [12]="Examination Room", 393 | [13]="Subway's B2F Passage", 394 | [14]="Abandon Hospital's Locker Room", 395 | [15]="Main Shaft", 396 | [16]="1F of The Apartment", 397 | [17]="Parking garage", 398 | [18]="Drainage Area", 399 | [19]="Raccoon Hospital's Hall", 400 | [20]="Room 306", 401 | [21]="Pier", 402 | }, 403 | ["showdown 1"] = { 404 | [0]="Spawning/Scenario Cleared", 405 | }, 406 | ["showdown 2"] = { 407 | [0]="Spawning/Scenario Cleared", 408 | }, 409 | ["showdown 3"] = { 410 | [0]="Spawning/Scenario Cleared", 411 | }, 412 | } -------------------------------------------------------------------------------- /lua/uidata.lua: -------------------------------------------------------------------------------- 1 | -- 2 | -- created with TexturePacker - https://www.codeandweb.com/texturepacker 3 | -- 4 | -- $TexturePacker:SmartUpdate:0008ee9bb208482d3db1e09b5cf2162a:ef4541a4cf50611cf4b54976c7d4bbcb:c8d8c8a54373edb5b4f883463138266b$ 5 | -- 6 | -- local sheetInfo = require("mysheet") 7 | -- local myImageSheet = graphics.newImageSheet( "mysheet.png", sheetInfo:getSheet() ) 8 | -- local sprite = display.newSprite( myImageSheet , {frames={sheetInfo:getFrameIndex("sprite")}} ) 9 | -- 10 | 11 | local SheetInfo = {} 12 | 13 | SheetInfo.sheet = 14 | { 15 | frames = { 16 | 17 | { 18 | -- below freezing point 19 | x=830, 20 | y=784, 21 | width=256, 22 | height=192, 23 | 24 | }, 25 | { 26 | -- bustAlyssa 27 | x=0, 28 | y=0, 29 | width=256, 30 | height=256, 31 | 32 | }, 33 | { 34 | -- bustCindy 35 | x=0, 36 | y=256, 37 | width=256, 38 | height=256, 39 | 40 | }, 41 | { 42 | -- bustDavid 43 | x=0, 44 | y=512, 45 | width=256, 46 | height=256, 47 | 48 | }, 49 | { 50 | -- bustGeorge 51 | x=0, 52 | y=768, 53 | width=256, 54 | height=256, 55 | 56 | }, 57 | { 58 | -- bustJim 59 | x=0, 60 | y=1024, 61 | width=256, 62 | height=256, 63 | 64 | }, 65 | { 66 | -- bustKevin 67 | x=256, 68 | y=0, 69 | width=256, 70 | height=256, 71 | 72 | }, 73 | { 74 | -- bustMark 75 | x=512, 76 | y=0, 77 | width=256, 78 | height=256, 79 | 80 | }, 81 | { 82 | -- bustYoko 83 | x=768, 84 | y=0, 85 | width=256, 86 | height=256, 87 | 88 | }, 89 | { 90 | -- dead 91 | x=436, 92 | y=576, 93 | width=30, 94 | height=11, 95 | 96 | }, 97 | { 98 | -- decisions,decisions 99 | x=512, 100 | y=844, 101 | width=256, 102 | height=192, 103 | 104 | }, 105 | { 106 | -- desperate times 107 | x=1024, 108 | y=0, 109 | width=256, 110 | height=196, 111 | 112 | }, 113 | { 114 | -- elimination 1 115 | x=1024, 116 | y=196, 117 | width=256, 118 | height=196, 119 | 120 | }, 121 | { 122 | -- elimination 2 123 | x=256, 124 | y=256, 125 | width=256, 126 | height=196, 127 | 128 | }, 129 | { 130 | -- elimination 3 131 | x=512, 132 | y=256, 133 | width=256, 134 | height=196, 135 | 136 | }, 137 | { 138 | -- end of the road 139 | x=768, 140 | y=256, 141 | width=256, 142 | height=196, 143 | 144 | }, 145 | { 146 | -- equip 147 | x=946, 148 | y=452, 149 | width=39, 150 | height=15, 151 | 152 | }, 153 | { 154 | -- flashback 155 | x=1024, 156 | y=392, 157 | width=256, 158 | height=196, 159 | 160 | }, 161 | { 162 | -- healthmask 163 | x=436, 164 | y=560, 165 | width=95, 166 | height=16, 167 | 168 | }, 169 | { 170 | -- hellfire 171 | x=512, 172 | y=1036, 173 | width=256, 174 | height=192, 175 | 176 | }, 177 | { 178 | -- iconAlyssa 179 | x=256, 180 | y=560, 181 | width=20, 182 | height=20, 183 | 184 | }, 185 | { 186 | -- iconCindy 187 | x=276, 188 | y=560, 189 | width=20, 190 | height=20, 191 | 192 | }, 193 | { 194 | -- iconDavid 195 | x=296, 196 | y=560, 197 | width=20, 198 | height=20, 199 | 200 | }, 201 | { 202 | -- iconGeorge 203 | x=316, 204 | y=560, 205 | width=20, 206 | height=20, 207 | 208 | }, 209 | { 210 | -- iconJim 211 | x=336, 212 | y=560, 213 | width=20, 214 | height=20, 215 | 216 | }, 217 | { 218 | -- iconKevin 219 | x=356, 220 | y=560, 221 | width=20, 222 | height=20, 223 | 224 | }, 225 | { 226 | -- iconMark 227 | x=376, 228 | y=560, 229 | width=20, 230 | height=20, 231 | 232 | }, 233 | { 234 | -- iconNPC 235 | x=396, 236 | y=560, 237 | width=20, 238 | height=20, 239 | 240 | }, 241 | { 242 | -- iconYoko 243 | x=416, 244 | y=560, 245 | width=20, 246 | height=20, 247 | 248 | }, 249 | { 250 | -- invDouble 251 | x=256, 252 | y=452, 253 | width=210, 254 | height=108, 255 | 256 | }, 257 | { 258 | -- inventorymask 259 | x=834, 260 | y=488, 261 | width=96, 262 | height=98, 263 | 264 | }, 265 | { 266 | -- invSingle 267 | x=466, 268 | y=452, 269 | width=112, 270 | height=108, 271 | 272 | }, 273 | { 274 | -- invSpecial 275 | x=512, 276 | y=608, 277 | width=62, 278 | height=56, 279 | 280 | }, 281 | { 282 | -- ispecialmask 283 | x=531, 284 | y=560, 285 | width=46, 286 | height=48, 287 | 288 | }, 289 | { 290 | -- outbreak 291 | x=768, 292 | y=976, 293 | width=256, 294 | height=192, 295 | 296 | }, 297 | { 298 | -- showdown 1 299 | x=256, 300 | y=588, 301 | width=256, 302 | height=196, 303 | 304 | }, 305 | { 306 | -- showdown 2 307 | x=578, 308 | y=452, 309 | width=256, 310 | height=196, 311 | 312 | }, 313 | { 314 | -- showdown 3 315 | x=834, 316 | y=588, 317 | width=256, 318 | height=196, 319 | 320 | }, 321 | { 322 | -- statusbar 323 | x=834, 324 | y=452, 325 | width=112, 326 | height=36, 327 | 328 | }, 329 | { 330 | -- the hive 331 | x=1024, 332 | y=976, 333 | width=256, 334 | height=192, 335 | 336 | }, 337 | { 338 | -- training ground 339 | x=574, 340 | y=648, 341 | width=256, 342 | height=196, 343 | 344 | }, 345 | { 346 | -- underbelly 347 | x=256, 348 | y=784, 349 | width=256, 350 | height=196, 351 | 352 | }, 353 | { 354 | -- virus50 355 | x=512, 356 | y=576, 357 | width=15, 358 | height=15, 359 | 360 | }, 361 | { 362 | -- virus80 363 | x=512, 364 | y=591, 365 | width=15, 366 | height=15, 367 | 368 | }, 369 | { 370 | -- virus90 371 | x=985, 372 | y=452, 373 | width=15, 374 | height=15, 375 | 376 | }, 377 | { 378 | -- virusOK 379 | x=1000, 380 | y=452, 381 | width=15, 382 | height=15, 383 | 384 | }, 385 | { 386 | -- wild things 387 | x=256, 388 | y=980, 389 | width=256, 390 | height=196, 391 | 392 | }, 393 | { 394 | -- key 395 | x=946, 396 | y=467, 397 | width=20, 398 | height=20, 399 | 400 | }, 401 | { 402 | -- title bar 403 | x=768, 404 | y=1172, 405 | width=300, 406 | height=24, 407 | 408 | }, 409 | { 410 | -- slot bar 411 | x=768, 412 | y=1200, 413 | width=300, 414 | height=30, 415 | 416 | }, 417 | }, 418 | 419 | sheetContentWidth = 1280, 420 | sheetContentHeight = 1280 421 | } 422 | 423 | SheetInfo.frameIndex = 424 | { 425 | 426 | ["below freezing point"] = 1, 427 | ["bustAlyssa "] = 2, 428 | ["bustCindy "] = 3, 429 | ["bustDavid "] = 4, 430 | ["bustGeorge "] = 5, 431 | ["bustJim "] = 6, 432 | ["bustKevin "] = 7, 433 | ["bustMark "] = 8, 434 | ["bustYoko "] = 9, 435 | ["bustAlyssa"] = 2, 436 | ["bustCindy"] = 3, 437 | ["bustDavid"] = 4, 438 | ["bustGeorge"] = 5, 439 | ["bustJim"] = 6, 440 | ["bustKevin"] = 7, 441 | ["bustMark"] = 8, 442 | ["bustYoko"] = 9, 443 | ["dead"] = 10, 444 | ["decisions,decisions"] = 11, 445 | ["desperate times"] = 12, 446 | ["elimination 1"] = 13, 447 | ["elimination 2"] = 14, 448 | ["elimination 3"] = 15, 449 | ["end of the road"] = 16, 450 | ["equip"] = 17, 451 | ["flashback"] = 18, 452 | ["healthmask"] = 19, 453 | ["hellfire"] = 20, 454 | ["iconAlyssa"] = 21, 455 | ["iconCindy"] = 22, 456 | ["iconDavid"] = 23, 457 | ["iconGeorge"] = 24, 458 | ["iconJim"] = 25, 459 | ["iconKevin"] = 26, 460 | ["iconMark"] = 27, 461 | ["iconNPC"] = 28, 462 | ["iconYoko"] = 29, 463 | ["bustUnknown"] = 7, 464 | ["bustAL:B"] = 7, 465 | ["bustBILLY"] = 7, 466 | ["bustBONE"] = 7, 467 | ["bustCONRAD"] = 7, 468 | ["bustDANNY"] = 7, 469 | ["bustDANNY:B"] = 7, 470 | ["bustDUSTIN"] = 7, 471 | ["bustHUNK"] = 7, 472 | ["bustHUNK:B"] = 7, 473 | ["bustKARL"] = 7, 474 | ["bustLUKE"] = 7, 475 | ["bustMIGUEL"] = 7, 476 | ["bustMr.RED"] = 7, 477 | ["bustRAYMOND"] = 7, 478 | ["bustRODNEY"] = 7, 479 | ["bustAARON"] = 8, 480 | ["bustARNOLD"] = 8, 481 | ["bustAUSTIN"] = 8, 482 | ["bustAXEMAN"] = 8, 483 | ["bustBOB"] = 8, 484 | ["bustCLINT"] = 8, 485 | ["bustDON"] = 8, 486 | ["bustELLIOTT"] = 8, 487 | ["bustGILL"] = 8, 488 | ["bustGILL:B"] = 8, 489 | ["bustMARVIN"] = 8, 490 | ["bustMr.GOLD"] = 8, 491 | ["bustTONY"] = 8, 492 | ["bustANDY"] = 6, 493 | ["bustCHUCK"] = 6, 494 | ["bustDEREK"] = 6, 495 | ["bustJEAN"] = 6, 496 | ["bustKURT:B"] = 6, 497 | ["bustMATTHEW"] = 6, 498 | ["bustMICKEY"] = 6, 499 | ["bustMr.GREEN"] = 6, 500 | ["bustPETER"] = 6, 501 | ["bustSAMUEL"] = 6, 502 | ["bustWILL"] = 6, 503 | ["bustAL"] = 5, 504 | ["bustAL:C"] = 5, 505 | ["bustARTHUR"] = 5, 506 | ["bustCARTER"] = 5, 507 | ["bustDORIAN"] = 5, 508 | ["bustETHAN"] = 5, 509 | ["bustFRANK"] = 5, 510 | ["bustFRED"] = 5, 511 | ["bustFROST"] = 5, 512 | ["bustFROST:B"] = 5, 513 | ["bustGARY"] = 5, 514 | ["bustGARY:B"] = 5, 515 | ["bustGREG"] = 5, 516 | ["bustHARRY"] = 5, 517 | ["bustHARSH"] = 5, 518 | ["bustHOWARD"] = 5, 519 | ["bustISAAC"] = 5, 520 | ["bustJAKE"] = 5, 521 | ["bustKEITH"] = 5, 522 | ["bustKURT"] = 5, 523 | ["bustLEN"] = 5, 524 | ["bustMACDOWELL"] = 5, 525 | ["bustMATT"] = 5, 526 | ["bustMr.BLUE"] = 5, 527 | ["bustNICOLAS"] = 5, 528 | ["bustPATRICK"] = 5, 529 | ["bustRICHARD"] = 5, 530 | ["bustSEAN"] = 5, 531 | ["bustBEN"] = 4, 532 | ["bustERIC"] = 4, 533 | ["bustLLOYD"] = 4, 534 | ["bustAXEMAN "] = 4, 535 | ["bustMr.BLACK"] = 4, 536 | ["bustNATHAN"] = 4, 537 | ["bustPHILIP"] = 4, 538 | ["bustROBERT"] = 4, 539 | ["bustRODRIGUEZ"] = 4, 540 | ["bustROGER"] = 4, 541 | ["bustELENA"] = 2, 542 | ["bustKATE"] = 2, 543 | ["bustLAURA"] = 2, 544 | ["bustMONICA"] = 2, 545 | ["bustMs.WHITE"] = 2, 546 | ["bustREGAN"] = 2, 547 | ["bustRITA"] = 2, 548 | ["bustYOKO:Z"] = 9, 549 | ["bustAMELIA"] = 9, 550 | ["bustMs.PEACH"] = 9, 551 | ["bustREGAN:B"] = 9, 552 | ["bustDOROTHY"] = 3, 553 | ["bustGINGER"] = 3, 554 | ["bustKATHY"] = 3, 555 | ["bustLINDA"] = 3, 556 | ["bustMARY"] = 3, 557 | ["bustMs.WATER"] = 3, 558 | ["invDouble"] = 30, 559 | ["inventorymask"] = 31, 560 | ["invSingle"] = 32, 561 | ["invSpecial"] = 33, 562 | ["ispecialmask"] = 34, 563 | ["outbreak"] = 35, 564 | ["showdown 1"] = 36, 565 | ["showdown 2"] = 37, 566 | ["showdown 3"] = 38, 567 | ["statusbar"] = 39, 568 | ["the hive"] = 40, 569 | ["training ground"] = 41, 570 | ["underbelly"] = 42, 571 | ["virus50"] = 43, 572 | ["virus80"] = 44, 573 | ["virus90"] = 45, 574 | ["virusOK"] = 46, 575 | ["wild things"] = 47, 576 | ["key"] = 48, 577 | ["title bar"] = 49, 578 | ["slot bar"] = 50, 579 | } 580 | 581 | function SheetInfo:getSheet() 582 | return self.sheet; 583 | end 584 | 585 | function SheetInfo:getFrameIndex(name) 586 | return self.frameIndex[name]; 587 | end 588 | 589 | return SheetInfo 590 | -------------------------------------------------------------------------------- /run.bat: -------------------------------------------------------------------------------- 1 | cd love2d 2 | del luaoutbreaktracker.dll 3 | cd .. 4 | cd clib/build 5 | gcc -m32 -shared -L./lib -I./include -llua51 ../main.c -o ../../love2d/luaoutbreaktracker.dll 6 | cd ../../love2d 7 | love ../lua 8 | -------------------------------------------------------------------------------- /run2.bat: -------------------------------------------------------------------------------- 1 | cd love2d 2 | love ../lua 3 | pause --------------------------------------------------------------------------------