Browse Source

fix some issues with map numbers and teleport effects

master
Alison Watson 11 months ago
parent
commit
9d7f2fbfc0
10 changed files with 25 additions and 33 deletions
  1. BIN
      pk7/acs/lithmain.bin
  2. +2
    -2
      pk7/mapinfo.txt
  3. +1
    -1
      pk7_ep1/lfiles/Dialogue_M1A1.txt
  4. +2
    -2
      pk7_ep1/mapinfo.txt
  5. +5
    -4
      source/d_vm.c
  6. +2
    -4
      source/include/p_player.h
  7. +4
    -5
      source/include/w_world.h
  8. +1
    -1
      source/p_player.c
  9. +7
    -13
      source/p_render.c
  10. +1
    -1
      source/w_world.c

BIN
pk7/acs/lithmain.bin View File


+ 2
- 2
pk7/mapinfo.txt View File

@@ -149,14 +149,14 @@ skill nightmare {
}

map TITLEMAP "Lithium Title" {
LevelNum = 18883001
LevelNum = 1888001
Sky1 = "LITHSKRD", 0.05
Sky2 = "LITHSKS1"
DoubleSky
}

map TESTMAP "Test Map" {
LevelNum = 18883000
LevelNum = 1888000
Music = "lmusic/dandalins story.it"
Next = 1
Sky1 = "LITHBGS4", 0.1


+ 1
- 1
pk7_ep1/lfiles/Dialogue_M1A1.txt View File

@@ -66,7 +66,7 @@ unfinished {
logoff "UAC" text UAC
}

teleport_interlevel 442
teleport_interlevel 102
}

/* EOF */

+ 2
- 2
pk7_ep1/mapinfo.txt View File

@@ -10,7 +10,7 @@
/* Maps -------------------------------------------------------------------- */

map M1A1 "Begin The Begin" {
LevelNum = 18883101
LevelNum = 1888101
Sky1 = "LITHN16S"
Music = "lmusic/M1A1.ogg"

@@ -18,7 +18,7 @@ map M1A1 "Begin The Begin" {
}

map M1A2 "The Ash Is Burning" {
LevelNum = 18883102
LevelNum = 1888102
Music = "lmusic/M1A2.ogg"
}



+ 5
- 4
source/d_vm.c View File

@@ -514,16 +514,17 @@ static void ActSCRIPT_S(struct player *p) {

alloc_aut(0) sync static
void ActTELEPORT_INTERLEVEL(struct player *p) {
u32 tag = MemB2_G(VAR_ADRL);
i32 tag = MemB2_G(VAR_ADRL);

ACS_Delay(5);
P_TeleportOut(p);
ACS_Teleport_NewMap(tag | LithMapMagic, 0, 0);
P_TeleportOut(p, tag + LithMapBeg);

SetVA(ACT_HALT);
}

alloc_aut(0) sync static
void ActTELEPORT_INTRALEVEL(struct player *p) {
u32 tag = MemB2_G(VAR_ADRL);
i32 tag = MemB2_G(VAR_ADRL);

ACS_Delay(5);
ACS_Teleport(0, tag, false);


+ 2
- 4
source/include/p_player.h View File

@@ -97,10 +97,8 @@ script extern void P_Wep_PTick (struct player *p);
script extern void P_Upg_PTickPst(struct player *p);
extern void P_Ren_PTickPst(struct player *p);

sync void P_TeleportIn(struct player *p);
sync void P_TeleportOut(struct player *p);
script void P_TeleportInAsync(struct player *p);
script void P_TeleportOutAsync(struct player *p);
script void P_TeleportIn (struct player *p);
sync void P_TeleportOut(struct player *p, i32 tag);

#ifndef NDEBUG
void P_Ren_Debug(struct player *p);


+ 4
- 5
source/include/w_world.h View File

@@ -26,12 +26,11 @@
#define Cluster ACS_GetLevelInfo(LEVELINFO_CLUSTERNUM)

/* Line 1888300 is used as a control line for mod features.
* Similarly, maps with a certain mask set in their map number are marked as
* Lithium maps.
* Similarly, maps in a certain range are marked as Lithium maps.
*/
#define LithMapLine 0x001CD02C
#define LithMapMagic 0x01202000
#define LithMapMask 0xFFFFFC00
#define LithMapLine 0x001CD02C
#define LithMapBeg 0x001CCF00
#define LithMapEnd 0x001CD2E7

#define GetFun() ACS_GetCVar(sc_fun)
#define SetFun(x) ACS_SetCVar(sc_fun, x)


+ 1
- 1
source/p_player.c View File

@@ -56,7 +56,7 @@ reinit:

P_bossText(p, ServCallI(sm_GetBossLevel));

if(p->teleportedout) P_TeleportInAsync(p);
if(p->teleportedout) P_TeleportIn(p);

while(p->active)
{


+ 7
- 13
source/p_render.c View File

@@ -65,7 +65,7 @@ void P_Ren_PTickPst(struct player *p) {
#endif
}

alloc_aut(0) sync
alloc_aut(0) script
void P_TeleportIn(struct player *p) {
p->teleportedout = false;

@@ -85,30 +85,24 @@ void P_TeleportIn(struct player *p) {
}

alloc_aut(0) sync
void P_TeleportOut(struct player *p) {
void P_TeleportOut(struct player *p, i32 tag) {
ACS_AmbientSound(ss_misc_teleout, 127);
ACS_SetCameraToTexture(p->tid, s_LITHCAM3, 90);

for(i32 i = 1, j = 1; i <= 18; i++) {
k32 w = 1 + (i / 18.0lk / 3.0lk * 50);
k32 h = 1 + (j / 18.0lk / 8.0lk * 10);
for(i32 i = 1, j = 1; i <= 20; i++) {
ACS_Delay(1);
k32 w = 1 + i / 20.0lk / 3.0lk * 50;
k32 h = 1 + j / 20.0lk / 8.0lk * 10;
SetSize(320, 200);
PrintSprite(sp_Terminal_Teleport, 160,0, 100,0);
SetSize(640 / w, 480 * h);
PrintSprite(s_LITHCAM3, 320/w,0, 240*h,0);
if(i & 3) j++;
ACS_Delay(1);
}

p->teleportedout = true;
}

script void P_TeleportInAsync(struct player *p) {
P_TeleportIn(p);
}

script void P_TeleportOutAsync(struct player *p) {
P_TeleportOut(p);
ACS_Teleport_NewMap(tag, 0, false);
}

/* EOF */

+ 1
- 1
source/w_world.c View File

@@ -289,7 +289,7 @@ void Sc_PreInit(void)
{
GetDebugInfo();

islithmap = (MapNum & LithMapMask) == LithMapMagic;
islithmap = (MapNum >= LithMapBeg && MapNum <= LithMapEnd);
}

_Noreturn dynam_aut script type("open") static


Loading…
Cancel
Save