SBird1337 hace 7 años
padre
commit
294212287c
Se han modificado 2 ficheros con 168 adiciones y 8 borrados
  1. 154
    0
      nbproject/private/configurations.xml
  2. 14
    8
      src/specials/trainer_battle.c

+ 154
- 0
nbproject/private/configurations.xml Ver fichero

@@ -4272,6 +4272,159 @@
4272 4272
           </df>
4273 4273
         </df>
4274 4274
         <df name="trainer_sprites">
4275
+          <in>ts_0000.s</in>
4276
+          <in>ts_0001.s</in>
4277
+          <in>ts_0002.s</in>
4278
+          <in>ts_0003.s</in>
4279
+          <in>ts_0004.s</in>
4280
+          <in>ts_0005.s</in>
4281
+          <in>ts_0006.s</in>
4282
+          <in>ts_0007.s</in>
4283
+          <in>ts_0008.s</in>
4284
+          <in>ts_0009.s</in>
4285
+          <in>ts_0010.s</in>
4286
+          <in>ts_0011.s</in>
4287
+          <in>ts_0012.s</in>
4288
+          <in>ts_0013.s</in>
4289
+          <in>ts_0014.s</in>
4290
+          <in>ts_0015.s</in>
4291
+          <in>ts_0016.s</in>
4292
+          <in>ts_0017.s</in>
4293
+          <in>ts_0018.s</in>
4294
+          <in>ts_0019.s</in>
4295
+          <in>ts_0020.s</in>
4296
+          <in>ts_0021.s</in>
4297
+          <in>ts_0022.s</in>
4298
+          <in>ts_0023.s</in>
4299
+          <in>ts_0024.s</in>
4300
+          <in>ts_0025.s</in>
4301
+          <in>ts_0026.s</in>
4302
+          <in>ts_0027.s</in>
4303
+          <in>ts_0028.s</in>
4304
+          <in>ts_0029.s</in>
4305
+          <in>ts_0030.s</in>
4306
+          <in>ts_0031.s</in>
4307
+          <in>ts_0032.s</in>
4308
+          <in>ts_0033.s</in>
4309
+          <in>ts_0034.s</in>
4310
+          <in>ts_0035.s</in>
4311
+          <in>ts_0036.s</in>
4312
+          <in>ts_0037.s</in>
4313
+          <in>ts_0038.s</in>
4314
+          <in>ts_0039.s</in>
4315
+          <in>ts_0040.s</in>
4316
+          <in>ts_0041.s</in>
4317
+          <in>ts_0042.s</in>
4318
+          <in>ts_0043.s</in>
4319
+          <in>ts_0044.s</in>
4320
+          <in>ts_0045.s</in>
4321
+          <in>ts_0046.s</in>
4322
+          <in>ts_0047.s</in>
4323
+          <in>ts_0048.s</in>
4324
+          <in>ts_0049.s</in>
4325
+          <in>ts_0050.s</in>
4326
+          <in>ts_0051.s</in>
4327
+          <in>ts_0052.s</in>
4328
+          <in>ts_0053.s</in>
4329
+          <in>ts_0054.s</in>
4330
+          <in>ts_0055.s</in>
4331
+          <in>ts_0056.s</in>
4332
+          <in>ts_0057.s</in>
4333
+          <in>ts_0058.s</in>
4334
+          <in>ts_0059.s</in>
4335
+          <in>ts_0060.s</in>
4336
+          <in>ts_0061.s</in>
4337
+          <in>ts_0062.s</in>
4338
+          <in>ts_0063.s</in>
4339
+          <in>ts_0064.s</in>
4340
+          <in>ts_0065.s</in>
4341
+          <in>ts_0066.s</in>
4342
+          <in>ts_0067.s</in>
4343
+          <in>ts_0068.s</in>
4344
+          <in>ts_0069.s</in>
4345
+          <in>ts_0070.s</in>
4346
+          <in>ts_0071.s</in>
4347
+          <in>ts_0072.s</in>
4348
+          <in>ts_0073.s</in>
4349
+          <in>ts_0074.s</in>
4350
+          <in>ts_0075.s</in>
4351
+          <in>ts_0076.s</in>
4352
+          <in>ts_0077.s</in>
4353
+          <in>ts_0078.s</in>
4354
+          <in>ts_0079.s</in>
4355
+          <in>ts_0080.s</in>
4356
+          <in>ts_0081.s</in>
4357
+          <in>ts_0082.s</in>
4358
+          <in>ts_0083.s</in>
4359
+          <in>ts_0084.s</in>
4360
+          <in>ts_0085.s</in>
4361
+          <in>ts_0086.s</in>
4362
+          <in>ts_0087.s</in>
4363
+          <in>ts_0088.s</in>
4364
+          <in>ts_0089.s</in>
4365
+          <in>ts_0090.s</in>
4366
+          <in>ts_0091.s</in>
4367
+          <in>ts_0092.s</in>
4368
+          <in>ts_0093.s</in>
4369
+          <in>ts_0094.s</in>
4370
+          <in>ts_0095.s</in>
4371
+          <in>ts_0096.s</in>
4372
+          <in>ts_0097.s</in>
4373
+          <in>ts_0098.s</in>
4374
+          <in>ts_0099.s</in>
4375
+          <in>ts_0100.s</in>
4376
+          <in>ts_0101.s</in>
4377
+          <in>ts_0102.s</in>
4378
+          <in>ts_0103.s</in>
4379
+          <in>ts_0104.s</in>
4380
+          <in>ts_0105.s</in>
4381
+          <in>ts_0106.s</in>
4382
+          <in>ts_0107.s</in>
4383
+          <in>ts_0108.s</in>
4384
+          <in>ts_0109.s</in>
4385
+          <in>ts_0110.s</in>
4386
+          <in>ts_0111.s</in>
4387
+          <in>ts_0112.s</in>
4388
+          <in>ts_0113.s</in>
4389
+          <in>ts_0114.s</in>
4390
+          <in>ts_0115.s</in>
4391
+          <in>ts_0116.s</in>
4392
+          <in>ts_0117.s</in>
4393
+          <in>ts_0118.s</in>
4394
+          <in>ts_0119.s</in>
4395
+          <in>ts_0120.s</in>
4396
+          <in>ts_0121.s</in>
4397
+          <in>ts_0122.s</in>
4398
+          <in>ts_0123.s</in>
4399
+          <in>ts_0124.s</in>
4400
+          <in>ts_0125.s</in>
4401
+          <in>ts_0126.s</in>
4402
+          <in>ts_0127.s</in>
4403
+          <in>ts_0128.s</in>
4404
+          <in>ts_0129.s</in>
4405
+          <in>ts_0130.s</in>
4406
+          <in>ts_0131.s</in>
4407
+          <in>ts_0132.s</in>
4408
+          <in>ts_0133.s</in>
4409
+          <in>ts_0134.s</in>
4410
+          <in>ts_0135.s</in>
4411
+          <in>ts_0136.s</in>
4412
+          <in>ts_0137.s</in>
4413
+          <in>ts_0138.s</in>
4414
+          <in>ts_0139.s</in>
4415
+          <in>ts_0140.s</in>
4416
+          <in>ts_0141.s</in>
4417
+          <in>ts_0142.s</in>
4418
+          <in>ts_0143.s</in>
4419
+          <in>ts_0144.s</in>
4420
+          <in>ts_0145.s</in>
4421
+          <in>ts_0146.s</in>
4422
+          <in>ts_0147.s</in>
4423
+          <in>ts_0148.s</in>
4424
+          <in>ts_0149.s</in>
4425
+          <in>ts_0150.s</in>
4426
+          <in>ts_0151.s</in>
4427
+          <in>ts_0152.s</in>
4275 4428
         </df>
