From 9b53e239ef61a3de753f5a26c5ff76da1049a80f Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Mon, 15 Nov 2021 23:28:32 -0500 Subject: [PATCH] peasant: hook up table compression to a lot of the dialog does seem to be a net win --- games/peasant/dialog_cliff.s | 3 ++- games/peasant/dialog_inn.s | 3 ++- games/peasant/dialog_inside.s | 3 ++- games/peasant/dialog_peasant1.s | 3 ++- games/peasant/dialog_peasant3.s | 3 ++- games/peasant/dialog_peasant4.s | 3 ++- games/peasant/text/Makefile | 31 ++++++++++++++++++++++++++++++- games/peasant/text/NOTES | 14 ++++++-------- games/peasant/text/kerrek.inc | 26 +++++++++++++------------- 9 files changed, 61 insertions(+), 28 deletions(-) diff --git a/games/peasant/dialog_cliff.s b/games/peasant/dialog_cliff.s index 60be582d..bb8f6fc0 100644 --- a/games/peasant/dialog_cliff.s +++ b/games/peasant/dialog_cliff.s @@ -1 +1,2 @@ -.include "text/cliff.inc" +.include "text/lookup.inc" +.include "text/cliff.inc.lookup" diff --git a/games/peasant/dialog_inn.s b/games/peasant/dialog_inn.s index 36084029..d9ca866b 100644 --- a/games/peasant/dialog_inn.s +++ b/games/peasant/dialog_inn.s @@ -1,2 +1,3 @@ -.include "text/inn.inc" +.include "text/lookup.inc" +.include "text/inn.inc.lookup" diff --git a/games/peasant/dialog_inside.s b/games/peasant/dialog_inside.s index 9ec5f1c0..41c830ef 100644 --- a/games/peasant/dialog_inside.s +++ b/games/peasant/dialog_inside.s @@ -1,2 +1,3 @@ -.include "text/inside.inc" +.include "text/lookup.inc" +.include "text/inside.inc.lookup" diff --git a/games/peasant/dialog_peasant1.s b/games/peasant/dialog_peasant1.s index 8201f00d..8d3b8d15 100644 --- a/games/peasant/dialog_peasant1.s +++ b/games/peasant/dialog_peasant1.s @@ -1,2 +1,3 @@ -.include "text/peasant1.inc" +.include "text/lookup.inc" +.include "text/peasant1.inc.lookup" diff --git a/games/peasant/dialog_peasant3.s b/games/peasant/dialog_peasant3.s index b191aaea..815e896f 100644 --- a/games/peasant/dialog_peasant3.s +++ b/games/peasant/dialog_peasant3.s @@ -1,2 +1,3 @@ -.include "text/peasant3.inc" +.include "text/lookup.inc" +.include "text/peasant3.inc.lookup" diff --git a/games/peasant/dialog_peasant4.s b/games/peasant/dialog_peasant4.s index 3348b84c..2c531d53 100644 --- a/games/peasant/dialog_peasant4.s +++ b/games/peasant/dialog_peasant4.s @@ -1 +1,2 @@ -.include "text/peasant4.inc" +.include "text/lookup.inc" +.include "text/peasant4.inc.lookup" diff --git a/games/peasant/text/Makefile b/games/peasant/text/Makefile index c87b2b09..0d4e23a0 100644 --- a/games/peasant/text/Makefile +++ b/games/peasant/text/Makefile @@ -1,13 +1,42 @@ CC = gcc CFLAGS = -O2 -Wall -g -all: dump_text shrink_text peasant2.inc.lookup +all: dump_text shrink_text \ + peasant1.inc.lookup \ + peasant2.inc.lookup \ + peasant3.inc.lookup \ + peasant4.inc.lookup \ + kerrek.inc.lookup \ + inside.inc.lookup \ + inn.inc.lookup \ + cliff.inc.lookup ### +cliff.inc.lookup: cliff.inc shrink_text + ./shrink_text < cliff.inc > cliff.inc.lookup + +inn.inc.lookup: inn.inc shrink_text + ./shrink_text < inn.inc > inn.inc.lookup + +inside.inc.lookup: inside.inc shrink_text + ./shrink_text < inside.inc > inside.inc.lookup + +peasant1.inc.lookup: peasant1.inc shrink_text + ./shrink_text < peasant1.inc > peasant1.inc.lookup + peasant2.inc.lookup: peasant2.inc shrink_text ./shrink_text < peasant2.inc > peasant2.inc.lookup +peasant3.inc.lookup: peasant3.inc shrink_text + ./shrink_text < peasant3.inc > peasant3.inc.lookup + +peasant4.inc.lookup: peasant4.inc shrink_text + ./shrink_text < peasant4.inc > peasant4.inc.lookup + +kerrek.inc.lookup: kerrek.inc shrink_text + ./shrink_text < kerrek.inc > kerrek.inc.lookup + ### diff --git a/games/peasant/text/NOTES b/games/peasant/text/NOTES index 811e55b4..61072087 100644 --- a/games/peasant/text/NOTES +++ b/games/peasant/text/NOTES @@ -1,13 +1,11 @@ orig lzsa word wordlzsa ==== ==== ==== ==== -cliff 2836 1801 -inn 3815 2251 -inside 7213 4111 -peasant1 7465 4234 +cliff 2836 1801 2209 1656 +inn 3815 2251 2926 2105 +inside 7213 4111 5645 3891 +peasant1 7758 4313 6564 4286 peasant2 7439 4269 5807 4055 -peasant3 6229 3599 -peasant4 6819 3947 +peasant3 6229 3599 4837 3379 +peasant4 7112 4023 5991 3997 -not peasant1/peasant4 has some of the kerrek text commented out -so it would fit diff --git a/games/peasant/text/kerrek.inc b/games/peasant/text/kerrek.inc index 8874a927..d0309d4b 100644 --- a/games/peasant/text/kerrek.inc +++ b/games/peasant/text/kerrek.inc @@ -58,23 +58,23 @@ kerrek_look_at_message: .byte "just go, ",34,"Yay! Piggies!",34,0 ; + look (dead Kerrek) -;.byte "There are large hoof prints",13 -;.byte "in the grass here.",13 -;.byte "There is a large",13 -;.byte "Kerrek-shaped mound on the",13 -;.byte "grass.",0 +.byte "There are large hoof prints",13 +.byte "in the grass here.",13 +.byte "There is a large",13 +.byte "Kerrek-shaped mound on the",13 +.byte "grass.",0 ; + look (rotting Kerrek) -;.byte "There are large hoof prints",13 -;.byte "in the grass here. Part",13 -;.byte "of the ground looks just",13 -;.byte "like a rotting kerrek.",0 +.byte "There are large hoof prints",13 +.byte "in the grass here. Part",13 +.byte "of the ground looks just",13 +.byte "like a rotting kerrek.",0 ; + look (skeletal Kerrek) -;.byte "There are large hoof prints",13 -;.byte "in the grass here.",13 -;.byte "Looks like someone left",13 -;.byte "their spare bones here.",0 +.byte "There are large hoof prints",13 +.byte "in the grass here.",13 +.byte "Looks like someone left",13 +.byte "their spare bones here.",0 ; + buy kerrek a cold one (in the Kerrek's domain while he's still alive) ; (Warning: This speeds the Kerrek up, so be careful.)