summaryrefslogtreecommitdiff
path: root/Remove-Artificial-Save-Delay.md
blob: acb02587ecf80a0c37f9d9ce038c42e50772d5aa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
Pokemon Red saves quicker than Pokemon Crystal on its own. However, it, like Crystal, uses an artificial delay. This is a much simpler fix than Pokemon Crystal's, and here it is: 

Open up [engine/menus/save.asm](https://github.com/pret/pokered/blob/master/engine/menus/save.asm#L140) and scroll down to about line 140, and you will have to change these lines: 

```diff
SaveSAV: 
...

.save
	call SaveSAVtoSRAM
	coord hl, 1, 13
	lb bc, 4, 18
	call ClearScreenArea
	coord hl, 1, 14
-	ld de, NowSavingString
-	call PlaceString
-	ld c, 120
-	call DelayFrames
	ld hl, GameSavedText
	call PrintText
	ld a, SFX_SAVE
	call PlaySoundWaitForCurrent
	call WaitForSoundToFinish
-	ld c, 30
+	ld c, 10 ; Shorter time than before
	jp DelayFrames

-NowSavingString:
-	db "Now saving...@"

SaveSAVConfirm:
	call PrintText
	coord hl, 0, 7
...
```
What that does is it removes the part of the code where the "Now saving..." text is drawn, as well as removing the delay during which that text is displayed. It also shortens the delay for after it says "Player saved the game!"

Also, you could edit [engine/menus/main_menu.asm](https://github.com/pret/pokered/blob/master/engine/menus/main_menu.asm#L392), line 392:
```diff
	ld [H_AUTOBGTRANSFERENABLED], a
-	ld c, 30
+	ld c, 5 ; shorter time while displaying stats
	jp DelayFrames
```
This part makes the game pause for a shorter time after displaying player stats before it saves. If you feel like this time is too short, you can change that 5 we added into a higher number. 

Optionally, if you want to remove the "Would you like to save the game?" part, you could also remove these: 

[engine/menus/save.asm](https://github.com/pret/pokered/blob/master/engine/menus/save.asm#L142):
```diff

SaveSAV: 
	farcall PrintSaveScreenText
-	ld hl, WouldYouLikeToSaveText
-	call SaveSAVConfirm
-	and a   ;|0 = Yes|1 = No|
-	ret nz
	ld a, [wSaveFileStatus]
	dec a
```
along with [this](https://github.com/pret/pokered/blob/master/engine/menus/save.asm#L182) (line 182): 
```diff
-WouldYouLikeToSaveText:
-	TX_FAR _WouldYouLikeToSaveText
-	db "@"
```
and [data/text/text_3.asm](https://github.com/pret/pokered/blob/master/data/text/text_3.asm#L6) (line 6):
```diff
-_WouldYouLikeToSaveText::
-	text "Would you like to"
-	line "SAVE the game?"
-	done
```
This optional change completely removes the "Would you like to SAVE the game?" choice, as well as the text and text pointer for it. 

Done! The game should save quickly without going through that useless menu. Enjoy!