wwww
修訂 | 1ff7522be9df2fd844d372e4a3f510a1bc9a5519 (tree) |
---|---|
時間 | 2016-05-06 08:05:35 |
作者 | sparky4 <sparky4@cock...> |
Commiter | sparky4 |
joncambell321 please help test.exe creates garbage if the 2nd rendering page is written writing beyon the 2nd page sw size breaks the program of all programs wwwwwwwww
@@ -117,8 +117,8 @@ tesuto.exe: tesuto.$(OBJ) $(DOSLIBLIBS) 16_head.$(OBJ) gfx.lib | ||
117 | 117 | tesuto.$(OBJ): $(SRC)tesuto.c |
118 | 118 | wcl $(FLAGS) $(WCLQ) -c $(SRC)tesuto.c |
119 | 119 | |
120 | -test.exe: test.$(OBJ) gfx.lib 16_in.$(OBJ) 16_head.$(OBJ) $(DOSLIBLIBS) | |
121 | - wcl $(FLAGS) test.$(OBJ) gfx.lib 16_in.$(OBJ) 16_head.$(OBJ) $(DOSLIBLIBS) -fm=test.mah | |
120 | +test.exe: test.$(OBJ) gfx.lib 16_in.$(OBJ) 16_head.$(OBJ) $(DOSLIBLIBS) $(16LIB) | |
121 | + wcl $(FLAGS) test.$(OBJ) gfx.lib 16_in.$(OBJ) 16_head.$(OBJ) $(DOSLIBLIBS) $(16LIB) -fm=test.mah | |
122 | 122 | |
123 | 123 | test2.exe: test2.$(OBJ) $(DOSLIBLIBS) gfx.lib |
124 | 124 | wcl $(FLAGS) test2.$(OBJ) $(DOSLIBLIBS) gfx.lib -fm=test2.mah |
@@ -35,7 +35,7 @@ player_t player[MaxPlayers]; | ||
35 | 35 | //page_t screen, gvar.video.page[1], gvar.video.page[2]; |
36 | 36 | map_view_t mv[3]; |
37 | 37 | bitmap_t p; |
38 | -word pn=0; | |
38 | +//word pn=0; //i forgot ww | |
39 | 39 | static planar_buf_t huge *pp; |
40 | 40 | float t; |
41 | 41 | sword bakapee; |
@@ -23,15 +23,18 @@ | ||
23 | 23 | #include <stdio.h> |
24 | 24 | #include "src/lib/modex16.h" |
25 | 25 | #include "src/lib/16_in.h" |
26 | +#include "src/lib/scroll16.h" | |
26 | 27 | |
27 | 28 | global_game_variables_t gvar; |
28 | 29 | player_t player[MaxPlayers]; |
30 | +map_view_t mv[2]; | |
31 | +pan_t pan; | |
29 | 32 | |
30 | 33 | void main(int argc, char *argv[]) |
31 | 34 | { |
32 | 35 | int i, j; |
33 | 36 | word startclk, endclk; |
34 | - word p, k; | |
37 | + word k; | |
35 | 38 | byte *pal, *pal2; |
36 | 39 | sword bakapee; |
37 | 40 |
@@ -79,6 +82,12 @@ void main(int argc, char *argv[]) | ||
79 | 82 | |
80 | 83 | /* set up the page, but with 16 pixels on all borders in offscreen mem */ |
81 | 84 | modexHiganbanaPageSetup(&gvar.video); |
85 | + for(i=0;i<gvar.video.num_of_pages-2;i++) | |
86 | + { | |
87 | + mv[i].page = &gvar.video.page[i]; | |
88 | + mv[i].video = &gvar.video; | |
89 | + mv[i].pan = &pan; | |
90 | + } | |
82 | 91 | // gvar.video.page[0]=modexDefaultPage(&gvar.video.page[0]); |
83 | 92 | // gvar.video.page[1] = modexNextPage(&gvar.video.page[0]); |
84 | 93 | // gvar.video.page[0].width += 32; |
@@ -97,7 +106,7 @@ void main(int argc, char *argv[]) | ||
97 | 106 | /* fade in */ |
98 | 107 | modexFadeOn(1, pal2); |
99 | 108 | |
100 | - i=0,k=0,j=0,p=1; | |
109 | + i=0,k=0,j=0,pan.pn=1; | |
101 | 110 | startclk = *clockw; |
102 | 111 | while(!IN_KeyDown(sc_Escape)) |
103 | 112 | { |
@@ -108,23 +117,23 @@ void main(int argc, char *argv[]) | ||
108 | 117 | case 0: |
109 | 118 | pee: |
110 | 119 | /* go right */ |
111 | - gvar.video.page[p].dx++; | |
120 | + gvar.video.page[pan.pn].dx++; | |
112 | 121 | if(i==5){ if(j>=31){ i++; j=0; goto baka; }else j++; }else |
113 | 122 | if(j>=32){ k++; j=0; }else j++; |
114 | 123 | break; |
115 | 124 | case 1: |
116 | 125 | /* go left */ |
117 | - gvar.video.page[p].dx--; | |
126 | + gvar.video.page[pan.pn].dx--; | |
118 | 127 | if(j>=32){ k++; j=0; }else j++; |
119 | 128 | break; |
120 | 129 | case 2: |
121 | 130 | /* go up */ |
122 | - gvar.video.page[p].dy++; | |
131 | + gvar.video.page[pan.pn].dy++; | |
123 | 132 | if(j>=32){ k++; j=0; }else j++; |
124 | 133 | break; |
125 | 134 | case 3: |
126 | 135 | /* go down */ |
127 | - gvar.video.page[p].dy--; | |
136 | + gvar.video.page[pan.pn].dy--; | |
128 | 137 | if(j>=32){ k=0; j=0; i++; }else j++; |
129 | 138 | break; |
130 | 139 | default: |
@@ -141,11 +150,12 @@ void main(int argc, char *argv[]) | ||
141 | 150 | modexClearRegion(&gvar.video.page[1], 32, 32, gvar.video.page[1].sw-32, gvar.video.page[1].sh-32, 42); |
142 | 151 | modexClearRegion(&gvar.video.page[1], 48, 48, gvar.video.page[1].sw-64, gvar.video.page[1].sh-64, 128); |
143 | 152 | } |
153 | + panpagemanual(mv, player, 0); | |
144 | 154 | } |
145 | - if(IN_KeyDown(2)) p=0; | |
146 | - if(IN_KeyDown(3)) p=1; | |
155 | + if(IN_KeyDown(2)) pan.pn=0; | |
156 | + if(IN_KeyDown(3)) pan.pn=1; | |
147 | 157 | //if(IN_KeyDown(6)) modexClearRegion(&gvar.video.page[1], 0, 0, gvar.video.page[0].sw-64, gvar.video.page[0].sh-16, 45); |
148 | - modexShowPage(&gvar.video.page[p]); | |
158 | + modexShowPage(&gvar.video.page[pan.pn]); | |
149 | 159 | } |
150 | 160 | |
151 | 161 | endclk = *clockw; |