projects
/
fishladder.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4a32e35
)
cleaned up world edges
author
hgn
<hgodden00@gmail.com>
Mon, 10 Jan 2022 18:03:42 +0000
(18:03 +0000)
committer
hgn
<hgodden00@gmail.com>
Mon, 10 Jan 2022 18:03:42 +0000
(18:03 +0000)
fishladder.c
patch
|
blob
|
history
fishladder_resources.h
patch
|
blob
|
history
diff --git
a/fishladder.c
b/fishladder.c
index c3f83a716a00ac11a8a59c9d9f68ad4c6170c7b7..a568516123b8ab072e3cbf5ad65fa62691bd96d8 100644
(file)
--- a/
fishladder.c
+++ b/
fishladder.c
@@
-917,7
+917,13
@@
static int map_load( const char *str, const char *name )
{
u8 *px = &info_buffer[((x*64)+y)*4];
{
u8 *px = &info_buffer[((x*64)+y)*4];
- px[0] = 0xFF-0x3F + hash21i( (v2i){x,y}, 0x3F );
+ int dist_x = 16 - VG_MIN( VG_MIN( x, 16 ), 16-VG_MAX( x-16-world.w, 0 ) );
+ int dist_y = 16 - VG_MIN( VG_MIN( y, 16 ), 16-VG_MAX( y-16-world.h, 0 ) );
+ int dist = VG_MAX( dist_x, dist_y ) * 16;
+
+ int value = VG_MAX( 0, 0xFF-0x3F + hash21i( (v2i){x,y}, 0x3F ) - dist );
+
+ px[0] = value;
px[1] = 0;
px[2] = 0;
px[3] = 0;
px[1] = 0;
px[2] = 0;
px[3] = 0;
diff --git
a/fishladder_resources.h
b/fishladder_resources.h
index c6ecc9a806d788a55bacad0784f738a8d5d8a5ed..f0371c1eb78dd368d7e77e9fb2f10804f5144892 100644
(file)
--- a/
fishladder_resources.h
+++ b/
fishladder_resources.h
@@
-899,18
+899,39
@@
static struct cmp_level cmp_levels_grad[] =
.map_name = "cmp_grad",
.description = "",
.map_name = "cmp_grad",
.description = "",
- ._linked = 22
+ ._linked = 22,
+ ._unlock = 23
},
// r2 GM
{
.serial_id = 22,
.title = "SECRET CODE",
.map_name = "cmp_secret",
},
// r2 GM
{
.serial_id = 22,
.title = "SECRET CODE",
.map_name = "cmp_secret",
+ .description = "",
+
+ ._unlock = 23
+ }
+};
+
+static struct cmp_level cmp_levels_computer[] =
+{
+ {
+ .serial_id = 23,
+ .title = "3 BIT BINARY",
+ .map_name = "cmp_binary",
+ .description = "",
+
+ ._unlock = 24
+ },
+ {
+ .serial_id = 24,
+ .title = "3 BIT ADDITION",
+ .map_name = "cmp_add3b",
.description = ""
}
};
.description = ""
}
};
-#define NUM_CAMPAIGN_LEVELS (vg_list_size( cmp_levels_tutorials ) + vg_list_size( cmp_levels_basic ) + vg_list_size( cmp_levels_grad ))
+#define NUM_CAMPAIGN_LEVELS (vg_list_size( cmp_levels_tutorials ) + vg_list_size( cmp_levels_basic ) + vg_list_size( cmp_levels_grad )
+ vg_list_size( cmp_levels_computer )
)
static struct career_level_pack
{
static struct career_level_pack
{
@@
-943,6
+964,13
@@
career_packs[] =
.primary_colour = { 0.553f, 0.345f, 0.204f },
.origin = { -5, 6 },
.dims = { 4, 1 }
.primary_colour = { 0.553f, 0.345f, 0.204f },
.origin = { -5, 6 },
.dims = { 4, 1 }
+ },
+ {
+ .pack = cmp_levels_computer,
+ .count = vg_list_size( cmp_levels_computer ),
+ .primary_colour = { 0.75f, 0.23f, 0.39f },
+ .origin = { -5, 8 },
+ .dims = { 5, 1 }
}
};
}
};