OSDN Git Service

fixed wwww now i need to work on map system stuff wwwwwwwwwwwwwww
authorsparky4 <sparky4@cock.li>
Fri, 3 Feb 2017 20:04:26 +0000 (14:04 -0600)
committersparky4 <sparky4@cock.li>
Fri, 3 Feb 2017 20:04:26 +0000 (14:04 -0600)
data/test.map
data/test.tmx
src/lib/16_enti.c
src/lib/scroll16.c
src/lib/scroll16.h
src/zcroll.c

index 04d8732..81ae685 100755 (executable)
@@ -2,7 +2,7 @@
  "height":30,
  "layers":[
         {
-         "data":[1, 2, 3, 4, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 6, 7, 8, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 9, 10, 11, 12, 4, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 13, 14, 15, 16, 0, 1, 1, 1, 5, 8, 1, 11, 11, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 4, 0, 0, 0, 0, 0, 8, 8, 1, 11, 11, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 8, 8, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1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, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 10, 10, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 10, 10],
          "height":30,
          "name":"bg",
          "opacity":1,
@@ -17,6 +17,7 @@
     {
 
     },
+ "renderorder":"right-down",
  "tileheight":16,
  "tilesets":[
         {
index 306c6bc..cb3cd45 100755 (executable)
@@ -1,11 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<map version="1.0" orientation="orthogonal" width="40" height="30" tilewidth="16" tileheight="16" backgroundcolor="#000000">
+<map version="1.0" orientation="orthogonal" renderorder="right-down" width="40" height="30" tilewidth="16" tileheight="16" backgroundcolor="#000000">
  <tileset firstgid="1" name="wwww" tilewidth="16" tileheight="16">
   <image source="ed.png" width="64" height="64"/>
  </tileset>
  <layer name="bg" width="40" height="30">
   <data encoding="csv">
-1,2,3,4,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
+1,2,3,4,0,3,3,3,3,3,3,3,3,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
 5,6,7,8,0,1,0,1,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
 9,10,11,12,4,1,0,1,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
 13,14,15,16,0,1,1,1,5,8,1,11,11,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
index 4768a29..45f5472 100755 (executable)
@@ -33,11 +33,11 @@ void EN_initentity(entity_t *enti, video_t *video)
 \r
        enti->q =               1;//loop var\r
        enti->d =               2;//dir var\r
+       enti->pred =    4;//previous dir\r
        enti->hp =              4;//hit points\r
        enti->speed =   4;//walkspeed\r
        enti->persist_aniframe = enti->q;\r
        enti->spt=(TILEWH/(enti->speed));       //speed per tile wwww\r
-       enti->pred=enti->d;//previous dir\r
        enti->overdraww =       0;\r
        enti->overdrawh =       4;\r
 \r
@@ -73,16 +73,11 @@ void EN_initplayer(player_t *player, word pn, video_t *video)
        player[pn].enti.spri->y = player[0].enti.y-16;\r
        player[pn].walktype=0;\r
        player[pn].enti.dire=30;\r
+       vga_state.vga_draw_stride_limit = vga_state.vga_draw_stride = video->page[0].stridew;\r
 \r
        video->sprifilei =      set_anim_by_id(player[pn].enti.spri, player[pn].enti.dire);\r
        animate_spri(&player[pn].enti, video);\r
 \r
-       //run to fully init sprite\r
-       //modexCopyPageRegion(&video->page[0], &video->page[1], 0, player[pn].enti.y, 0, player[pn].enti.y, video->page[0].width, 40);\r
-       modexCopyPageRegion(&video->page[0], &video->page[1], 0, 0, 0, 0, video->page[0].width, video->page[0].height);\r
-       animate_spri(&player[pn].enti, video);\r
-       //\r
-\r
        //print_anim_ids(player[0].enti.spri);\r
 /*     player[0].info.x = player[0].tx;\r
        player[0].info.xaxis = player[0].tx*TILEWH;\r
index 77d3d4d..948c9f8 100755 (executable)
@@ -305,6 +305,7 @@ void ZC_ShowMV(map_view_t *moo, boolean vsync, boolean sr)
        // do PEL panning here\r
        outp(AC_INDEX, 0x33);\r
        outp(AC_INDEX, (moo[0].page->dx & 0x03) << 1);\r
+       vga_state.vga_draw_stride_limit = vga_state.vga_draw_stride = moo[0].page->stridew;\r
 }\r
 \r
 void\r
@@ -523,26 +524,12 @@ sword chkmap(map_t *map, word q)
 //TODO: player position here\r
 void mapGoTo(map_view_t *mv, int tx, int ty)\r
 {\r
-       int py;//px,\r
-       unsigned int i;\r
-\r
        ZC_mapinitMV(mv, tx, ty);\r
 \r
        /* draw the tiles */\r
        modexClearRegion(mv[0].page, 0, 0, mv[0].page->width, mv[0].page->height, 0);\r
-       py=0;\r
-       i=mv[0].ty * mv[0].map->width + mv[0].tx;\r
-       for(ty=mv[0].ty-1; py < mv[0].page->sh+mv->dyThresh && ty < mv[0].map->height; ty++, py+=mv[0].map->tiles->tileHeight) {\r
-               mapDrawWRow(&mv[0], tx-1, ty, py);\r
-               mapDrawWRow(&mv[1], tx-1, ty, py);\r
-               i+=mv->map->width - tx;\r
-       }\r
-//     py=0;\r
-//     i=mv[1].ty * mv[1].map->width + mv[1].tx;\r
-//     for(ty=mv[1].ty-1; py < mv[1].page->sh+mv->dyThresh && ty < mv[1].map->height; ty++, py+=mv[1].map->tiles->tileHeight) {\r
-//             mapDrawWRow(&mv[1], tx-1, ty, py);\r
-//             i+=mv->map->width - tx;\r
-//     }\r
+       ZC_mapredraw(mv, tx, ty);\r
+\r
        //if(mv[0].video->bgps) modexCopyPageRegion(mv[1].page, mv[0].page, 0, 0, 0, 0, mv[0].page->width, mv[0].page->height);\r
 }\r
 \r
@@ -559,6 +546,20 @@ void ZC_mapinitMV(map_view_t *mv, int tx, int ty)
        mv[0].dyThresh = mv[1].dyThresh = mv[2].dyThresh = mv[3].dyThresh = mv->map->tiles->tileHeight * 2;\r
 }\r
 \r
+void ZC_mapredraw(map_view_t *mv, int tx, int ty)\r
+{\r
+       int py;//px,\r
+       unsigned int i;\r
+\r
+       py=0;\r
+       i=mv[0].ty * mv[0].map->width + mv[0].tx;\r
+       for(ty=mv[0].ty-1; py < mv[0].page->sh+mv->dyThresh && ty < mv[0].map->height; ty++, py+=mv[0].map->tiles->tileHeight) {\r
+               mapDrawWRow(&mv[0], tx-1, ty, py);\r
+               mapDrawWRow(&mv[1], tx-1, ty, py);\r
+               i+=mv->map->width - tx;\r
+       }\r
+}\r
+\r
 void near\r
 mapDrawTile(tiles_t *t, word i, page_t *page, word x, word y)\r
 {\r
@@ -730,7 +731,7 @@ void shinku(global_game_variables_t *gv)
        }\r
 }\r
 \r
-void near ZC_animatePlayer(map_view_t *pip, player_t *player, nibble pn)\r
+void near ZC_animatePlayer(map_view_t *pip, player_t *player, word pn)\r
 {\r
        sword x = player[pn].enti.x;\r
        sword y = player[pn].enti.y;\r
index 97759ac..3d9fe4c 100755 (executable)
@@ -111,6 +111,7 @@ void ZC_playerXYpos(int x, int y, player_t *player, map_view_t *pip, nibble pn,
 sword chkmap(map_t *map, word q);\r
 void mapGoTo(map_view_t *mv, int tx, int ty);\r
 void ZC_mapinitMV(map_view_t *mv, int tx, int ty);\r
+void ZC_mapredraw(map_view_t *mv, int tx, int ty);\r
 void near mapDrawTile(tiles_t *t, word i, page_t *page, word x, word y);\r
 void near mapDrawRow(map_view_t *mv, int tx, int ty, word y, player_t *player, word poopoffset);\r
 void near mapDrawCol(map_view_t *mv, int tx, int ty, word x, player_t *player, word poopoffset);\r
@@ -188,7 +189,7 @@ inline void near ScrollDown(map_view_t *mv, player_t *player, word id, word plid
 //sync\r
 void shinku(global_game_variables_t *gv);\r
 //animate the sprite\r
-void near ZC_animatePlayer(map_view_t *pip, player_t *player, nibble pn);\r
+void near ZC_animatePlayer(map_view_t *pip, player_t *player, word pn);\r
 \r
 // Move an entity around. Should actually be in 16_entity\r
 boolean ZC_walk2(entity_t *ent, map_view_t *map_v);\r
index dc169fe..9b6ba75 100755 (executable)
@@ -129,20 +129,20 @@ void main(int argc, char *argv[])
 \r
        ZC_playerXYpos(0, 0, &player, &mv, 0, 1);\r
        EN_initplayer(&player, 0, &gvar.video);\r
+       //print_anim_ids(player[0].enti.spri);\r
        if (gvar.video.sprifilei == -1)\r
        {\r
 #ifdef FADE\r
                modexFadeOff(4, gpal);\r
 #endif\r
-               Quit(&gvar, "Wrong");\r
+               Quit(&gvar, "Wrong ID for sprite");\r
 #ifdef FADE\r
                modexFadeOn(4, dpal);\r
 #endif\r
        }\r
 \r
 //     while(!IN_KeyDown(sc_Escape) && !IN_KeyDown(sc_Space) && !IN_KeyDown(sc_Enter)){ FUNCTIONKEYSHOWMV }\r
-//     VL_ShowPage(mv[0].page, gvar.kurokku.fpscap, 0);\r
-       ZC_ShowMV(&mv, gvar.kurokku.fpscap, 0);\r
+       shinku(&gvar);\r
 #ifdef FADE\r
        modexFadeOn(4, gpal);\r
 #endif\r