Omnimaga: The Coders Of Tomorrow
Welcome, Guest. Please login or register.
 
Omnimaga: The Coders Of Tomorrow
22 May, 2013, 09:00:17 *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   home   news downloads projects tutorials misc forums rules new posts irc about Login Register  
+-OmnomIRC

You must Register, be logged in and have at least 40 posts to use this shout-box! If it still doesn't show up afterward, it might be that OmnomIRC is disabled for your group or under maintenance.

Note: You can also use an IRC client like mIRC, X-Chat or Mibbit to connect to an EFnet server and #omnimaga.

Pages: 1 ... 57 58 [59] 60 61 ... 110   Go Down
  Print  
Author Topic: Axe Q&A -  (Read 59440 times) Bookmark and Share
0 Members and 1 Guest are viewing this topic.
Builderboy
Physics Guru
LV13 Extreme Addict (Next: 9001)
*************
Offline Offline

Gender: Male
Last Login: Yesterday at 23:45:26
Date Registered: 20 April, 2009, 00:28:53
Location: Ravenholm
Posts: 5642


Total Post Ratings: +589

View Profile
« Reply #870 on: 29 October, 2011, 22:54:09 »
0

You mean a 12x8 grid right?  The answer is X=N^12  Y=N/12  where N is your number in the list.  Also for future reference, what you are describing is a simple tilemap Smiley
Logged

epic7
Chopin!
LV11 Super Veteran (Next: 3000)
***********
Offline Offline

Gender: Male
Last Login: Today at 05:00:47
Date Registered: 22 October, 2011, 01:45:43
Location: Northeast US
Posts: 2169


Total Post Ratings: +119

View Profile
« Reply #871 on: 29 October, 2011, 23:19:09 »
0

That doesn't quite work, as that is storing the pointer into Pic1, not storing the pointer as Pic1.  This will also modify your program if you use a shell like MirageOS.  Probably the best design would be something like this:


1
2
3
4
5
6
[SPRITE DATA 1]->Pic1
[SPRITE DATA 2]
[SPRITE DATA 3]
...

