[jak2] un-hardcode level-related code a bit (#2330)

Makes it less of a headache to change level amounts.
This commit is contained in:
ManDude 2023-03-19 05:33:04 +00:00 committed by GitHub
parent 198c8e1946
commit d46f790973
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
40 changed files with 538 additions and 524 deletions

View File

@ -41,6 +41,11 @@ constexpr int bits_for_sym() {
return b + 1;
}
static_assert(bits_for_sym() != -1, "symbol table invalid length");
// amount of levels in level heap
constexpr int LEVEL_MAX = 2;
// total amount of levels, including ones outside level heap (default-level)
constexpr int LEVEL_TOTAL = LEVEL_MAX + 1;
} // namespace jak1
namespace jak2 {
@ -50,6 +55,11 @@ constexpr s32 SYM_TABLE_MEM_SIZE = 0x30000;
// from the "off-by-one" symbol pointer
constexpr int SYM_TO_STRING_OFFSET = 0xff37;
constexpr int SYM_TO_HASH_OFFSET = 0x1fe6f;
// amount of levels in level heap
constexpr int LEVEL_MAX = 6;
// total amount of levels, including ones outside level heap (default-level)
constexpr int LEVEL_TOTAL = LEVEL_MAX + 1;
} // namespace jak2
constexpr s32 max_symbols(GameVersion version) {

View File

@ -26,8 +26,8 @@ constexpr u32 TX_PAGE_VERSION = 7;
namespace jak2 {
constexpr u32 ART_FILE_VERSION = 7;
constexpr u32 DGO_FILE_VERSION = 1;
constexpr u32 LEVEL_FILE_VERSION = 36;
constexpr u32 DGO_FILE_VERSION = 1;
constexpr u32 TX_PAGE_VERSION = 8;
} // namespace jak2

View File

@ -6070,9 +6070,6 @@
(level5 level :inline :offset 26416)
(default-level level :inline :offset 31648)
(unknown-inline-vec-01 (inline-array vector) :offset 32064)
(unknown-inline-vec-02 (inline-array vector) :offset 33712)
(pad2 uint8 4)
)
:method-count-assert 31

View File