4276 4429
       </df>
4277 4430
       <df name="object">
@@ -5576,6 +5729,7 @@
5576 5729
           <in>var_hook.S</in>
5577 5730
         </df>
5578 5731
         <df name="specials">
5732
+          <in>.#trainer_battle.c</in>
5579 5733
           <in>camera_move.c</in>
5580 5734
           <in>camera_move.h</in>
5581 5735
           <in>custom_specials.c</in>

+ 14
- 8
src/specials/trainer_battle.c Ver fichero

@@ -114,7 +114,6 @@ u16 tb_modify_flag_id(u16 flag)
114 114
         case 2:
115 115
             return flag + 2;
116 116
     }
117
-    assert(0);
118 117
     return 0;
119 118
 }
120 119
 
@@ -229,9 +228,8 @@ void* tb_configure_by_script(void* ptr_script)
229 228
             trainerbattle_next_scr_cmd = ptr_script;
230 229
             battle_80801F0_something();
231 230
             return (void*) (0x081A4EE9); /* some script to execute */
232
-        case 5:
233
-            assert(0);
234
-            return NULL;
231
+            
232
+            //this will merge case 5 with default which might not be as intended
235 233
         case 6:
236 234
         case 8:
237 235
             trainerbattle_battle_type = load_byte(ptr_script);
@@ -258,11 +256,14 @@ void* tb_configure_by_script(void* ptr_script)
258 256
             trainerbattle_next_scr_cmd = ptr_script;
259 257
             battle_80801F0_something();
260 258
             return (void*) (0x081A4EE9); /* some script to execute */
261
-        case 7:
262
-            assert(0);
263
-            return NULL;
259
+            
260
+            //this will merge case 7 with default
264 261
         case 9:
265 262
             /* WIN / LOSE resume script */
263
+            
264
+            trainerbattle_battle_type = load_byte(ptr_script);
265
+            ptr_script++;
266
+            
266 267
             trainerbattle_flag_id = tb_modify_flag_id(load_hword(ptr_script));
267 268
             ptr_script += 2;
268 269
             
@@ -282,7 +283,12 @@ void* tb_configure_by_script(void* ptr_script)
282 283
             trainerbattle_message_4 = NULL;
283 284
             
284 285
             trainerbattle_next_scr_cmd = ptr_script;
285
-            return (void*) 0x081A4F21; /* some script to execute */
286
+            
287
+            battle_80801F0_something();
288
+            
289
+            /* one method call is missing here */
290
+            
291
+            return (void*) (0x081A4EC1); /* some script to execute */
286 292
         default:
287 293
             trainerbattle_battle_type = load_byte(ptr_script);
288 294
             ptr_script++;