Pt-On(X,Y,G*8+Pic1

Where G=0 is the first sprite, G=1 is the second sprite, and so on

It doesn't work. It just screws up the sprites.

Edit: Wait... What the heck, it works now.
« Last Edit: 29 October, 2011, 23:26:00 by epic7 » Logged



Current Projects:
TitleLanguageProgressStatus
DrillMiner    C (ndless)   35%         Active
?     C (ndless)   0%        Unconfirmed

Spoiler for Programming languages I currently know:
Java (Learning in AP Comp Sci)
C (Specifically Ndless)
Unity JavaScript
LabView (For FIRST robotics)
z80 ASM (Just a little bit Tongue)
Builderboy
Physics Guru
LV13 Extreme Addict (Next: 9001)
*************
Offline Offline

Gender: Male
Last Login: Yesterday at 23:45:26
Date Registered: 20 April, 2009, 00:28:53
Location: Ravenholm
Posts: 5642


Total Post Ratings: +589

View Profile
« Reply #872 on: 29 October, 2011, 23:26:16 »
0

Could you post how you implemented it?  

EDIT: Yay Smiley There might be some other part of your code that is intermittently messing with your graphics it would seem o.O
« Last Edit: 29 October, 2011, 23:27:09 by Builderboy » Logged

epic7
Chopin!
LV11 Super Veteran (Next: 3000)
***********
Offline Offline

Gender: Male
Last Login: Today at 05:00:47
Date Registered: 22 October, 2011, 01:45:43
Location: Northeast US
Posts: 2169


Total Post Ratings: +119

View Profile
« Reply #873 on: 29 October, 2011, 23:49:24 »
0

When it screwed up my sprite the first time, it made it look kinda like a horse Tongue

I tried it and it failed, that was this morning. Then, I changed the code and fixed some unrelated errors. After I posted I  tried to get it to work again... and it worked.


The only thing I think I did differently was instead of
Pic1+G*8
I used
G*8+Pic1
Logged



Current Projects:
TitleLanguageProgressStatus
DrillMiner    C (ndless)   35%         Active
?     C (ndless)   0%        Unconfirmed

Spoiler for Programming languages I currently know:
Java (Learning in AP Comp Sci)
C (Specifically Ndless)
Unity JavaScript
LabView (For FIRST robotics)
z80 ASM (Just a little bit Tongue)
Builderboy
Physics Guru
LV13 Extreme Addict (Next: 9001)
*************
Offline Offline

Gender: Male
Last Login: Yesterday at 23:45:26
Date Registered: 20 April, 2009, 00:28:53
Location: Ravenholm
Posts: 5642


Total Post Ratings: +589

View Profile
« Reply #874 on: 29 October, 2011, 23:51:00 »
0

Oh, that would do it Big smile Those are very very different, because Axe does its math from left to right and IGNORES pemdas!  So the first did (Pic1+G)*8, while the second does ( G*8 )+Pic1
« Last Edit: 29 October, 2011, 23:51:07 by Builderboy » Logged

epic7
Chopin!
LV11 Super Veteran (Next: 3000)
***********
Offline Offline

Gender: Male
Last Login: Today at 05:00:47
Date Registered: 22 October, 2011, 01:45:43
Location: Northeast US
Posts: 2169


Total Post Ratings: +119

View Profile
« Reply #875 on: 29 October, 2011, 23:55:01 »
0

Oh yeah... AXE, Y U NO DO ORDER OF OPS?
« Last Edit: 29 October, 2011, 23:55:34 by epic7 » Logged



Current Projects:
TitleLanguageProgressStatus
DrillMiner    C (ndless)   35%         Active
?     C (ndless)   0%        Unconfirmed

Spoiler for Programming languages I currently know:
Java (Learning in AP Comp Sci)
C (Specifically Ndless)
Unity JavaScript
LabView (For FIRST robotics)
z80 ASM (Just a little bit Tongue)
calc84maniac
Epic z80 roflpwner
Coder Of Tomorrow
LV11 Super Veteran (Next: 3000)
*
Offline Offline

Gender: Male
Last Login: 20 May, 2013, 21:27:24
Date Registered: 28 August, 2008, 05:09:05
Location: Right behind you.
Posts: 2735


Total Post Ratings: +373

View Profile
« Reply #876 on: 30 October, 2011, 00:15:40 »
0

Axe does its math from left to right and IGNORES pemdas!
But Axe is good friends with lambdas Grin
Logged

"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman
Wellen
LV4 Regular (Next: 200)
****
Offline Offline

Gender: Male
Last Login: 02 May, 2012, 11:56:34
Date Registered: 08 August, 2011, 11:00:09
Location: France
Posts: 118


Total Post Ratings: +5

View Profile
« Reply #877 on: 30 October, 2011, 01:11:39 »
0

Appvars.. again Cheesy

I don't know why, but when i compile the following code, and I run the program:
-first time, the appvar doesn't exist => code 1
-second time, the appvar exists => code 2
It's okay, that's what I want it to do.
But after the second time, it doesn't do anything Huh? it just skips this part of the code...


1
2
3
4
5
6
7
8
9
10
11
!If GetCalc("appvTLKC",Y0
GetCalc("appvTLKC",6)->K             // Code 1
sub(MOD                             //
Else
Repeat M=6               //
0->M            //  Code 2 
sub(SA         //
sub(CM        //
End
End

Spoiler for the whole code:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
.TILOCK
DiagnosticOff
ClrHomeClrDraw^^r
Fix 5

sub(Z

!If GetCalc("appvTLKC",Y0
GetCalc("appvTLKC",6)->K
sub(MOD
Else
Repeat M=6
0->M
sub(SA
sub(CM
End
End

.MENU

[0000070F0C0C0C1F->Pic1
[0000C0E0606060F0
[3F3F3F3F3F1F0000
[B8389838F8F00000

ClrDraw^^r

Rect(11,14,74,35
RectI(13,16,70,31
Rect(14,17,68,29
RectI(15,18,66,27
Text(17,19,"Turn off
Text(17,28,"Change my code
Text(17,37,"Quit to homescreen
19->B
16->H
4->K
fnInt(FD,6

RectI(16,B,64,7
Repeat getKey(54)
If getKey(1)+getKey(4)
RectI(16,B,64,7
B<37*getKey(1)-(B>19*getKey(4))*9+B->B
RectI(16,B,64,7
While getKey(0)
Pause 5
End
End
If getKey(54)
If B=19
Text(0,,"1
End
If B=28
Text(0,,"2
End
If B=37
Text(0,,"3
End
End
End
FnOff

Archive "appvTLKC"
LnReg
Fix 4
Return


.SAISIE DU CODE
Lbl SA
Data(0,0,0,0,0,0)->GDB0
For(theta,0,20
ClrDraw
Rect(29,45-theta,37,20
RectI(31,47-theta,33,16
Rect(48-theta,9,38,11
Rect(49-theta,10,38,11
RectI(49-theta,10,36,9
If Z
Text(21-theta,1,"Choose your new code :"
Else
Text(21-theta,1,"Please enter your code:"
End
DispGraph
End


For(theta,0,9
Text(theta>4*~5+theta*7+32->L,theta>4*9+27,theta>Dec
Line(L+4,27,L+4,44
Line(L+5,27,L+5,44
End

Line(31,34,64,34
Line(31,35,64,35
0->C+26->B+4->A
RectI(A,B,7,9

Repeat getKey(15)
If getKey
RectI(A,B,7,9
A<58*getKey(3)-(A>30*getKey(2))*7+A->A
B=26*getKey(1)-(B=35*getKey(4))*9+B->B
RectI(A,B,7,9
If getKey(56)
0->C
DrawInv
Rect(33,11,28,6
DrawInv
End
If getKey(54)
Text(C*5+33,11,B=35*5+(A-30/7)->D>Dec
D->{GDB0+C
C+1->C
End
End
DispGraph
ReturnIf C=6
End
Return



.MODIFICATION
Lbl MOD
1->Z
sub(SA
Copy(GDB0,K,6
sub(Z
sub(H
ClrDraw
Return



.VERIFICATION DU CODE
Lbl CM
For(theta,0,5
(({GDB0+theta})=({Y0+theta}))+M->M
End
sub(H

Data(44,40)->Pic1FP
[00003A00000001E1900000079764000000719A00
[002DFEB500002E688980002207B2800069DE6D80
[00A803C2C00097DC9C40066233F7E006DF07F960
[0F661C96A00D99E32D501E271CDEA02963F36760
[34260C9D503B45F36AA03CB70C95602969FB6D60
[46A90D2A502AD5F2EA40151776AAE014AAD52A40
[0AA12B6BC0A955EAB90084543545405457CF5140
[122852AB00255DB54E000AAE856D00154A440800
[AAB1EBB500152CAA9800202612B600149A4DF000
[0812B540000865382000082A0A80000212A80000
[02A4040000010850000000128000000000000000
Bitmap(28,5,Pic1FP

Text(0,57,"Scanning...
For(theta,4,45
RectI(25,theta,43,5
Text(75,57,theta-3*100/42>Dec,37>Char
DispGraph
RectI(25,theta,43,5
Pause rand^250+50
End

!If M=6
Fix 3
Rect(0,17,96,15
Text(33,18,"WARNING !
Text(23,24,"Access denied
DispGraph
Fix 2
Repeat getKey
End
End
ClrHomeClrDraw
Return


.INITIALISATION DE Z
Lbl Z
0->Z
Return



Lbl H
For(theta,0,95
Horizontal -
DispGraph
End
Return



.FOND MENU
Lbl FD
DS>(K,4)
DS>(H,16)
End
End

For(C,0,4
For(A,0,5
Pt-Off(A*16,C*16-H,Pic1)^^r
Pt-Off(A*16+8,C*16-H,Pic1+8)^^r
Pt-Off(A*16,C*16+8-H,Pic1+16)^^r
Pt-Off(A*16+8,C*16+8-H,Pic1+24)^^r
End
End
DrawInv ^^r
Rect(11,14,74,35)^^r
DrawInv ^^r
DispGraph^^r
Return
« Last Edit: 30 October, 2011, 01:12:07 by Wellen » Logged

-/...././/--./.-/--/.
I'm french, so please feel free to correct my bad english, it'd help me a lot Wink
Spoiler for Feat. Loulou54:
Spoiler for Projects:
Spoiler for Axe:
Ti-Lock : Lock your calc before turning it off               [XXXXXXXX--] 80%
Spoiler for Ti-Basic:
Spoiler for Soko-Ti, a sokoban game in Ti-Basic:

Spoiler for Memory:

Downloads here.
Builderboy
Physics Guru
LV13 Extreme Addict (Next: 9001)
*************
Offline Offline

Gender: Male
Last Login: Yesterday at 23:45:26
Date Registered: 20 April, 2009, 00:28:53
Location: Ravenholm
Posts: 5642


Total Post Ratings: +589

View Profile
« Reply #878 on: 30 October, 2011, 01:14:48 »
0

I think the first line GetCalc(Name,Y1) returns 0 if the file does not exist, OR if the file is in RAM.  This may not be true though, it doesn't specify in the documentation Big frown Try archiving the file and see if it works

EDIT: nevermind, it should return true whether or not it is archived or not.  What version of Axe are you using?
« Last Edit: 30 October, 2011, 01:16:25 by Builderboy » Logged

Wellen
LV4 Regular (Next: 200)
****
Offline Offline

Gender: Male
Last Login: 02 May, 2012, 11:56:34
Date Registered: 08 August, 2011, 11:00:09
Location: France
Posts: 118


Total Post Ratings: +5

View Profile
« Reply #879 on: 30 October, 2011, 01:19:17 »
0

The appvar is archived at the end of the program..

I'm using 0.5.0
Logged

-/...././/--./.-/--/.
I'm french, so please feel free to correct my bad english, it'd help me a lot Wink
Spoiler for Feat. Loulou54:
Spoiler for Projects:
Spoiler for Axe:
Ti-Lock : Lock your calc before turning it off               [XXXXXXXX--] 80%
Spoiler for Ti-Basic:
Spoiler for Soko-Ti, a sokoban game in Ti-Basic:

Spoiler for Memory:

Downloads here.
Builderboy
Physics Guru
LV13 Extreme Addict (Next: 9001)
*************
Offline Offline

Gender: Male
Last Login: Yesterday at 23:45:26
Date Registered: 20 April, 2009, 00:28:53
Location: Ravenholm
Posts: 5642


Total Post Ratings: +589

View Profile
« Reply #880 on: 30 October, 2011, 01:19:56 »
0

Oh really?  Try upgrading to 1.0.5 first, maybe that will help fix some things and then we can go from there
Logged

Wellen
LV4 Regular (Next: 200)
****
Offline Offline

Gender: Male
Last Login: 02 May, 2012, 11:56:34
Date Registered: 08 August, 2011, 11:00:09
Location: France
Posts: 118


Total Post Ratings: +5

View Profile
« Reply #881 on: 30 October, 2011, 01:34:53 »
0

I tried to update to 1.0.5, but it does weird things ^^" I guess that's because 0.5.0 and 1.0.5 are very different, right ?
0.5.3b doesn't change anything compared to 0.5.0
« Last Edit: 30 October, 2011, 01:36:46 by Wellen » Logged

-/...././/--./.-/--/.
I'm french, so please feel free to correct my bad english, it'd help me a lot Wink
Spoiler for Feat. Loulou54:
Spoiler for Projects:
Spoiler for Axe:
Ti-Lock : Lock your calc before turning it off               [XXXXXXXX--] 80%
Spoiler for Ti-Basic:
Spoiler for Soko-Ti, a sokoban game in Ti-Basic:

Spoiler for Memory:

Downloads here.
Builderboy
Physics Guru
LV13 Extreme Addict (Next: 9001)
*************
Offline Offline

Gender: Male
Last Login: Yesterday at 23:45:26
Date Registered: 20 April, 2009, 00:28:53
Location: Ravenholm
Posts: 5642


Total Post Ratings: +589

View Profile
« Reply #882 on: 30 October, 2011, 01:51:09 »
0

The only difference is 1.0.5 has more features, everything should be backwards compatible o.O What kind of 'weird things' happen?
Logged

Wellen
LV4 Regular (Next: 200)
****
Offline Offline

Gender: Male
Last Login: 02 May, 2012, 11:56:34
Date Registered: 08 August, 2011, 11:00:09
Location: France
Posts: 118


Total Post Ratings: +5

View Profile
« Reply #883 on: 30 October, 2011, 10:59:33 »
0

Here are two screenshots :
0.5.0 / 0.5.3


1.0.5 : it seems that the picture that scrolls fast a the beginnig is the menu picture.. So it doesn't even ask for the code, but the appvar is created Huh? And RAM Cleared, wtf Huh?

« Last Edit: 30 October, 2011, 11:00:28 by Wellen » Logged

-/...././/--./.-/--/.
I'm french, so please feel free to correct my bad english, it'd help me a lot Wink
Spoiler for Feat. Loulou54:
Spoiler for Projects:
Spoiler for Axe:
Ti-Lock : Lock your calc before turning it off               [XXXXXXXX--] 80%
Spoiler for Ti-Basic:
Spoiler for Soko-Ti, a sokoban game in Ti-Basic:

Spoiler for Memory:

Downloads here.
Builderboy
Physics Guru
LV13 Extreme Addict (Next: 9001)
*************
Offline Offline

Gender: Male
Last Login: Yesterday at 23:45:26
Date Registered: 20 April, 2009, 00:28:53
Location: Ravenholm
Posts: 5642


Total Post Ratings: +589

View Profile
« Reply #884 on: 30 October, 2011, 12:00:55 »
0

Hmm strange, could you post the source as an 8xp file so I can test in in wabbit myself?  There definitely are some interesting things going on here.
Logged

Pages: 1 ... 57 58 [59] 60 61 ... 110   Go Up
  Print  
 
Jump to:  

Powered by EzPortal
Powered by MySQL Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Powered by PHP
Page created in 0.239 seconds with 31 queries.
Skin by DJ Omnimaga edited from SMF default theme with the help of tr1p1ea.
All programs, games and songs avaliable on this website are property of their respective owners.
Best viewed in Opera, Firefox, Chrome and Safari with a resolution of 1024x768 or above.