@ -45,7 +45,9 @@ struct SharedRenderState {
void reset();
bool has_pc_data = false;
LevelVis occlusion_vis[6];
// limit is arbitrary so let's go ham in case we want more levels in the future
LevelVis occlusion_vis[32];
math::Vector4f camera_planes[4];

View File

@ -1,5 +1,6 @@
#include "OpenGLRenderer.h"
#include "common/goal_constants.h"
#include "common/log/log.h"
#include "common/util/FileUtil.h"
@ -98,8 +99,8 @@ void OpenGLRenderer::init_bucket_renderers_jak2() {
init_bucket_renderer<DirectRenderer>("sky-draw", BucketCategory::OTHER, BucketId::SKY_DRAW, 1024);
init_bucket_renderer<OceanMidAndFar>("ocean-mid-far", BucketCategory::OCEAN,
BucketId::OCEAN_MID_FAR);
// hardcoded level number!!!
for (int i = 0; i < 6; ++i) {
for (int i = 0; i < LEVEL_MAX; ++i) {
#define GET_BUCKET_ID_FOR_LIST(bkt1, bkt2, idx) ((int)(bkt1) + ((int)(bkt2) - (int)(bkt1)) * (idx))
init_bucket_renderer<TextureUploadHandler>(
fmt::format("tex-l{}-tfrag", i), BucketCategory::TEX,
@ -221,7 +222,7 @@ void OpenGLRenderer::init_bucket_renderers_jak2() {
init_bucket_renderer<DirectRenderer>("debug2", BucketCategory::OTHER, BucketId::DEBUG2, 0x8000);
init_bucket_renderer<DirectRenderer>("debug-no-zbuf2", BucketCategory::OTHER,
BucketId::DEBUG_NO_ZBUF2, 0x8000);
init_bucket_renderer<DirectRenderer>("debug3", BucketCategory::OTHER, BucketId::DEBUG3, 0x8000);
init_bucket_renderer<DirectRenderer>("debug3", BucketCategory::OTHER, BucketId::DEBUG3, 0x1000);
auto eye_renderer = std::make_unique<EyeRenderer>("eyes", 0);
m_render_state.eye_renderer = eye_renderer.get();
@ -839,7 +840,7 @@ void OpenGLRenderer::dispatch_buckets_jak1(DmaFollower dma,
dma.current_tag_offset() + 16; // offset by 1 qw for the initial call
m_render_state.next_bucket = m_render_state.buckets_base;
m_render_state.bucket_for_vis_copy = (int)jak1::BucketId::TFRAG_LEVEL0;
m_render_state.num_vis_to_copy = 2;
m_render_state.num_vis_to_copy = jak1::LEVEL_MAX;
// Find the default regs buffer
auto initial_call_tag = dma.current_tag();
@ -903,7 +904,7 @@ void OpenGLRenderer::dispatch_buckets_jak2(DmaFollower dma,
m_render_state.buckets_base = dma.current_tag_offset(); // starts at 0 in jak 2
m_render_state.next_bucket = m_render_state.buckets_base + 16;
m_render_state.bucket_for_vis_copy = (int)jak2::BucketId::BUCKET_2;
m_render_state.num_vis_to_copy = 6;
m_render_state.num_vis_to_copy = jak2::LEVEL_MAX;
for (size_t bucket_id = 0; bucket_id < m_bucket_renderers.size(); bucket_id++) {
auto& renderer = m_bucket_renderers[bucket_id];

View File

@ -38,7 +38,7 @@ namespace {
constexpr bool run_dma_copy = false;
constexpr PerGameVersion<int> fr3_level_count(3, 7);
constexpr PerGameVersion<int> fr3_level_count(jak1::LEVEL_TOTAL, jak2::LEVEL_TOTAL);
struct GraphicsData {
// vsync

View File

@ -509,7 +509,7 @@ u64 get_os() {
void pc_set_levels(u32 lev_list) {
std::vector<std::string> levels;
for (int i = 0; i < 6; i++) {
for (int i = 0; i < LEVEL_MAX; i++) {
u32 lev = *Ptr<u32>(lev_list + i * 4);
std::string ls = Ptr<String>(lev).c()->data();
if (ls != "none" && ls != "#f" && ls != "") {

View File

@ -412,6 +412,11 @@
max-val)
)
(defgmacro enum-max (enum)
(enum-max enum))
(defgmacro enum-length (enum)
(enum-length enum))
;; shortcut to quit GOOS
(defsmacro e ()

View File

@ -580,7 +580,7 @@
)
(let ((s2-0 add-debug-text-3d)
(s1-0 #t)
(s0-0 318)
(s0-0 (bucket-id debug-no-zbuf1))
)
(set! sv-32 format)
(let ((a0-10 (clear *temp-string*))

View File

@ -120,7 +120,7 @@
(add-debug-x #t (bucket-id debug-no-zbuf1) arg0 (new 'static 'rgba :r #xff :g #xff :a #x80))
(let ((s3-0 add-debug-text-3d)
(s2-0 #t)
(s1-0 318)
(s1-0 (bucket-id debug-no-zbuf1))
)
(format (clear *temp-string*) "region-~D~%" (-> obj id))
(s3-0 s2-0 (the-as bucket-id s1-0) *temp-string* arg0 (font-color #dadada) sv-32)
@ -131,7 +131,7 @@
(when s4-1
(let ((s3-1 add-debug-text-3d)
(s2-1 #t)
(s1-1 318)
(s1-1 (bucket-id debug-no-zbuf1))
)
(format (clear *temp-string*) "(on-enter ~S)" s4-1)
(s3-1 s2-1 (the-as bucket-id s1-1) *temp-string* arg0 (font-color #dadada) sv-32)

View File

@ -1786,7 +1786,7 @@
(debug-reset-buffers)
(clear! *simple-sprite-system*)
)
(set! (-> s5-1 bucket-group) (dma-buffer-add-buckets (-> s5-1 calc-buf) 327))
(set! (-> s5-1 bucket-group) (dma-buffer-add-buckets (-> s5-1 calc-buf) (enum-length bucket-id)))
)
(service-cpads)
@ -2069,7 +2069,7 @@
;; end each normal bucket with the standard GS state reset
(let ((s3-3 6)
(s2-2 324)
(s2-2 (bucket-id debug2))
)
(while (>= s2-2 s3-3)
(default-end-buffer
@ -2110,7 +2110,7 @@
)
;; link all buckets to build the final massive dma list.
(dma-buffer-patch-buckets (-> s4-0 bucket-group) 327)
(dma-buffer-patch-buckets (-> s4-0 bucket-group) (enum-length bucket-id))
;; append the final END
(let* ((v1-71 s5-0)

View File

@ -1115,7 +1115,7 @@
(when sv-20
(let ((s5-1 add-debug-text-3d)
(s4-1 #t)
(s3-1 318)
(s3-1 (bucket-id debug-no-zbuf1))
)
(format (clear *temp-string*) "~S ~D~%" (pickup-type->string (the-as pickup-type (-> sv-20 0))) (-> sv-20 1))
(s5-1
@ -1162,7 +1162,7 @@
(else
(let ((s5-3 add-debug-text-3d)
(s4-3 #t)
(s3-3 318)
(s3-3 (bucket-id debug-no-zbuf1))
)
(format (clear *temp-string*) "pid ~d" (-> (the-as process-drawable arg0) pid))
(s5-3
@ -1248,7 +1248,7 @@
(let ((s1-0 add-debug-text-3d)
(s0-0 #t)
)
(set! sv-32 318)
(set! sv-32 (the-as int (bucket-id debug-no-zbuf1)))
(let ((a2-4 (res-lump-struct s2-0 'name structure))
(a3-2 sv-20)
(t0-1 (if (logtest? (-> s2-0 extra perm status) (entity-perm-status bit-0 bit-1))
@ -1285,7 +1285,7 @@
(when (and v0-6 (or (= s5-3 #t) (= s5-3 'box)))
(set! sv-48 add-debug-box)
(set! sv-64 #t)
(set! sv-80 318)
(set! sv-80 (the-as int (bucket-id debug-no-zbuf1)))
(set! sv-96 (&+ v0-6 0))
(set! sv-112 (&+ v0-6 16))
(let ((t0-3 (if (is-object-visible? s3-1 a1-10)

View File

@ -178,7 +178,7 @@
(deftype load-state (basic)
((want level-buffer-state 6 :inline :offset-assert 4)
((want level-buffer-state LEVEL_MAX :inline :offset-assert 4)
(want-sound symbol 3 :offset-assert 100)
(vis-nick symbol :offset-assert 112)
(command-list pair :offset-assert 116)

View File

@ -1286,7 +1286,7 @@
(if arg2
(format arg0 "~%")
)
(dotimes (s4-2 6)
(dotimes (s4-2 LEVEL_MAX)
(if (or (= (-> *level* level s4-2 status) 'active)
(= (-> *level* level s4-2 status) 'alive)
(= (-> *level* level s4-2 status) 'loaded)

View File

@ -13,7 +13,7 @@
(when (and (type? (-> obj process) process-drawable) *display-entity-errors*)
(let ((s5-0 add-debug-text-3d)
(s4-0 #t)
(s3-0 318)
(s3-0 (bucket-id debug-no-zbuf1))
)
(format (clear *temp-string*) "path data error in ~S" (-> obj process name))
(s5-0
@ -49,7 +49,7 @@
(when (logtest? (-> obj flags) (path-control-flag draw-text))
(let ((s3-1 add-debug-text-3d)
(s2-1 #t)
(s1-0 318)
(s1-0 (bucket-id debug-no-zbuf1))
)
(format (clear *temp-string*) "~D" s5-1)
(s3-1 s2-1 (the-as bucket-id s1-0) *temp-string* s4-1 (font-color gold-#ba9200) (the-as vector2h #f))
@ -399,7 +399,7 @@ using the fractional component of `idx` as the interpolant, return this result
(when (and (type? (-> obj process) process-drawable) *display-entity-errors*)
(let ((s5-0 add-debug-text-3d)
(s4-0 #t)
(s3-0 318)
(s3-0 (bucket-id debug-no-zbuf1))
)
(format (clear *temp-string*) "curve data error in ~S" (-> obj process name))
(s5-0
@ -427,7 +427,7 @@ using the fractional component of `idx` as the interpolant, return this result
(when (logtest? (-> obj flags) (path-control-flag draw-text))
(let ((s3-1 add-debug-text-3d)
(s2-1 #t)
(s1-0 318)
(s1-0 (bucket-id debug-no-zbuf1))
)
(format (clear *temp-string*) "~D" s5-1)
(s3-1 s2-1 (the-as bucket-id s1-0) *temp-string* s4-1 (font-color gold-#ba9200) (the-as vector2h #f))

View File

@ -5,6 +5,8 @@
;; name in dgo: background-h
;; dgos: ENGINE, GAME
;; NOTE : the limits here seem arbitrary and must be increased if you add more levels.
;; DECOMP BEGINS
(deftype background-work (basic)

View File

@ -232,7 +232,7 @@
(defun add-pc-port-background-data ((dma-buf dma-buffer))
"PC Port added"
;; loop over levels
(dotimes (lev-idx 6)
(dotimes (lev-idx (-> *level* length))
(let ((lev (-> *level* draw-level lev-idx))
(dma-start (-> dma-buf base)))
(cond

View File

@ -53,7 +53,7 @@
)
(deftype foreground-bucket-grid (structure)
((level-buckets foreground-level-buckets 7 :inline :offset-assert 0)
((level-buckets foreground-level-buckets LEVEL_TOTAL :inline :offset-assert 0)
(warp-chain mercneric-chain :inline :offset-assert 2352)
)
:method-count-assert 9
@ -84,7 +84,7 @@
(deftype foreground-work (structure)
((regs foreground-regs :inline :offset-assert 0)
(draw-index-map uint8 7 :offset 64)
(draw-index-map uint8 LEVEL_TOTAL :offset 64)
(grid foreground-bucket-grid :inline :offset-assert 80)
(bounds sphere :inline :offset-assert 2464)
(lights vu-lights :inline :offset-assert 2480)

View File

@ -277,13 +277,13 @@
;; stash drawing map
(let ((v1-7 *level*))
(dotimes (a0-9 7)
(dotimes (a0-9 LEVEL_TOTAL)
(set! (-> gp-0 draw-index-map a0-9) (-> v1-7 draw-index-map a0-9))
)
)
;; bucket lookups, set up chains.
(dotimes (s5-1 7)
(dotimes (s5-1 LEVEL_TOTAL)
(let ((s4-0 (-> gp-0 grid level-buckets s5-1)))
(dotimes (s3-0 7)
(let ((s1-0 (-> s4-0 data s3-0)))
@ -498,7 +498,7 @@
(defun foreground-wrapup ()
(let ((gp-0 (scratchpad-object foreground-work)))
(dotimes (s5-0 7)
(dotimes (s5-0 LEVEL_TOTAL)
(let ((s4-0 (-> gp-0 grid level-buckets s5-0)))
(dotimes (s3-0 7)
(let ((s2-0 (-> s4-0 data s3-0)))

View File

@ -334,7 +334,7 @@
; addiu a2, r0, 0
; beq r0, r0, L45
; sll r0, r0, 0
(dotimes (i 327)
(dotimes (i (enum-length bucket-id))
; B3:
; L44:
; dsll a3, a2, 4
@ -367,7 +367,7 @@
(set! (-> prof data 0 start-time) 0) ;; why do it again...
; addiu a2, r0, 327
; sh a2, 0(v1)
(set! (-> prof count) 327)
(set! (-> prof count) (enum-length bucket-id))
; beq r0, r0, L47
; sll r0, r0, 0
) ;; end (>= mark last-index)

View File

@ -367,7 +367,7 @@
)
(defun-debug merc-stats ()
(dotimes (gp-0 7)
(dotimes (gp-0 LEVEL_TOTAL)
(let ((s5-0 (-> *level* level gp-0 art-group)))
(when (nonzero? s5-0)
(dotimes (s4-0 (-> s5-0 art-group-array length))
@ -394,7 +394,7 @@
)
(defun-debug merc-edge-stats ()
(dotimes (gp-0 7)
(dotimes (gp-0 LEVEL_TOTAL)
(let ((s5-0 (-> *level* level gp-0 art-group)))
(when (nonzero? s5-0)
(dotimes (s4-0 (-> s5-0 art-group-array length))

View File

@ -483,7 +483,7 @@
(set! (-> (&-> *level* default-level texture-anim-array 9) 0) #f)
)
(let ((s5-2 (level-get-target-inside *level*)))
(dotimes (s4-1 6)
(dotimes (s4-1 LEVEL_MAX)
(let ((s3-0 (-> *level* level s4-1)))
(case (-> s3-0 status)
(('active 'loaded)

View File

@ -662,7 +662,7 @@ additionally, some texture pages have a chunk system that allows more specific c
;; this assumes that the common-segment starts at 0.
(let ((vram-loc 0))
;; loop over all active levels
(countdown (level-idx 7)
(countdown (level-idx LEVEL_TOTAL)
(let ((lev (-> *level* level level-idx)))
(when (or (= (-> lev status) 'active)
(= (-> lev status) 'alive)
@ -700,7 +700,7 @@ additionally, some texture pages have a chunk system that allows more specific c
"Lay out hud/map textures from all levels so all can fit into
VRAM at the same time."
(let ((level-idx 0))
(countdown (vram-loc 7)
(countdown (vram-loc LEVEL_TOTAL)
(let ((lev (-> *level* level vram-loc)))
(when (or (= (-> lev status) 'active)
(= (-> lev status) 'alive)
@ -743,7 +743,7 @@ additionally, some texture pages have a chunk system that allows more specific c
;; again, assume that common-segment starts at 0
(let ((vram-loc 0))
;; iterate over active levels
(countdown (level-idx 7)
(countdown (level-idx LEVEL_TOTAL)
(let ((lev (-> *level* level level-idx)))
(when (or (= (-> lev status) 'active)
(= (-> lev status) 'alive)
@ -1644,7 +1644,7 @@ additionally, some texture pages have a chunk system that allows more specific c
(((tpage-category alpha))
;; alpha has some special cases
(cond
((= (-> lev index) 6) ;; default level
((= (-> lev index) LEVEL_MAX) ;; default level
;; if the auto-save-icon-flag is set, upload the alpha texture and clear flag.
(if (not (-> *bigmap* auto-save-icon-flag))
(set! (-> lev upload-size 8)
@ -1711,7 +1711,7 @@ additionally, some texture pages have a chunk system that allows more specific c
)
(((tpage-category sprite))
;; sprite skips uploads if the level isn't drawing, but otherwise uploads the whole thing.
(when (or (= (-> lev display?) 'display) (= (-> lev display?) 'actor) (= (-> lev index) 6))
(when (or (= (-> lev display?) 'display) (= (-> lev display?) 'actor) (= (-> lev index) LEVEL_MAX))
(set! (-> lev upload-size 7)
(upload-vram-pages pool (-> pool segment-common) tpage (tex-upload-mode seg0-1-2) bucket)
)
@ -1720,7 +1720,7 @@ additionally, some texture pages have a chunk system that allows more specific c
(((tpage-category map))
;; map doesn't use masks for the default level.
(cond
((= (-> lev index) 6)
((= (-> lev index) LEVEL_MAX)
(set! (-> lev upload-size 8)
(upload-vram-pages pool (-> pool segment-common) tpage (tex-upload-mode seg0-1-2) bucket)
)
@ -1747,8 +1747,8 @@ additionally, some texture pages have a chunk system that allows more specific c
(cond
((= cat (tpage-category warp))
;; warps put all their update-texture-anim's with the default level:
(when (= (-> lev index) 6)
(dotimes (s2-1 7)
(when (= (-> lev index) LEVEL_MAX)
(dotimes (s2-1 LEVEL_TOTAL)
(let ((v1-54 (-> *level* level s2-1)))
(when (or (= (-> v1-54 status) 'active) (= (-> v1-54 status) 'reserved))
(if (-> v1-54 texture-anim-array 5)
@ -1844,7 +1844,7 @@ additionally, some texture pages have a chunk system that allows more specific c
)
;; clear upload-size
(dotimes (lev-idx 7)
(dotimes (lev-idx LEVEL_TOTAL)
(let ((lev (-> *level* level lev-idx)))
(when (or (= (-> lev status) 'active) (= (-> lev status) 'reserved))
(dotimes (a1-6 18)
@ -1866,7 +1866,7 @@ additionally, some texture pages have a chunk system that allows more specific c
)
(when (and src-level (logtest? (-> *texture-pool* texture-enable-user) (-> tpage-info texture-user)))
(cond
((= (-> tpage-info level-index) 6)
((= (-> tpage-info level-index) LEVEL_MAX)
;; always upload default-level textures
(add-level-tpage-dma
arg0
@ -1892,7 +1892,7 @@ additionally, some texture pages have a chunk system that allows more specific c
)
;; reset masks and closest array for the next frame!
(dotimes (v1-16 7)
(dotimes (v1-16 LEVEL_TOTAL)
(let ((a0-30 (-> *level* level v1-16)))
(when (or (= (-> a0-30 status) 'active) (= (-> a0-30 status) 'reserved))
(dotimes (a1-15 18)

View File

@ -523,7 +523,7 @@
:flag-assert #x900000018
)
(define *tfrag-init-table* (new 'static 'inline-array tfrag-init-data 6
(define *tfrag-init-table* (new 'static 'inline-array tfrag-init-data LEVEL_MAX
(new 'static 'tfrag-init-data
:tfrag-bucket (bucket-id tfrag-l0-tfrag)
:tfrag-scissor-bucket (bucket-id tfrag-s-l0-tfrag)
@ -578,7 +578,7 @@
(define *pc-tfrag-draw-level* (the level #f))
(defun tfrag-vu1-init-buffers ()
(dotimes (gp-0 6)
(dotimes (gp-0 LEVEL_MAX)
(let ((s5-0 (-> *level* draw-level gp-0))
(s4-0 (-> *tfrag-init-table* gp-0))
)

View File

@ -1527,7 +1527,7 @@
(define *tie-init-table* (new 'static 'inline-array tie-init-data 6
(define *tie-init-table* (new 'static 'inline-array tie-init-data LEVEL_MAX
(new 'static 'tie-init-data
:tie-bucket (bucket-id tie-l0-tfrag)
:tie-scissor-bucket (bucket-id tie-s-l0-tfrag)
@ -1626,7 +1626,7 @@
(s5-0 100)
(s4-0 68)
)
(dotimes (s3-0 6)
(dotimes (s3-0 LEVEL_MAX)
(let ((v1-2 (-> *level* draw-level s3-0))
(s2-0 (-> *tie-init-table* s3-0))
)

View File

@ -29,387 +29,387 @@ for example: tie-s-l1-tfrag
;;;;;;;;;;
(bucket-0 0)
(bucket-1 1)
(bucket-2 2)
(bucket-3 3) ;; blit displays
(tex-lcom-sky-pre 4) ;; tex
(sky-draw 5) ;; sky
(ocean-mid-far 6) ;; ocean
(bucket-0)
(bucket-1)
(bucket-2)
(bucket-3) ;; blit displays
(tex-lcom-sky-pre) ;; tex
(sky-draw) ;; sky
(ocean-mid-far) ;; ocean
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; All levels with tfrag tpage
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(tex-l0-tfrag 7) ;; level 0 tex
(tfrag-l0-tfrag 8) ;; tfrag
(tie-l0-tfrag 9) ;; tie
(etie-l0-tfrag 10) ;; tie
(tfrag-s-l0-tfrag 11) ;; tfrag
(tie-s-l0-tfrag 12) ;; tie
(etie-s-l0-tfrag 13) ;; tie
(merc-l0-tfrag 14) ;; merc
(emerc-l0-tfrag 15) ;; emerc
(gmerc-l0-tfrag 16) ;; mercneric
(tie-v-l0-tfrag 17) ;; tie
(tex-l0-tfrag) ;; level 0 tex
(tfrag-l0-tfrag) ;; tfrag
(tie-l0-tfrag) ;; tie
(etie-l0-tfrag) ;; tie
(tfrag-s-l0-tfrag) ;; tfrag
(tie-s-l0-tfrag) ;; tie
(etie-s-l0-tfrag) ;; tie
(merc-l0-tfrag) ;; merc
(emerc-l0-tfrag) ;; emerc
(gmerc-l0-tfrag) ;; mercneric
(tie-v-l0-tfrag) ;; tie
(tex-l1-tfrag 18) ;; tex
(tfrag-l1-tfrag 19) ;; tfrag
(tie-l1-tfrag 20) ;; tie
(etie-l1-tfrag 21) ;; tie
(tfrag-s-l1-tfrag 22) ;; tfrag
(tie-s-l1-tfrag 23) ;; tie
(etie-s-l1-tfrag 24) ;; tie
(merc-l1-tfrag 25) ;; merc
(emerc-l1-tfrag 26) ;; emerc
(gmerc-l1-tfrag 27) ;; mercneric
(tie-v-l1-tfrag 28) ;; tie
(tex-l1-tfrag) ;; tex
(tfrag-l1-tfrag) ;; tfrag
(tie-l1-tfrag) ;; tie
(etie-l1-tfrag) ;; tie
(tfrag-s-l1-tfrag) ;; tfrag
(tie-s-l1-tfrag) ;; tie
(etie-s-l1-tfrag) ;; tie
(merc-l1-tfrag) ;; merc
(emerc-l1-tfrag) ;; emerc
(gmerc-l1-tfrag) ;; mercneric
(tie-v-l1-tfrag) ;; tie
(tex-l2-tfrag 29) ;; tex
(tfrag-l2-tfrag 30) ;; tfrag
(tie-l2-tfrag 31) ;; tie
(etie-l2-tfrag 32) ;; tie
(tfrag-s-l2-tfrag 33) ;; tfrag
(tie-s-l2-tfrag 34) ;; tie
(etie-s-l2-tfrag 35) ;; tie
(merc-l2-tfrag 36) ;; merc
(emerc-l2-tfrag 37) ;; emerc
(gmerc-l2-tfrag 38) ;; mercneric
(tie-v-l2-tfrag 39) ;; tie
(tex-l2-tfrag) ;; tex
(tfrag-l2-tfrag) ;; tfrag
(tie-l2-tfrag) ;; tie
(etie-l2-tfrag) ;; tie
(tfrag-s-l2-tfrag) ;; tfrag
(tie-s-l2-tfrag) ;; tie
(etie-s-l2-tfrag) ;; tie
(merc-l2-tfrag) ;; merc
(emerc-l2-tfrag) ;; emerc
(gmerc-l2-tfrag) ;; mercneric
(tie-v-l2-tfrag) ;; tie
(tex-l3-tfrag 40) ;; tex
(tfrag-l3-tfrag 41) ;; tfrag
(tie-l3-tfrag 42) ;; tie
(etie-l3-tfrag 43) ;; tie
(tfrag-s-l3-tfrag 44) ;; tfrag
(tie-s-l3-tfrag 45) ;; tie
(etie-s-l3-tfrag 46) ;; tie
(merc-l3-tfrag 47) ;; merc
(emerc-l3-tfrag 48) ;; emerc
(gmerc-l3-tfrag 49) ;; mercneric
(tie-v-l3-tfrag 50) ;; tie
(tex-l3-tfrag) ;; tex
(tfrag-l3-tfrag) ;; tfrag
(tie-l3-tfrag) ;; tie
(etie-l3-tfrag) ;; tie
(tfrag-s-l3-tfrag) ;; tfrag
(tie-s-l3-tfrag) ;; tie
(etie-s-l3-tfrag) ;; tie
(merc-l3-tfrag) ;; merc
(emerc-l3-tfrag) ;; emerc
(gmerc-l3-tfrag) ;; mercneric
(tie-v-l3-tfrag) ;; tie
(tex-l4-tfrag 51) ;; tex
(tfrag-l4-tfrag 52) ;; tfrag
(tie-l4-tfrag 53) ;; tie
(etie-l4-tfrag 54) ;; tie
(tfrag-s-l4-tfrag 55) ;; tfrag
(tie-s-l4-tfrag 56) ;; tie
(etie-s-l4-tfrag 57) ;; tie
(merc-l4-tfrag 58) ;; merc
(emerc-l4-tfrag 59) ;; emerc
(gmerc-l4-tfrag 60) ;; mercneric
(tie-v-l4-tfrag 61) ;; tie
(tex-l4-tfrag) ;; tex
(tfrag-l4-tfrag) ;; tfrag
(tie-l4-tfrag) ;; tie
(etie-l4-tfrag) ;; tie
(tfrag-s-l4-tfrag) ;; tfrag
(tie-s-l4-tfrag) ;; tie
(etie-s-l4-tfrag) ;; tie
(merc-l4-tfrag) ;; merc
(emerc-l4-tfrag) ;; emerc
(gmerc-l4-tfrag) ;; mercneric
(tie-v-l4-tfrag) ;; tie
(tex-l5-tfrag 62) ;; tex
(tfrag-l5-tfrag 63) ;; tfrag
(tie-l5-tfrag 64) ;; tie
(etie-l5-tfrag 65) ;; tie
(tfrag-s-l5-tfrag 66) ;; tfrag
(tie-s-l5-tfrag 67) ;; tie
(etie-s-l5-tfrag 68) ;; tie
(merc-l5-tfrag 69) ;; merc
(emerc-l5-tfrag 70) ;; emerc
(gmerc-l5-tfrag 71) ;; mercneric
(tie-v-l5-tfrag 72) ;; tie
(tex-l5-tfrag) ;; tex
(tfrag-l5-tfrag) ;; tfrag
(tie-l5-tfrag) ;; tie
(etie-l5-tfrag) ;; tie
(tfrag-s-l5-tfrag) ;; tfrag
(tie-s-l5-tfrag) ;; tie
(etie-s-l5-tfrag) ;; tie
(merc-l5-tfrag) ;; merc
(emerc-l5-tfrag) ;; emerc
(gmerc-l5-tfrag) ;; mercneric
(tie-v-l5-tfrag) ;; tie
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; All levels with shrub tpage
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(tex-l0-shrub 73) ;; tex
(shrub-l0-shrub 74) ;; shrub
(shrub-n-l0-shrub 75) ;; shrub
(billboard-l0-shrub 76) ;; shrub
(shrub-v-l0-shrub 77) ;; shrub
(shrub-nt-l0-shrub 78) ;; shrub
(merc-l0-shrub 79) ;; merc
(emerc-l0-shrub 80) ;; emerc
(gmerc-l0-shrub 81) ;; mercneric
(tex-l0-shrub) ;; tex
(shrub-l0-shrub) ;; shrub
(shrub-n-l0-shrub) ;; shrub
(billboard-l0-shrub) ;; shrub
(shrub-v-l0-shrub) ;; shrub
(shrub-nt-l0-shrub) ;; shrub
(merc-l0-shrub) ;; merc
(emerc-l0-shrub) ;; emerc
(gmerc-l0-shrub) ;; mercneric
(tex-l1-shrub 82) ;; tex
(shrub-l1-shrub 83) ;; shrub
(shrub-n-l1-shrub 84) ;; shrub
(billboard-l1-shrub 85) ;; shrub
(shrub-v-l1-shrub 86) ;; shrub
(shrub-nt-l1-shrub 87) ;; shrub
(merc-l1-shrub 88) ;; merc
(emerc-l1-shrub 89) ;; emerc
(gmerc-l1-shrub 90) ;; mercneric
(tex-l1-shrub) ;; tex
(shrub-l1-shrub) ;; shrub
(shrub-n-l1-shrub) ;; shrub
(billboard-l1-shrub) ;; shrub
(shrub-v-l1-shrub) ;; shrub
(shrub-nt-l1-shrub) ;; shrub
(merc-l1-shrub) ;; merc
(emerc-l1-shrub) ;; emerc
(gmerc-l1-shrub) ;; mercneric
(tex-l2-shrub 91) ;; tex
(shrub-l2-shrub 92) ;; shrub
(shrub-n-l2-shrub 93) ;; shrub
(billboard-l2-shrub 94) ;; shrub
(shrub-v-l2-shrub 95) ;; shrub
(shrub-nt-l2-shrub 96) ;; shrub
(merc-l2-shrub 97) ;; merc
(emerc-l2-shrub 98) ;; emerc
(gmerc-l2-shrub 99) ;; mercneric
(tex-l2-shrub) ;; tex
(shrub-l2-shrub) ;; shrub
(shrub-n-l2-shrub) ;; shrub
(billboard-l2-shrub) ;; shrub
(shrub-v-l2-shrub) ;; shrub
(shrub-nt-l2-shrub) ;; shrub
(merc-l2-shrub) ;; merc
(emerc-l2-shrub) ;; emerc
(gmerc-l2-shrub) ;; mercneric
(tex-l3-shrub 100) ;; tex
(shrub-l3-shrub 101) ;; shrub
(shrub-n-l3-shrub 102) ;; shrub
(billboard-l3-shrub 103) ;; shrub
(shrub-v-l3-shrub 104) ;; shrub
(shrub-nt-l3-shrub 105) ;; shrub
(merc-l3-shrub 106) ;; merc
(emerc-l3-shrub 107) ;; emerc
(gmerc-l3-shrub 108) ;; mercneric
(tex-l3-shrub) ;; tex
(shrub-l3-shrub) ;; shrub
(shrub-n-l3-shrub) ;; shrub
(billboard-l3-shrub) ;; shrub
(shrub-v-l3-shrub) ;; shrub
(shrub-nt-l3-shrub) ;; shrub
(merc-l3-shrub) ;; merc
(emerc-l3-shrub) ;; emerc
(gmerc-l3-shrub) ;; mercneric
(tex-l4-shrub 109) ;; tex
(shrub-l4-shrub 110) ;; shrub
(shrub-n-l4-shrub 111) ;; shrub
(billboard-l4-shrub 112) ;; shrub
(shrub-v-l4-shrub 113) ;; shrub
(shrub-nt-l4-shrub 114) ;; shrub
(merc-l4-shrub 115) ;; merc
(emerc-l4-shrub 116) ;; emerc
(gmerc-l4-shrub 117) ;; mercneric
(tex-l4-shrub) ;; tex
(shrub-l4-shrub) ;; shrub
(shrub-n-l4-shrub) ;; shrub
(billboard-l4-shrub) ;; shrub
(shrub-v-l4-shrub) ;; shrub
(shrub-nt-l4-shrub) ;; shrub
(merc-l4-shrub) ;; merc
(emerc-l4-shrub) ;; emerc
(gmerc-l4-shrub) ;; mercneric
(tex-l5-shrub 118) ;; tex
(shrub-l5-shrub 119) ;; shrub
(shrub-n-l5-shrub 120) ;; shrub
(billboard-l5-shrub 121) ;; shrub
(shrub-v-l5-shrub 122) ;; shrub
(shrub-nt-l5-shrub 123) ;; shrub
(merc-l5-shrub 124) ;; merc
(emerc-l5-shrub 125) ;; emerc
(gmerc-l5-shrub 126) ;; mercneric
(tex-l5-shrub) ;; tex
(shrub-l5-shrub) ;; shrub
(shrub-n-l5-shrub) ;; shrub
(billboard-l5-shrub) ;; shrub
(shrub-v-l5-shrub) ;; shrub
(shrub-nt-l5-shrub) ;; shrub
(merc-l5-shrub) ;; merc
(emerc-l5-shrub) ;; emerc
(gmerc-l5-shrub) ;; mercneric
(tex-l0-alpha 127) ;; tex
(tfrag-t-l0-alpha 128) ;; tfrag
(tie-t-l0-alpha 129) ;; tie
(etie-t-l0-alpha 130) ;; tie
(merc-l0-alpha 131) ;; merc
(emerc-l0-alpha 132) ;; emerc
(gmerc-l0-alpha 133) ;; mercneric
(tfrag-st-l0-alpha 134) ;; tfrag
(tie-st-l0-alpha 135) ;; tie
(etie-st-l0-alpha 136) ;; tie
(tex-l0-alpha) ;; tex
(tfrag-t-l0-alpha) ;; tfrag
(tie-t-l0-alpha) ;; tie
(etie-t-l0-alpha) ;; tie
(merc-l0-alpha) ;; merc
(emerc-l0-alpha) ;; emerc
(gmerc-l0-alpha) ;; mercneric
(tfrag-st-l0-alpha) ;; tfrag
(tie-st-l0-alpha) ;; tie
(etie-st-l0-alpha) ;; tie
(tex-l1-alpha 137) ;; tex
(tfrag-t-l1-alpha 138) ;; tfrag
(tie-t-l1-alpha 139) ;; tie
(etie-t-l1-alpha 140) ;; tie
(merc-l1-alpha 141) ;; merc
(emerc-l1-alpha 142) ;; emerc
(gmerc-l1-alpha 143) ;; mercneric
(tfrag-st-l1-alpha 144) ;; tfrag
(tie-st-l1-alpha 145) ;; tie
(etie-st-l1-alpha 146) ;; tie
(tex-l1-alpha) ;; tex
(tfrag-t-l1-alpha) ;; tfrag
(tie-t-l1-alpha) ;; tie
(etie-t-l1-alpha) ;; tie
(merc-l1-alpha) ;; merc
(emerc-l1-alpha) ;; emerc
(gmerc-l1-alpha) ;; mercneric
(tfrag-st-l1-alpha) ;; tfrag
(tie-st-l1-alpha) ;; tie
(etie-st-l1-alpha) ;; tie
(tex-l2-alpha 147) ;; tex
(tfrag-t-l2-alpha 148) ;; tfrag
(tie-t-l2-alpha 149) ;; tie
(etie-t-l2-alpha 150) ;; tie
(merc-l2-alpha 151) ;; merc
(emerc-l2-alpha 152) ;; emerc
(gmerc-l2-alpha 153) ;; mercneric
(tfrag-st-l2-alpha 154) ;; tfrag
(tie-st-l2-alpha 155) ;; tie
(etie-st-l2-alpha 156) ;; tie
(tex-l2-alpha) ;; tex
(tfrag-t-l2-alpha) ;; tfrag
(tie-t-l2-alpha) ;; tie
(etie-t-l2-alpha) ;; tie
(merc-l2-alpha) ;; merc
(emerc-l2-alpha) ;; emerc
(gmerc-l2-alpha) ;; mercneric
(tfrag-st-l2-alpha) ;; tfrag
(tie-st-l2-alpha) ;; tie
(etie-st-l2-alpha) ;; tie
(tex-l3-alpha 157) ;; tex
(tfrag-t-l3-alpha 158) ;; tfrag
(tie-t-l3-alpha 159) ;; tie
(etie-t-l3-alpha 160) ;; tie
(merc-l3-alpha 161) ;; merc
(emerc-l3-alpha 162) ;; emerc
(gmerc-l3-alpha 163) ;; mercneric
(tfrag-st-l3-alpha 164) ;; tfrag
(tie-st-l3-alpha 165) ;; tie
(etie-st-l3-alpha 166) ;; tie
(tex-l3-alpha) ;; tex
(tfrag-t-l3-alpha) ;; tfrag
(tie-t-l3-alpha) ;; tie
(etie-t-l3-alpha) ;; tie
(merc-l3-alpha) ;; merc
(emerc-l3-alpha) ;; emerc
(gmerc-l3-alpha) ;; mercneric
(tfrag-st-l3-alpha) ;; tfrag
(tie-st-l3-alpha) ;; tie
(etie-st-l3-alpha) ;; tie
(tex-l4-alpha 167) ;; tex
(tfrag-t-l4-alpha 168) ;; tfrag
(tie-t-l4-alpha 169) ;; tie
(etie-t-l4-alpha 170) ;; tie
(merc-l4-alpha 171) ;; merc
(emerc-l4-alpha 172) ;; emerc
(gmerc-l4-alpha 173) ;; mercneric
(tfrag-st-l4-alpha 174) ;; tfrag
(tie-st-l4-alpha 175) ;; tie
(etie-st-l4-alpha 176) ;; tie
(tex-l4-alpha) ;; tex
(tfrag-t-l4-alpha) ;; tfrag
(tie-t-l4-alpha) ;; tie
(etie-t-l4-alpha) ;; tie
(merc-l4-alpha) ;; merc
(emerc-l4-alpha) ;; emerc
(gmerc-l4-alpha) ;; mercneric
(tfrag-st-l4-alpha) ;; tfrag
(tie-st-l4-alpha) ;; tie
(etie-st-l4-alpha) ;; tie
(tex-l5-alpha 177) ;; tex
(tfrag-t-l5-alpha 178) ;; tfrag
(tie-t-l5-alpha 179) ;; tie
(etie-t-l5-alpha 180) ;; tie
(merc-l5-alpha 181) ;; merc
(emerc-l5-alpha 182) ;; emerc
(gmerc-l5-alpha 183) ;; mercneric
(tfrag-st-l5-alpha 184) ;; tfrag
(tie-st-l5-alpha 185) ;; tie
(etie-st-l5-alpha 186) ;; tie
(tex-l5-alpha) ;; tex
(tfrag-t-l5-alpha) ;; tfrag
(tie-t-l5-alpha) ;; tie
(etie-t-l5-alpha) ;; tie
(merc-l5-alpha) ;; merc
(emerc-l5-alpha) ;; emerc
(gmerc-l5-alpha) ;; mercneric
(tfrag-st-l5-alpha) ;; tfrag
(tie-st-l5-alpha) ;; tie
(etie-st-l5-alpha) ;; tie
(tex-lcom-tfrag 187) ;; tex
(merc-lcom-tfrag 188) ;; merc
(emerc-lcom-tfrag 189) ;; emerc
(gmerc-lcom-tfrag 190) ;; mercneric
(tex-lcom-tfrag) ;; tex
(merc-lcom-tfrag) ;; merc
(emerc-lcom-tfrag) ;; emerc
(gmerc-lcom-tfrag) ;; mercneric
(tex-lcom-shrub 191) ;; tex
(merc-lcom-shrub 192) ;; merc
(emerc-lcom-shrub 193) ;; emerc
(gmerc-lcom-shrub 194) ;; mercneric
(tex-lcom-shrub) ;; tex
(merc-lcom-shrub) ;; merc
(emerc-lcom-shrub) ;; emerc
(gmerc-lcom-shrub) ;; mercneric
(shadow 195) ;; shadow
(shadow) ;; shadow
(tex-l0-pris 196) ;; tex
(merc-l0-pris 197) ;; merc
(emerc-l0-pris 198) ;; emerc
(gmerc-l0-pris 199) ;; mercneric
(tex-l0-pris) ;; tex
(merc-l0-pris) ;; merc
(emerc-l0-pris) ;; emerc
(gmerc-l0-pris) ;; mercneric
(tex-l1-pris 200) ;; tex
(merc-l1-pris 201) ;; merc
(emerc-l1-pris 202) ;; emerc
(gmerc-l1-pris 203) ;; mercneric
(tex-l1-pris) ;; tex
(merc-l1-pris) ;; merc
(emerc-l1-pris) ;; emerc
(gmerc-l1-pris) ;; mercneric
(tex-l2-pris 204) ;; tex
(merc-l2-pris 205) ;; merc
(emerc-l2-pris 206) ;; emerc
(gmerc-l2-pris 207) ;; mercneric
(tex-l2-pris) ;; tex
(merc-l2-pris) ;; merc
(emerc-l2-pris) ;; emerc
(gmerc-l2-pris) ;; mercneric
(tex-l3-pris 208) ;; tex
(merc-l3-pris 209) ;; merc
(emerc-l3-pris 210) ;; emerc
(gmerc-l3-pris 211) ;; mercneric
(tex-l3-pris) ;; tex
(merc-l3-pris) ;; merc
(emerc-l3-pris) ;; emerc
(gmerc-l3-pris) ;; mercneric
(tex-l4-pris 212) ;; tex
(merc-l4-pris 213) ;; merc
(emerc-l4-pris 214) ;; emerc
(gmerc-l4-pris 215) ;; mercneric
(tex-l4-pris) ;; tex
(merc-l4-pris) ;; merc
(emerc-l4-pris) ;; emerc
(gmerc-l4-pris) ;; mercneric
(tex-l5-pris 216) ;; tex
(merc-l5-pris 217) ;; merc
(emerc-l5-pris 218) ;; emerc
(gmerc-l5-pris 219) ;; mercneric
(tex-l5-pris) ;; tex
(merc-l5-pris) ;; merc
(emerc-l5-pris) ;; emerc
(gmerc-l5-pris) ;; mercneric
(tex-lcom-pris 220) ;; tex
(merc-lcom-pris 221) ;; merc
(emerc-lcom-pris 222) ;; emerc
(gmerc-lcom-pris 223) ;; mercneric
(tex-lcom-pris) ;; tex
(merc-lcom-pris) ;; merc
(emerc-lcom-pris) ;; emerc
(gmerc-lcom-pris) ;; mercneric
(tex-l0-pris2 224) ;; tex
(merc-l0-pris2 225) ;; merc
(emerc-l0-pris2 226) ;; emerc
(gmerc-l0-pris2 227) ;; mercneric
(tex-l0-pris2) ;; tex
(merc-l0-pris2) ;; merc
(emerc-l0-pris2) ;; emerc
(gmerc-l0-pris2) ;; mercneric
(tex-l1-pris2 228) ;; tex
(merc-l1-pris2 229) ;; merc
(emerc-l1-pris2 230) ;; emerc
(gmerc-l1-pris2 231) ;; mercneric
(tex-l1-pris2) ;; tex
(merc-l1-pris2) ;; merc
(emerc-l1-pris2) ;; emerc
(gmerc-l1-pris2) ;; mercneric
(tex-l2-pris2 232) ;; tex
(merc-l2-pris2 233) ;; merc
(emerc-l2-pris2 234) ;; emerc
(gmerc-l2-pris2 235) ;; mercneric
(tex-l2-pris2) ;; tex
(merc-l2-pris2) ;; merc
(emerc-l2-pris2) ;; emerc
(gmerc-l2-pris2) ;; mercneric
(tex-l3-pris2 236) ;; tex
(merc-l3-pris2 237) ;; merc
(emerc-l3-pris2 238) ;; emerc
(gmerc-l3-pris2 239) ;; mercneric
(tex-l3-pris2) ;; tex
(merc-l3-pris2) ;; merc
(emerc-l3-pris2) ;; emerc
(gmerc-l3-pris2) ;; mercneric
(tex-l4-pris2 240) ;; tex
(merc-l4-pris2 241) ;; merc
(emerc-l4-pris2 242) ;; emerc
(gmerc-l4-pris2 243) ;; mercneric
(tex-l4-pris2) ;; tex
(merc-l4-pris2) ;; merc
(emerc-l4-pris2) ;; emerc
(gmerc-l4-pris2) ;; mercneric
(tex-l5-pris2 244) ;; tex
(merc-l5-pris2 245) ;; merc
(emerc-l5-pris2 246) ;; emerc
(gmerc-l5-pris2 247) ;; mercneric
(tex-l5-pris2) ;; tex
(merc-l5-pris2) ;; merc
(emerc-l5-pris2) ;; emerc
(gmerc-l5-pris2) ;; mercneric
(tex-lcom-pris2 248) ;; tex
(merc-lcom-pris2 249) ;; merc
(emerc-lcom-pris2 250) ;; emerc
(gmerc-lcom-pris2 251) ;; mercneric
(tex-lcom-pris2) ;; tex
(merc-lcom-pris2) ;; merc
(emerc-lcom-pris2) ;; emerc
(gmerc-lcom-pris2) ;; mercneric
(tex-l0-water 252) ;; tex
(merc-l0-water 253) ;; merc
(gmerc-l0-water 254) ;; mercneric
(tfrag-w-l0-water 255) ;; tfrag
(tie-w-l0-water 256)
(etie-w-l0-water 257)
(tie-sw-l0-water 258)
(tfrag-ws-l0-water 259) ;; tfrag
(etie-sw-l0-water 260)
(tex-l0-water) ;; tex
(merc-l0-water) ;; merc
(gmerc-l0-water) ;; mercneric
(tfrag-w-l0-water) ;; tfrag
(tie-w-l0-water)
(etie-w-l0-water)
(tie-sw-l0-water)
(tfrag-ws-l0-water) ;; tfrag
(etie-sw-l0-water)
(tex-l1-water 261) ;; tex
(merc-l1-water 262) ;; merc
(gmerc-l1-water 263) ;; mercneric
(tfrag-w-l1-water 264) ;; tfrag
(tie-w-l1-water 265)
(etie-w-l1-water 266)
(tie-sw-l1-water 267)
(tfrag-ws-l1-water 268) ;; tfrag
(etie-sw-l1-water 269)
(tex-l1-water) ;; tex
(merc-l1-water) ;; merc
(gmerc-l1-water) ;; mercneric
(tfrag-w-l1-water) ;; tfrag
(tie-w-l1-water)
(etie-w-l1-water)
(tie-sw-l1-water)
(tfrag-ws-l1-water) ;; tfrag
(etie-sw-l1-water)
(tex-l2-water 270) ;; tex
(merc-l2-water 271) ;; merc
(gmerc-l2-water 272) ;; mercneric
(tfrag-w-l2-water 273) ;; tfrag
(tie-w-l2-water 274)
(etie-w-l2-water 275)
(tie-sw-l2-water 276)
(tfrag-ws-l2-water 277) ;; tfrag
(tie-esw-l2-water 278)
(tex-l2-water) ;; tex
(merc-l2-water) ;; merc
(gmerc-l2-water) ;; mercneric
(tfrag-w-l2-water) ;; tfrag
(tie-w-l2-water)
(etie-w-l2-water)
(tie-sw-l2-water)
(tfrag-ws-l2-water) ;; tfrag
(tie-esw-l2-water)
(tex-l3-water 279) ;; tex
(merc-l3-water 280) ;; merc
(gmerc-l3-water 281) ;; mercneric
(tfrag-w-l3-water 282) ;; tfrag
(tie-w-l3-water 283)
(etie-w-l3-water 284)
(tie-sw-l3-water 285)
(tfrag-ws-l3-water 286) ;; tfrag
(etie-sw-l3-water 287)
(tex-l3-water) ;; tex
(merc-l3-water) ;; merc
(gmerc-l3-water) ;; mercneric
(tfrag-w-l3-water) ;; tfrag
(tie-w-l3-water)
(etie-w-l3-water)
(tie-sw-l3-water)
(tfrag-ws-l3-water) ;; tfrag
(etie-sw-l3-water)
(tex-l4-water 288) ;; tex
(merc-l4-water 289) ;; merc
(gmerc-l4-water 290) ;; mercneric
(tfrag-w-l4-water 291) ;; tfrag
(tie-w-l4-water 292)
(etie-w-l4-water 293)
(tie-sw-l4-water 294)
(tfrag-ws-l4-water 295) ;; tfrag
(etie-sw-l4-water 296)
(tex-l4-water) ;; tex
(merc-l4-water) ;; merc
(gmerc-l4-water) ;; mercneric
(tfrag-w-l4-water) ;; tfrag
(tie-w-l4-water)
(etie-w-l4-water)
(tie-sw-l4-water)
(tfrag-ws-l4-water) ;; tfrag
(etie-sw-l4-water)
(tex-l5-water 297) ;; tex
(merc-l5-water 298) ;; merc
(gmerc-l5-water 299) ;; mercneric
(tfrag-w-l5-water 300) ;; tfrag
(tie-w-l5-water 301)
(etie-w-l5-water 302)
(tie-sw-l5-water 303)
(tfrag-ws-l5-water 304) ;; tfrag
(etie-sw-l5-water 305)
(tex-l5-water) ;; tex
(merc-l5-water) ;; merc
(gmerc-l5-water) ;; mercneric
(tfrag-w-l5-water) ;; tfrag
(tie-w-l5-water)
(etie-w-l5-water)
(tie-sw-l5-water)
(tfrag-ws-l5-water) ;; tfrag
(etie-sw-l5-water)
(tex-lcom-water 306) ;; tex
(merc-lcom-water 307) ;; merc
(gmerc-lcom-water 308) ;; mercneric
(tex-lcom-water) ;; tex
(merc-lcom-water) ;; merc
(gmerc-lcom-water) ;; mercneric
(tex-lcom-sky-post 309)
(tex-lcom-sky-post)
(ocean-near 310) ;; ocean
(depth-cue 311) ;; depth-cue
(ocean-near) ;; ocean
(depth-cue) ;; depth-cue
(tex-all-sprite 312)
(particles 313) ;; particles
(shadow2 314) ;; shadow
(effects 315) ;; effects
(tex-all-warp 316) ;; tex
(gmerc-warp 317) ;; mercneric
(tex-all-sprite)
(particles) ;; particles
(shadow2) ;; shadow
(effects) ;; effects
(tex-all-warp) ;; tex
(gmerc-warp) ;; mercneric
(debug-no-zbuf1 318) ;; debug, no zbuf
(tex-all-map 319) ;; tex
(progress 320) ;; hud | progress
(screen-filter 321) ;; hud letterbox, no zbuf
(bucket-322 322) ;; hud
(bucket-323 323) ;; hud
(debug2 324) ;; debug
(debug-no-zbuf2 325) ;; debug
(debug3 326)
(debug-no-zbuf1) ;; debug, no zbuf
(tex-all-map) ;; tex
(progress) ;; hud | progress
(screen-filter) ;; hud letterbox, no zbuf
(bucket-322) ;; hud
(bucket-323) ;; hud
(debug2) ;; debug
(debug-no-zbuf2) ;; debug
(debug3)
)
(defenum bucket-id-16

View File

@ -6,6 +6,11 @@
;; dgos: ENGINE, GAME
;; todo docs, methods
;; max amount of levels in level heap
(defconstant LEVEL_MAX 6)
;; total amount of levels, including ones outside level heap (default-level)
(defconstant LEVEL_TOTAL 7)
(declare-type bsp-header basic)
(declare-type drawable basic)
(declare-type entity-links structure)
@ -380,11 +385,11 @@
(load-time float :offset-assert 156)
(load-login-time float :offset-assert 160)
(draw-level-count int32 :offset-assert 164)
(draw-level level 7 :offset-assert 168)
(draw-index-map uint8 7 :offset-assert 196)
(draw-level level LEVEL_TOTAL :offset-assert 168)
(draw-index-map uint8 LEVEL_TOTAL :offset-assert 196)
(load-order uint64 :offset-assert 208)
(pad uint8 30 :offset-assert 216)
(level level 7 :inline :offset-assert 256)
(pad uint8 30 :offset 216)
(level level LEVEL_TOTAL :inline :offset-assert 256)
(level0 level :inline :offset 256)
(level1 level :inline :offset 5488)
(level2 level :inline :offset 10720)
@ -392,9 +397,7 @@
(level4 level :inline :offset 21184)
(level5 level :inline :offset 26416)
(default-level level :inline :offset 31648)
(unknown-inline-vec-01 (inline-array vector) :offset 32064)
(unknown-inline-vec-02 (inline-array vector) :offset 33712)
(pad2 uint8 4 :offset-assert 36880)
(pad2 uint8 4)
)
:method-count-assert 31
:size-assert #x9014
@ -428,7 +431,7 @@
(when (zero? *level*)
(set! *level* (new 'static 'level-group
:length 6
:length LEVEL_MAX
:log-in-level-bsp #f
:loading-level #f
:entity-link #f
@ -506,7 +509,7 @@
)
:default-level (new 'static 'level
:name 'default
:index 6
:index LEVEL_MAX
:status 'reserved
:borrow-level (new 'static 'array level 2 #f #f)
:borrow-from-level #f

View File

@ -524,14 +524,14 @@ into 7 sections, which might explain the weird sizes in the center.
;; previous object, plus 2048 bytes. Maybe the objects are sorted in decreasing size,
;; so this allows the big ones to load first, then shrink the temp buffer as the rest come in.
;; also seems to be no way to hit this case - the load-buffer-mode is eventually
;; forced to small-edge in all cases that I see.
;; forced to small-edge in all cases that I see. -- NOTE: not true!
(case (-> arg0 load-buffer-mode)
(((load-buffer-mode small-center))
(set! (-> arg0 load-buffer-size) (the-as uint #x113000)) ;; 1.126 MB
(set! (-> arg0 load-buffer-size) (the-as uint (* 1100 1024))) ;; 1100 KB
)
(((load-buffer-mode medium))
(set! (-> arg0 load-buffer-size) (+ (-> arg1 length) 2048))
(format 0 "believed unused load-buffer-resize case hit.")
(set! (-> arg0 load-buffer-size) (+ (-> arg1 length) (* 2 1024)))
(format 0 "believed unused load-buffer-resize case hit.~%")
; (break!)
)
)
@ -744,7 +744,7 @@ into 7 sections, which might explain the weird sizes in the center.
;; borrowing is a two-way thing. the host level has to have our name.
(let ((slot-in-borrow-from-lev -1)) ;; the slot in the host
(dotimes (borrow-from-lev-idx 6) ;; loop over all levels
(dotimes (borrow-from-lev-idx LEVEL_MAX) ;; loop over all levels
(let ((maybe-borrow-from-lev (-> *level* level borrow-from-lev-idx)))
;; only can borrow from loaded level
(when (and (or (= (-> maybe-borrow-from-lev status) 'active) (= (-> maybe-borrow-from-lev status) 'loaded))
@ -821,7 +821,7 @@ into 7 sections, which might explain the weird sizes in the center.
)
(else
(start-debug "load-begin, no borrow~%")
(dotimes (i 7)
(dotimes (i LEVEL_TOTAL)
(start-debug "lev ~8S bits #b~b~%"
(-> *level* level i name)
(-> *level* level i memory-mask))
@ -846,7 +846,7 @@ into 7 sections, which might explain the weird sizes in the center.
;; helper function to check to see if a certain group of bits is unused.
(let* ((memory-unused? (lambda ((arg0 level-group) (arg1 int))
(dotimes (v1-0 7)
(dotimes (v1-0 LEVEL_TOTAL)
(if (logtest? (-> arg0 level v1-0 memory-mask) arg1)
(return #f)
)
@ -936,7 +936,7 @@ into 7 sections, which might explain the weird sizes in the center.
((zero? bits-to-use)
;; darn, couldn't find a spot.
(format 0 "ERROR: level ~A could not find free ~S bank in the level-group heap~%" (-> obj name) (enum->string load-buffer-mode mem-mode))
(dotimes (s5-1 7)
(dotimes (s5-1 LEVEL_TOTAL)
(if (!= (-> *level* level s5-1 status) 'inactive)
(format
0
@ -1538,7 +1538,7 @@ into 7 sections, which might explain the weird sizes in the center.
(when (-> obj info kill-func)
(let ((s5-0 (-> obj info kill-func value)))
(if (and s5-0 (nonzero? s5-0) (type? s5-0 function))
((the (function level none )s5-0) obj)
((the (function level none) s5-0) obj)
)
)
)
@ -1704,9 +1704,7 @@ into 7 sections, which might explain the weird sizes in the center.
(let ((a1-20 (-> v1-100 a0-59)))
(when (and (-> a1-20 info) (= (-> a1-20 info level) (-> obj name)))
(countdown (a2-6 7)
(let ((a3-3 (+ (* a2-6 4) (the-as int (-> a1-20 info)))))
(s.w! (+ a3-3 44) #f)
)
(set! (-> a1-20 info hooks a2-6) #f)
)
)
)
@ -1977,7 +1975,7 @@ into 7 sections, which might explain the weird sizes in the center.
(defmethod art-group-get-by-name level-group ((obj level-group) (arg0 string) (arg1 (pointer uint32)))
"Search all levels for an art-group. Return the art group, or #f. Optionally return the level index."
(countdown (s4-0 7)
(countdown (s4-0 LEVEL_TOTAL)
(let ((s3-0 (-> *level* level s4-0)))
(when (or (= (-> s3-0 status) 'active) (= (-> s3-0 status) 'reserved))
(countdown (s2-0 (-> s3-0 art-group art-group-array length))
@ -2205,8 +2203,7 @@ into 7 sections, which might explain the weird sizes in the center.
'demo
)
(*debug-segment*
; 'prison
'ctysluma
'prison
)
(else
'title
@ -2434,18 +2431,18 @@ into 7 sections, which might explain the weird sizes in the center.
-1
;; unload up to 6 levels, so try 6 times
(countdown (unload-attempt 6)
(countdown (unload-attempt LEVEL_MAX)
(let ((unload-idx -1)) ;; which is best to unload
;; try all six, to find the best to unload
(countdown (unload-candidate-idx 6)
(countdown (unload-candidate-idx LEVEL_MAX)
(let ((unload-candidate-lev (-> *level* level unload-candidate-idx)))
(when (and (!= (-> unload-candidate-lev status) 'inactive) ;; in use
(>= (the-as uint (-> unload-candidate-lev load-order)) (the-as uint most-recent-load-order)) ;; newer that best
(>= (the-as uint (-> unload-candidate-lev load-order)) (the-as uint most-recent-load-order)) ;; newer than best
)
;; check if still wanted
(let ((still-wanted #f))
(dotimes (t0-2 6)
(dotimes (t0-2 LEVEL_MAX)
(if (= (-> unload-candidate-lev name) (-> obj want t0-2 name))
(set! still-wanted #t)
)
@ -2475,7 +2472,7 @@ into 7 sections, which might explain the weird sizes in the center.
(let ((no-levels-at-all #f))
;; see if all levels inactive
(countdown (a0-9 6)
(countdown (a0-9 LEVEL_MAX)
(when (!= (-> *level* level a0-9 status) 'inactive)
(set! all-levels-inactive #f)
(goto cfg-23)
@ -2492,15 +2489,15 @@ into 7 sections, which might explain the weird sizes in the center.
)
;; build array of desired levels that we might want to load
(let ((desired-levels (new 'static 'boxed-array :type symbol :length 0 :allocated-length 6)))
(countdown (a0-14 6)
(let ((desired-levels (new 'static 'boxed-array :type symbol :length 0 :allocated-length LEVEL_MAX)))
(countdown (a0-14 LEVEL_MAX)
(set! (-> desired-levels a0-14) #f)
)
(dotimes (want-lev-idx 6) ;; loop over wants
(dotimes (want-lev-idx LEVEL_MAX) ;; loop over wants
(when (-> obj want want-lev-idx name)
(set! (-> desired-levels want-lev-idx) (-> obj want want-lev-idx name))
;; check if this wanted level is already present, in any state.
(dotimes (a1-17 6)
(dotimes (a1-17 LEVEL_MAX)
(let ((a2-13 (-> *level* level a1-17)))
(if (and (!= (-> a2-13 status) 'inactive) (= (-> a2-13 name) (-> obj want want-lev-idx name)))
(set! (-> desired-levels want-lev-idx) #f) ;; it's already there, not candidate for load start
@ -2512,7 +2509,7 @@ into 7 sections, which might explain the weird sizes in the center.
;; find the first level in the possible load array that's not #f (nothing, or already assigned to a level)
(let ((want-lev-idx-to-load -1))
(dotimes (a0-20 6)
(dotimes (a0-20 LEVEL_MAX)
(when (-> desired-levels a0-20)
(set! want-lev-idx-to-load a0-20)
(goto cfg-51)
@ -2546,10 +2543,10 @@ into 7 sections, which might explain the weird sizes in the center.
;; process other changes in want.
;; loop over all wanted levels
(dotimes (want-lev-i 6)
(dotimes (want-lev-i LEVEL_MAX)
(when (-> obj want want-lev-i name)
;; and find the associated level
(dotimes (lev-i 7)
(dotimes (lev-i LEVEL_TOTAL)
(let ((lev (-> *level* level lev-i)))
(when (!= (-> lev status) 'inactive)
(when (= (-> lev name) (-> obj want want-lev-i name))
@ -2653,7 +2650,7 @@ into 7 sections, which might explain the weird sizes in the center.
"Sort the levels by draw priority."
(local-vars (t0-3 symbol))
(set! (-> obj draw-level-count) 0)
(dotimes (v1-0 7)
(dotimes (v1-0 LEVEL_TOTAL)
(let ((f0-0 100000.0)
(a1-1 (the-as level #f))
)
@ -2686,13 +2683,13 @@ into 7 sections, which might explain the weird sizes in the center.
)
)
)
(while (< (-> obj draw-level-count) 7)
(while (< (-> obj draw-level-count) LEVEL_TOTAL)
(set! (-> obj draw-level (-> obj draw-level-count)) #f)
(+! (-> obj draw-level-count) 1)
)
(set! (-> obj draw-level 6) (-> obj default-level))
(set! (-> (&-> obj default-level draw-index) 0) 6)
(dotimes (v1-12 7)
(set! (-> obj draw-level LEVEL_MAX) (-> obj default-level))
(set! (-> (&-> obj default-level draw-index) 0) LEVEL_MAX)
(dotimes (v1-12 LEVEL_TOTAL)
(let ((a2-9 (-> obj level v1-12)))
(if a2-9
(set! (-> obj draw-index-map v1-12) (the-as uint (-> a2-9 draw-index)))
@ -2703,25 +2700,16 @@ into 7 sections, which might explain the weird sizes in the center.
(none)
)
(define *printed-level-update-warning* #f) ;; added
(defmethod level-update level-group ((obj level-group))
"NOT DONE: commented out stuff!"
(when (not *printed-level-update-warning*)
(set! *printed-level-update-warning* #t)
(format 0 "SKIP level-update not fully implemented~%")
(format #t "SKIP level-update not fully implemented~%")
)
(local-vars (v1-101 symbol))
(camera-pos)
(new 'static 'boxed-array :type symbol :length 0 :allocated-length 6)
(new 'static 'boxed-array :type symbol :length 0 :allocated-length LEVEL_MAX)
(update *setting-control*)
(update *gui-control* #t)
(update *art-control* #t)
(clear-rec *art-control*)
(dotimes (s5-0 6)
(dotimes (s5-0 LEVEL_MAX)
(load-continue (-> obj level s5-0))
)
(dotimes (s5-1 (-> obj length))
@ -2819,7 +2807,7 @@ into 7 sections, which might explain the weird sizes in the center.
)
)
)
(countdown (v1-100 6)
(countdown (v1-100 LEVEL_MAX)
(when (-> obj level v1-100 inside-boxes)
(set! v1-101 #f)
(goto cfg-90)
@ -2908,7 +2896,7 @@ into 7 sections, which might explain the weird sizes in the center.
)
)
)
(dotimes (s5-5 7)
(dotimes (s5-5 LEVEL_TOTAL)
(let ((s4-4 (-> obj level s5-5)))
(when (or (= (-> s4-4 status) 'active) (= (-> s4-4 status) 'reserved))
(let ((t9-19 format)
@ -2991,8 +2979,8 @@ into 7 sections, which might explain the weird sizes in the center.
)
;; pc port added
(let ((lev-names (new 'stack-no-clear 'array 'string 6)))
(dotimes (i 6)
(let ((lev-names (new 'stack-no-clear 'array 'string LEVEL_MAX)))
(dotimes (i LEVEL_MAX)
(cond
((= (-> obj level i status) 'inactive)
(set! (-> lev-names i) "none")
@ -3027,7 +3015,7 @@ into 7 sections, which might explain the weird sizes in the center.
(kmemopen global "level")
(let ((gp-0 *level*))
(set! (-> gp-0 loading-level) (-> gp-0 default-level))
(dotimes (s5-0 6)
(dotimes (s5-0 LEVEL_MAX)
(let ((s4-0 (-> gp-0 level s5-0)))
(set! (-> s4-0 art-group) (new 'global 'load-dir-art-group 100 s4-0))
(set! (-> s4-0 vis-bits) (malloc 'global 2048))
@ -3044,7 +3032,7 @@ into 7 sections, which might explain the weird sizes in the center.
)
)
(set! (-> gp-0 default-level art-group) (new 'global 'load-dir-art-group 512 (-> gp-0 default-level)))
(dotimes (v1-31 7)
(dotimes (v1-31 LEVEL_TOTAL)
(let ((a0-53 (-> gp-0 level v1-31)))
(dotimes (a1-48 10)
(set! (-> a0-53 texture-anim-array a1-48) #f)

View File

@ -91,7 +91,7 @@
(when (nonzero? (-> obj region))
(let ((s5-0 add-debug-text-3d)
(s4-0 #t)
(s3-0 318)
(s3-0 (bucket-id debug-no-zbuf1))
)
(format (clear *temp-string*) "region-~D~%" (-> obj region id))
(s5-0 s4-0 (the-as bucket-id s3-0) *temp-string* sv-36 (font-color #dadada) sv-32)
@ -101,7 +101,7 @@
(when s5-1
(let ((s4-1 add-debug-text-3d)
(s3-1 #t)
(s2-1 318)
(s2-1 (bucket-id debug-no-zbuf1))
)
(format (clear *temp-string*) "(on-enter ~S)" s5-1)
(s4-1 s3-1 (the-as bucket-id s2-1) *temp-string* sv-36 (font-color #dadada) sv-32)
@ -113,7 +113,7 @@
(when s5-2
(let ((s4-2 add-debug-text-3d)
(s3-2 #t)
(s2-2 318)
(s2-2 (bucket-id debug-no-zbuf1))
)
(format (clear *temp-string*) "(on-inside ~S)" s5-2)
(s4-2 s3-2 (the-as bucket-id s2-2) *temp-string* sv-36 (font-color #dadada) sv-32)
@ -125,7 +125,7 @@
(when gp-1
(let ((s5-3 add-debug-text-3d)
(s4-3 #t)
(s3-3 318)
(s3-3 (bucket-id debug-no-zbuf1))
)
(format (clear *temp-string*) "(on-exit ~S)" gp-1)
(s5-3 s4-3 (the-as bucket-id s3-3) *temp-string* sv-36 (font-color #dadada) sv-32)

View File

@ -24,7 +24,7 @@
)
(defmethod reset! load-state ((obj load-state))
(dotimes (v1-0 6)
(dotimes (v1-0 (-> *level* length))
(set! (-> obj want v1-0 name) #f)
(set! (-> obj want v1-0 display?) #f)
(set! (-> obj want v1-0 force-vis?) #f)
@ -42,7 +42,7 @@
)
(defmethod want-levels load-state ((obj load-state) (arg0 (pointer symbol)))
(dotimes (v1-0 6)
(dotimes (v1-0 LEVEL_MAX)
(dotimes (a2-0 6)
(when (= (-> obj want v1-0 name) (-> arg0 a2-0))
(set! (-> arg0 a2-0) #f)
@ -54,7 +54,7 @@
)
(dotimes (v1-3 6)
(when (-> arg0 v1-3)
(dotimes (a2-13 6)
(dotimes (a2-13 LEVEL_MAX)
(when (not (-> obj want a2-13 name))
(set! (-> obj want a2-13 name) (-> arg0 v1-3))
(set! (-> obj want a2-13 display?) #f)
@ -97,7 +97,7 @@
)
(defmethod want-display-level load-state ((obj load-state) (arg0 symbol) (arg1 symbol))
(dotimes (v1-0 6)
(dotimes (v1-0 LEVEL_MAX)
(when (= (-> obj want v1-0 name) arg0)
(set! (-> obj want v1-0 display?) arg1)
(add-borrow-levels obj)
@ -122,7 +122,7 @@
)
(defmethod want-force-vis load-state ((obj load-state) (arg0 symbol) (arg1 symbol))
(dotimes (v1-0 6)
(dotimes (v1-0 LEVEL_MAX)
(when (= (-> obj want v1-0 name) arg0)
(set! (-> obj want v1-0 force-vis?) arg1)
(return 0)
@ -134,7 +134,7 @@
;; WARN: Function (method 16 load-state) has a return type of none, but the expression builder found a return statement.
(defmethod want-force-inside load-state ((obj load-state) (arg0 symbol) (arg1 symbol))
(dotimes (v1-0 6)
(dotimes (v1-0 LEVEL_MAX)
(when (= (-> obj want v1-0 name) arg0)
(set! (-> obj want v1-0 force-inside?) arg1)
(return 0)
@ -150,7 +150,7 @@
This will also remove borrow levels that are no longer needed."
;; remove borrow levels
(dotimes (s5-0 6)
(dotimes (s5-0 LEVEL_MAX)
(let ((a0-1 (-> obj want s5-0 name)))
(when a0-1
(let ((a0-2 (lookup-level-info a0-1)))
@ -170,7 +170,7 @@
(let ((symbol-array (new 'stack-no-clear 'array 'symbol 24))
(used-slots 0))
; (set! (-> s5-1 length) 0)
(dotimes (s4-0 6)
(dotimes (s4-0 LEVEL_MAX)
(let ((a0-5 (-> obj want s4-0 name)))
;; add level from the want state
(when a0-5
@ -198,7 +198,7 @@
)
)
;; copy back to actual load-state.
(dotimes (v1-39 6)
(dotimes (v1-39 LEVEL_MAX)
(cond
((< (* v1-39 4) used-slots)
(set! (-> obj want v1-39 name) (-> symbol-array (* v1-39 4)))
@ -228,7 +228,7 @@
(set! (-> obj object-name s4-0) #f)
)
)
(mem-copy! (&-> *backup-load-state* type) (&-> obj type) 2168)
(mem-copy! (&-> *backup-load-state* type) (&-> obj type) (psize-of load-state))
(set! (-> *backup-load-state* command-list) '())
(set! (-> obj command-list) arg0)
0
@ -248,16 +248,16 @@
(set! (-> obj object-name s5-0) #f)
)
)
(let ((s5-1 (new 'stack-no-clear 'inline-array 'level-buffer-state 6)))
(dotimes (s4-0 6)
(let ((s5-1 (new 'stack-no-clear 'inline-array 'level-buffer-state LEVEL_MAX)))
(dotimes (s4-0 LEVEL_MAX)
((method-of-type level-buffer-state new) (the-as symbol (-> s5-1 s4-0)) level-buffer-state)
)
(dotimes (s4-1 6)
(dotimes (s4-1 LEVEL_MAX)
(mem-copy! (the-as pointer (-> s5-1 s4-1)) (the-as pointer (-> *load-state* want s4-1)) 16)
)
(mem-copy! (&-> obj type) (&-> *backup-load-state* type) 2168)
(mem-copy! (&-> obj type) (&-> *backup-load-state* type) (psize-of load-state))
(when (!= (-> pp type) scene-player)
(dotimes (gp-1 6)
(dotimes (gp-1 LEVEL_MAX)
(mem-copy! (the-as pointer (-> *load-state* want gp-1)) (the-as pointer (-> s5-1 gp-1)) 16)
)
)
@ -273,7 +273,7 @@
(set! (-> obj object-name v1-0) #f)
)
)
(mem-copy! (&-> obj type) (&-> *backup-load-state* type) 2168)
(mem-copy! (&-> obj type) (&-> *backup-load-state* type) (psize-of load-state))
0
)

View File

@ -216,7 +216,7 @@
(s2-0 #f)
)
(when s4-0
(let ((s3-1 7))
(let ((s3-1 LEVEL_TOTAL))
(while (begin (label cfg-24) (nonzero? s3-1))
(+! s3-1 -1)
(let ((v1-8 (get-art-group-by-name (-> *level* level s3-1) (-> s4-0 master-art-group-name))))
@ -268,7 +268,7 @@
(s3-1 #f)
)
(when s4-0
(let ((s2-0 7))
(let ((s2-0 LEVEL_TOTAL))
(while (begin (label cfg-13) (nonzero? s2-0))
(+! s2-0 -1)
(let ((v1-8 (get-art-group-by-name (-> *level* level s2-0) (-> s4-0 master-art-group-name))))

View File

@ -278,7 +278,7 @@ Note that this doesn't actually return the nav-control, but instead adds this pr
(add-debug-sphere #t (bucket-id debug2) s4-0 (-> s4-0 r) *color-blue*)
(let ((s3-0 add-debug-text-3d)
(s2-0 #t)
(s1-0 318)
(s1-0 (bucket-id debug-no-zbuf1))
)
(format (clear *temp-string*) "~D" s5-1)
(s3-0 s2-0 (the-as bucket-id s1-0) *temp-string* s4-0 (font-color cyan-#00fefe) (the-as vector2h #f))

View File

@ -394,7 +394,7 @@
)
(let ((s4-1 add-debug-text-3d)
(s3-1 #t)
(s2-1 318)
(s2-1 (bucket-id debug-no-zbuf1))
)
(format (clear *temp-string*) "aid ~D" (-> obj aid))
(s4-1
@ -540,7 +540,7 @@
(add-debug-x #t (bucket-id debug-no-zbuf1) (-> gp-0 1) *color-magenta*)
(let ((s4-1 add-debug-text-3d)
(s3-1 #t)
(s2-1 318)
(s2-1 (bucket-id debug-no-zbuf1))
)
(format (clear *temp-string*) "link ~D" (-> s5-1 id))
(s4-1
@ -1466,7 +1466,7 @@
)
(let ((s4-0 add-debug-text-3d)
(s3-0 #t)
(s2-0 318)
(s2-0 (bucket-id debug-no-zbuf1))
)
(format (clear *temp-string*) "~D" s5-0)
(s4-0
@ -1502,7 +1502,7 @@
(when (logtest? sv-36 32)
(let ((s3-1 add-debug-text-3d)
(s2-1 #t)
(s1-1 318)
(s1-1 (bucket-id debug-no-zbuf1))
)
(format (clear *temp-string*) "~D" (-> s4-1 id))
(s3-1

View File

@ -523,7 +523,7 @@
(dotimes (s0-0 3)
(set! sv-64 add-debug-vector)
(set! sv-80 #t)
(set! sv-96 318)
(set! sv-96 (the-as int (bucket-id debug-no-zbuf1)))
(set! sv-112 s3-0)
(let ((a3-0
(vector-normalize-copy! (new 'stack-no-clear 'vector) (the-as vector (+ (the-as uint s1-0) (* s0-0 16))) 1.0)
@ -636,7 +636,7 @@
(when s5-1
(let ((s4-0 add-debug-text-3d)
(s3-0 #t)
(s2-0 318)
(s2-0 (bucket-id debug-no-zbuf1))
)
(format (clear *temp-string*) "~2j~s error for ~s" arg0 (-> self name))
(s4-0

View File

@ -1260,7 +1260,7 @@
(defun lookup-minimap-texture-by-name ((arg0 string) (arg1 string) (arg2 (pointer texture-page)))
(local-vars (sv-16 texture-page))
(dotimes (s3-0 7)
(dotimes (s3-0 LEVEL_TOTAL)
(let ((s2-0 (-> *level* level s3-0)))
(when (or (= (-> s2-0 status) 'active) (= (-> s2-0 status) 'reserved))
(set! sv-16 (-> s2-0 texture-page 8))

View File

@ -1772,7 +1772,7 @@
(a1-2 arg1)
(a2-2 #f)
(a3-1 44)
(t0-1 320)
(t0-1 (bucket-id progress))
)
(sv-80 a0-4 a1-2 a2-2 a3-1 (the-as bucket-id t0-1))
)
@ -1862,7 +1862,7 @@
(let ((a0-4 (lookup-text! *common-text* s0-0 #f))
(a2-2 #f)
(a3-1 44)
(t0-0 320)
(t0-0 (bucket-id progress))
)
(sv-32 a0-4 sv-48 a2-2 a3-1 (the-as bucket-id t0-0))
)
@ -1959,7 +1959,7 @@
(a1-2 sv-16)
(a2-2 #f)
(a3-1 44)
(t0-1 320)
(t0-1 (bucket-id progress))
)
(sv-48 a0-5 a1-2 a2-2 a3-1 (the-as bucket-id t0-1))
)
@ -2052,7 +2052,7 @@
(let ((a0-4 (lookup-text! *common-text* s0-0 #f))
(a2-2 #f)
(a3-1 44)
(t0-0 320)
(t0-0 (bucket-id progress))
)
(sv-32 a0-4 sv-48 a2-2 a3-1 (the-as bucket-id t0-0))
)
@ -2162,7 +2162,7 @@
(a0-9 (t9-1 a0-8 (the-as game-text-id sv-64) a2-1))
(a2-2 #f)
(a3-1 44)
(t0-0 320)
(t0-0 (bucket-id progress))
)
(sv-48 a0-9 sv-80 a2-2 a3-1 (the-as bucket-id t0-0))
)
@ -3921,7 +3921,7 @@
(a1-12 arg1)
(a2-7 #f)
(a3-2 44)
(t0-3 320)
(t0-3 (bucket-id progress))
)
(sv-112 a0-46 a1-12 a2-7 a3-2 (the-as bucket-id t0-3))
)
@ -4015,7 +4015,7 @@
(a1-16 arg1)
(a2-4 #t)
(a3-3 44)
(t0-3 320)
(t0-3 (bucket-id progress))
)
(+! f28-0 (sv-64 a0-4 a1-16 a2-4 a3-3 (the-as bucket-id t0-3)))
)
@ -4037,7 +4037,7 @@
(a1-19 arg1)
(a2-7 #t)
(a3-4 44)
(t0-4 320)
(t0-4 (bucket-id progress))
(f0-16 (sv-80 a0-8 a1-19 a2-7 a3-4 (the-as bucket-id t0-4)))
)
(* (-> arg0 sliding-height) f0-16)
@ -4057,7 +4057,7 @@
(a1-22 arg1)
(a2-10 #t)
(a3-5 44)
(t0-5 320)
(t0-5 (bucket-id progress))
(f0-18 (sv-128 a0-12 a1-22 a2-10 a3-5 (the-as bucket-id t0-5)))
)
(* (-> arg0 sliding-height) f0-18)
@ -4073,7 +4073,7 @@
(a1-24 arg1)
(a2-12 #t)
(a3-6 44)
(t0-6 320)
(t0-6 (bucket-id progress))
(f26-0 (sv-176 a0-14 a1-24 a2-12 a3-6 (the-as bucket-id t0-6)))
)
(set! (-> arg1 flags) (font-flags kerning large))
@ -4100,7 +4100,7 @@
(a1-28 arg1)
(a2-16 #f)
(a3-7 44)
(t0-7 320)
(t0-7 (bucket-id progress))
)
(+! s0-1 (the int (sv-224 a0-23 a1-28 a2-16 a3-7 (the-as bucket-id t0-7))))
)
@ -7034,7 +7034,7 @@
(a1-3 s5-0)
(a2-3 #f)
(a3-1 44)
(t0-1 320)
(t0-1 (bucket-id progress))
)
(sv-144 a0-15 a1-3 a2-3 a3-1 (the-as bucket-id t0-1))
)
@ -7165,7 +7165,7 @@
(a1-21 s5-0)
(a2-18 #f)
(a3-8 44)
(t0-4 320)
(t0-4 (bucket-id progress))
)
(sv-224 a0-81 a1-21 a2-18 a3-8 (the-as bucket-id t0-4))
)

View File

@ -17,27 +17,24 @@
(defconstant MEM_BAR_HEIGHT 14) ;; total height of the bar
(defconstant MEM_BAR_BOTTOM 416) ;; x coord for the bottom side of the bar list
(defconstant MEM_BAR_NUM 11) ;; amount of memory usage bars (override later if wanted)
(defconstant MEM_BAR_NUM (+ LEVEL_MAX 5)) ;; amount of memory usage bars (override later if wanted)
(defmethod draw-memory pc-settings-jak2 ((obj pc-settings-jak2) (buf dma-buffer))
"draw the memory heap status in the bottom right corner"
(when (-> obj display-heap-status)
(let ((idx 0)
(level-heap-colors (new 'static 'array rgba 6 (static-rgba 32 255 255 64)
(static-rgba 255 32 255 64)
(static-rgba 255 255 32 64)
(static-rgba 32 255 255 64)
(level-heap-colors (new 'static 'array rgba 3 (static-rgba 32 255 255 64)
(static-rgba 255 32 255 64)
(static-rgba 255 255 32 64)
)))
(draw-memory-bar-kheap buf global :idx idx :color (static-rgba 32 32 255 64))
(draw-memory-bar-kheap buf debug :idx (1+! idx) :color (static-rgba 255 32 32 64))
(dotimes (i (-> *level* length))
(dotimes (i LEVEL_MAX)
(draw-memory-bar-kheap buf (-> *level* level i heap)
:name (aif (-> *level* level i borrow-from-level)
(string-format "(~A)l~D<-l~D" (-> *level* level i name) i (-> it index))
(string-format "(~A)l~D" (-> *level* level i name) i))
:idx (1+! idx) :color (-> level-heap-colors i))
:idx (1+! idx) :color (-> level-heap-colors (mod i 3)))
)
(draw-memory-bar-dead-pool-heap buf *nk-dead-pool* :name "actor" :idx (1+! idx) :color (static-rgba 32 255 32 64))
(draw-memory-bar-generic buf

View File

@ -0,0 +1,6 @@
@echo off
cd ..\..
task set-game-jak1
task set-decomp-ntscv2
task extract
pause

View File

@ -0,0 +1,5 @@
@echo off
cd ..\..
task set-game-jak2
task extract
pause

View File

@ -645,41 +645,39 @@
;; definition of type level-group
(deftype level-group (basic)
((length int32 :offset-assert 4)
(log-in-level-bsp bsp-header :offset-assert 8)
(loading-level level :offset-assert 12)
(entity-link entity-links :offset 16)
(border? symbol :offset-assert 20)
(vis? symbol :offset-assert 24)
(want-level basic :offset-assert 28)
(receiving-level basic :offset-assert 32)
(load-commands pair :offset-assert 36)
(play? symbol :offset-assert 40)
(target-pos vector 2 :inline :offset-assert 48)
(camera-pos vector 2 :inline :offset-assert 80)
(heap kheap :inline :offset-assert 112)
(sound-bank basic 4 :offset-assert 128)
(disk-load-timing? symbol :offset-assert 144)
(load-level basic :offset-assert 148)
(load-size uint32 :offset-assert 152)
(load-time float :offset-assert 156)
(load-login-time float :offset-assert 160)
(draw-level-count int32 :offset-assert 164)
(draw-level level 7 :offset-assert 168)
(draw-index-map uint8 7 :offset-assert 196)
(load-order uint64 :offset-assert 208)
(pad uint8 30 :offset-assert 216)
(level level 7 :inline :offset-assert 256)
(level0 level :inline :offset 256)
(level1 level :inline :offset 5488)
(level2 level :inline :offset 10720)
(level3 level :inline :offset 15952)
(level4 level :inline :offset 21184)
(level5 level :inline :offset 26416)
(default-level level :inline :offset 31648)
(unknown-inline-vec-01 (inline-array vector) :offset 32064)
(unknown-inline-vec-02 (inline-array vector) :offset 33712)
(pad2 uint8 4 :offset-assert 36880)
((length int32 :offset-assert 4)
(log-in-level-bsp bsp-header :offset-assert 8)
(loading-level level :offset-assert 12)
(entity-link entity-links :offset 16)
(border? symbol :offset-assert 20)
(vis? symbol :offset-assert 24)
(want-level basic :offset-assert 28)
(receiving-level basic :offset-assert 32)
(load-commands pair :offset-assert 36)
(play? symbol :offset-assert 40)
(target-pos vector 2 :inline :offset-assert 48)
(camera-pos vector 2 :inline :offset-assert 80)
(heap kheap :inline :offset-assert 112)
(sound-bank basic 4 :offset-assert 128)
(disk-load-timing? symbol :offset-assert 144)
(load-level basic :offset-assert 148)
(load-size uint32 :offset-assert 152)
(load-time float :offset-assert 156)
(load-login-time float :offset-assert 160)
(draw-level-count int32 :offset-assert 164)
(draw-level level 7 :offset-assert 168)
(draw-index-map uint8 7 :offset-assert 196)
(load-order uint64 :offset-assert 208)
(pad uint8 30 :offset-assert 216)
(level level 7 :inline :offset-assert 256)
(level0 level :inline :offset 256)
(level1 level :inline :offset 5488)
(level2 level :inline :offset 10720)
(level3 level :inline :offset 15952)
(level4 level :inline :offset 21184)
(level5 level :inline :offset 26416)
(default-level level :inline :offset 31648)
(pad2 uint8 4 :offset-assert 36880)
)
:method-count-assert 31
:size-assert #x9014